@veecode-platform/backstage-plugin-kong-service-manager-backend-dynamic 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +179 -0
- package/dist/.config-schema.json +1 -0
- package/dist/configSchema.json +1 -0
- package/dist/index.cjs.js +13 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +44 -0
- package/dist/plugin.cjs.js +36 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/router.cjs.js +313 -0
- package/dist/router.cjs.js.map +1 -0
- package/dist/services/KongServiceManagerService.cjs.js +241 -0
- package/dist/services/KongServiceManagerService.cjs.js.map +1 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/README.md +61 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/annotations.cjs.js +13 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/annotations.cjs.js.map +1 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/annotations.esm.js +9 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/annotations.esm.js.map +1 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/index.cjs.js +26 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/index.cjs.js.map +1 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/index.d.ts +228 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/index.esm.js +4 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/index.esm.js.map +1 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/permissions.cjs.js +81 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/permissions.cjs.js.map +1 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/permissions.esm.js +67 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/permissions.esm.js.map +1 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/types.cjs.js +16 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/types.cjs.js.map +1 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/types.esm.js +14 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/types.esm.js.map +1 -0
- package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/package.json +48 -0
- package/node_modules/accepts/HISTORY.md +243 -0
- package/node_modules/accepts/LICENSE +23 -0
- package/node_modules/accepts/README.md +140 -0
- package/node_modules/accepts/index.js +238 -0
- package/node_modules/accepts/package.json +47 -0
- package/node_modules/array-flatten/LICENSE +21 -0
- package/node_modules/array-flatten/README.md +43 -0
- package/node_modules/array-flatten/array-flatten.js +64 -0
- package/node_modules/array-flatten/package.json +39 -0
- package/node_modules/async-function/.eslintrc +16 -0
- package/node_modules/async-function/.github/FUNDING.yml +12 -0
- package/node_modules/async-function/.nycrc +9 -0
- package/node_modules/async-function/CHANGELOG.md +16 -0
- package/node_modules/async-function/LICENSE +21 -0
- package/node_modules/async-function/README.md +51 -0
- package/node_modules/async-function/index.d.mts +3 -0
- package/node_modules/async-function/index.d.ts +13 -0
- package/node_modules/async-function/index.js +8 -0
- package/node_modules/async-function/index.mjs +4 -0
- package/node_modules/async-function/legacy.js +18 -0
- package/node_modules/async-function/package.json +86 -0
- package/node_modules/async-function/require.mjs +5 -0
- package/node_modules/async-function/test/index.js +40 -0
- package/node_modules/async-function/tsconfig.json +9 -0
- package/node_modules/async-generator-function/.eslintrc +26 -0
- package/node_modules/async-generator-function/.github/FUNDING.yml +12 -0
- package/node_modules/async-generator-function/.nycrc +9 -0
- package/node_modules/async-generator-function/CHANGELOG.md +15 -0
- package/node_modules/async-generator-function/LICENSE +21 -0
- package/node_modules/async-generator-function/README.md +52 -0
- package/node_modules/async-generator-function/index.d.mts +3 -0
- package/node_modules/async-generator-function/index.d.ts +22 -0
- package/node_modules/async-generator-function/index.js +8 -0
- package/node_modules/async-generator-function/index.mjs +4 -0
- package/node_modules/async-generator-function/legacy.js +18 -0
- package/node_modules/async-generator-function/package.json +87 -0
- package/node_modules/async-generator-function/require.mjs +5 -0
- package/node_modules/async-generator-function/test/index.js +40 -0
- package/node_modules/async-generator-function/tsconfig.json +9 -0
- package/node_modules/body-parser/HISTORY.md +672 -0
- package/node_modules/body-parser/LICENSE +23 -0
- package/node_modules/body-parser/README.md +476 -0
- package/node_modules/body-parser/SECURITY.md +25 -0
- package/node_modules/body-parser/index.js +156 -0
- package/node_modules/body-parser/lib/read.js +205 -0
- package/node_modules/body-parser/lib/types/json.js +247 -0
- package/node_modules/body-parser/lib/types/raw.js +101 -0
- package/node_modules/body-parser/lib/types/text.js +121 -0
- package/node_modules/body-parser/lib/types/urlencoded.js +307 -0
- package/node_modules/body-parser/package.json +56 -0
- package/node_modules/bytes/History.md +97 -0
- package/node_modules/bytes/LICENSE +23 -0
- package/node_modules/bytes/Readme.md +152 -0
- package/node_modules/bytes/index.js +170 -0
- package/node_modules/bytes/package.json +42 -0
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/call-bound/.eslintrc +13 -0
- package/node_modules/call-bound/.github/FUNDING.yml +12 -0
- package/node_modules/call-bound/.nycrc +9 -0
- package/node_modules/call-bound/CHANGELOG.md +42 -0
- package/node_modules/call-bound/LICENSE +21 -0
- package/node_modules/call-bound/README.md +53 -0
- package/node_modules/call-bound/index.d.ts +94 -0
- package/node_modules/call-bound/index.js +19 -0
- package/node_modules/call-bound/package.json +99 -0
- package/node_modules/call-bound/test/index.js +61 -0
- package/node_modules/call-bound/tsconfig.json +10 -0
- package/node_modules/content-disposition/HISTORY.md +60 -0
- package/node_modules/content-disposition/LICENSE +22 -0
- package/node_modules/content-disposition/README.md +142 -0
- package/node_modules/content-disposition/index.js +458 -0
- package/node_modules/content-disposition/package.json +44 -0
- package/node_modules/content-type/HISTORY.md +29 -0
- package/node_modules/content-type/LICENSE +22 -0
- package/node_modules/content-type/README.md +94 -0
- package/node_modules/content-type/index.js +225 -0
- package/node_modules/content-type/package.json +42 -0
- package/node_modules/cookie/LICENSE +24 -0
- package/node_modules/cookie/README.md +317 -0
- package/node_modules/cookie/SECURITY.md +25 -0
- package/node_modules/cookie/index.js +334 -0
- package/node_modules/cookie/package.json +44 -0
- package/node_modules/cookie-signature/.npmignore +4 -0
- package/node_modules/cookie-signature/History.md +38 -0
- package/node_modules/cookie-signature/Readme.md +42 -0
- package/node_modules/cookie-signature/index.js +51 -0
- package/node_modules/cookie-signature/package.json +18 -0
- package/node_modules/debug/.coveralls.yml +1 -0
- package/node_modules/debug/.eslintrc +11 -0
- package/node_modules/debug/.npmignore +9 -0
- package/node_modules/debug/.travis.yml +14 -0
- package/node_modules/debug/CHANGELOG.md +362 -0
- package/node_modules/debug/LICENSE +19 -0
- package/node_modules/debug/Makefile +50 -0
- package/node_modules/debug/README.md +312 -0
- package/node_modules/debug/component.json +19 -0
- package/node_modules/debug/karma.conf.js +70 -0
- package/node_modules/debug/node.js +1 -0
- package/node_modules/debug/package.json +49 -0
- package/node_modules/debug/src/browser.js +185 -0
- package/node_modules/debug/src/debug.js +202 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/inspector-log.js +15 -0
- package/node_modules/debug/src/node.js +248 -0
- package/node_modules/depd/History.md +103 -0
- package/node_modules/depd/LICENSE +22 -0
- package/node_modules/depd/Readme.md +280 -0
- package/node_modules/depd/index.js +538 -0
- package/node_modules/depd/lib/browser/index.js +77 -0
- package/node_modules/depd/package.json +45 -0
- package/node_modules/destroy/LICENSE +23 -0
- package/node_modules/destroy/README.md +63 -0
- package/node_modules/destroy/index.js +209 -0
- package/node_modules/destroy/package.json +48 -0
- package/node_modules/dunder-proto/.eslintrc +5 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/dunder-proto/LICENSE +21 -0
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/ee-first/LICENSE +22 -0
- package/node_modules/ee-first/README.md +80 -0
- package/node_modules/ee-first/index.js +95 -0
- package/node_modules/ee-first/package.json +29 -0
- package/node_modules/encodeurl/LICENSE +22 -0
- package/node_modules/encodeurl/README.md +109 -0
- package/node_modules/encodeurl/index.js +60 -0
- package/node_modules/encodeurl/package.json +40 -0
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +14 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +56 -0
- package/node_modules/es-define-property/tsconfig.json +10 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
- package/node_modules/es-object-atoms/LICENSE +21 -0
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +80 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +6 -0
- package/node_modules/escape-html/LICENSE +24 -0
- package/node_modules/escape-html/Readme.md +43 -0
- package/node_modules/escape-html/index.js +78 -0
- package/node_modules/escape-html/package.json +24 -0
- package/node_modules/etag/HISTORY.md +83 -0
- package/node_modules/etag/LICENSE +22 -0
- package/node_modules/etag/README.md +159 -0
- package/node_modules/etag/index.js +131 -0
- package/node_modules/etag/package.json +47 -0
- package/node_modules/express/History.md +3656 -0
- package/node_modules/express/LICENSE +24 -0
- package/node_modules/express/Readme.md +260 -0
- package/node_modules/express/index.js +11 -0
- package/node_modules/express/lib/application.js +661 -0
- package/node_modules/express/lib/express.js +116 -0
- package/node_modules/express/lib/middleware/init.js +43 -0
- package/node_modules/express/lib/middleware/query.js +47 -0
- package/node_modules/express/lib/request.js +525 -0
- package/node_modules/express/lib/response.js +1179 -0
- package/node_modules/express/lib/router/index.js +673 -0
- package/node_modules/express/lib/router/layer.js +181 -0
- package/node_modules/express/lib/router/route.js +230 -0
- package/node_modules/express/lib/utils.js +303 -0
- package/node_modules/express/lib/view.js +182 -0
- package/node_modules/express/package.json +102 -0
- package/node_modules/express-promise-router/.changeset/README.md +8 -0
- package/node_modules/express-promise-router/.changeset/config.json +9 -0
- package/node_modules/express-promise-router/.eslintrc.json +13 -0
- package/node_modules/express-promise-router/.github/renovate.json5 +14 -0
- package/node_modules/express-promise-router/.github/workflows/test.yml +24 -0
- package/node_modules/express-promise-router/.prettierrc.yaml +2 -0
- package/node_modules/express-promise-router/CHANGELOG.md +82 -0
- package/node_modules/express-promise-router/LICENSE +21 -0
- package/node_modules/express-promise-router/README.md +182 -0
- package/node_modules/express-promise-router/index.d.ts +7 -0
- package/node_modules/express-promise-router/lib/express-promise-router.js +131 -0
- package/node_modules/express-promise-router/package.json +86 -0
- package/node_modules/express-promise-router/test/.eslintrc +8 -0
- package/node_modules/express-promise-router/test/babel.test.js +35 -0
- package/node_modules/express-promise-router/test/commonjs.test.js +35 -0
- package/node_modules/express-promise-router/test/express-promise-router.nested-route.test.js +18 -0
- package/node_modules/express-promise-router/test/express-promise-router.route.test.js +353 -0
- package/node_modules/express-promise-router/test/express-promise-router.test.js +401 -0
- package/node_modules/express-promise-router/test/test-resources/.eslintrc +6 -0
- package/node_modules/express-promise-router/test/test-resources/babel-base-case.js +12 -0
- package/node_modules/express-promise-router/test/test-resources/commonjs-base-case.js +12 -0
- package/node_modules/express-promise-router/test/test-resources/typescript-base-case.ts +13 -0
- package/node_modules/express-promise-router/test/tracing.test.js +36 -0
- package/node_modules/express-promise-router/test/typescript.test.js +53 -0
- package/node_modules/express-promise-router/test/util/http-utils.js +14 -0
- package/node_modules/express-promise-router/test/util/launch-utils.js +40 -0
- package/node_modules/finalhandler/HISTORY.md +210 -0
- package/node_modules/finalhandler/LICENSE +22 -0
- package/node_modules/finalhandler/README.md +147 -0
- package/node_modules/finalhandler/SECURITY.md +25 -0
- package/node_modules/finalhandler/index.js +341 -0
- package/node_modules/finalhandler/package.json +47 -0
- package/node_modules/forwarded/HISTORY.md +21 -0
- package/node_modules/forwarded/LICENSE +22 -0
- package/node_modules/forwarded/README.md +57 -0
- package/node_modules/forwarded/index.js +90 -0
- package/node_modules/forwarded/package.json +45 -0
- package/node_modules/fresh/HISTORY.md +70 -0
- package/node_modules/fresh/LICENSE +23 -0
- package/node_modules/fresh/README.md +119 -0
- package/node_modules/fresh/index.js +137 -0
- package/node_modules/fresh/package.json +46 -0
- package/node_modules/function-bind/.eslintrc +21 -0
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +46 -0
- package/node_modules/function-bind/implementation.js +84 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +87 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/generator-function/.eslintrc +16 -0
- package/node_modules/generator-function/.github/FUNDING.yml +12 -0
- package/node_modules/generator-function/.nycrc +9 -0
- package/node_modules/generator-function/CHANGELOG.md +27 -0
- package/node_modules/generator-function/LICENSE.md +7 -0
- package/node_modules/generator-function/README.md +51 -0
- package/node_modules/generator-function/index.d.mts +3 -0
- package/node_modules/generator-function/index.d.ts +3 -0
- package/node_modules/generator-function/index.js +8 -0
- package/node_modules/generator-function/index.mjs +4 -0
- package/node_modules/generator-function/legacy.js +18 -0
- package/node_modules/generator-function/package.json +88 -0
- package/node_modules/generator-function/require.mjs +5 -0
- package/node_modules/generator-function/test/index.js +42 -0
- package/node_modules/generator-function/tsconfig.json +9 -0
- package/node_modules/get-intrinsic/.eslintrc +42 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +9 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +193 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +71 -0
- package/node_modules/get-intrinsic/index.js +373 -0
- package/node_modules/get-intrinsic/package.json +100 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/get-proto/package.json +81 -0
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +45 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +15 -0
- package/node_modules/gopd/package.json +77 -0
- package/node_modules/gopd/test/index.js +36 -0
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +14 -0
- package/node_modules/has-symbols/package.json +111 -0
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +45 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/node_modules/has-symbols/test/tests.js +58 -0
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/hasown/.eslintrc +5 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +40 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +92 -0
- package/node_modules/hasown/tsconfig.json +6 -0
- package/node_modules/http-errors/HISTORY.md +180 -0
- package/node_modules/http-errors/LICENSE +23 -0
- package/node_modules/http-errors/README.md +169 -0
- package/node_modules/http-errors/index.js +289 -0
- package/node_modules/http-errors/package.json +50 -0
- package/node_modules/iconv-lite/Changelog.md +162 -0
- package/node_modules/iconv-lite/LICENSE +21 -0
- package/node_modules/iconv-lite/README.md +156 -0
- package/node_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
- package/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
- package/node_modules/iconv-lite/encodings/index.js +22 -0
- package/node_modules/iconv-lite/encodings/internal.js +188 -0
- package/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/node_modules/iconv-lite/encodings/sbcs-data.js +174 -0
- package/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- package/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/node_modules/iconv-lite/encodings/utf16.js +177 -0
- package/node_modules/iconv-lite/encodings/utf7.js +290 -0
- package/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- package/node_modules/iconv-lite/lib/extend-node.js +217 -0
- package/node_modules/iconv-lite/lib/index.d.ts +24 -0
- package/node_modules/iconv-lite/lib/index.js +153 -0
- package/node_modules/iconv-lite/lib/streams.js +121 -0
- package/node_modules/iconv-lite/package.json +46 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/ipaddr.js/LICENSE +19 -0
- package/node_modules/ipaddr.js/README.md +233 -0
- package/node_modules/ipaddr.js/ipaddr.min.js +1 -0
- package/node_modules/ipaddr.js/lib/ipaddr.js +673 -0
- package/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
- package/node_modules/ipaddr.js/package.json +35 -0
- package/node_modules/is-promise/LICENSE +19 -0
- package/node_modules/is-promise/index.d.ts +2 -0
- package/node_modules/is-promise/index.js +6 -0
- package/node_modules/is-promise/index.mjs +3 -0
- package/node_modules/is-promise/package.json +30 -0
- package/node_modules/is-promise/readme.md +33 -0
- package/node_modules/lodash.flattendeep/LICENSE +47 -0
- package/node_modules/lodash.flattendeep/README.md +18 -0
- package/node_modules/lodash.flattendeep/index.js +350 -0
- package/node_modules/lodash.flattendeep/package.json +17 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/media-typer/HISTORY.md +22 -0
- package/node_modules/media-typer/LICENSE +22 -0
- package/node_modules/media-typer/README.md +81 -0
- package/node_modules/media-typer/index.js +270 -0
- package/node_modules/media-typer/package.json +26 -0
- package/node_modules/merge-descriptors/HISTORY.md +21 -0
- package/node_modules/merge-descriptors/LICENSE +23 -0
- package/node_modules/merge-descriptors/README.md +49 -0
- package/node_modules/merge-descriptors/index.js +60 -0
- package/node_modules/merge-descriptors/package.json +39 -0
- package/node_modules/methods/HISTORY.md +29 -0
- package/node_modules/methods/LICENSE +24 -0
- package/node_modules/methods/README.md +51 -0
- package/node_modules/methods/index.js +69 -0
- package/node_modules/methods/package.json +36 -0
- package/node_modules/mime/.npmignore +0 -0
- package/node_modules/mime/CHANGELOG.md +164 -0
- package/node_modules/mime/LICENSE +21 -0
- package/node_modules/mime/README.md +90 -0
- package/node_modules/mime/cli.js +8 -0
- package/node_modules/mime/mime.js +108 -0
- package/node_modules/mime/package.json +44 -0
- package/node_modules/mime/src/build.js +53 -0
- package/node_modules/mime/src/test.js +60 -0
- package/node_modules/mime/types.json +1 -0
- package/node_modules/mime-db/HISTORY.md +507 -0
- package/node_modules/mime-db/LICENSE +23 -0
- package/node_modules/mime-db/README.md +100 -0
- package/node_modules/mime-db/db.json +8519 -0
- package/node_modules/mime-db/index.js +12 -0
- package/node_modules/mime-db/package.json +60 -0
- package/node_modules/mime-types/HISTORY.md +397 -0
- package/node_modules/mime-types/LICENSE +23 -0
- package/node_modules/mime-types/README.md +113 -0
- package/node_modules/mime-types/index.js +188 -0
- package/node_modules/mime-types/package.json +44 -0
- package/node_modules/ms/index.js +152 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +37 -0
- package/node_modules/ms/readme.md +51 -0
- package/node_modules/negotiator/HISTORY.md +108 -0
- package/node_modules/negotiator/LICENSE +24 -0
- package/node_modules/negotiator/README.md +203 -0
- package/node_modules/negotiator/index.js +82 -0
- package/node_modules/negotiator/lib/charset.js +169 -0
- package/node_modules/negotiator/lib/encoding.js +184 -0
- package/node_modules/negotiator/lib/language.js +179 -0
- package/node_modules/negotiator/lib/mediaType.js +294 -0
- package/node_modules/negotiator/package.json +42 -0
- package/node_modules/object-inspect/.eslintrc +53 -0
- package/node_modules/object-inspect/.github/FUNDING.yml +12 -0
- package/node_modules/object-inspect/.nycrc +13 -0
- package/node_modules/object-inspect/CHANGELOG.md +424 -0
- package/node_modules/object-inspect/LICENSE +21 -0
- package/node_modules/object-inspect/example/all.js +23 -0
- package/node_modules/object-inspect/example/circular.js +6 -0
- package/node_modules/object-inspect/example/fn.js +5 -0
- package/node_modules/object-inspect/example/inspect.js +10 -0
- package/node_modules/object-inspect/index.js +544 -0
- package/node_modules/object-inspect/package-support.json +20 -0
- package/node_modules/object-inspect/package.json +105 -0
- package/node_modules/object-inspect/readme.markdown +84 -0
- package/node_modules/object-inspect/test/bigint.js +58 -0
- package/node_modules/object-inspect/test/browser/dom.js +15 -0
- package/node_modules/object-inspect/test/circular.js +16 -0
- package/node_modules/object-inspect/test/deep.js +12 -0
- package/node_modules/object-inspect/test/element.js +53 -0
- package/node_modules/object-inspect/test/err.js +48 -0
- package/node_modules/object-inspect/test/fakes.js +29 -0
- package/node_modules/object-inspect/test/fn.js +76 -0
- package/node_modules/object-inspect/test/global.js +17 -0
- package/node_modules/object-inspect/test/has.js +15 -0
- package/node_modules/object-inspect/test/holes.js +15 -0
- package/node_modules/object-inspect/test/indent-option.js +271 -0
- package/node_modules/object-inspect/test/inspect.js +139 -0
- package/node_modules/object-inspect/test/lowbyte.js +12 -0
- package/node_modules/object-inspect/test/number.js +58 -0
- package/node_modules/object-inspect/test/quoteStyle.js +26 -0
- package/node_modules/object-inspect/test/toStringTag.js +40 -0
- package/node_modules/object-inspect/test/undef.js +12 -0
- package/node_modules/object-inspect/test/values.js +261 -0
- package/node_modules/object-inspect/test-core-js.js +26 -0
- package/node_modules/object-inspect/util.inspect.js +1 -0
- package/node_modules/on-finished/HISTORY.md +98 -0
- package/node_modules/on-finished/LICENSE +23 -0
- package/node_modules/on-finished/README.md +162 -0
- package/node_modules/on-finished/index.js +234 -0
- package/node_modules/on-finished/package.json +39 -0
- package/node_modules/parseurl/HISTORY.md +58 -0
- package/node_modules/parseurl/LICENSE +24 -0
- package/node_modules/parseurl/README.md +133 -0
- package/node_modules/parseurl/index.js +158 -0
- package/node_modules/parseurl/package.json +40 -0
- package/node_modules/path-to-regexp/LICENSE +21 -0
- package/node_modules/path-to-regexp/Readme.md +35 -0
- package/node_modules/path-to-regexp/index.js +156 -0
- package/node_modules/path-to-regexp/package.json +30 -0
- package/node_modules/proxy-addr/HISTORY.md +161 -0
- package/node_modules/proxy-addr/LICENSE +22 -0
- package/node_modules/proxy-addr/README.md +139 -0
- package/node_modules/proxy-addr/index.js +327 -0
- package/node_modules/proxy-addr/package.json +47 -0
- package/node_modules/qs/.editorconfig +46 -0
- package/node_modules/qs/.eslintrc +38 -0
- package/node_modules/qs/.github/FUNDING.yml +12 -0
- package/node_modules/qs/.nycrc +13 -0
- package/node_modules/qs/CHANGELOG.md +600 -0
- package/node_modules/qs/LICENSE.md +29 -0
- package/node_modules/qs/README.md +709 -0
- package/node_modules/qs/dist/qs.js +90 -0
- package/node_modules/qs/lib/formats.js +23 -0
- package/node_modules/qs/lib/index.js +11 -0
- package/node_modules/qs/lib/parse.js +296 -0
- package/node_modules/qs/lib/stringify.js +351 -0
- package/node_modules/qs/lib/utils.js +265 -0
- package/node_modules/qs/package.json +91 -0
- package/node_modules/qs/test/empty-keys-cases.js +267 -0
- package/node_modules/qs/test/parse.js +1170 -0
- package/node_modules/qs/test/stringify.js +1298 -0
- package/node_modules/qs/test/utils.js +136 -0
- package/node_modules/range-parser/HISTORY.md +56 -0
- package/node_modules/range-parser/LICENSE +23 -0
- package/node_modules/range-parser/README.md +84 -0
- package/node_modules/range-parser/index.js +162 -0
- package/node_modules/range-parser/package.json +44 -0
- package/node_modules/raw-body/HISTORY.md +308 -0
- package/node_modules/raw-body/LICENSE +22 -0
- package/node_modules/raw-body/README.md +223 -0
- package/node_modules/raw-body/SECURITY.md +24 -0
- package/node_modules/raw-body/index.d.ts +87 -0
- package/node_modules/raw-body/index.js +336 -0
- package/node_modules/raw-body/package.json +49 -0
- package/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/index.js +65 -0
- package/node_modules/safe-buffer/package.json +51 -0
- package/node_modules/safer-buffer/LICENSE +21 -0
- package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/node_modules/safer-buffer/Readme.md +156 -0
- package/node_modules/safer-buffer/dangerous.js +58 -0
- package/node_modules/safer-buffer/package.json +34 -0
- package/node_modules/safer-buffer/safer.js +77 -0
- package/node_modules/safer-buffer/tests.js +406 -0
- package/node_modules/send/HISTORY.md +526 -0
- package/node_modules/send/LICENSE +23 -0
- package/node_modules/send/README.md +327 -0
- package/node_modules/send/SECURITY.md +24 -0
- package/node_modules/send/index.js +1142 -0
- package/node_modules/send/node_modules/encodeurl/HISTORY.md +14 -0
- package/node_modules/send/node_modules/encodeurl/LICENSE +22 -0
- package/node_modules/send/node_modules/encodeurl/README.md +128 -0
- package/node_modules/send/node_modules/encodeurl/index.js +60 -0
- package/node_modules/send/node_modules/encodeurl/package.json +40 -0
- package/node_modules/send/node_modules/ms/index.js +162 -0
- package/node_modules/send/node_modules/ms/license.md +21 -0
- package/node_modules/send/node_modules/ms/package.json +38 -0
- package/node_modules/send/node_modules/ms/readme.md +59 -0
- package/node_modules/send/package.json +62 -0
- package/node_modules/serve-static/HISTORY.md +487 -0
- package/node_modules/serve-static/LICENSE +25 -0
- package/node_modules/serve-static/README.md +257 -0
- package/node_modules/serve-static/index.js +209 -0
- package/node_modules/serve-static/package.json +42 -0
- package/node_modules/setprototypeof/LICENSE +13 -0
- package/node_modules/setprototypeof/README.md +31 -0
- package/node_modules/setprototypeof/index.d.ts +2 -0
- package/node_modules/setprototypeof/index.js +17 -0
- package/node_modules/setprototypeof/package.json +38 -0
- package/node_modules/setprototypeof/test/index.js +24 -0
- package/node_modules/side-channel/.editorconfig +9 -0
- package/node_modules/side-channel/.eslintrc +12 -0
- package/node_modules/side-channel/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel/.nycrc +13 -0
- package/node_modules/side-channel/CHANGELOG.md +110 -0
- package/node_modules/side-channel/LICENSE +21 -0
- package/node_modules/side-channel/README.md +61 -0
- package/node_modules/side-channel/index.d.ts +14 -0
- package/node_modules/side-channel/index.js +43 -0
- package/node_modules/side-channel/package.json +85 -0
- package/node_modules/side-channel/test/index.js +104 -0
- package/node_modules/side-channel/tsconfig.json +9 -0
- package/node_modules/side-channel-list/.editorconfig +9 -0
- package/node_modules/side-channel-list/.eslintrc +11 -0
- package/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-list/.nycrc +13 -0
- package/node_modules/side-channel-list/CHANGELOG.md +15 -0
- package/node_modules/side-channel-list/LICENSE +21 -0
- package/node_modules/side-channel-list/README.md +62 -0
- package/node_modules/side-channel-list/index.d.ts +13 -0
- package/node_modules/side-channel-list/index.js +113 -0
- package/node_modules/side-channel-list/list.d.ts +14 -0
- package/node_modules/side-channel-list/package.json +77 -0
- package/node_modules/side-channel-list/test/index.js +104 -0
- package/node_modules/side-channel-list/tsconfig.json +9 -0
- package/node_modules/side-channel-map/.editorconfig +9 -0
- package/node_modules/side-channel-map/.eslintrc +11 -0
- package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-map/.nycrc +13 -0
- package/node_modules/side-channel-map/CHANGELOG.md +22 -0
- package/node_modules/side-channel-map/LICENSE +21 -0
- package/node_modules/side-channel-map/README.md +62 -0
- package/node_modules/side-channel-map/index.d.ts +15 -0
- package/node_modules/side-channel-map/index.js +68 -0
- package/node_modules/side-channel-map/package.json +80 -0
- package/node_modules/side-channel-map/test/index.js +114 -0
- package/node_modules/side-channel-map/tsconfig.json +9 -0
- package/node_modules/side-channel-weakmap/.editorconfig +9 -0
- package/node_modules/side-channel-weakmap/.eslintrc +12 -0
- package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-weakmap/.nycrc +13 -0
- package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
- package/node_modules/side-channel-weakmap/LICENSE +21 -0
- package/node_modules/side-channel-weakmap/README.md +62 -0
- package/node_modules/side-channel-weakmap/index.d.ts +15 -0
- package/node_modules/side-channel-weakmap/index.js +84 -0
- package/node_modules/side-channel-weakmap/package.json +87 -0
- package/node_modules/side-channel-weakmap/test/index.js +114 -0
- package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
- package/node_modules/statuses/HISTORY.md +82 -0
- package/node_modules/statuses/LICENSE +23 -0
- package/node_modules/statuses/README.md +136 -0
- package/node_modules/statuses/codes.json +65 -0
- package/node_modules/statuses/index.js +146 -0
- package/node_modules/statuses/package.json +49 -0
- package/node_modules/toidentifier/HISTORY.md +9 -0
- package/node_modules/toidentifier/LICENSE +21 -0
- package/node_modules/toidentifier/README.md +61 -0
- package/node_modules/toidentifier/index.js +32 -0
- package/node_modules/toidentifier/package.json +38 -0
- package/node_modules/type-is/HISTORY.md +259 -0
- package/node_modules/type-is/LICENSE +23 -0
- package/node_modules/type-is/README.md +170 -0
- package/node_modules/type-is/index.js +266 -0
- package/node_modules/type-is/package.json +45 -0
- package/node_modules/unpipe/HISTORY.md +4 -0
- package/node_modules/unpipe/LICENSE +22 -0
- package/node_modules/unpipe/README.md +43 -0
- package/node_modules/unpipe/index.js +69 -0
- package/node_modules/unpipe/package.json +27 -0
- package/node_modules/utils-merge/.npmignore +9 -0
- package/node_modules/utils-merge/LICENSE +20 -0
- package/node_modules/utils-merge/README.md +34 -0
- package/node_modules/utils-merge/index.js +23 -0
- package/node_modules/utils-merge/package.json +40 -0
- package/node_modules/vary/HISTORY.md +39 -0
- package/node_modules/vary/LICENSE +22 -0
- package/node_modules/vary/README.md +101 -0
- package/node_modules/vary/index.js +149 -0
- package/node_modules/vary/package.json +43 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +208 -0
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -0
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/package.json +118 -0
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +257 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5136 -0
- package/node_modules/zod/src/v4/classic/checks.ts +30 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +66 -0
- package/node_modules/zod/src/v4/classic/errors.ts +75 -0
- package/node_modules/zod/src/v4/classic/external.ts +50 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +33 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1594 -0
- package/node_modules/zod/src/v4/core/checks.ts +1283 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +134 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +424 -0
- package/node_modules/zod/src/v4/core/function.ts +176 -0
- package/node_modules/zod/src/v4/core/index.ts +15 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +143 -0
- package/node_modules/zod/src/v4/core/parse.ts +94 -0
- package/node_modules/zod/src/v4/core/regexes.ts +135 -0
- package/node_modules/zod/src/v4/core/registries.ts +96 -0
- package/node_modules/zod/src/v4/core/schemas.ts +3842 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
- package/node_modules/zod/src/v4/core/util.ts +775 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +125 -0
- package/node_modules/zod/src/v4/locales/az.ts +121 -0
- package/node_modules/zod/src/v4/locales/be.ts +184 -0
- package/node_modules/zod/src/v4/locales/ca.ts +127 -0
- package/node_modules/zod/src/v4/locales/cs.ts +142 -0
- package/node_modules/zod/src/v4/locales/de.ts +124 -0
- package/node_modules/zod/src/v4/locales/en.ts +127 -0
- package/node_modules/zod/src/v4/locales/eo.ts +125 -0
- package/node_modules/zod/src/v4/locales/es.ts +125 -0
- package/node_modules/zod/src/v4/locales/fa.ts +134 -0
- package/node_modules/zod/src/v4/locales/fi.ts +131 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
- package/node_modules/zod/src/v4/locales/fr.ts +124 -0
- package/node_modules/zod/src/v4/locales/he.ts +125 -0
- package/node_modules/zod/src/v4/locales/hu.ts +126 -0
- package/node_modules/zod/src/v4/locales/id.ts +125 -0
- package/node_modules/zod/src/v4/locales/index.ts +39 -0
- package/node_modules/zod/src/v4/locales/it.ts +125 -0
- package/node_modules/zod/src/v4/locales/ja.ts +122 -0
- package/node_modules/zod/src/v4/locales/kh.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +131 -0
- package/node_modules/zod/src/v4/locales/mk.ts +127 -0
- package/node_modules/zod/src/v4/locales/ms.ts +124 -0
- package/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/node_modules/zod/src/v4/locales/no.ts +124 -0
- package/node_modules/zod/src/v4/locales/ota.ts +125 -0
- package/node_modules/zod/src/v4/locales/pl.ts +126 -0
- package/node_modules/zod/src/v4/locales/ps.ts +133 -0
- package/node_modules/zod/src/v4/locales/pt.ts +123 -0
- package/node_modules/zod/src/v4/locales/ru.ts +184 -0
- package/node_modules/zod/src/v4/locales/sl.ts +126 -0
- package/node_modules/zod/src/v4/locales/sv.ts +127 -0
- package/node_modules/zod/src/v4/locales/ta.ts +125 -0
- package/node_modules/zod/src/v4/locales/th.ts +126 -0
- package/node_modules/zod/src/v4/locales/tr.ts +121 -0
- package/node_modules/zod/src/v4/locales/ua.ts +126 -0
- package/node_modules/zod/src/v4/locales/ur.ts +126 -0
- package/node_modules/zod/src/v4/locales/vi.ts +125 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +22 -0
- package/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +62 -0
- package/node_modules/zod/src/v4/mini/parse.ts +1 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
- package/node_modules/zod/src/v4-mini/index.ts +1 -0
- package/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +111 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3775 -0
- package/node_modules/zod/v3/types.d.cts +1031 -0
- package/node_modules/zod/v3/types.d.ts +1031 -0
- package/node_modules/zod/v3/types.js +3693 -0
- package/node_modules/zod/v4/classic/checks.cjs +32 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +57 -0
- package/node_modules/zod/v4/classic/compat.d.cts +46 -0
- package/node_modules/zod/v4/classic/compat.d.ts +46 -0
- package/node_modules/zod/v4/classic/compat.js +27 -0
- package/node_modules/zod/v4/classic/errors.cjs +67 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +41 -0
- package/node_modules/zod/v4/classic/external.cjs +70 -0
- package/node_modules/zod/v4/classic/external.d.cts +13 -0
- package/node_modules/zod/v4/classic/external.d.ts +13 -0
- package/node_modules/zod/v4/classic/external.js +18 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/parse.cjs +32 -0
- package/node_modules/zod/v4/classic/parse.d.cts +23 -0
- package/node_modules/zod/v4/classic/parse.d.ts +23 -0
- package/node_modules/zod/v4/classic/parse.js +6 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1109 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +630 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +630 -0
- package/node_modules/zod/v4/classic/schemas.js +1006 -0
- package/node_modules/zod/v4/core/api.cjs +1039 -0
- package/node_modules/zod/v4/core/api.d.cts +284 -0
- package/node_modules/zod/v4/core/api.d.ts +284 -0
- package/node_modules/zod/v4/core/api.js +906 -0
- package/node_modules/zod/v4/core/checks.cjs +591 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +565 -0
- package/node_modules/zod/v4/core/core.cjs +67 -0
- package/node_modules/zod/v4/core/core.d.cts +49 -0
- package/node_modules/zod/v4/core/core.d.ts +49 -0
- package/node_modules/zod/v4/core/core.js +61 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +226 -0
- package/node_modules/zod/v4/core/errors.d.cts +208 -0
- package/node_modules/zod/v4/core/errors.d.ts +208 -0
- package/node_modules/zod/v4/core/errors.js +195 -0
- package/node_modules/zod/v4/core/function.cjs +102 -0
- package/node_modules/zod/v4/core/function.d.cts +52 -0
- package/node_modules/zod/v4/core/function.d.ts +52 -0
- package/node_modules/zod/v4/core/function.js +75 -0
- package/node_modules/zod/v4/core/index.cjs +44 -0
- package/node_modules/zod/v4/core/index.d.cts +15 -0
- package/node_modules/zod/v4/core/index.d.ts +15 -0
- package/node_modules/zod/v4/core/index.js +15 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +87 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +87 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/parse.cjs +87 -0
- package/node_modules/zod/v4/core/parse.d.cts +25 -0
- package/node_modules/zod/v4/core/parse.d.ts +25 -0
- package/node_modules/zod/v4/core/parse.js +57 -0
- package/node_modules/zod/v4/core/regexes.cjs +103 -0
- package/node_modules/zod/v4/core/regexes.d.cts +62 -0
- package/node_modules/zod/v4/core/regexes.d.ts +62 -0
- package/node_modules/zod/v4/core/regexes.js +95 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +1748 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1041 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1041 -0
- package/node_modules/zod/v4/core/schemas.js +1717 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.js +849 -0
- package/node_modules/zod/v4/core/util.cjs +539 -0
- package/node_modules/zod/v4/core/util.d.cts +183 -0
- package/node_modules/zod/v4/core/util.d.ts +183 -0
- package/node_modules/zod/v4/core/util.js +493 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +142 -0
- package/node_modules/zod/v4/locales/ar.d.cts +4 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +116 -0
- package/node_modules/zod/v4/locales/az.cjs +141 -0
- package/node_modules/zod/v4/locales/az.d.cts +4 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +115 -0
- package/node_modules/zod/v4/locales/be.cjs +190 -0
- package/node_modules/zod/v4/locales/be.d.cts +4 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +164 -0
- package/node_modules/zod/v4/locales/ca.cjs +144 -0
- package/node_modules/zod/v4/locales/ca.d.cts +4 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +118 -0
- package/node_modules/zod/v4/locales/cs.cjs +161 -0
- package/node_modules/zod/v4/locales/cs.d.cts +4 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +135 -0
- package/node_modules/zod/v4/locales/de.cjs +142 -0
- package/node_modules/zod/v4/locales/de.d.cts +4 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +116 -0
- package/node_modules/zod/v4/locales/en.cjs +145 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +5 -0
- package/node_modules/zod/v4/locales/en.js +117 -0
- package/node_modules/zod/v4/locales/eo.cjs +144 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +5 -0
- package/node_modules/zod/v4/locales/eo.js +116 -0
- package/node_modules/zod/v4/locales/es.cjs +143 -0
- package/node_modules/zod/v4/locales/es.d.cts +4 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +117 -0
- package/node_modules/zod/v4/locales/fa.cjs +148 -0
- package/node_modules/zod/v4/locales/fa.d.cts +4 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +122 -0
- package/node_modules/zod/v4/locales/fi.cjs +148 -0
- package/node_modules/zod/v4/locales/fi.d.cts +4 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +122 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +117 -0
- package/node_modules/zod/v4/locales/fr.cjs +142 -0
- package/node_modules/zod/v4/locales/fr.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +116 -0
- package/node_modules/zod/v4/locales/he.cjs +143 -0
- package/node_modules/zod/v4/locales/he.d.cts +4 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +117 -0
- package/node_modules/zod/v4/locales/hu.cjs +143 -0
- package/node_modules/zod/v4/locales/hu.d.cts +4 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +117 -0
- package/node_modules/zod/v4/locales/id.cjs +142 -0
- package/node_modules/zod/v4/locales/id.d.cts +4 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +116 -0
- package/node_modules/zod/v4/locales/index.cjs +84 -0
- package/node_modules/zod/v4/locales/index.d.cts +39 -0
- package/node_modules/zod/v4/locales/index.d.ts +39 -0
- package/node_modules/zod/v4/locales/index.js +39 -0
- package/node_modules/zod/v4/locales/it.cjs +143 -0
- package/node_modules/zod/v4/locales/it.d.cts +4 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +117 -0
- package/node_modules/zod/v4/locales/ja.cjs +141 -0
- package/node_modules/zod/v4/locales/ja.d.cts +4 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +115 -0
- package/node_modules/zod/v4/locales/kh.cjs +143 -0
- package/node_modules/zod/v4/locales/kh.d.cts +4 -0
- package/node_modules/zod/v4/locales/kh.d.ts +4 -0
- package/node_modules/zod/v4/locales/kh.js +117 -0
- package/node_modules/zod/v4/locales/ko.cjs +147 -0
- package/node_modules/zod/v4/locales/ko.d.cts +4 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +121 -0
- package/node_modules/zod/v4/locales/mk.cjs +144 -0
- package/node_modules/zod/v4/locales/mk.d.cts +4 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +118 -0
- package/node_modules/zod/v4/locales/ms.cjs +142 -0
- package/node_modules/zod/v4/locales/ms.d.cts +4 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +116 -0
- package/node_modules/zod/v4/locales/nl.cjs +143 -0
- package/node_modules/zod/v4/locales/nl.d.cts +4 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +117 -0
- package/node_modules/zod/v4/locales/no.cjs +142 -0
- package/node_modules/zod/v4/locales/no.d.cts +4 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +116 -0
- package/node_modules/zod/v4/locales/ota.cjs +143 -0
- package/node_modules/zod/v4/locales/ota.d.cts +4 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +117 -0
- package/node_modules/zod/v4/locales/pl.cjs +143 -0
- package/node_modules/zod/v4/locales/pl.d.cts +4 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +117 -0
- package/node_modules/zod/v4/locales/ps.cjs +148 -0
- package/node_modules/zod/v4/locales/ps.d.cts +4 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +122 -0
- package/node_modules/zod/v4/locales/pt.cjs +142 -0
- package/node_modules/zod/v4/locales/pt.d.cts +4 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +116 -0
- package/node_modules/zod/v4/locales/ru.cjs +190 -0
- package/node_modules/zod/v4/locales/ru.d.cts +4 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +164 -0
- package/node_modules/zod/v4/locales/sl.cjs +143 -0
- package/node_modules/zod/v4/locales/sl.d.cts +4 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +117 -0
- package/node_modules/zod/v4/locales/sv.cjs +144 -0
- package/node_modules/zod/v4/locales/sv.d.cts +4 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +118 -0
- package/node_modules/zod/v4/locales/ta.cjs +143 -0
- package/node_modules/zod/v4/locales/ta.d.cts +4 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +143 -0
- package/node_modules/zod/v4/locales/th.d.cts +4 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +117 -0
- package/node_modules/zod/v4/locales/tr.cjs +143 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +5 -0
- package/node_modules/zod/v4/locales/tr.js +115 -0
- package/node_modules/zod/v4/locales/ua.cjs +143 -0
- package/node_modules/zod/v4/locales/ua.d.cts +4 -0
- package/node_modules/zod/v4/locales/ua.d.ts +4 -0
- package/node_modules/zod/v4/locales/ua.js +117 -0
- package/node_modules/zod/v4/locales/ur.cjs +143 -0
- package/node_modules/zod/v4/locales/ur.d.cts +4 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +117 -0
- package/node_modules/zod/v4/locales/vi.cjs +142 -0
- package/node_modules/zod/v4/locales/vi.d.cts +4 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +116 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +116 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +117 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +47 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +17 -0
- package/node_modules/zod/v4/mini/external.cjs +62 -0
- package/node_modules/zod/v4/mini/external.d.cts +11 -0
- package/node_modules/zod/v4/mini/external.d.ts +11 -0
- package/node_modules/zod/v4/mini/external.js +13 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +60 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +30 -0
- package/node_modules/zod/v4/mini/parse.cjs +8 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +839 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +356 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +356 -0
- package/node_modules/zod/v4/mini/schemas.js +732 -0
- package/node_modules/zod/v4-mini/index.cjs +17 -0
- package/node_modules/zod/v4-mini/index.d.cts +1 -0
- package/node_modules/zod/v4-mini/index.d.ts +1 -0
- package/node_modules/zod/v4-mini/index.js +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
4
|
+
var errors = require('@backstage/errors');
|
|
5
|
+
|
|
6
|
+
class KongServiceManagerService {
|
|
7
|
+
#logger;
|
|
8
|
+
#instances;
|
|
9
|
+
static create(options) {
|
|
10
|
+
return new KongServiceManagerService(options.logger, options.config);
|
|
11
|
+
}
|
|
12
|
+
constructor(logger, config) {
|
|
13
|
+
this.#logger = logger;
|
|
14
|
+
this.#instances = this.readInstances(config);
|
|
15
|
+
this.#logger.info(
|
|
16
|
+
`Kong Service Manager initialized with ${this.#instances.length} instance(s)`
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
readInstances(config) {
|
|
20
|
+
if (!config.has("kong.instances")) {
|
|
21
|
+
this.#logger.warn("No kong.instances configured");
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
const instancesConfig = config.getConfigArray("kong.instances");
|
|
25
|
+
return instancesConfig.map((c) => {
|
|
26
|
+
const id = c.getString("id");
|
|
27
|
+
const apiBaseUrl = c.getString("apiBaseUrl");
|
|
28
|
+
const workspace = c.getOptionalString("workspace");
|
|
29
|
+
let auth;
|
|
30
|
+
if (c.has("auth.kongAdmin")) {
|
|
31
|
+
auth = { kongAdmin: c.getString("auth.kongAdmin") };
|
|
32
|
+
} else if (c.has("auth.custom")) {
|
|
33
|
+
auth = {
|
|
34
|
+
custom: {
|
|
35
|
+
header: c.getString("auth.custom.header"),
|
|
36
|
+
value: c.getString("auth.custom.value")
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
} else {
|
|
40
|
+
auth = { kongAdmin: "" };
|
|
41
|
+
}
|
|
42
|
+
return { id, apiBaseUrl, workspace, auth };
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
getInstance(instanceName) {
|
|
46
|
+
const instance = this.#instances.find((i) => i.id === instanceName);
|
|
47
|
+
if (!instance) {
|
|
48
|
+
throw new errors.NotFoundError(
|
|
49
|
+
`Kong instance '${instanceName}' not found in configuration`
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
return instance;
|
|
53
|
+
}
|
|
54
|
+
buildUrl(instance, path) {
|
|
55
|
+
const base = instance.apiBaseUrl.replace(/\/$/, "");
|
|
56
|
+
if (instance.workspace) {
|
|
57
|
+
return `${base}/${instance.workspace}${path}`;
|
|
58
|
+
}
|
|
59
|
+
return `${base}${path}`;
|
|
60
|
+
}
|
|
61
|
+
buildHeaders(instance) {
|
|
62
|
+
const headers = {
|
|
63
|
+
"Content-Type": "application/json"
|
|
64
|
+
};
|
|
65
|
+
if ("kongAdmin" in instance.auth && instance.auth.kongAdmin) {
|
|
66
|
+
headers["Kong-Admin-Token"] = instance.auth.kongAdmin;
|
|
67
|
+
} else if ("custom" in instance.auth) {
|
|
68
|
+
headers[instance.auth.custom.header] = instance.auth.custom.value;
|
|
69
|
+
}
|
|
70
|
+
return headers;
|
|
71
|
+
}
|
|
72
|
+
async kongFetch(instanceName, path, options) {
|
|
73
|
+
const instance = this.getInstance(instanceName);
|
|
74
|
+
const url = this.buildUrl(instance, path);
|
|
75
|
+
const headers = this.buildHeaders(instance);
|
|
76
|
+
this.#logger.debug(`Kong API request: ${options?.method ?? "GET"} ${url}`);
|
|
77
|
+
const response = await fetch(url, {
|
|
78
|
+
...options,
|
|
79
|
+
headers: { ...headers, ...options?.headers }
|
|
80
|
+
});
|
|
81
|
+
if (!response.ok) {
|
|
82
|
+
const body = await response.text();
|
|
83
|
+
this.#logger.error(
|
|
84
|
+
`Kong API error: ${response.status} ${response.statusText} - ${body}`
|
|
85
|
+
);
|
|
86
|
+
throw new Error(
|
|
87
|
+
`Kong API request failed: ${response.status} ${response.statusText}`
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
if (response.status === 204) {
|
|
91
|
+
return void 0;
|
|
92
|
+
}
|
|
93
|
+
return response.json();
|
|
94
|
+
}
|
|
95
|
+
// --- Service operations ---
|
|
96
|
+
async getServiceInfo(instanceName, serviceName) {
|
|
97
|
+
return this.kongFetch(
|
|
98
|
+
instanceName,
|
|
99
|
+
`/services/${encodeURIComponent(serviceName)}`
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
// --- Route operations ---
|
|
103
|
+
async getRoutes(instanceName, serviceName) {
|
|
104
|
+
return this.kongFetch(
|
|
105
|
+
instanceName,
|
|
106
|
+
`/services/${encodeURIComponent(serviceName)}/routes`
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
async getRouteById(instanceName, serviceName, routeId) {
|
|
110
|
+
return this.kongFetch(
|
|
111
|
+
instanceName,
|
|
112
|
+
`/services/${encodeURIComponent(serviceName)}/routes/${encodeURIComponent(routeId)}`
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
async createRoute(instanceName, serviceName, route) {
|
|
116
|
+
return this.kongFetch(
|
|
117
|
+
instanceName,
|
|
118
|
+
`/services/${encodeURIComponent(serviceName)}/routes`,
|
|
119
|
+
{
|
|
120
|
+
method: "POST",
|
|
121
|
+
body: JSON.stringify(route)
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
async editRoute(instanceName, serviceName, routeId, route) {
|
|
126
|
+
return this.kongFetch(
|
|
127
|
+
instanceName,
|
|
128
|
+
`/services/${encodeURIComponent(serviceName)}/routes/${encodeURIComponent(routeId)}`,
|
|
129
|
+
{
|
|
130
|
+
method: "PATCH",
|
|
131
|
+
body: JSON.stringify(route)
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
async removeRoute(instanceName, serviceName, routeId) {
|
|
136
|
+
await this.kongFetch(
|
|
137
|
+
instanceName,
|
|
138
|
+
`/services/${encodeURIComponent(serviceName)}/routes/${encodeURIComponent(routeId)}`,
|
|
139
|
+
{ method: "DELETE" }
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
// --- Plugin operations on services ---
|
|
143
|
+
async getServiceAssociatedPlugins(instanceName, serviceName) {
|
|
144
|
+
const result = await this.kongFetch(
|
|
145
|
+
instanceName,
|
|
146
|
+
`/services/${encodeURIComponent(serviceName)}/plugins`
|
|
147
|
+
);
|
|
148
|
+
return result.data;
|
|
149
|
+
}
|
|
150
|
+
async getAvailablePlugins(instanceName) {
|
|
151
|
+
return this.kongFetch(
|
|
152
|
+
instanceName,
|
|
153
|
+
"/plugins/enabled"
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
async getPluginFields(instanceName, pluginName) {
|
|
157
|
+
return this.kongFetch(
|
|
158
|
+
instanceName,
|
|
159
|
+
`/schemas/plugins/${encodeURIComponent(pluginName)}`
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
async addPluginToService(instanceName, serviceName, plugin) {
|
|
163
|
+
return this.kongFetch(
|
|
164
|
+
instanceName,
|
|
165
|
+
`/services/${encodeURIComponent(serviceName)}/plugins`,
|
|
166
|
+
{
|
|
167
|
+
method: "POST",
|
|
168
|
+
body: JSON.stringify(plugin)
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
async editServicePlugin(instanceName, serviceName, pluginId, plugin) {
|
|
173
|
+
return this.kongFetch(
|
|
174
|
+
instanceName,
|
|
175
|
+
`/services/${encodeURIComponent(serviceName)}/plugins/${encodeURIComponent(pluginId)}`,
|
|
176
|
+
{
|
|
177
|
+
method: "PATCH",
|
|
178
|
+
body: JSON.stringify(plugin)
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
async removeServicePlugin(instanceName, serviceName, pluginId) {
|
|
183
|
+
await this.kongFetch(
|
|
184
|
+
instanceName,
|
|
185
|
+
`/services/${encodeURIComponent(serviceName)}/plugins/${encodeURIComponent(pluginId)}`,
|
|
186
|
+
{ method: "DELETE" }
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
// --- Plugin operations on routes ---
|
|
190
|
+
async getRouteAssociatedPlugins(instanceName, routeId) {
|
|
191
|
+
const result = await this.kongFetch(
|
|
192
|
+
instanceName,
|
|
193
|
+
`/routes/${encodeURIComponent(routeId)}/plugins`
|
|
194
|
+
);
|
|
195
|
+
return result.data;
|
|
196
|
+
}
|
|
197
|
+
async addPluginToRoute(instanceName, routeId, plugin) {
|
|
198
|
+
return this.kongFetch(
|
|
199
|
+
instanceName,
|
|
200
|
+
`/routes/${encodeURIComponent(routeId)}/plugins`,
|
|
201
|
+
{
|
|
202
|
+
method: "POST",
|
|
203
|
+
body: JSON.stringify(plugin)
|
|
204
|
+
}
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
async editRoutePlugin(instanceName, routeId, pluginId, plugin) {
|
|
208
|
+
return this.kongFetch(
|
|
209
|
+
instanceName,
|
|
210
|
+
`/routes/${encodeURIComponent(routeId)}/plugins/${encodeURIComponent(pluginId)}`,
|
|
211
|
+
{
|
|
212
|
+
method: "PATCH",
|
|
213
|
+
body: JSON.stringify(plugin)
|
|
214
|
+
}
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
async removeRoutePlugin(instanceName, routeId, pluginId) {
|
|
218
|
+
await this.kongFetch(
|
|
219
|
+
instanceName,
|
|
220
|
+
`/routes/${encodeURIComponent(routeId)}/plugins/${encodeURIComponent(pluginId)}`,
|
|
221
|
+
{ method: "DELETE" }
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
const kongServiceManagerServiceRef = backendPluginApi.createServiceRef({
|
|
226
|
+
id: "kong-service-manager.service",
|
|
227
|
+
defaultFactory: async (service) => backendPluginApi.createServiceFactory({
|
|
228
|
+
service,
|
|
229
|
+
deps: {
|
|
230
|
+
logger: backendPluginApi.coreServices.logger,
|
|
231
|
+
config: backendPluginApi.coreServices.rootConfig
|
|
232
|
+
},
|
|
233
|
+
async factory(deps) {
|
|
234
|
+
return KongServiceManagerService.create(deps);
|
|
235
|
+
}
|
|
236
|
+
})
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
exports.KongServiceManagerService = KongServiceManagerService;
|
|
240
|
+
exports.kongServiceManagerServiceRef = kongServiceManagerServiceRef;
|
|
241
|
+
//# sourceMappingURL=KongServiceManagerService.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KongServiceManagerService.cjs.js","sources":["../../src/services/KongServiceManagerService.ts"],"sourcesContent":["import {\n coreServices,\n createServiceFactory,\n createServiceRef,\n LoggerService,\n} from '@backstage/backend-plugin-api';\nimport { Config } from '@backstage/config';\nimport { NotFoundError } from '@backstage/errors';\nimport type {\n ServiceInfoResponse,\n RoutesResponse,\n RouteResponse,\n CreateRoute,\n AssociatedPluginsResponse,\n PluginFieldsResponse,\n CreatePlugin,\n AvailablePluginsResponse,\n} from '@veecode-platform/backstage-plugin-kong-service-manager-common';\n\n/** Configuration for a single Kong instance */\nexport type KongInstanceConfig = {\n id: string;\n apiBaseUrl: string;\n workspace?: string;\n auth:\n | { kongAdmin: string }\n | { custom: { header: string; value: string } };\n};\n\nexport class KongServiceManagerService {\n readonly #logger: LoggerService;\n readonly #instances: KongInstanceConfig[];\n\n static create(options: { logger: LoggerService; config: Config }) {\n return new KongServiceManagerService(options.logger, options.config);\n }\n\n private constructor(logger: LoggerService, config: Config) {\n this.#logger = logger;\n this.#instances = this.readInstances(config);\n this.#logger.info(\n `Kong Service Manager initialized with ${this.#instances.length} instance(s)`,\n );\n }\n\n private readInstances(config: Config): KongInstanceConfig[] {\n if (!config.has('kong.instances')) {\n this.#logger.warn('No kong.instances configured');\n return [];\n }\n\n const instancesConfig = config.getConfigArray('kong.instances');\n return instancesConfig.map(c => {\n const id = c.getString('id');\n const apiBaseUrl = c.getString('apiBaseUrl');\n const workspace = c.getOptionalString('workspace');\n\n let auth: KongInstanceConfig['auth'];\n if (c.has('auth.kongAdmin')) {\n auth = { kongAdmin: c.getString('auth.kongAdmin') };\n } else if (c.has('auth.custom')) {\n auth = {\n custom: {\n header: c.getString('auth.custom.header'),\n value: c.getString('auth.custom.value'),\n },\n };\n } else {\n auth = { kongAdmin: '' };\n }\n\n return { id, apiBaseUrl, workspace, auth };\n });\n }\n\n private getInstance(instanceName: string): KongInstanceConfig {\n const instance = this.#instances.find(i => i.id === instanceName);\n if (!instance) {\n throw new NotFoundError(\n `Kong instance '${instanceName}' not found in configuration`,\n );\n }\n return instance;\n }\n\n private buildUrl(instance: KongInstanceConfig, path: string): string {\n const base = instance.apiBaseUrl.replace(/\\/$/, '');\n if (instance.workspace) {\n return `${base}/${instance.workspace}${path}`;\n }\n return `${base}${path}`;\n }\n\n private buildHeaders(instance: KongInstanceConfig): Record<string, string> {\n const headers: Record<string, string> = {\n 'Content-Type': 'application/json',\n };\n\n if ('kongAdmin' in instance.auth && instance.auth.kongAdmin) {\n headers['Kong-Admin-Token'] = instance.auth.kongAdmin;\n } else if ('custom' in instance.auth) {\n headers[instance.auth.custom.header] = instance.auth.custom.value;\n }\n\n return headers;\n }\n\n private async kongFetch<T>(\n instanceName: string,\n path: string,\n options?: RequestInit,\n ): Promise<T> {\n const instance = this.getInstance(instanceName);\n const url = this.buildUrl(instance, path);\n const headers = this.buildHeaders(instance);\n\n this.#logger.debug(`Kong API request: ${options?.method ?? 'GET'} ${url}`);\n\n const response = await fetch(url, {\n ...options,\n headers: { ...headers, ...options?.headers },\n });\n\n if (!response.ok) {\n const body = await response.text();\n this.#logger.error(\n `Kong API error: ${response.status} ${response.statusText} - ${body}`,\n );\n throw new Error(\n `Kong API request failed: ${response.status} ${response.statusText}`,\n );\n }\n\n if (response.status === 204) {\n return undefined as T;\n }\n\n return response.json() as Promise<T>;\n }\n\n // --- Service operations ---\n\n async getServiceInfo(\n instanceName: string,\n serviceName: string,\n ): Promise<ServiceInfoResponse> {\n return this.kongFetch<ServiceInfoResponse>(\n instanceName,\n `/services/${encodeURIComponent(serviceName)}`,\n );\n }\n\n // --- Route operations ---\n\n async getRoutes(\n instanceName: string,\n serviceName: string,\n ): Promise<RoutesResponse> {\n return this.kongFetch<RoutesResponse>(\n instanceName,\n `/services/${encodeURIComponent(serviceName)}/routes`,\n );\n }\n\n async getRouteById(\n instanceName: string,\n serviceName: string,\n routeId: string,\n ): Promise<RouteResponse> {\n return this.kongFetch<RouteResponse>(\n instanceName,\n `/services/${encodeURIComponent(serviceName)}/routes/${encodeURIComponent(routeId)}`,\n );\n }\n\n async createRoute(\n instanceName: string,\n serviceName: string,\n route: CreateRoute,\n ): Promise<RouteResponse> {\n return this.kongFetch<RouteResponse>(\n instanceName,\n `/services/${encodeURIComponent(serviceName)}/routes`,\n {\n method: 'POST',\n body: JSON.stringify(route),\n },\n );\n }\n\n async editRoute(\n instanceName: string,\n serviceName: string,\n routeId: string,\n route: Partial<CreateRoute>,\n ): Promise<RouteResponse> {\n return this.kongFetch<RouteResponse>(\n instanceName,\n `/services/${encodeURIComponent(serviceName)}/routes/${encodeURIComponent(routeId)}`,\n {\n method: 'PATCH',\n body: JSON.stringify(route),\n },\n );\n }\n\n async removeRoute(\n instanceName: string,\n serviceName: string,\n routeId: string,\n ): Promise<void> {\n await this.kongFetch<void>(\n instanceName,\n `/services/${encodeURIComponent(serviceName)}/routes/${encodeURIComponent(routeId)}`,\n { method: 'DELETE' },\n );\n }\n\n // --- Plugin operations on services ---\n\n async getServiceAssociatedPlugins(\n instanceName: string,\n serviceName: string,\n ): Promise<AssociatedPluginsResponse[]> {\n const result = await this.kongFetch<{ data: AssociatedPluginsResponse[] }>(\n instanceName,\n `/services/${encodeURIComponent(serviceName)}/plugins`,\n );\n return result.data;\n }\n\n async getAvailablePlugins(\n instanceName: string,\n ): Promise<AvailablePluginsResponse> {\n return this.kongFetch<AvailablePluginsResponse>(\n instanceName,\n '/plugins/enabled',\n );\n }\n\n async getPluginFields(\n instanceName: string,\n pluginName: string,\n ): Promise<PluginFieldsResponse> {\n return this.kongFetch<PluginFieldsResponse>(\n instanceName,\n `/schemas/plugins/${encodeURIComponent(pluginName)}`,\n );\n }\n\n async addPluginToService(\n instanceName: string,\n serviceName: string,\n plugin: CreatePlugin,\n ): Promise<AssociatedPluginsResponse> {\n return this.kongFetch<AssociatedPluginsResponse>(\n instanceName,\n `/services/${encodeURIComponent(serviceName)}/plugins`,\n {\n method: 'POST',\n body: JSON.stringify(plugin),\n },\n );\n }\n\n async editServicePlugin(\n instanceName: string,\n serviceName: string,\n pluginId: string,\n plugin: Partial<CreatePlugin>,\n ): Promise<AssociatedPluginsResponse> {\n return this.kongFetch<AssociatedPluginsResponse>(\n instanceName,\n `/services/${encodeURIComponent(serviceName)}/plugins/${encodeURIComponent(pluginId)}`,\n {\n method: 'PATCH',\n body: JSON.stringify(plugin),\n },\n );\n }\n\n async removeServicePlugin(\n instanceName: string,\n serviceName: string,\n pluginId: string,\n ): Promise<void> {\n await this.kongFetch<void>(\n instanceName,\n `/services/${encodeURIComponent(serviceName)}/plugins/${encodeURIComponent(pluginId)}`,\n { method: 'DELETE' },\n );\n }\n\n // --- Plugin operations on routes ---\n\n async getRouteAssociatedPlugins(\n instanceName: string,\n routeId: string,\n ): Promise<AssociatedPluginsResponse[]> {\n const result = await this.kongFetch<{ data: AssociatedPluginsResponse[] }>(\n instanceName,\n `/routes/${encodeURIComponent(routeId)}/plugins`,\n );\n return result.data;\n }\n\n async addPluginToRoute(\n instanceName: string,\n routeId: string,\n plugin: CreatePlugin,\n ): Promise<AssociatedPluginsResponse> {\n return this.kongFetch<AssociatedPluginsResponse>(\n instanceName,\n `/routes/${encodeURIComponent(routeId)}/plugins`,\n {\n method: 'POST',\n body: JSON.stringify(plugin),\n },\n );\n }\n\n async editRoutePlugin(\n instanceName: string,\n routeId: string,\n pluginId: string,\n plugin: Partial<CreatePlugin>,\n ): Promise<AssociatedPluginsResponse> {\n return this.kongFetch<AssociatedPluginsResponse>(\n instanceName,\n `/routes/${encodeURIComponent(routeId)}/plugins/${encodeURIComponent(pluginId)}`,\n {\n method: 'PATCH',\n body: JSON.stringify(plugin),\n },\n );\n }\n\n async removeRoutePlugin(\n instanceName: string,\n routeId: string,\n pluginId: string,\n ): Promise<void> {\n await this.kongFetch<void>(\n instanceName,\n `/routes/${encodeURIComponent(routeId)}/plugins/${encodeURIComponent(pluginId)}`,\n { method: 'DELETE' },\n );\n }\n}\n\nexport const kongServiceManagerServiceRef =\n createServiceRef<KongServiceManagerService>({\n id: 'kong-service-manager.service',\n defaultFactory: async service =>\n createServiceFactory({\n service,\n deps: {\n logger: coreServices.logger,\n config: coreServices.rootConfig,\n },\n async factory(deps) {\n return KongServiceManagerService.create(deps);\n },\n }),\n });\n"],"names":["NotFoundError","createServiceRef","createServiceFactory","coreServices"],"mappings":"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"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Kong Service Manager Common
|
|
2
|
+
|
|
3
|
+
Shared types, constants, and permissions for the
|
|
4
|
+
`@veecode-platform/backstage-plugin-kong-service-manager` plugin suite.
|
|
5
|
+
|
|
6
|
+
This package is used by both the frontend and backend plugins and should
|
|
7
|
+
**not** be installed directly by end users. It is pulled in as a dependency
|
|
8
|
+
automatically.
|
|
9
|
+
|
|
10
|
+
## Contents
|
|
11
|
+
|
|
12
|
+
### Types
|
|
13
|
+
|
|
14
|
+
TypeScript interfaces for Kong Admin API entities:
|
|
15
|
+
|
|
16
|
+
- `ServiceInfoResponse` - Kong service details
|
|
17
|
+
- `RouteResponse` / `RoutesResponse` / `CreateRoute` - Route entities
|
|
18
|
+
- `AssociatedPluginsResponse` / `CreatePlugin` - Plugin entities
|
|
19
|
+
- `PluginFieldsResponse` / `SchemaField` - Plugin schema introspection
|
|
20
|
+
- `PluginCard` / `PluginPerCategory` - UI display types
|
|
21
|
+
- `AvailablePluginsResponse` - List of enabled plugins
|
|
22
|
+
- `PluginCategory` - Enum of plugin categories
|
|
23
|
+
- `HttpMethod` / `RouteProtocol` - String literal unions
|
|
24
|
+
|
|
25
|
+
### API Interface
|
|
26
|
+
|
|
27
|
+
`KongServiceManagerApi` - The contract between the frontend client and
|
|
28
|
+
backend, defining all available operations for services, routes, and plugins.
|
|
29
|
+
|
|
30
|
+
### Annotations
|
|
31
|
+
|
|
32
|
+
| Constant | Value | Description |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| `KONG_SERVICE_NAME_ANNOTATION` | `kong-manager/service-name` | Maps an entity to a Kong service. |
|
|
35
|
+
| `KONG_SERVICE_INSTANCE_ANNOTATION` | `kong-manager/instance` | Specifies which Kong instance(s) to use. |
|
|
36
|
+
|
|
37
|
+
Helper: `isKongServiceManagerAvailable(entity)` - Returns `true` when the
|
|
38
|
+
entity has the required annotation.
|
|
39
|
+
|
|
40
|
+
### Permissions
|
|
41
|
+
|
|
42
|
+
12 Backstage permissions for controlling access to Kong operations:
|
|
43
|
+
|
|
44
|
+
| Permission | Scope |
|
|
45
|
+
|---|---|
|
|
46
|
+
| `kongServiceReadPermission` | Read service info |
|
|
47
|
+
| `kongPluginsReadPermission` | List available plugins |
|
|
48
|
+
| `kongRoutesReadPermission` | Read routes |
|
|
49
|
+
| `kongApplyPluginServicePermission` | Add plugin to service |
|
|
50
|
+
| `kongUpdateServicePluginPermission` | Edit service plugin |
|
|
51
|
+
| `kongDisableServicePluginPermission` | Remove service plugin |
|
|
52
|
+
| `kongRouteCreatePermission` | Create route |
|
|
53
|
+
| `kongRouteUpdatePermission` | Edit route |
|
|
54
|
+
| `kongRouteDeletePermission` | Delete route |
|
|
55
|
+
| `kongApplyPluginRoutePermission` | Add plugin to route |
|
|
56
|
+
| `kongUpdateRoutePluginPermission` | Edit route plugin |
|
|
57
|
+
| `kongDisableRoutePluginPermission` | Remove route plugin |
|
|
58
|
+
|
|
59
|
+
## License
|
|
60
|
+
|
|
61
|
+
Apache-2.0
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const KONG_SERVICE_NAME_ANNOTATION = "kong-manager/service-name";
|
|
4
|
+
const KONG_SERVICE_INSTANCE_ANNOTATION = "kong-manager/instance";
|
|
5
|
+
function isKongServiceManagerAvailable(entity) {
|
|
6
|
+
const serviceName = entity.metadata.annotations?.[KONG_SERVICE_NAME_ANNOTATION];
|
|
7
|
+
return Boolean(serviceName);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
exports.KONG_SERVICE_INSTANCE_ANNOTATION = KONG_SERVICE_INSTANCE_ANNOTATION;
|
|
11
|
+
exports.KONG_SERVICE_NAME_ANNOTATION = KONG_SERVICE_NAME_ANNOTATION;
|
|
12
|
+
exports.isKongServiceManagerAvailable = isKongServiceManagerAvailable;
|
|
13
|
+
//# sourceMappingURL=annotations.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotations.cjs.js","sources":["../src/annotations.ts"],"sourcesContent":["import { Entity } from '@backstage/catalog-model';\n\n/** Annotation key for the Kong service name */\nexport const KONG_SERVICE_NAME_ANNOTATION = 'kong-manager/service-name';\n\n/** Annotation key for the Kong instance(s), comma-separated */\nexport const KONG_SERVICE_INSTANCE_ANNOTATION = 'kong-manager/instance';\n\n/** Check whether an entity has the required Kong annotations */\nexport function isKongServiceManagerAvailable(entity: Entity): boolean {\n const serviceName =\n entity.metadata.annotations?.[KONG_SERVICE_NAME_ANNOTATION];\n return Boolean(serviceName);\n}\n"],"names":[],"mappings":";;AAGO,MAAM,4BAAA,GAA+B;AAGrC,MAAM,gCAAA,GAAmC;AAGzC,SAAS,8BAA8B,MAAA,EAAyB;AACrE,EAAA,MAAM,WAAA,GACJ,MAAA,CAAO,QAAA,CAAS,WAAA,GAAc,4BAA4B,CAAA;AAC5D,EAAA,OAAO,QAAQ,WAAW,CAAA;AAC5B;;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const KONG_SERVICE_NAME_ANNOTATION = "kong-manager/service-name";
|
|
2
|
+
const KONG_SERVICE_INSTANCE_ANNOTATION = "kong-manager/instance";
|
|
3
|
+
function isKongServiceManagerAvailable(entity) {
|
|
4
|
+
const serviceName = entity.metadata.annotations?.[KONG_SERVICE_NAME_ANNOTATION];
|
|
5
|
+
return Boolean(serviceName);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export { KONG_SERVICE_INSTANCE_ANNOTATION, KONG_SERVICE_NAME_ANNOTATION, isKongServiceManagerAvailable };
|
|
9
|
+
//# sourceMappingURL=annotations.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotations.esm.js","sources":["../src/annotations.ts"],"sourcesContent":["import { Entity } from '@backstage/catalog-model';\n\n/** Annotation key for the Kong service name */\nexport const KONG_SERVICE_NAME_ANNOTATION = 'kong-manager/service-name';\n\n/** Annotation key for the Kong instance(s), comma-separated */\nexport const KONG_SERVICE_INSTANCE_ANNOTATION = 'kong-manager/instance';\n\n/** Check whether an entity has the required Kong annotations */\nexport function isKongServiceManagerAvailable(entity: Entity): boolean {\n const serviceName =\n entity.metadata.annotations?.[KONG_SERVICE_NAME_ANNOTATION];\n return Boolean(serviceName);\n}\n"],"names":[],"mappings":"AAGO,MAAM,4BAAA,GAA+B;AAGrC,MAAM,gCAAA,GAAmC;AAGzC,SAAS,8BAA8B,MAAA,EAAyB;AACrE,EAAA,MAAM,WAAA,GACJ,MAAA,CAAO,QAAA,CAAS,WAAA,GAAc,4BAA4B,CAAA;AAC5D,EAAA,OAAO,QAAQ,WAAW,CAAA;AAC5B;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var types = require('./types.cjs.js');
|
|
4
|
+
var permissions = require('./permissions.cjs.js');
|
|
5
|
+
var annotations = require('./annotations.cjs.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.PluginCategory = types.PluginCategory;
|
|
10
|
+
exports.kongApplyPluginRoutePermission = permissions.kongApplyPluginRoutePermission;
|
|
11
|
+
exports.kongApplyPluginServicePermission = permissions.kongApplyPluginServicePermission;
|
|
12
|
+
exports.kongDisableRoutePluginPermission = permissions.kongDisableRoutePluginPermission;
|
|
13
|
+
exports.kongDisableServicePluginPermission = permissions.kongDisableServicePluginPermission;
|
|
14
|
+
exports.kongPermissions = permissions.kongPermissions;
|
|
15
|
+
exports.kongPluginsReadPermission = permissions.kongPluginsReadPermission;
|
|
16
|
+
exports.kongRouteCreatePermission = permissions.kongRouteCreatePermission;
|
|
17
|
+
exports.kongRouteDeletePermission = permissions.kongRouteDeletePermission;
|
|
18
|
+
exports.kongRouteUpdatePermission = permissions.kongRouteUpdatePermission;
|
|
19
|
+
exports.kongRoutesReadPermission = permissions.kongRoutesReadPermission;
|
|
20
|
+
exports.kongServiceReadPermission = permissions.kongServiceReadPermission;
|
|
21
|
+
exports.kongUpdateRoutePluginPermission = permissions.kongUpdateRoutePluginPermission;
|
|
22
|
+
exports.kongUpdateServicePluginPermission = permissions.kongUpdateServicePluginPermission;
|
|
23
|
+
exports.KONG_SERVICE_INSTANCE_ANNOTATION = annotations.KONG_SERVICE_INSTANCE_ANNOTATION;
|
|
24
|
+
exports.KONG_SERVICE_NAME_ANNOTATION = annotations.KONG_SERVICE_NAME_ANNOTATION;
|
|
25
|
+
exports.isKongServiceManagerAvailable = annotations.isKongServiceManagerAvailable;
|
|
26
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/node_modules/@veecode-platform/backstage-plugin-kong-service-manager-common/dist/index.d.ts
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import * as _backstage_plugin_permission_common from '@backstage/plugin-permission-common';
|
|
2
|
+
import { Entity } from '@backstage/catalog-model';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Kong Service Manager shared types.
|
|
6
|
+
*
|
|
7
|
+
* These types mirror the Kong Admin API response shapes and are shared
|
|
8
|
+
* between the frontend and backend plugins.
|
|
9
|
+
*/
|
|
10
|
+
/** HTTP methods supported by Kong routes */
|
|
11
|
+
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT';
|
|
12
|
+
/** Protocols supported by Kong routes */
|
|
13
|
+
type RouteProtocol = 'http' | 'https' | 'tcp' | 'tls' | 'tls_passthrough' | 'ws' | 'wss' | 'grpc' | 'grpcs';
|
|
14
|
+
/** Kong service info from Admin API */
|
|
15
|
+
type ServiceInfoResponse = {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
protocol: string;
|
|
19
|
+
host: string;
|
|
20
|
+
port: number;
|
|
21
|
+
path: string | null;
|
|
22
|
+
retries: number;
|
|
23
|
+
connect_timeout: number;
|
|
24
|
+
write_timeout: number;
|
|
25
|
+
read_timeout: number;
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
created_at: number;
|
|
28
|
+
updated_at: number;
|
|
29
|
+
tags?: string[] | null;
|
|
30
|
+
};
|
|
31
|
+
/** Kong route from Admin API */
|
|
32
|
+
type RouteResponse = {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string | null;
|
|
35
|
+
protocols: RouteProtocol[];
|
|
36
|
+
methods: HttpMethod[] | null;
|
|
37
|
+
hosts: string[] | null;
|
|
38
|
+
paths: string[] | null;
|
|
39
|
+
headers: Record<string, string[]> | null;
|
|
40
|
+
https_redirect_status_code: number;
|
|
41
|
+
regex_priority: number;
|
|
42
|
+
strip_path: boolean;
|
|
43
|
+
path_handling: string;
|
|
44
|
+
preserve_host: boolean;
|
|
45
|
+
request_buffering: boolean;
|
|
46
|
+
response_buffering: boolean;
|
|
47
|
+
tags?: string[] | null;
|
|
48
|
+
service: {
|
|
49
|
+
id: string;
|
|
50
|
+
} | null;
|
|
51
|
+
created_at: number;
|
|
52
|
+
updated_at: number;
|
|
53
|
+
};
|
|
54
|
+
/** Kong routes list response */
|
|
55
|
+
type RoutesResponse = {
|
|
56
|
+
data: RouteResponse[];
|
|
57
|
+
next: string | null;
|
|
58
|
+
};
|
|
59
|
+
/** Payload for creating a route */
|
|
60
|
+
type CreateRoute = {
|
|
61
|
+
name?: string;
|
|
62
|
+
protocols?: RouteProtocol[];
|
|
63
|
+
methods?: HttpMethod[];
|
|
64
|
+
hosts?: string[];
|
|
65
|
+
paths?: string[];
|
|
66
|
+
headers?: Record<string, string[]>;
|
|
67
|
+
https_redirect_status_code?: number;
|
|
68
|
+
regex_priority?: number;
|
|
69
|
+
strip_path?: boolean;
|
|
70
|
+
path_handling?: string;
|
|
71
|
+
preserve_host?: boolean;
|
|
72
|
+
request_buffering?: boolean;
|
|
73
|
+
response_buffering?: boolean;
|
|
74
|
+
tags?: string[];
|
|
75
|
+
};
|
|
76
|
+
/** Kong plugin associated with a service or route */
|
|
77
|
+
type AssociatedPluginsResponse = {
|
|
78
|
+
id: string;
|
|
79
|
+
name: string;
|
|
80
|
+
enabled: boolean;
|
|
81
|
+
config: Record<string, unknown>;
|
|
82
|
+
protocols: string[];
|
|
83
|
+
tags?: string[] | null;
|
|
84
|
+
created_at: number;
|
|
85
|
+
service: {
|
|
86
|
+
id: string;
|
|
87
|
+
} | null;
|
|
88
|
+
route: {
|
|
89
|
+
id: string;
|
|
90
|
+
} | null;
|
|
91
|
+
consumer: {
|
|
92
|
+
id: string;
|
|
93
|
+
} | null;
|
|
94
|
+
};
|
|
95
|
+
/** Plugin field schema from Kong introspection */
|
|
96
|
+
type PluginFieldsResponse = {
|
|
97
|
+
fields: SchemaField[];
|
|
98
|
+
};
|
|
99
|
+
/** Individual schema field descriptor */
|
|
100
|
+
type SchemaField = {
|
|
101
|
+
[key: string]: {
|
|
102
|
+
type: string;
|
|
103
|
+
required?: boolean;
|
|
104
|
+
default?: unknown;
|
|
105
|
+
elements?: {
|
|
106
|
+
type: string;
|
|
107
|
+
fields?: SchemaField[];
|
|
108
|
+
one_of?: unknown[];
|
|
109
|
+
};
|
|
110
|
+
fields?: SchemaField[];
|
|
111
|
+
one_of?: unknown[];
|
|
112
|
+
between?: [number, number];
|
|
113
|
+
len_min?: number;
|
|
114
|
+
match_none?: Array<{
|
|
115
|
+
pattern: string;
|
|
116
|
+
err?: string;
|
|
117
|
+
}>;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
/** Payload for creating/editing a plugin */
|
|
121
|
+
type CreatePlugin = {
|
|
122
|
+
name: string;
|
|
123
|
+
config?: Record<string, unknown>;
|
|
124
|
+
enabled?: boolean;
|
|
125
|
+
protocols?: string[];
|
|
126
|
+
tags?: string[];
|
|
127
|
+
};
|
|
128
|
+
/** Plugin card info for UI display */
|
|
129
|
+
type PluginCard = {
|
|
130
|
+
name: string;
|
|
131
|
+
slug: string;
|
|
132
|
+
associated: boolean;
|
|
133
|
+
image?: string;
|
|
134
|
+
description?: string;
|
|
135
|
+
};
|
|
136
|
+
/** Plugin category grouping */
|
|
137
|
+
type PluginPerCategory = {
|
|
138
|
+
category: string;
|
|
139
|
+
plugins: PluginCard[];
|
|
140
|
+
};
|
|
141
|
+
/** Available plugins response from Kong */
|
|
142
|
+
type AvailablePluginsResponse = {
|
|
143
|
+
enabled_plugins: string[];
|
|
144
|
+
};
|
|
145
|
+
/** Plugin categories enum */
|
|
146
|
+
declare enum PluginCategory {
|
|
147
|
+
AI = "ai",
|
|
148
|
+
AUTHENTICATION = "authentication",
|
|
149
|
+
SECURITY = "security",
|
|
150
|
+
TRAFFIC_CONTROL = "traffic-control",
|
|
151
|
+
SERVERLESS = "serverless",
|
|
152
|
+
TRANSFORMATION = "transformation",
|
|
153
|
+
LOGGING = "logging",
|
|
154
|
+
ANALYTICS = "analytics"
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** Permission to read Kong service information */
|
|
158
|
+
declare const kongServiceReadPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
159
|
+
/** Permission to read available and associated Kong plugins */
|
|
160
|
+
declare const kongPluginsReadPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
161
|
+
/** Permission to read Kong routes */
|
|
162
|
+
declare const kongRoutesReadPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
163
|
+
/** Permission to add a plugin to a Kong service */
|
|
164
|
+
declare const kongApplyPluginServicePermission: _backstage_plugin_permission_common.BasicPermission;
|
|
165
|
+
/** Permission to update a plugin on a Kong service */
|
|
166
|
+
declare const kongUpdateServicePluginPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
167
|
+
/** Permission to disable/remove a plugin from a Kong service */
|
|
168
|
+
declare const kongDisableServicePluginPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
169
|
+
/** Permission to create a Kong route */
|
|
170
|
+
declare const kongRouteCreatePermission: _backstage_plugin_permission_common.BasicPermission;
|
|
171
|
+
/** Permission to update a Kong route */
|
|
172
|
+
declare const kongRouteUpdatePermission: _backstage_plugin_permission_common.BasicPermission;
|
|
173
|
+
/** Permission to delete a Kong route */
|
|
174
|
+
declare const kongRouteDeletePermission: _backstage_plugin_permission_common.BasicPermission;
|
|
175
|
+
/** Permission to add a plugin to a Kong route */
|
|
176
|
+
declare const kongApplyPluginRoutePermission: _backstage_plugin_permission_common.BasicPermission;
|
|
177
|
+
/** Permission to update a plugin on a Kong route */
|
|
178
|
+
declare const kongUpdateRoutePluginPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
179
|
+
/** Permission to disable/remove a plugin from a Kong route */
|
|
180
|
+
declare const kongDisableRoutePluginPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
181
|
+
/** All Kong Service Manager permissions */
|
|
182
|
+
declare const kongPermissions: _backstage_plugin_permission_common.BasicPermission[];
|
|
183
|
+
|
|
184
|
+
/** Annotation key for the Kong service name */
|
|
185
|
+
declare const KONG_SERVICE_NAME_ANNOTATION = "kong-manager/service-name";
|
|
186
|
+
/** Annotation key for the Kong instance(s), comma-separated */
|
|
187
|
+
declare const KONG_SERVICE_INSTANCE_ANNOTATION = "kong-manager/instance";
|
|
188
|
+
/** Check whether an entity has the required Kong annotations */
|
|
189
|
+
declare function isKongServiceManagerAvailable(entity: Entity): boolean;
|
|
190
|
+
|
|
191
|
+
/** Frontend API contract for Kong Service Manager */
|
|
192
|
+
interface KongServiceManagerApi {
|
|
193
|
+
/** Get service details */
|
|
194
|
+
getServiceInfo(instance: string, serviceName: string): Promise<ServiceInfoResponse>;
|
|
195
|
+
/** List routes for a service */
|
|
196
|
+
getRoutesFromService(instance: string, serviceName: string): Promise<RoutesResponse>;
|
|
197
|
+
/** Get route by ID */
|
|
198
|
+
getRouteById(instance: string, serviceName: string, routeId: string): Promise<RouteResponse>;
|
|
199
|
+
/** Create a route on a service */
|
|
200
|
+
createRoute(instance: string, serviceName: string, route: CreateRoute): Promise<RouteResponse>;
|
|
201
|
+
/** Edit a route */
|
|
202
|
+
editRoute(instance: string, serviceName: string, routeId: string, route: Partial<CreateRoute>): Promise<RouteResponse>;
|
|
203
|
+
/** Delete a route */
|
|
204
|
+
removeRoute(instance: string, serviceName: string, routeId: string): Promise<void>;
|
|
205
|
+
/** List plugins associated with a service */
|
|
206
|
+
getServiceAssociatedPlugins(instance: string, serviceName: string): Promise<AssociatedPluginsResponse[]>;
|
|
207
|
+
/** List all available (enabled) plugins on a Kong instance */
|
|
208
|
+
getAvailablePlugins(instance: string): Promise<PluginPerCategory[]>;
|
|
209
|
+
/** Get plugin schema fields for introspection */
|
|
210
|
+
getPluginFields(instance: string, pluginName: string): Promise<PluginFieldsResponse>;
|
|
211
|
+
/** Add a plugin to a service */
|
|
212
|
+
addPluginToService(instance: string, serviceName: string, plugin: CreatePlugin): Promise<AssociatedPluginsResponse>;
|
|
213
|
+
/** Edit a plugin on a service */
|
|
214
|
+
editServicePlugin(instance: string, serviceName: string, pluginId: string, plugin: Partial<CreatePlugin>): Promise<AssociatedPluginsResponse>;
|
|
215
|
+
/** Remove a plugin from a service */
|
|
216
|
+
removeServicePlugin(instance: string, serviceName: string, pluginId: string): Promise<void>;
|
|
217
|
+
/** List plugins associated with a route */
|
|
218
|
+
getRouteAssociatedPlugins(instance: string, routeId: string): Promise<AssociatedPluginsResponse[]>;
|
|
219
|
+
/** Add a plugin to a route */
|
|
220
|
+
addPluginToRoute(instance: string, routeId: string, plugin: CreatePlugin): Promise<AssociatedPluginsResponse>;
|
|
221
|
+
/** Edit a plugin on a route */
|
|
222
|
+
editRoutePlugin(instance: string, routeId: string, pluginId: string, plugin: Partial<CreatePlugin>): Promise<AssociatedPluginsResponse>;
|
|
223
|
+
/** Remove a plugin from a route */
|
|
224
|
+
removeRoutePlugin(instance: string, routeId: string, pluginId: string): Promise<void>;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export { KONG_SERVICE_INSTANCE_ANNOTATION, KONG_SERVICE_NAME_ANNOTATION, PluginCategory, isKongServiceManagerAvailable, kongApplyPluginRoutePermission, kongApplyPluginServicePermission, kongDisableRoutePluginPermission, kongDisableServicePluginPermission, kongPermissions, kongPluginsReadPermission, kongRouteCreatePermission, kongRouteDeletePermission, kongRouteUpdatePermission, kongRoutesReadPermission, kongServiceReadPermission, kongUpdateRoutePluginPermission, kongUpdateServicePluginPermission };
|
|
228
|
+
export type { AssociatedPluginsResponse, AvailablePluginsResponse, CreatePlugin, CreateRoute, HttpMethod, KongServiceManagerApi, PluginCard, PluginFieldsResponse, PluginPerCategory, RouteProtocol, RouteResponse, RoutesResponse, SchemaField, ServiceInfoResponse };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { PluginCategory } from './types.esm.js';
|
|
2
|
+
export { kongApplyPluginRoutePermission, kongApplyPluginServicePermission, kongDisableRoutePluginPermission, kongDisableServicePluginPermission, kongPermissions, kongPluginsReadPermission, kongRouteCreatePermission, kongRouteDeletePermission, kongRouteUpdatePermission, kongRoutesReadPermission, kongServiceReadPermission, kongUpdateRoutePluginPermission, kongUpdateServicePluginPermission } from './permissions.esm.js';
|
|
3
|
+
export { KONG_SERVICE_INSTANCE_ANNOTATION, KONG_SERVICE_NAME_ANNOTATION, isKongServiceManagerAvailable } from './annotations.esm.js';
|
|
4
|
+
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|