From 88a000e7c1ddd2dc99564345c41592ae6a2cb387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Sun, 7 Jul 2024 20:09:33 +0200 Subject: [PATCH] V1.0.0 (#36) * release 1.0.0 * release 1.0.0 --- .gitignore | 3 ++- package-lock.json | 14 +++++++------- package.json | 4 ++-- src/cli/curl-route-builder.ts | 2 +- src/cli/har-route-builder.ts | 2 +- src/cli/make.ts | 2 +- src/cli/open-api-route-builder.ts | 2 +- src/locales/de.ts | 10 ---------- src/locales/en.ts | 13 ------------- src/locales/es.ts | 9 --------- src/locales/files.ts | 6 ------ src/locales/language-key.ts | 3 --- src/locales/languages.ts | 7 ------- 13 files changed, 15 insertions(+), 62 deletions(-) delete mode 100644 src/locales/de.ts delete mode 100644 src/locales/en.ts delete mode 100644 src/locales/es.ts delete mode 100644 src/locales/files.ts delete mode 100644 src/locales/language-key.ts delete mode 100644 src/locales/languages.ts diff --git a/.gitignore b/.gitignore index 5c725d4..9b82ac5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /node_modules /.idea -/src/**/*.js \ No newline at end of file +/src/**/*.js +/src/locales/* \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index a4befc0..7acde69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@idrinth-api-bench/cli", - "version": "2.7.4", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@idrinth-api-bench/cli", - "version": "2.7.4", + "version": "1.0.0", "license": "MIT", "dependencies": { "change-case": "^5.4.3", @@ -25,7 +25,7 @@ "make-benchmark-project": "bin/make-benchmark-project.js" }, "devDependencies": { - "@idrinth/typescript-language-from-yaml": "^1.3.0", + "@idrinth-api-bench/typescript-language-from-yaml": "^1.4.0", "@types/chai": "^4.3.14", "@types/cli-progress": "^3.11.5", "@types/fs-extra": "^11.0.4", @@ -198,10 +198,10 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@idrinth/typescript-language-from-yaml": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@idrinth/typescript-language-from-yaml/-/typescript-language-from-yaml-1.3.0.tgz", - "integrity": "sha512-jnRIZCQzijq81HaSEBq6ye9uvrxB86jb8Sxy/OY5/Vbf3CW5lr77GIhp/JkEevY9qOYIq98DzFaE6ZMZcm4+4g==", + "node_modules/@idrinth-api-bench/typescript-language-from-yaml": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@idrinth-api-bench/typescript-language-from-yaml/-/typescript-language-from-yaml-1.4.0.tgz", + "integrity": "sha512-n/ylrZ3fZ3aDVkkQIFLM1grddz6GlrEU5zyhAOadn/CkNmwqVIOcaHHNzWXT0ELzAS9/+YEBFGVKozC42XrEJQ==", "dev": true, "dependencies": { "yaml": "^2.4.1" diff --git a/package.json b/package.json index 41efceb..3cbc44e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@idrinth-api-bench/cli", "description": "A library to benchmark apis, no matter if rest or soap", "license": "MIT", - "version": "2.7.4", + "version": "1.0.0", "type": "module", "homepage": "https://idrinth-api-ben.ch", "bugs": { @@ -55,7 +55,7 @@ "mock-fs": "^5.2.0", "ts-node": "^10.9.1", "typescript": "^5.5.2", - "@idrinth/typescript-language-from-yaml": "^1.3.0", + "@idrinth-api-bench/typescript-language-from-yaml": "^1.4.0", "spellchecker-cli": "^6.2.0", "knip": "^5.23.3" }, diff --git a/src/cli/curl-route-builder.ts b/src/cli/curl-route-builder.ts index a552093..7f0f452 100644 --- a/src/cli/curl-route-builder.ts +++ b/src/cli/curl-route-builder.ts @@ -39,7 +39,7 @@ const write = ( stream.write( `import { Task, -} from '@idrinth/api-bench'; +} from '@idrinth-api-bench/framework'; export default (): Task => ({ id: '${ name }', diff --git a/src/cli/har-route-builder.ts b/src/cli/har-route-builder.ts index 25c8eb8..a6528e7 100644 --- a/src/cli/har-route-builder.ts +++ b/src/cli/har-route-builder.ts @@ -25,7 +25,7 @@ const write = ( stream.write( `import { Task, -} from '@idrinth/api-bench'; +} from '@idrinth-api-bench/framework'; export default (): Task => ({ id: '${ name }', diff --git a/src/cli/make.ts b/src/cli/make.ts index e7f7600..88f5fd4 100644 --- a/src/cli/make.ts +++ b/src/cli/make.ts @@ -70,7 +70,7 @@ export default (args: string[], cwd: string,) => { private: true, type: 'module', dependencies: { - '@idrinth/api-bench': '^' + pkg.version, + '@idrinth-api-bench/framework': '^' + pkg.version, }, devDependencies: { typescript: '^5.3.3', diff --git a/src/cli/open-api-route-builder.ts b/src/cli/open-api-route-builder.ts index b9190cd..afa8777 100644 --- a/src/cli/open-api-route-builder.ts +++ b/src/cli/open-api-route-builder.ts @@ -29,7 +29,7 @@ const write = ( stream.write( `import { Task, -} from '@idrinth/api-bench'; +} from '@idrinth-api-bench/framework'; export default (/*String*/apiBaseUrl: string): Task => ({ id: '${ name.replace(/[^a-z0-9_\-/ ]+/iug, '',) }', diff --git a/src/locales/de.ts b/src/locales/de.ts deleted file mode 100644 index 8fce162..0000000 --- a/src/locales/de.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* eslint max-len:0 */ -const lang = { - openapi_invalid: 'Das Open-Api-Dokument ist ungültig, bitte auf Fehler überprüfen!', - no_openapi_document_given: 'Es wurde kein Pfad zu einem Open-Api-Dokument angegeben.', - name_invalid: 'Ungültiger Projektname.', - already_created: 'Projektordner existiert bereits.', - no_har_document_given: 'Der angegebene Pfad zeigt auf kein HAR-Dokument.', -}; - -export default lang; diff --git a/src/locales/en.ts b/src/locales/en.ts deleted file mode 100644 index ac97946..0000000 --- a/src/locales/en.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* eslint max-len:0 */ -const lang = { - openapi_invalid: 'Your OpenApi document is not valid, please check for errors!', - no_openapi_document_given: 'You need to provide an OpenApi document path.', - no_har_document_given: 'The path didn\'t point to an HAR document.', - cant_determine_valid_type: 'Failed to find a supported file type.', - invalid_request_property: 'The request property %2% of task %1% is invalid.', - invalid_request: 'The request task %1% has unknown properties.', - name_invalid: 'Invalid project name.', - already_created: 'Project folder already exists.', -}; - -export default lang; diff --git a/src/locales/es.ts b/src/locales/es.ts deleted file mode 100644 index 508606b..0000000 --- a/src/locales/es.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint max-len:0 */ -const lang = { - openapi_invalid: 'Su documento Open-Api no es válido, verifique si hay errores!', - no_openapi_document_given: 'Debes proporcionar una ruta de documento Open-Api.', - name_invalid: 'Nombre de proyecto inválido.', - already_created: 'Directo de proyecto ya existe.', -}; - -export default lang; diff --git a/src/locales/files.ts b/src/locales/files.ts deleted file mode 100644 index 041dcd0..0000000 --- a/src/locales/files.ts +++ /dev/null @@ -1,6 +0,0 @@ -const files = [ - 'de', - 'en', - 'es', -]; -export default files; diff --git a/src/locales/language-key.ts b/src/locales/language-key.ts deleted file mode 100644 index 12e0a8b..0000000 --- a/src/locales/language-key.ts +++ /dev/null @@ -1,3 +0,0 @@ -/* eslint max-len:0 */ -type languageKey = 'openapi_invalid'|'no_openapi_document_given'|'no_har_document_given'|'cant_determine_valid_type'|'invalid_request_property'|'invalid_request'|'name_invalid'|'already_created'; -export default languageKey; diff --git a/src/locales/languages.ts b/src/locales/languages.ts deleted file mode 100644 index 3462b48..0000000 --- a/src/locales/languages.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* eslint max-len:0 */ -const languages = [ - 'de', - 'en', - 'es', -]; -export default languages;