From 88928577cda5f0156f14e6ff3eb01028d52e401e Mon Sep 17 00:00:00 2001 From: Mbaye THIAM Date: Fri, 29 Mar 2024 10:33:26 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20rename=20directives?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/unit-tests.yml | 4 +- package-lock.json | 212 +++++++++--------- package.json | 7 +- .../.gitignore | 0 .../package.json | 2 +- .../scripts/prepare-package-json.js | 0 .../src/index.ts | 0 .../tsconfig-cjs.json | 0 .../tsconfig-esm.json | 0 .../tsconfig.json | 0 .../.gitignore | 0 .../package.json | 2 +- .../scripts/prepare-package-json.js | 0 .../src/index.ts | 0 .../tsconfig-cjs.json | 0 .../tsconfig-esm.json | 0 .../tsconfig.json | 0 .../.gitignore | 0 .../package.json | 2 +- .../scripts/prepare-package-json.js | 0 .../src/index.ts | 0 .../src/main/OperandReader.ts | 0 .../src/main/PropertyWalker.ts | 0 .../src/main/antlr/SPL.g4 | 0 .../src/main/antlr/SPL.interp | 0 .../src/main/antlr/SPL.tokens | 0 .../src/main/antlr/SPLLexer.interp | 0 .../src/main/antlr/SPLLexer.tokens | 0 .../src/main/antlr/SPLLexer.ts | 0 .../src/main/antlr/SPLListener.ts | 0 .../src/main/antlr/SPLParser.ts | 0 .../src/main/antlr/SPLQueryToTreeConverter.ts | 0 .../src/main/antlr/SPLVisitor.ts | 0 .../src/main/functions/Concat.ts | 0 .../src/main/functions/Day.ts | 0 .../src/main/functions/EvaluateDate.ts | 0 .../main/functions/EvaluateFunctionOperand.ts | 0 .../src/main/functions/Intersection.ts | 0 .../src/main/functions/Keys.ts | 0 .../src/main/functions/Len.ts | 0 .../src/main/functions/Month.ts | 0 .../src/main/functions/Now.ts | 0 .../src/main/functions/Reverse.ts | 0 .../src/main/functions/Split.ts | 0 .../src/main/functions/Year.ts | 0 .../src/main/index.ts | 0 .../src/main/limiter/Limit.ts | 0 .../src/main/limiter/SPLLimitExtractor.ts | 0 .../src/main/predicate/SPLPredicateFilter.ts | 0 .../BooleanListBooleansOperations.ts | 0 .../predicate/operations/BooleanOperations.ts | 0 .../predicate/operations/DateOperations.ts | 0 .../predicate/operations/NumberOperations.ts | 0 .../operations/PredicateOperation.ts | 0 .../operations/StringListStringOperations.ts | 0 .../predicate/operations/StringOperations.ts | 0 .../src/main/predicate/operations/index.ts | 0 .../src/main/sorter/SPLComparatorFactory.ts | 0 .../src/main/sorter/SPLListFilterer.ts | 0 .../src/test/SPLListFilter.test.ts | 0 .../src/test/SPLPredicateFilter.test.ts | 0 .../tsconfig-cjs.json | 0 .../tsconfig-esm.json | 0 .../tsconfig.json | 0 .../vite.config.ts | 0 packages/graphql-mesh/.meshrc.ts | 6 +- packages/graphql-mesh/package-lock.json | 84 +++---- packages/graphql-mesh/package.json | 8 +- ...downloadSources.ts => download-sources.ts} | 2 +- 69 files changed, 166 insertions(+), 163 deletions(-) rename packages/{headers-directive => directive-headers}/.gitignore (100%) rename packages/{headers-directive => directive-headers}/package.json (96%) rename packages/{headers-directive => directive-headers}/scripts/prepare-package-json.js (100%) rename packages/{headers-directive => directive-headers}/src/index.ts (100%) rename packages/{headers-directive => directive-headers}/tsconfig-cjs.json (100%) rename packages/{headers-directive => directive-headers}/tsconfig-esm.json (100%) rename packages/{headers-directive => directive-headers}/tsconfig.json (100%) rename packages/{no-auth-directive => directive-no-auth}/.gitignore (100%) rename packages/{no-auth-directive => directive-no-auth}/package.json (96%) rename packages/{no-auth-directive => directive-no-auth}/scripts/prepare-package-json.js (100%) rename packages/{no-auth-directive => directive-no-auth}/src/index.ts (100%) rename packages/{no-auth-directive => directive-no-auth}/tsconfig-cjs.json (100%) rename packages/{no-auth-directive => directive-no-auth}/tsconfig-esm.json (100%) rename packages/{no-auth-directive => directive-no-auth}/tsconfig.json (100%) rename packages/{spl-directive => directive-spl}/.gitignore (100%) rename packages/{spl-directive => directive-spl}/package.json (97%) rename packages/{spl-directive => directive-spl}/scripts/prepare-package-json.js (100%) rename packages/{spl-directive => directive-spl}/src/index.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/OperandReader.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/PropertyWalker.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/antlr/SPL.g4 (100%) rename packages/{spl-directive => directive-spl}/src/main/antlr/SPL.interp (100%) rename packages/{spl-directive => directive-spl}/src/main/antlr/SPL.tokens (100%) rename packages/{spl-directive => directive-spl}/src/main/antlr/SPLLexer.interp (100%) rename packages/{spl-directive => directive-spl}/src/main/antlr/SPLLexer.tokens (100%) rename packages/{spl-directive => directive-spl}/src/main/antlr/SPLLexer.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/antlr/SPLListener.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/antlr/SPLParser.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/antlr/SPLQueryToTreeConverter.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/antlr/SPLVisitor.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/functions/Concat.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/functions/Day.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/functions/EvaluateDate.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/functions/EvaluateFunctionOperand.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/functions/Intersection.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/functions/Keys.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/functions/Len.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/functions/Month.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/functions/Now.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/functions/Reverse.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/functions/Split.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/functions/Year.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/index.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/limiter/Limit.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/limiter/SPLLimitExtractor.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/predicate/SPLPredicateFilter.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/predicate/operations/BooleanListBooleansOperations.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/predicate/operations/BooleanOperations.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/predicate/operations/DateOperations.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/predicate/operations/NumberOperations.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/predicate/operations/PredicateOperation.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/predicate/operations/StringListStringOperations.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/predicate/operations/StringOperations.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/predicate/operations/index.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/sorter/SPLComparatorFactory.ts (100%) rename packages/{spl-directive => directive-spl}/src/main/sorter/SPLListFilterer.ts (100%) rename packages/{spl-directive => directive-spl}/src/test/SPLListFilter.test.ts (100%) rename packages/{spl-directive => directive-spl}/src/test/SPLPredicateFilter.test.ts (100%) rename packages/{spl-directive => directive-spl}/tsconfig-cjs.json (100%) rename packages/{spl-directive => directive-spl}/tsconfig-esm.json (100%) rename packages/{spl-directive => directive-spl}/tsconfig.json (100%) rename packages/{spl-directive => directive-spl}/vite.config.ts (100%) rename packages/graphql-mesh/scripts/{downloadSources.ts => download-sources.ts} (97%) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index ffd543d..2dea47d 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -1,4 +1,4 @@ -name: Run Unit Tests for spl-directive library +name: Run Unit Tests for directive-spl library on: push: @@ -27,4 +27,4 @@ jobs: run: npm install - name: Run tests - run: npm test -w spl-directive + run: npm test -w directive-spl diff --git a/package-lock.json b/package-lock.json index fe0c2ba..7f11417 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1800,6 +1800,18 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/directive-headers": { + "resolved": "packages/directive-headers", + "link": true + }, + "node_modules/directive-no-auth": { + "resolved": "packages/directive-no-auth", + "link": true + }, + "node_modules/directive-spl": { + "resolved": "packages/directive-spl", + "link": true + }, "node_modules/dset": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/dset/-/dset-3.1.3.tgz", @@ -2174,10 +2186,6 @@ "he": "bin/he" } }, - "node_modules/headers-directive": { - "resolved": "packages/headers-directive", - "link": true - }, "node_modules/human-signals": { "version": "5.0.0", "dev": true, @@ -2609,10 +2617,6 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/no-auth-directive": { - "resolved": "packages/no-auth-directive", - "link": true - }, "node_modules/node-int64": { "version": "0.4.0", "license": "MIT" @@ -3141,10 +3145,6 @@ "integrity": "sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==", "dev": true }, - "node_modules/spl-directive": { - "resolved": "packages/spl-directive", - "link": true - }, "node_modules/sprintf-js": { "version": "1.0.3", "dev": true, @@ -3862,6 +3862,58 @@ "commander": "^9.4.1" } }, + "packages/directive-headers": { + "version": "1.0.0", + "devDependencies": { + "@types/node": "^20.11.19", + "tslib": "^2.6.2", + "typescript": "^5.2.2" + }, + "peerDependencies": { + "@graphql-mesh/cache-localforage": "*", + "@graphql-mesh/types": "*", + "@graphql-mesh/utils": "*", + "@graphql-tools/utils": "*", + "graphql": "*" + } + }, + "packages/directive-no-auth": { + "version": "1.0.0", + "devDependencies": { + "@types/node": "^20.11.19", + "tslib": "^2.6.2", + "typescript": "^5.2.2" + }, + "peerDependencies": { + "@graphql-mesh/cache-localforage": "*", + "@graphql-mesh/types": "*", + "@graphql-mesh/utils": "*", + "@graphql-tools/utils": "*", + "graphql": "*" + } + }, + "packages/directive-spl": { + "version": "1.0.0", + "dependencies": { + "antlr4ts": "^0.5.0-alpha.4" + }, + "devDependencies": { + "@types/node": "^20.11.19", + "antlr4ts-cli": "^0.5.0-alpha.4", + "tslib": "^2.6.2", + "typescript": "^5.2.2", + "vite": "^5.1.0", + "vite-plugin-dts": "^3.7.2", + "vitest": "^1.3.0" + }, + "peerDependencies": { + "@graphql-mesh/cache-localforage": "*", + "@graphql-mesh/types": "*", + "@graphql-mesh/utils": "*", + "@graphql-tools/utils": "*", + "graphql": "*" + } + }, "packages/graphql-mesh": { "hasInstallScript": true, "dependencies": { @@ -3876,12 +3928,12 @@ "@graphql-mesh/transform-type-merging": "^0.96.2", "@graphql-tools/schema": "^10.0.2", "@graphql-tools/utils": "^10.0.12", + "directive-headers": "file:./local-pkg/directive-headers-1.0.0.tgz", + "directive-no-auth": "file:./local-pkg/directive-no-auth-1.0.0.tgz", + "directive-spl": "file:./local-pkg/directive-spl-1.0.0.tgz", "glob": "^10.3.10", "graphql": "^16.8.1", - "headers-directive": "file:./local-pkg/headers-directive-1.0.0.tgz", - "no-auth-directive": "file:./local-pkg/no-auth-directive-1.0.0.tgz", "patch-package": "^8.0.0", - "spl-directive": "file:./local-pkg/spl-directive-1.0.0.tgz", "sucrase": "^3.35.0" }, "devDependencies": { @@ -6305,6 +6357,45 @@ "node": ">=8" } }, + "packages/graphql-mesh/node_modules/directive-headers": { + "version": "1.0.0", + "resolved": "file:packages/graphql-mesh/local-pkg/directive-headers-1.0.0.tgz", + "integrity": "sha512-iCxJ5MOi1bbb+2ebFn5n4a3ZDE7CDDMNT4moSksQrAVSxYYTXR6K6Bs1OuFD6O67FnX9IMi6cVmaLFIHmxOvWg==", + "peerDependencies": { + "@graphql-mesh/cache-localforage": "*", + "@graphql-mesh/types": "*", + "@graphql-mesh/utils": "*", + "@graphql-tools/utils": "*", + "graphql": "*" + } + }, + "packages/graphql-mesh/node_modules/directive-no-auth": { + "version": "1.0.0", + "resolved": "file:packages/graphql-mesh/local-pkg/directive-no-auth-1.0.0.tgz", + "integrity": "sha512-H1lWlaIUKu9Ul0M1ZpjDqGrPj6VQsJvlRwCyCsrPVCgKDKB7VW72P9B0l5ZgQUTSGxe6ZKAk351wBmbojKMsgQ==", + "peerDependencies": { + "@graphql-mesh/cache-localforage": "*", + "@graphql-mesh/types": "*", + "@graphql-mesh/utils": "*", + "@graphql-tools/utils": "*", + "graphql": "*" + } + }, + "packages/graphql-mesh/node_modules/directive-spl": { + "version": "1.0.0", + "resolved": "file:packages/graphql-mesh/local-pkg/directive-spl-1.0.0.tgz", + "integrity": "sha512-zGEd/z6eTDazjR43aVHNXiRSNtEYvoR1GG/Vg7VLXQYgGarpxop1gDhm7OW++GO6rfSzObJrVCg7Xy+YHB4acg==", + "dependencies": { + "antlr4ts": "^0.5.0-alpha.4" + }, + "peerDependencies": { + "@graphql-mesh/cache-localforage": "*", + "@graphql-mesh/types": "*", + "@graphql-mesh/utils": "*", + "@graphql-tools/utils": "*", + "graphql": "*" + } + }, "packages/graphql-mesh/node_modules/dot-case": { "version": "3.0.4", "license": "MIT", @@ -6623,18 +6714,6 @@ "tslib": "^2.0.3" } }, - "packages/graphql-mesh/node_modules/headers-directive": { - "version": "1.0.0", - "resolved": "file:packages/graphql-mesh/local-pkg/headers-directive-1.0.0.tgz", - "integrity": "sha512-iCxJ5MOi1bbb+2ebFn5n4a3ZDE7CDDMNT4moSksQrAVSxYYTXR6K6Bs1OuFD6O67FnX9IMi6cVmaLFIHmxOvWg==", - "peerDependencies": { - "@graphql-mesh/cache-localforage": "*", - "@graphql-mesh/types": "*", - "@graphql-mesh/utils": "*", - "@graphql-tools/utils": "*", - "graphql": "*" - } - }, "packages/graphql-mesh/node_modules/hoist-non-react-statics": { "version": "3.3.2", "license": "BSD-3-Clause", @@ -7176,18 +7255,6 @@ "node": ">= 0.6" } }, - "packages/graphql-mesh/node_modules/no-auth-directive": { - "version": "1.0.0", - "resolved": "file:packages/graphql-mesh/local-pkg/no-auth-directive-1.0.0.tgz", - "integrity": "sha512-H1lWlaIUKu9Ul0M1ZpjDqGrPj6VQsJvlRwCyCsrPVCgKDKB7VW72P9B0l5ZgQUTSGxe6ZKAk351wBmbojKMsgQ==", - "peerDependencies": { - "@graphql-mesh/cache-localforage": "*", - "@graphql-mesh/types": "*", - "@graphql-mesh/utils": "*", - "@graphql-tools/utils": "*", - "graphql": "*" - } - }, "packages/graphql-mesh/node_modules/no-case": { "version": "3.0.4", "license": "MIT", @@ -7763,21 +7830,6 @@ "node": ">= 14" } }, - "packages/graphql-mesh/node_modules/spl-directive": { - "version": "1.0.0", - "resolved": "file:packages/graphql-mesh/local-pkg/spl-directive-1.0.0.tgz", - "integrity": "sha512-zGEd/z6eTDazjR43aVHNXiRSNtEYvoR1GG/Vg7VLXQYgGarpxop1gDhm7OW++GO6rfSzObJrVCg7Xy+YHB4acg==", - "dependencies": { - "antlr4ts": "^0.5.0-alpha.4" - }, - "peerDependencies": { - "@graphql-mesh/cache-localforage": "*", - "@graphql-mesh/types": "*", - "@graphql-mesh/utils": "*", - "@graphql-tools/utils": "*", - "graphql": "*" - } - }, "packages/graphql-mesh/node_modules/sponge-case": { "version": "1.0.1", "license": "MIT", @@ -8147,58 +8199,6 @@ "dependencies": { "zen-observable": "0.8.15" } - }, - "packages/headers-directive": { - "version": "1.0.0", - "devDependencies": { - "@types/node": "^20.11.19", - "tslib": "^2.6.2", - "typescript": "^5.2.2" - }, - "peerDependencies": { - "@graphql-mesh/cache-localforage": "*", - "@graphql-mesh/types": "*", - "@graphql-mesh/utils": "*", - "@graphql-tools/utils": "*", - "graphql": "*" - } - }, - "packages/no-auth-directive": { - "version": "1.0.0", - "devDependencies": { - "@types/node": "^20.11.19", - "tslib": "^2.6.2", - "typescript": "^5.2.2" - }, - "peerDependencies": { - "@graphql-mesh/cache-localforage": "*", - "@graphql-mesh/types": "*", - "@graphql-mesh/utils": "*", - "@graphql-tools/utils": "*", - "graphql": "*" - } - }, - "packages/spl-directive": { - "version": "1.0.0", - "dependencies": { - "antlr4ts": "^0.5.0-alpha.4" - }, - "devDependencies": { - "@types/node": "^20.11.19", - "antlr4ts-cli": "^0.5.0-alpha.4", - "tslib": "^2.6.2", - "typescript": "^5.2.2", - "vite": "^5.1.0", - "vite-plugin-dts": "^3.7.2", - "vitest": "^1.3.0" - }, - "peerDependencies": { - "@graphql-mesh/cache-localforage": "*", - "@graphql-mesh/types": "*", - "@graphql-mesh/utils": "*", - "@graphql-tools/utils": "*", - "graphql": "*" - } } } } diff --git a/package.json b/package.json index e6348ff..371f4d5 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,15 @@ { "name": "graphql-mesh", "workspaces": { - "packages": ["packages/*"] + "packages": [ + "packages/*" + ] }, "scripts": { + "clean:modules": "npm exec --workspaces -- npx rimraf node_modules && npx rimraf node_modules", "generate:mesh:lock": "cd packages/graphql-mesh && npm i --package-lock-only --workspaces=false", "postinstall": "npm run postinstall -w graphql-mesh && patch-package && npm run generate:mesh:lock", - "prepare": "concurrently \"npm run pack -w spl-directive\" \"npm run pack -w headers-directive\" \"npm run pack -w no-auth-directive\"", + "prepare": "concurrently \"npm run pack -w directive-spl\" \"npm run pack -w directive-headers\" \"npm run pack -w directive-no-auth\"", "start": "npm start -w graphql-mesh" }, "devDependencies": { diff --git a/packages/headers-directive/.gitignore b/packages/directive-headers/.gitignore similarity index 100% rename from packages/headers-directive/.gitignore rename to packages/directive-headers/.gitignore diff --git a/packages/headers-directive/package.json b/packages/directive-headers/package.json similarity index 96% rename from packages/headers-directive/package.json rename to packages/directive-headers/package.json index af68638..f0398d1 100644 --- a/packages/headers-directive/package.json +++ b/packages/directive-headers/package.json @@ -1,5 +1,5 @@ { - "name": "headers-directive", + "name": "directive-headers", "version": "1.0.0", "type": "module", "main": "_build/cjs/index.js", diff --git a/packages/headers-directive/scripts/prepare-package-json.js b/packages/directive-headers/scripts/prepare-package-json.js similarity index 100% rename from packages/headers-directive/scripts/prepare-package-json.js rename to packages/directive-headers/scripts/prepare-package-json.js diff --git a/packages/headers-directive/src/index.ts b/packages/directive-headers/src/index.ts similarity index 100% rename from packages/headers-directive/src/index.ts rename to packages/directive-headers/src/index.ts diff --git a/packages/headers-directive/tsconfig-cjs.json b/packages/directive-headers/tsconfig-cjs.json similarity index 100% rename from packages/headers-directive/tsconfig-cjs.json rename to packages/directive-headers/tsconfig-cjs.json diff --git a/packages/headers-directive/tsconfig-esm.json b/packages/directive-headers/tsconfig-esm.json similarity index 100% rename from packages/headers-directive/tsconfig-esm.json rename to packages/directive-headers/tsconfig-esm.json diff --git a/packages/headers-directive/tsconfig.json b/packages/directive-headers/tsconfig.json similarity index 100% rename from packages/headers-directive/tsconfig.json rename to packages/directive-headers/tsconfig.json diff --git a/packages/no-auth-directive/.gitignore b/packages/directive-no-auth/.gitignore similarity index 100% rename from packages/no-auth-directive/.gitignore rename to packages/directive-no-auth/.gitignore diff --git a/packages/no-auth-directive/package.json b/packages/directive-no-auth/package.json similarity index 96% rename from packages/no-auth-directive/package.json rename to packages/directive-no-auth/package.json index bd0ad8a..9ce271a 100644 --- a/packages/no-auth-directive/package.json +++ b/packages/directive-no-auth/package.json @@ -1,5 +1,5 @@ { - "name": "no-auth-directive", + "name": "directive-no-auth", "version": "1.0.0", "type": "module", "main": "_build/cjs/index.js", diff --git a/packages/no-auth-directive/scripts/prepare-package-json.js b/packages/directive-no-auth/scripts/prepare-package-json.js similarity index 100% rename from packages/no-auth-directive/scripts/prepare-package-json.js rename to packages/directive-no-auth/scripts/prepare-package-json.js diff --git a/packages/no-auth-directive/src/index.ts b/packages/directive-no-auth/src/index.ts similarity index 100% rename from packages/no-auth-directive/src/index.ts rename to packages/directive-no-auth/src/index.ts diff --git a/packages/no-auth-directive/tsconfig-cjs.json b/packages/directive-no-auth/tsconfig-cjs.json similarity index 100% rename from packages/no-auth-directive/tsconfig-cjs.json rename to packages/directive-no-auth/tsconfig-cjs.json diff --git a/packages/no-auth-directive/tsconfig-esm.json b/packages/directive-no-auth/tsconfig-esm.json similarity index 100% rename from packages/no-auth-directive/tsconfig-esm.json rename to packages/directive-no-auth/tsconfig-esm.json diff --git a/packages/no-auth-directive/tsconfig.json b/packages/directive-no-auth/tsconfig.json similarity index 100% rename from packages/no-auth-directive/tsconfig.json rename to packages/directive-no-auth/tsconfig.json diff --git a/packages/spl-directive/.gitignore b/packages/directive-spl/.gitignore similarity index 100% rename from packages/spl-directive/.gitignore rename to packages/directive-spl/.gitignore diff --git a/packages/spl-directive/package.json b/packages/directive-spl/package.json similarity index 97% rename from packages/spl-directive/package.json rename to packages/directive-spl/package.json index 6d6d8c7..cb7892b 100644 --- a/packages/spl-directive/package.json +++ b/packages/directive-spl/package.json @@ -1,5 +1,5 @@ { - "name": "spl-directive", + "name": "directive-spl", "version": "1.0.0", "type": "module", "main": "_build/cjs/index.js", diff --git a/packages/spl-directive/scripts/prepare-package-json.js b/packages/directive-spl/scripts/prepare-package-json.js similarity index 100% rename from packages/spl-directive/scripts/prepare-package-json.js rename to packages/directive-spl/scripts/prepare-package-json.js diff --git a/packages/spl-directive/src/index.ts b/packages/directive-spl/src/index.ts similarity index 100% rename from packages/spl-directive/src/index.ts rename to packages/directive-spl/src/index.ts diff --git a/packages/spl-directive/src/main/OperandReader.ts b/packages/directive-spl/src/main/OperandReader.ts similarity index 100% rename from packages/spl-directive/src/main/OperandReader.ts rename to packages/directive-spl/src/main/OperandReader.ts diff --git a/packages/spl-directive/src/main/PropertyWalker.ts b/packages/directive-spl/src/main/PropertyWalker.ts similarity index 100% rename from packages/spl-directive/src/main/PropertyWalker.ts rename to packages/directive-spl/src/main/PropertyWalker.ts diff --git a/packages/spl-directive/src/main/antlr/SPL.g4 b/packages/directive-spl/src/main/antlr/SPL.g4 similarity index 100% rename from packages/spl-directive/src/main/antlr/SPL.g4 rename to packages/directive-spl/src/main/antlr/SPL.g4 diff --git a/packages/spl-directive/src/main/antlr/SPL.interp b/packages/directive-spl/src/main/antlr/SPL.interp similarity index 100% rename from packages/spl-directive/src/main/antlr/SPL.interp rename to packages/directive-spl/src/main/antlr/SPL.interp diff --git a/packages/spl-directive/src/main/antlr/SPL.tokens b/packages/directive-spl/src/main/antlr/SPL.tokens similarity index 100% rename from packages/spl-directive/src/main/antlr/SPL.tokens rename to packages/directive-spl/src/main/antlr/SPL.tokens diff --git a/packages/spl-directive/src/main/antlr/SPLLexer.interp b/packages/directive-spl/src/main/antlr/SPLLexer.interp similarity index 100% rename from packages/spl-directive/src/main/antlr/SPLLexer.interp rename to packages/directive-spl/src/main/antlr/SPLLexer.interp diff --git a/packages/spl-directive/src/main/antlr/SPLLexer.tokens b/packages/directive-spl/src/main/antlr/SPLLexer.tokens similarity index 100% rename from packages/spl-directive/src/main/antlr/SPLLexer.tokens rename to packages/directive-spl/src/main/antlr/SPLLexer.tokens diff --git a/packages/spl-directive/src/main/antlr/SPLLexer.ts b/packages/directive-spl/src/main/antlr/SPLLexer.ts similarity index 100% rename from packages/spl-directive/src/main/antlr/SPLLexer.ts rename to packages/directive-spl/src/main/antlr/SPLLexer.ts diff --git a/packages/spl-directive/src/main/antlr/SPLListener.ts b/packages/directive-spl/src/main/antlr/SPLListener.ts similarity index 100% rename from packages/spl-directive/src/main/antlr/SPLListener.ts rename to packages/directive-spl/src/main/antlr/SPLListener.ts diff --git a/packages/spl-directive/src/main/antlr/SPLParser.ts b/packages/directive-spl/src/main/antlr/SPLParser.ts similarity index 100% rename from packages/spl-directive/src/main/antlr/SPLParser.ts rename to packages/directive-spl/src/main/antlr/SPLParser.ts diff --git a/packages/spl-directive/src/main/antlr/SPLQueryToTreeConverter.ts b/packages/directive-spl/src/main/antlr/SPLQueryToTreeConverter.ts similarity index 100% rename from packages/spl-directive/src/main/antlr/SPLQueryToTreeConverter.ts rename to packages/directive-spl/src/main/antlr/SPLQueryToTreeConverter.ts diff --git a/packages/spl-directive/src/main/antlr/SPLVisitor.ts b/packages/directive-spl/src/main/antlr/SPLVisitor.ts similarity index 100% rename from packages/spl-directive/src/main/antlr/SPLVisitor.ts rename to packages/directive-spl/src/main/antlr/SPLVisitor.ts diff --git a/packages/spl-directive/src/main/functions/Concat.ts b/packages/directive-spl/src/main/functions/Concat.ts similarity index 100% rename from packages/spl-directive/src/main/functions/Concat.ts rename to packages/directive-spl/src/main/functions/Concat.ts diff --git a/packages/spl-directive/src/main/functions/Day.ts b/packages/directive-spl/src/main/functions/Day.ts similarity index 100% rename from packages/spl-directive/src/main/functions/Day.ts rename to packages/directive-spl/src/main/functions/Day.ts diff --git a/packages/spl-directive/src/main/functions/EvaluateDate.ts b/packages/directive-spl/src/main/functions/EvaluateDate.ts similarity index 100% rename from packages/spl-directive/src/main/functions/EvaluateDate.ts rename to packages/directive-spl/src/main/functions/EvaluateDate.ts diff --git a/packages/spl-directive/src/main/functions/EvaluateFunctionOperand.ts b/packages/directive-spl/src/main/functions/EvaluateFunctionOperand.ts similarity index 100% rename from packages/spl-directive/src/main/functions/EvaluateFunctionOperand.ts rename to packages/directive-spl/src/main/functions/EvaluateFunctionOperand.ts diff --git a/packages/spl-directive/src/main/functions/Intersection.ts b/packages/directive-spl/src/main/functions/Intersection.ts similarity index 100% rename from packages/spl-directive/src/main/functions/Intersection.ts rename to packages/directive-spl/src/main/functions/Intersection.ts diff --git a/packages/spl-directive/src/main/functions/Keys.ts b/packages/directive-spl/src/main/functions/Keys.ts similarity index 100% rename from packages/spl-directive/src/main/functions/Keys.ts rename to packages/directive-spl/src/main/functions/Keys.ts diff --git a/packages/spl-directive/src/main/functions/Len.ts b/packages/directive-spl/src/main/functions/Len.ts similarity index 100% rename from packages/spl-directive/src/main/functions/Len.ts rename to packages/directive-spl/src/main/functions/Len.ts diff --git a/packages/spl-directive/src/main/functions/Month.ts b/packages/directive-spl/src/main/functions/Month.ts similarity index 100% rename from packages/spl-directive/src/main/functions/Month.ts rename to packages/directive-spl/src/main/functions/Month.ts diff --git a/packages/spl-directive/src/main/functions/Now.ts b/packages/directive-spl/src/main/functions/Now.ts similarity index 100% rename from packages/spl-directive/src/main/functions/Now.ts rename to packages/directive-spl/src/main/functions/Now.ts diff --git a/packages/spl-directive/src/main/functions/Reverse.ts b/packages/directive-spl/src/main/functions/Reverse.ts similarity index 100% rename from packages/spl-directive/src/main/functions/Reverse.ts rename to packages/directive-spl/src/main/functions/Reverse.ts diff --git a/packages/spl-directive/src/main/functions/Split.ts b/packages/directive-spl/src/main/functions/Split.ts similarity index 100% rename from packages/spl-directive/src/main/functions/Split.ts rename to packages/directive-spl/src/main/functions/Split.ts diff --git a/packages/spl-directive/src/main/functions/Year.ts b/packages/directive-spl/src/main/functions/Year.ts similarity index 100% rename from packages/spl-directive/src/main/functions/Year.ts rename to packages/directive-spl/src/main/functions/Year.ts diff --git a/packages/spl-directive/src/main/index.ts b/packages/directive-spl/src/main/index.ts similarity index 100% rename from packages/spl-directive/src/main/index.ts rename to packages/directive-spl/src/main/index.ts diff --git a/packages/spl-directive/src/main/limiter/Limit.ts b/packages/directive-spl/src/main/limiter/Limit.ts similarity index 100% rename from packages/spl-directive/src/main/limiter/Limit.ts rename to packages/directive-spl/src/main/limiter/Limit.ts diff --git a/packages/spl-directive/src/main/limiter/SPLLimitExtractor.ts b/packages/directive-spl/src/main/limiter/SPLLimitExtractor.ts similarity index 100% rename from packages/spl-directive/src/main/limiter/SPLLimitExtractor.ts rename to packages/directive-spl/src/main/limiter/SPLLimitExtractor.ts diff --git a/packages/spl-directive/src/main/predicate/SPLPredicateFilter.ts b/packages/directive-spl/src/main/predicate/SPLPredicateFilter.ts similarity index 100% rename from packages/spl-directive/src/main/predicate/SPLPredicateFilter.ts rename to packages/directive-spl/src/main/predicate/SPLPredicateFilter.ts diff --git a/packages/spl-directive/src/main/predicate/operations/BooleanListBooleansOperations.ts b/packages/directive-spl/src/main/predicate/operations/BooleanListBooleansOperations.ts similarity index 100% rename from packages/spl-directive/src/main/predicate/operations/BooleanListBooleansOperations.ts rename to packages/directive-spl/src/main/predicate/operations/BooleanListBooleansOperations.ts diff --git a/packages/spl-directive/src/main/predicate/operations/BooleanOperations.ts b/packages/directive-spl/src/main/predicate/operations/BooleanOperations.ts similarity index 100% rename from packages/spl-directive/src/main/predicate/operations/BooleanOperations.ts rename to packages/directive-spl/src/main/predicate/operations/BooleanOperations.ts diff --git a/packages/spl-directive/src/main/predicate/operations/DateOperations.ts b/packages/directive-spl/src/main/predicate/operations/DateOperations.ts similarity index 100% rename from packages/spl-directive/src/main/predicate/operations/DateOperations.ts rename to packages/directive-spl/src/main/predicate/operations/DateOperations.ts diff --git a/packages/spl-directive/src/main/predicate/operations/NumberOperations.ts b/packages/directive-spl/src/main/predicate/operations/NumberOperations.ts similarity index 100% rename from packages/spl-directive/src/main/predicate/operations/NumberOperations.ts rename to packages/directive-spl/src/main/predicate/operations/NumberOperations.ts diff --git a/packages/spl-directive/src/main/predicate/operations/PredicateOperation.ts b/packages/directive-spl/src/main/predicate/operations/PredicateOperation.ts similarity index 100% rename from packages/spl-directive/src/main/predicate/operations/PredicateOperation.ts rename to packages/directive-spl/src/main/predicate/operations/PredicateOperation.ts diff --git a/packages/spl-directive/src/main/predicate/operations/StringListStringOperations.ts b/packages/directive-spl/src/main/predicate/operations/StringListStringOperations.ts similarity index 100% rename from packages/spl-directive/src/main/predicate/operations/StringListStringOperations.ts rename to packages/directive-spl/src/main/predicate/operations/StringListStringOperations.ts diff --git a/packages/spl-directive/src/main/predicate/operations/StringOperations.ts b/packages/directive-spl/src/main/predicate/operations/StringOperations.ts similarity index 100% rename from packages/spl-directive/src/main/predicate/operations/StringOperations.ts rename to packages/directive-spl/src/main/predicate/operations/StringOperations.ts diff --git a/packages/spl-directive/src/main/predicate/operations/index.ts b/packages/directive-spl/src/main/predicate/operations/index.ts similarity index 100% rename from packages/spl-directive/src/main/predicate/operations/index.ts rename to packages/directive-spl/src/main/predicate/operations/index.ts diff --git a/packages/spl-directive/src/main/sorter/SPLComparatorFactory.ts b/packages/directive-spl/src/main/sorter/SPLComparatorFactory.ts similarity index 100% rename from packages/spl-directive/src/main/sorter/SPLComparatorFactory.ts rename to packages/directive-spl/src/main/sorter/SPLComparatorFactory.ts diff --git a/packages/spl-directive/src/main/sorter/SPLListFilterer.ts b/packages/directive-spl/src/main/sorter/SPLListFilterer.ts similarity index 100% rename from packages/spl-directive/src/main/sorter/SPLListFilterer.ts rename to packages/directive-spl/src/main/sorter/SPLListFilterer.ts diff --git a/packages/spl-directive/src/test/SPLListFilter.test.ts b/packages/directive-spl/src/test/SPLListFilter.test.ts similarity index 100% rename from packages/spl-directive/src/test/SPLListFilter.test.ts rename to packages/directive-spl/src/test/SPLListFilter.test.ts diff --git a/packages/spl-directive/src/test/SPLPredicateFilter.test.ts b/packages/directive-spl/src/test/SPLPredicateFilter.test.ts similarity index 100% rename from packages/spl-directive/src/test/SPLPredicateFilter.test.ts rename to packages/directive-spl/src/test/SPLPredicateFilter.test.ts diff --git a/packages/spl-directive/tsconfig-cjs.json b/packages/directive-spl/tsconfig-cjs.json similarity index 100% rename from packages/spl-directive/tsconfig-cjs.json rename to packages/directive-spl/tsconfig-cjs.json diff --git a/packages/spl-directive/tsconfig-esm.json b/packages/directive-spl/tsconfig-esm.json similarity index 100% rename from packages/spl-directive/tsconfig-esm.json rename to packages/directive-spl/tsconfig-esm.json diff --git a/packages/spl-directive/tsconfig.json b/packages/directive-spl/tsconfig.json similarity index 100% rename from packages/spl-directive/tsconfig.json rename to packages/directive-spl/tsconfig.json diff --git a/packages/spl-directive/vite.config.ts b/packages/directive-spl/vite.config.ts similarity index 100% rename from packages/spl-directive/vite.config.ts rename to packages/directive-spl/vite.config.ts diff --git a/packages/graphql-mesh/.meshrc.ts b/packages/graphql-mesh/.meshrc.ts index deb02e4..a79ec34 100644 --- a/packages/graphql-mesh/.meshrc.ts +++ b/packages/graphql-mesh/.meshrc.ts @@ -10,9 +10,9 @@ import { const config = { ...defaultConfig, transforms: [ - { 'spl-directive': {} }, - { 'headers-directive': {} }, - { 'no-auth-directive': {} }, + { 'directive-spl': {} }, + { 'directive-headers': {} }, + { 'directive-no-auth': {} }, ...(defaultConfig.transforms || []) ], sources: [...openapiSources, ...othersSources], diff --git a/packages/graphql-mesh/package-lock.json b/packages/graphql-mesh/package-lock.json index 5042da9..7199012 100644 --- a/packages/graphql-mesh/package-lock.json +++ b/packages/graphql-mesh/package-lock.json @@ -17,12 +17,12 @@ "@graphql-mesh/transform-type-merging": "^0.96.2", "@graphql-tools/schema": "^10.0.2", "@graphql-tools/utils": "^10.0.12", + "directive-headers": "file:./local-pkg/directive-headers-1.0.0.tgz", + "directive-no-auth": "file:./local-pkg/directive-no-auth-1.0.0.tgz", + "directive-spl": "file:./local-pkg/directive-spl-1.0.0.tgz", "glob": "^10.3.10", "graphql": "^16.8.1", - "headers-directive": "file:./local-pkg/headers-directive-1.0.0.tgz", - "no-auth-directive": "file:./local-pkg/no-auth-directive-1.0.0.tgz", "patch-package": "^8.0.0", - "spl-directive": "file:./local-pkg/spl-directive-1.0.0.tgz", "sucrase": "^3.35.0" }, "devDependencies": { @@ -3527,6 +3527,45 @@ "node": ">=8" } }, + "node_modules/directive-headers": { + "version": "1.0.0", + "resolved": "file:local-pkg/directive-headers-1.0.0.tgz", + "integrity": "sha512-iCxJ5MOi1bbb+2ebFn5n4a3ZDE7CDDMNT4moSksQrAVSxYYTXR6K6Bs1OuFD6O67FnX9IMi6cVmaLFIHmxOvWg==", + "peerDependencies": { + "@graphql-mesh/cache-localforage": "*", + "@graphql-mesh/types": "*", + "@graphql-mesh/utils": "*", + "@graphql-tools/utils": "*", + "graphql": "*" + } + }, + "node_modules/directive-no-auth": { + "version": "1.0.0", + "resolved": "file:local-pkg/directive-no-auth-1.0.0.tgz", + "integrity": "sha512-H1lWlaIUKu9Ul0M1ZpjDqGrPj6VQsJvlRwCyCsrPVCgKDKB7VW72P9B0l5ZgQUTSGxe6ZKAk351wBmbojKMsgQ==", + "peerDependencies": { + "@graphql-mesh/cache-localforage": "*", + "@graphql-mesh/types": "*", + "@graphql-mesh/utils": "*", + "@graphql-tools/utils": "*", + "graphql": "*" + } + }, + "node_modules/directive-spl": { + "version": "1.0.0", + "resolved": "file:local-pkg/directive-spl-1.0.0.tgz", + "integrity": "sha512-zGEd/z6eTDazjR43aVHNXiRSNtEYvoR1GG/Vg7VLXQYgGarpxop1gDhm7OW++GO6rfSzObJrVCg7Xy+YHB4acg==", + "dependencies": { + "antlr4ts": "^0.5.0-alpha.4" + }, + "peerDependencies": { + "@graphql-mesh/cache-localforage": "*", + "@graphql-mesh/types": "*", + "@graphql-mesh/utils": "*", + "@graphql-tools/utils": "*", + "graphql": "*" + } + }, "node_modules/dot-case": { "version": "3.0.4", "license": "MIT", @@ -4138,18 +4177,6 @@ "tslib": "^2.0.3" } }, - "node_modules/headers-directive": { - "version": "1.0.0", - "resolved": "file:local-pkg/headers-directive-1.0.0.tgz", - "integrity": "sha512-iCxJ5MOi1bbb+2ebFn5n4a3ZDE7CDDMNT4moSksQrAVSxYYTXR6K6Bs1OuFD6O67FnX9IMi6cVmaLFIHmxOvWg==", - "peerDependencies": { - "@graphql-mesh/cache-localforage": "*", - "@graphql-mesh/types": "*", - "@graphql-mesh/utils": "*", - "@graphql-tools/utils": "*", - "graphql": "*" - } - }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", "license": "BSD-3-Clause", @@ -4985,18 +5012,6 @@ "node": ">= 0.6" } }, - "node_modules/no-auth-directive": { - "version": "1.0.0", - "resolved": "file:local-pkg/no-auth-directive-1.0.0.tgz", - "integrity": "sha512-H1lWlaIUKu9Ul0M1ZpjDqGrPj6VQsJvlRwCyCsrPVCgKDKB7VW72P9B0l5ZgQUTSGxe6ZKAk351wBmbojKMsgQ==", - "peerDependencies": { - "@graphql-mesh/cache-localforage": "*", - "@graphql-mesh/types": "*", - "@graphql-mesh/utils": "*", - "@graphql-tools/utils": "*", - "graphql": "*" - } - }, "node_modules/no-case": { "version": "3.0.4", "license": "MIT", @@ -6032,21 +6047,6 @@ "node": ">= 14" } }, - "node_modules/spl-directive": { - "version": "1.0.0", - "resolved": "file:local-pkg/spl-directive-1.0.0.tgz", - "integrity": "sha512-zGEd/z6eTDazjR43aVHNXiRSNtEYvoR1GG/Vg7VLXQYgGarpxop1gDhm7OW++GO6rfSzObJrVCg7Xy+YHB4acg==", - "dependencies": { - "antlr4ts": "^0.5.0-alpha.4" - }, - "peerDependencies": { - "@graphql-mesh/cache-localforage": "*", - "@graphql-mesh/types": "*", - "@graphql-mesh/utils": "*", - "@graphql-tools/utils": "*", - "graphql": "*" - } - }, "node_modules/sponge-case": { "version": "1.0.1", "license": "MIT", diff --git a/packages/graphql-mesh/package.json b/packages/graphql-mesh/package.json index 3440a06..969e681 100644 --- a/packages/graphql-mesh/package.json +++ b/packages/graphql-mesh/package.json @@ -1,7 +1,7 @@ { "scripts": { "build": "npm run downloadswaggers && mesh build", - "downloadswaggers": "NODE_TLS_REJECT_UNAUTHORIZED='0' sucrase-node ./scripts/downloadSources.ts", + "downloadswaggers": "NODE_TLS_REJECT_UNAUTHORIZED='0' sucrase-node ./scripts/download-sources.ts", "postinstall": "patch-package", "serve": "npm run build && sucrase-node serve.ts", "start": "npm run downloadswaggers && mesh dev" @@ -20,10 +20,10 @@ "@graphql-tools/utils": "^10.0.12", "glob": "^10.3.10", "graphql": "^16.8.1", - "headers-directive": "file:./local-pkg/headers-directive-1.0.0.tgz", - "no-auth-directive": "file:./local-pkg/no-auth-directive-1.0.0.tgz", + "directive-headers": "file:./local-pkg/directive-headers-1.0.0.tgz", + "directive-no-auth": "file:./local-pkg/directive-no-auth-1.0.0.tgz", "patch-package": "^8.0.0", - "spl-directive": "file:./local-pkg/spl-directive-1.0.0.tgz", + "directive-spl": "file:./local-pkg/directive-spl-1.0.0.tgz", "sucrase": "^3.35.0" }, "devDependencies": { diff --git a/packages/graphql-mesh/scripts/downloadSources.ts b/packages/graphql-mesh/scripts/download-sources.ts similarity index 97% rename from packages/graphql-mesh/scripts/downloadSources.ts rename to packages/graphql-mesh/scripts/download-sources.ts index 7236fd8..6896c04 100644 --- a/packages/graphql-mesh/scripts/downloadSources.ts +++ b/packages/graphql-mesh/scripts/download-sources.ts @@ -1,5 +1,5 @@ import { readFileOrUrl, DefaultLogger } from '@graphql-mesh/utils' -import { getConfig } from '../helpers' +import { getConfig } from '../helpers/config' import { writeFileSync, existsSync, mkdirSync } from 'node:fs' import { fetch } from '@whatwg-node/fetch' const logger = new DefaultLogger()