From 9b0429425cbbdf8f73a103d86370d92ea432f33b Mon Sep 17 00:00:00 2001 From: Shardul Vaidya Date: Tue, 30 Jan 2024 12:45:35 -0500 Subject: [PATCH] Updated the used types to ensure seamless compilation, refer to: https://github.com/microsoft/TypeScript/issues/52593#issuecomment-1419505081 for reasoning --- package.json | 15 ++------- src/types/{issue.d.ts => issue.ts} | 0 src/types/{service.d.ts => service.ts} | 0 src/types/{validate.d.ts => validate.ts} | 0 test/commands/validate.test.ts | 41 ------------------------ 5 files changed, 2 insertions(+), 54 deletions(-) rename src/types/{issue.d.ts => issue.ts} (100%) rename src/types/{service.d.ts => service.ts} (100%) rename src/types/{validate.d.ts => validate.ts} (100%) delete mode 100644 test/commands/validate.test.ts diff --git a/package.json b/package.json index 37a9b50..9bcce3a 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "/dist", "/oclif.manifest.json" ], - "homepage": "https://github.com/elaramas/aws-sleek-transformer", + "homepage": "https://github.com/aws-samples/addons-transformer-for-amazon-eks", "main": "", "license": "MIT", "name": "aws-sleek-transformer", @@ -53,22 +53,11 @@ "topicSeparator": " ", "macos": { "identifier": "com.aws.sleek.cli" - }, - "topics": { - "configure": { - "description": "Sets up the Sleek CLI to work with a given helm chart" - }, - "validate": { - "description": "Validates the addons you want to validate" - }, - "submit": { - "description": "Submits the addons to the marketplace team to place in the EKS console marketplace" - } } }, "repository": "aws-samples/addons-transformer-for-amazon-eks", "scripts": { - "build": "shx rm -rf dist && tsc -b", + "build": "shx rm -rf dist && tsc -b && rsync -a -m --include='**/*.d.ts' --include='*/' --exclude='*' src/ dist/", "lint": "eslint . --ext .ts", "postpack": "shx rm -f oclif.manifest.json", "posttest": "npm run lint", diff --git a/src/types/issue.d.ts b/src/types/issue.ts similarity index 100% rename from src/types/issue.d.ts rename to src/types/issue.ts diff --git a/src/types/service.d.ts b/src/types/service.ts similarity index 100% rename from src/types/service.d.ts rename to src/types/service.ts diff --git a/src/types/validate.d.ts b/src/types/validate.ts similarity index 100% rename from src/types/validate.d.ts rename to src/types/validate.ts diff --git a/test/commands/validate.test.ts b/test/commands/validate.test.ts deleted file mode 100644 index 6613f8e..0000000 --- a/test/commands/validate.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import {CLIError} from "@oclif/core/lib/errors"; -import {expect, test} from '@oclif/test'; -describe('validate', () => { - - describe('validate --file validate.not_valid.yaml', () => { - test - .stderr() - .stdout() - .command(['validate', - '--file', // avoid creation of the actual issue con GitHub - './test/commands/resources/validate.not-valid.yaml', - ]) - .catch(error => { - expect(error.message) - expect(error.message).to.contain('Schema validation errors') - expect(error.message).to.contain('must have required property \'sellerName\'') - expect(error.message).to.contain('must have required property \'sellerMarketPlaceAlias\'') - expect(error.message).to.not.contain('must have required property \'accountId\'') - if (error instanceof CLIError) - expect(error.oclif.exit).to.eq(1) - }) - .it('Didn\'t try to create the issue due to validation errors',error=>{ - console.log(JSON.stringify(error)) - // expect(ctx.stdout).to.contain('must have required property') - }) - }); - - describe('validate --file validate.valid.yaml', () => { - test - .stdout() - .command(['validate', - '--file', // avoid creation of the actual issue con GitHub - './test/commands/resources/validate.valid.yaml', - ] - ).it('create-issue with valid input', ctx => { - expect(ctx.stdout).to.eq('File to process: ./test/commands/resources/create-issue-input.valid.yaml (dry run)\n' + - 'Schema validation correct\n' - ) - }) - }) -})