@fntio/infra-client 0.0.0-stage → 0.5.0
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/CHANGELOG.md +193 -0
- package/LICENSE +93 -0
- package/README.md +875 -2
- package/assets/acl-reconciler/index.js +1604 -0
- package/assets/api/index.js +9857 -0
- package/assets/api/package.json +9 -0
- package/assets/api/vendor_modules/.package-lock.json +857 -0
- package/assets/api/vendor_modules/accepts/HISTORY.md +243 -0
- package/assets/api/vendor_modules/accepts/LICENSE +23 -0
- package/assets/api/vendor_modules/accepts/README.md +140 -0
- package/assets/api/vendor_modules/accepts/index.js +238 -0
- package/assets/api/vendor_modules/accepts/package.json +47 -0
- package/assets/api/vendor_modules/array-flatten/LICENSE +21 -0
- package/assets/api/vendor_modules/array-flatten/README.md +43 -0
- package/assets/api/vendor_modules/array-flatten/array-flatten.js +64 -0
- package/assets/api/vendor_modules/array-flatten/package.json +39 -0
- package/assets/api/vendor_modules/aws-jwt-verify/LICENSE +175 -0
- package/assets/api/vendor_modules/aws-jwt-verify/README.md +1033 -0
- package/assets/api/vendor_modules/aws-jwt-verify/asn1.d.ts +20 -0
- package/assets/api/vendor_modules/aws-jwt-verify/assert.d.ts +41 -0
- package/assets/api/vendor_modules/aws-jwt-verify/cognito-verifier.d.ts +183 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/asn1.js +301 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/assert.js +108 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/cognito-verifier.js +158 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/error.js +131 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/https-common.js +29 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/https-node.js +89 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/https.js +52 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/index.js +9 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/jwk.js +221 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/jwt-model.js +10 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/jwt-rsa.js +397 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/jwt.js +161 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/node-web-compat-node.js +48 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/node-web-compat-web.js +78 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/node-web-compat.js +11 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/package.json +1 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/safe-json-parse.js +34 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/typing-util.js +6 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/asn1.js +296 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/assert.js +101 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/cognito-verifier.js +153 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/error.js +101 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/https-common.js +25 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/https-node.js +85 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/https.js +48 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/index.js +4 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/jwk.js +208 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/jwt-model.js +7 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/jwt-rsa.js +389 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/jwt.js +156 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/node-web-compat-node.js +45 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/node-web-compat-web.js +75 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/node-web-compat.js +10 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/package.json +1 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/safe-json-parse.js +29 -0
- package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/typing-util.js +5 -0
- package/assets/api/vendor_modules/aws-jwt-verify/error.d.ts +108 -0
- package/assets/api/vendor_modules/aws-jwt-verify/https-common.d.ts +9 -0
- package/assets/api/vendor_modules/aws-jwt-verify/https-node.d.ts +20 -0
- package/assets/api/vendor_modules/aws-jwt-verify/https.d.ts +35 -0
- package/assets/api/vendor_modules/aws-jwt-verify/index.d.ts +2 -0
- package/assets/api/vendor_modules/aws-jwt-verify/jwk.d.ts +76 -0
- package/assets/api/vendor_modules/aws-jwt-verify/jwt-model.d.ts +78 -0
- package/assets/api/vendor_modules/aws-jwt-verify/jwt-rsa.d.ts +348 -0
- package/assets/api/vendor_modules/aws-jwt-verify/jwt.d.ts +51 -0
- package/assets/api/vendor_modules/aws-jwt-verify/package.json +136 -0
- package/assets/api/vendor_modules/aws-jwt-verify/safe-json-parse.d.ts +18 -0
- package/assets/api/vendor_modules/aws-jwt-verify/typing-util.d.ts +38 -0
- package/assets/api/vendor_modules/body-parser/HISTORY.md +703 -0
- package/assets/api/vendor_modules/body-parser/LICENSE +23 -0
- package/assets/api/vendor_modules/body-parser/README.md +476 -0
- package/assets/api/vendor_modules/body-parser/index.js +156 -0
- package/assets/api/vendor_modules/body-parser/lib/read.js +205 -0
- package/assets/api/vendor_modules/body-parser/lib/types/json.js +247 -0
- package/assets/api/vendor_modules/body-parser/lib/types/raw.js +105 -0
- package/assets/api/vendor_modules/body-parser/lib/types/text.js +125 -0
- package/assets/api/vendor_modules/body-parser/lib/types/urlencoded.js +303 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/.editorconfig +46 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/.github/SECURITY.md +11 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/.github/THREAT_MODEL.md +80 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/.nycrc +13 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/CHANGELOG.md +872 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/LICENSE.md +29 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/README.md +804 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/dist/qs.js +141 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/eslint.config.mjs +57 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/lib/formats.js +23 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/lib/index.js +11 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/lib/parse.js +503 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/lib/stringify.js +378 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/lib/utils.js +512 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/package.json +95 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/test/empty-keys-cases.js +267 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/test/parse.js +2296 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/test/stringify.js +1995 -0
- package/assets/api/vendor_modules/body-parser/node_modules/qs/test/utils.js +822 -0
- package/assets/api/vendor_modules/body-parser/package.json +55 -0
- package/assets/api/vendor_modules/bytes/History.md +97 -0
- package/assets/api/vendor_modules/bytes/LICENSE +23 -0
- package/assets/api/vendor_modules/bytes/Readme.md +152 -0
- package/assets/api/vendor_modules/bytes/index.js +170 -0
- package/assets/api/vendor_modules/bytes/package.json +42 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/README.md +62 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/index.js +15 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/package.json +85 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/assets/api/vendor_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/assets/api/vendor_modules/call-bound/.eslintrc +13 -0
- package/assets/api/vendor_modules/call-bound/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/call-bound/.nycrc +9 -0
- package/assets/api/vendor_modules/call-bound/CHANGELOG.md +42 -0
- package/assets/api/vendor_modules/call-bound/LICENSE +21 -0
- package/assets/api/vendor_modules/call-bound/README.md +53 -0
- package/assets/api/vendor_modules/call-bound/index.d.ts +94 -0
- package/assets/api/vendor_modules/call-bound/index.js +19 -0
- package/assets/api/vendor_modules/call-bound/package.json +99 -0
- package/assets/api/vendor_modules/call-bound/test/index.js +61 -0
- package/assets/api/vendor_modules/call-bound/tsconfig.json +10 -0
- package/assets/api/vendor_modules/content-disposition/HISTORY.md +60 -0
- package/assets/api/vendor_modules/content-disposition/LICENSE +22 -0
- package/assets/api/vendor_modules/content-disposition/README.md +142 -0
- package/assets/api/vendor_modules/content-disposition/index.js +458 -0
- package/assets/api/vendor_modules/content-disposition/package.json +44 -0
- package/assets/api/vendor_modules/content-type/HISTORY.md +29 -0
- package/assets/api/vendor_modules/content-type/LICENSE +22 -0
- package/assets/api/vendor_modules/content-type/README.md +94 -0
- package/assets/api/vendor_modules/content-type/index.js +225 -0
- package/assets/api/vendor_modules/content-type/package.json +42 -0
- package/assets/api/vendor_modules/cookie/LICENSE +24 -0
- package/assets/api/vendor_modules/cookie/README.md +317 -0
- package/assets/api/vendor_modules/cookie/SECURITY.md +25 -0
- package/assets/api/vendor_modules/cookie/index.js +335 -0
- package/assets/api/vendor_modules/cookie/package.json +44 -0
- package/assets/api/vendor_modules/cookie-signature/History.md +42 -0
- package/assets/api/vendor_modules/cookie-signature/Readme.md +42 -0
- package/assets/api/vendor_modules/cookie-signature/index.js +51 -0
- package/assets/api/vendor_modules/cookie-signature/package.json +18 -0
- package/assets/api/vendor_modules/debug/.coveralls.yml +1 -0
- package/assets/api/vendor_modules/debug/.eslintrc +11 -0
- package/assets/api/vendor_modules/debug/.travis.yml +14 -0
- package/assets/api/vendor_modules/debug/CHANGELOG.md +362 -0
- package/assets/api/vendor_modules/debug/LICENSE +19 -0
- package/assets/api/vendor_modules/debug/Makefile +50 -0
- package/assets/api/vendor_modules/debug/README.md +312 -0
- package/assets/api/vendor_modules/debug/component.json +19 -0
- package/assets/api/vendor_modules/debug/karma.conf.js +70 -0
- package/assets/api/vendor_modules/debug/node.js +1 -0
- package/assets/api/vendor_modules/debug/package.json +49 -0
- package/assets/api/vendor_modules/debug/src/browser.js +185 -0
- package/assets/api/vendor_modules/debug/src/debug.js +202 -0
- package/assets/api/vendor_modules/debug/src/index.js +10 -0
- package/assets/api/vendor_modules/debug/src/inspector-log.js +15 -0
- package/assets/api/vendor_modules/debug/src/node.js +248 -0
- package/assets/api/vendor_modules/depd/History.md +103 -0
- package/assets/api/vendor_modules/depd/LICENSE +22 -0
- package/assets/api/vendor_modules/depd/Readme.md +280 -0
- package/assets/api/vendor_modules/depd/index.js +538 -0
- package/assets/api/vendor_modules/depd/lib/browser/index.js +77 -0
- package/assets/api/vendor_modules/depd/package.json +45 -0
- package/assets/api/vendor_modules/destroy/LICENSE +23 -0
- package/assets/api/vendor_modules/destroy/README.md +63 -0
- package/assets/api/vendor_modules/destroy/index.js +209 -0
- package/assets/api/vendor_modules/destroy/package.json +48 -0
- package/assets/api/vendor_modules/dunder-proto/.eslintrc +5 -0
- package/assets/api/vendor_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/dunder-proto/.nycrc +13 -0
- package/assets/api/vendor_modules/dunder-proto/CHANGELOG.md +24 -0
- package/assets/api/vendor_modules/dunder-proto/LICENSE +21 -0
- package/assets/api/vendor_modules/dunder-proto/README.md +54 -0
- package/assets/api/vendor_modules/dunder-proto/get.d.ts +5 -0
- package/assets/api/vendor_modules/dunder-proto/get.js +30 -0
- package/assets/api/vendor_modules/dunder-proto/package.json +76 -0
- package/assets/api/vendor_modules/dunder-proto/set.d.ts +5 -0
- package/assets/api/vendor_modules/dunder-proto/set.js +35 -0
- package/assets/api/vendor_modules/dunder-proto/test/get.js +34 -0
- package/assets/api/vendor_modules/dunder-proto/test/index.js +4 -0
- package/assets/api/vendor_modules/dunder-proto/test/set.js +50 -0
- package/assets/api/vendor_modules/dunder-proto/tsconfig.json +9 -0
- package/assets/api/vendor_modules/ee-first/LICENSE +22 -0
- package/assets/api/vendor_modules/ee-first/README.md +80 -0
- package/assets/api/vendor_modules/ee-first/index.js +95 -0
- package/assets/api/vendor_modules/ee-first/package.json +29 -0
- package/assets/api/vendor_modules/encodeurl/LICENSE +22 -0
- package/assets/api/vendor_modules/encodeurl/README.md +109 -0
- package/assets/api/vendor_modules/encodeurl/index.js +60 -0
- package/assets/api/vendor_modules/encodeurl/package.json +40 -0
- package/assets/api/vendor_modules/es-define-property/.eslintrc +13 -0
- package/assets/api/vendor_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/es-define-property/.nycrc +9 -0
- package/assets/api/vendor_modules/es-define-property/CHANGELOG.md +29 -0
- package/assets/api/vendor_modules/es-define-property/LICENSE +21 -0
- package/assets/api/vendor_modules/es-define-property/README.md +49 -0
- package/assets/api/vendor_modules/es-define-property/index.d.ts +3 -0
- package/assets/api/vendor_modules/es-define-property/index.js +14 -0
- package/assets/api/vendor_modules/es-define-property/package.json +81 -0
- package/assets/api/vendor_modules/es-define-property/test/index.js +56 -0
- package/assets/api/vendor_modules/es-define-property/tsconfig.json +10 -0
- package/assets/api/vendor_modules/es-errors/.eslintrc +5 -0
- package/assets/api/vendor_modules/es-errors/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/es-errors/CHANGELOG.md +40 -0
- package/assets/api/vendor_modules/es-errors/LICENSE +21 -0
- package/assets/api/vendor_modules/es-errors/README.md +55 -0
- package/assets/api/vendor_modules/es-errors/eval.d.ts +3 -0
- package/assets/api/vendor_modules/es-errors/eval.js +4 -0
- package/assets/api/vendor_modules/es-errors/index.d.ts +3 -0
- package/assets/api/vendor_modules/es-errors/index.js +4 -0
- package/assets/api/vendor_modules/es-errors/package.json +80 -0
- package/assets/api/vendor_modules/es-errors/range.d.ts +3 -0
- package/assets/api/vendor_modules/es-errors/range.js +4 -0
- package/assets/api/vendor_modules/es-errors/ref.d.ts +3 -0
- package/assets/api/vendor_modules/es-errors/ref.js +4 -0
- package/assets/api/vendor_modules/es-errors/syntax.d.ts +3 -0
- package/assets/api/vendor_modules/es-errors/syntax.js +4 -0
- package/assets/api/vendor_modules/es-errors/test/index.js +19 -0
- package/assets/api/vendor_modules/es-errors/tsconfig.json +49 -0
- package/assets/api/vendor_modules/es-errors/type.d.ts +3 -0
- package/assets/api/vendor_modules/es-errors/type.js +4 -0
- package/assets/api/vendor_modules/es-errors/uri.d.ts +3 -0
- package/assets/api/vendor_modules/es-errors/uri.js +4 -0
- package/assets/api/vendor_modules/es-object-atoms/.eslintrc +16 -0
- package/assets/api/vendor_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/es-object-atoms/CHANGELOG.md +44 -0
- package/assets/api/vendor_modules/es-object-atoms/LICENSE +21 -0
- package/assets/api/vendor_modules/es-object-atoms/README.md +63 -0
- package/assets/api/vendor_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/assets/api/vendor_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/assets/api/vendor_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/assets/api/vendor_modules/es-object-atoms/ToObject.js +10 -0
- package/assets/api/vendor_modules/es-object-atoms/index.d.ts +3 -0
- package/assets/api/vendor_modules/es-object-atoms/index.js +4 -0
- package/assets/api/vendor_modules/es-object-atoms/isObject.d.ts +3 -0
- package/assets/api/vendor_modules/es-object-atoms/isObject.js +6 -0
- package/assets/api/vendor_modules/es-object-atoms/package.json +79 -0
- package/assets/api/vendor_modules/es-object-atoms/test/index.js +38 -0
- package/assets/api/vendor_modules/es-object-atoms/tsconfig.json +7 -0
- package/assets/api/vendor_modules/escape-html/LICENSE +24 -0
- package/assets/api/vendor_modules/escape-html/Readme.md +43 -0
- package/assets/api/vendor_modules/escape-html/index.js +78 -0
- package/assets/api/vendor_modules/escape-html/package.json +24 -0
- package/assets/api/vendor_modules/etag/HISTORY.md +83 -0
- package/assets/api/vendor_modules/etag/LICENSE +22 -0
- package/assets/api/vendor_modules/etag/README.md +159 -0
- package/assets/api/vendor_modules/etag/index.js +131 -0
- package/assets/api/vendor_modules/etag/package.json +47 -0
- package/assets/api/vendor_modules/express/History.md +3676 -0
- package/assets/api/vendor_modules/express/LICENSE +24 -0
- package/assets/api/vendor_modules/express/Readme.md +260 -0
- package/assets/api/vendor_modules/express/index.js +11 -0
- package/assets/api/vendor_modules/express/lib/application.js +661 -0
- package/assets/api/vendor_modules/express/lib/express.js +116 -0
- package/assets/api/vendor_modules/express/lib/middleware/init.js +43 -0
- package/assets/api/vendor_modules/express/lib/middleware/query.js +47 -0
- package/assets/api/vendor_modules/express/lib/request.js +525 -0
- package/assets/api/vendor_modules/express/lib/response.js +1179 -0
- package/assets/api/vendor_modules/express/lib/router/index.js +673 -0
- package/assets/api/vendor_modules/express/lib/router/layer.js +181 -0
- package/assets/api/vendor_modules/express/lib/router/route.js +230 -0
- package/assets/api/vendor_modules/express/lib/utils.js +304 -0
- package/assets/api/vendor_modules/express/lib/view.js +182 -0
- package/assets/api/vendor_modules/express/package.json +102 -0
- package/assets/api/vendor_modules/finalhandler/HISTORY.md +216 -0
- package/assets/api/vendor_modules/finalhandler/LICENSE +22 -0
- package/assets/api/vendor_modules/finalhandler/README.md +147 -0
- package/assets/api/vendor_modules/finalhandler/SECURITY.md +25 -0
- package/assets/api/vendor_modules/finalhandler/index.js +341 -0
- package/assets/api/vendor_modules/finalhandler/package.json +47 -0
- package/assets/api/vendor_modules/forwarded/HISTORY.md +21 -0
- package/assets/api/vendor_modules/forwarded/LICENSE +22 -0
- package/assets/api/vendor_modules/forwarded/README.md +57 -0
- package/assets/api/vendor_modules/forwarded/index.js +90 -0
- package/assets/api/vendor_modules/forwarded/package.json +45 -0
- package/assets/api/vendor_modules/fresh/HISTORY.md +70 -0
- package/assets/api/vendor_modules/fresh/LICENSE +23 -0
- package/assets/api/vendor_modules/fresh/README.md +119 -0
- package/assets/api/vendor_modules/fresh/index.js +137 -0
- package/assets/api/vendor_modules/fresh/package.json +46 -0
- package/assets/api/vendor_modules/function-bind/.eslintrc +21 -0
- package/assets/api/vendor_modules/function-bind/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/function-bind/.github/SECURITY.md +3 -0
- package/assets/api/vendor_modules/function-bind/.nycrc +13 -0
- package/assets/api/vendor_modules/function-bind/CHANGELOG.md +136 -0
- package/assets/api/vendor_modules/function-bind/LICENSE +20 -0
- package/assets/api/vendor_modules/function-bind/README.md +46 -0
- package/assets/api/vendor_modules/function-bind/implementation.js +84 -0
- package/assets/api/vendor_modules/function-bind/index.js +5 -0
- package/assets/api/vendor_modules/function-bind/package.json +87 -0
- package/assets/api/vendor_modules/function-bind/test/.eslintrc +9 -0
- package/assets/api/vendor_modules/function-bind/test/index.js +252 -0
- package/assets/api/vendor_modules/get-intrinsic/.eslintrc +42 -0
- package/assets/api/vendor_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/get-intrinsic/.nycrc +9 -0
- package/assets/api/vendor_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/assets/api/vendor_modules/get-intrinsic/LICENSE +21 -0
- package/assets/api/vendor_modules/get-intrinsic/README.md +71 -0
- package/assets/api/vendor_modules/get-intrinsic/index.js +378 -0
- package/assets/api/vendor_modules/get-intrinsic/package.json +97 -0
- package/assets/api/vendor_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/assets/api/vendor_modules/get-proto/.eslintrc +10 -0
- package/assets/api/vendor_modules/get-proto/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/get-proto/.nycrc +9 -0
- package/assets/api/vendor_modules/get-proto/CHANGELOG.md +21 -0
- package/assets/api/vendor_modules/get-proto/LICENSE +21 -0
- package/assets/api/vendor_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/assets/api/vendor_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/assets/api/vendor_modules/get-proto/README.md +50 -0
- package/assets/api/vendor_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/assets/api/vendor_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/assets/api/vendor_modules/get-proto/index.d.ts +5 -0
- package/assets/api/vendor_modules/get-proto/index.js +27 -0
- package/assets/api/vendor_modules/get-proto/package.json +81 -0
- package/assets/api/vendor_modules/get-proto/test/index.js +68 -0
- package/assets/api/vendor_modules/get-proto/tsconfig.json +9 -0
- package/assets/api/vendor_modules/gopd/.eslintrc +16 -0
- package/assets/api/vendor_modules/gopd/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/gopd/CHANGELOG.md +45 -0
- package/assets/api/vendor_modules/gopd/LICENSE +21 -0
- package/assets/api/vendor_modules/gopd/README.md +40 -0
- package/assets/api/vendor_modules/gopd/gOPD.d.ts +1 -0
- package/assets/api/vendor_modules/gopd/gOPD.js +4 -0
- package/assets/api/vendor_modules/gopd/index.d.ts +5 -0
- package/assets/api/vendor_modules/gopd/index.js +15 -0
- package/assets/api/vendor_modules/gopd/package.json +77 -0
- package/assets/api/vendor_modules/gopd/test/index.js +36 -0
- package/assets/api/vendor_modules/gopd/tsconfig.json +9 -0
- package/assets/api/vendor_modules/has-symbols/.eslintrc +11 -0
- package/assets/api/vendor_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/has-symbols/.nycrc +9 -0
- package/assets/api/vendor_modules/has-symbols/CHANGELOG.md +91 -0
- package/assets/api/vendor_modules/has-symbols/LICENSE +21 -0
- package/assets/api/vendor_modules/has-symbols/README.md +46 -0
- package/assets/api/vendor_modules/has-symbols/index.d.ts +3 -0
- package/assets/api/vendor_modules/has-symbols/index.js +14 -0
- package/assets/api/vendor_modules/has-symbols/package.json +111 -0
- package/assets/api/vendor_modules/has-symbols/shams.d.ts +3 -0
- package/assets/api/vendor_modules/has-symbols/shams.js +45 -0
- package/assets/api/vendor_modules/has-symbols/test/index.js +22 -0
- package/assets/api/vendor_modules/has-symbols/test/shams/core-js.js +29 -0
- package/assets/api/vendor_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/assets/api/vendor_modules/has-symbols/test/tests.js +58 -0
- package/assets/api/vendor_modules/has-symbols/tsconfig.json +10 -0
- package/assets/api/vendor_modules/hasown/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/hasown/.nycrc +13 -0
- package/assets/api/vendor_modules/hasown/CHANGELOG.md +58 -0
- package/assets/api/vendor_modules/hasown/LICENSE +21 -0
- package/assets/api/vendor_modules/hasown/README.md +40 -0
- package/assets/api/vendor_modules/hasown/eslint.config.mjs +6 -0
- package/assets/api/vendor_modules/hasown/index.d.ts +3 -0
- package/assets/api/vendor_modules/hasown/index.js +8 -0
- package/assets/api/vendor_modules/hasown/package.json +91 -0
- package/assets/api/vendor_modules/hasown/tsconfig.json +6 -0
- package/assets/api/vendor_modules/http-errors/HISTORY.md +186 -0
- package/assets/api/vendor_modules/http-errors/LICENSE +23 -0
- package/assets/api/vendor_modules/http-errors/README.md +169 -0
- package/assets/api/vendor_modules/http-errors/index.js +290 -0
- package/assets/api/vendor_modules/http-errors/package.json +54 -0
- package/assets/api/vendor_modules/iconv-lite/Changelog.md +162 -0
- package/assets/api/vendor_modules/iconv-lite/LICENSE +21 -0
- package/assets/api/vendor_modules/iconv-lite/README.md +156 -0
- package/assets/api/vendor_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
- package/assets/api/vendor_modules/iconv-lite/encodings/dbcs-data.js +176 -0
- package/assets/api/vendor_modules/iconv-lite/encodings/index.js +22 -0
- package/assets/api/vendor_modules/iconv-lite/encodings/internal.js +188 -0
- package/assets/api/vendor_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- package/assets/api/vendor_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/assets/api/vendor_modules/iconv-lite/encodings/sbcs-data.js +174 -0
- package/assets/api/vendor_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/assets/api/vendor_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/assets/api/vendor_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/assets/api/vendor_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/assets/api/vendor_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/assets/api/vendor_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/assets/api/vendor_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- package/assets/api/vendor_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/assets/api/vendor_modules/iconv-lite/encodings/utf16.js +177 -0
- package/assets/api/vendor_modules/iconv-lite/encodings/utf7.js +290 -0
- package/assets/api/vendor_modules/iconv-lite/lib/bom-handling.js +52 -0
- package/assets/api/vendor_modules/iconv-lite/lib/extend-node.js +217 -0
- package/assets/api/vendor_modules/iconv-lite/lib/index.d.ts +24 -0
- package/assets/api/vendor_modules/iconv-lite/lib/index.js +153 -0
- package/assets/api/vendor_modules/iconv-lite/lib/streams.js +121 -0
- package/assets/api/vendor_modules/iconv-lite/package.json +46 -0
- package/assets/api/vendor_modules/inherits/LICENSE +16 -0
- package/assets/api/vendor_modules/inherits/README.md +42 -0
- package/assets/api/vendor_modules/inherits/inherits.js +9 -0
- package/assets/api/vendor_modules/inherits/inherits_browser.js +27 -0
- package/assets/api/vendor_modules/inherits/package.json +29 -0
- package/assets/api/vendor_modules/ipaddr.js/LICENSE +19 -0
- package/assets/api/vendor_modules/ipaddr.js/README.md +233 -0
- package/assets/api/vendor_modules/ipaddr.js/ipaddr.min.js +1 -0
- package/assets/api/vendor_modules/ipaddr.js/lib/ipaddr.js +673 -0
- package/assets/api/vendor_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
- package/assets/api/vendor_modules/ipaddr.js/package.json +35 -0
- package/assets/api/vendor_modules/math-intrinsics/.eslintrc +16 -0
- package/assets/api/vendor_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/assets/api/vendor_modules/math-intrinsics/LICENSE +21 -0
- package/assets/api/vendor_modules/math-intrinsics/README.md +50 -0
- package/assets/api/vendor_modules/math-intrinsics/abs.d.ts +1 -0
- package/assets/api/vendor_modules/math-intrinsics/abs.js +4 -0
- package/assets/api/vendor_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/assets/api/vendor_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/assets/api/vendor_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/assets/api/vendor_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/assets/api/vendor_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/assets/api/vendor_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/assets/api/vendor_modules/math-intrinsics/floor.d.ts +1 -0
- package/assets/api/vendor_modules/math-intrinsics/floor.js +4 -0
- package/assets/api/vendor_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/assets/api/vendor_modules/math-intrinsics/isFinite.js +12 -0
- package/assets/api/vendor_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/assets/api/vendor_modules/math-intrinsics/isInteger.js +16 -0
- package/assets/api/vendor_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/assets/api/vendor_modules/math-intrinsics/isNaN.js +6 -0
- package/assets/api/vendor_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/assets/api/vendor_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/assets/api/vendor_modules/math-intrinsics/max.d.ts +1 -0
- package/assets/api/vendor_modules/math-intrinsics/max.js +4 -0
- package/assets/api/vendor_modules/math-intrinsics/min.d.ts +1 -0
- package/assets/api/vendor_modules/math-intrinsics/min.js +4 -0
- package/assets/api/vendor_modules/math-intrinsics/mod.d.ts +3 -0
- package/assets/api/vendor_modules/math-intrinsics/mod.js +9 -0
- package/assets/api/vendor_modules/math-intrinsics/package.json +86 -0
- package/assets/api/vendor_modules/math-intrinsics/pow.d.ts +1 -0
- package/assets/api/vendor_modules/math-intrinsics/pow.js +4 -0
- package/assets/api/vendor_modules/math-intrinsics/round.d.ts +1 -0
- package/assets/api/vendor_modules/math-intrinsics/round.js +4 -0
- package/assets/api/vendor_modules/math-intrinsics/sign.d.ts +3 -0
- package/assets/api/vendor_modules/math-intrinsics/sign.js +11 -0
- package/assets/api/vendor_modules/math-intrinsics/test/index.js +192 -0
- package/assets/api/vendor_modules/math-intrinsics/tsconfig.json +3 -0
- package/assets/api/vendor_modules/media-typer/HISTORY.md +22 -0
- package/assets/api/vendor_modules/media-typer/LICENSE +22 -0
- package/assets/api/vendor_modules/media-typer/README.md +81 -0
- package/assets/api/vendor_modules/media-typer/index.js +270 -0
- package/assets/api/vendor_modules/media-typer/package.json +26 -0
- package/assets/api/vendor_modules/merge-descriptors/HISTORY.md +21 -0
- package/assets/api/vendor_modules/merge-descriptors/LICENSE +23 -0
- package/assets/api/vendor_modules/merge-descriptors/README.md +49 -0
- package/assets/api/vendor_modules/merge-descriptors/index.js +60 -0
- package/assets/api/vendor_modules/merge-descriptors/package.json +39 -0
- package/assets/api/vendor_modules/methods/HISTORY.md +29 -0
- package/assets/api/vendor_modules/methods/LICENSE +24 -0
- package/assets/api/vendor_modules/methods/README.md +51 -0
- package/assets/api/vendor_modules/methods/index.js +69 -0
- package/assets/api/vendor_modules/methods/package.json +36 -0
- package/assets/api/vendor_modules/mime/CHANGELOG.md +164 -0
- package/assets/api/vendor_modules/mime/LICENSE +21 -0
- package/assets/api/vendor_modules/mime/README.md +90 -0
- package/assets/api/vendor_modules/mime/cli.js +8 -0
- package/assets/api/vendor_modules/mime/mime.js +108 -0
- package/assets/api/vendor_modules/mime/package.json +44 -0
- package/assets/api/vendor_modules/mime/src/build.js +53 -0
- package/assets/api/vendor_modules/mime/src/test.js +60 -0
- package/assets/api/vendor_modules/mime/types.json +1 -0
- package/assets/api/vendor_modules/mime-db/HISTORY.md +507 -0
- package/assets/api/vendor_modules/mime-db/LICENSE +23 -0
- package/assets/api/vendor_modules/mime-db/README.md +100 -0
- package/assets/api/vendor_modules/mime-db/db.json +8519 -0
- package/assets/api/vendor_modules/mime-db/index.js +12 -0
- package/assets/api/vendor_modules/mime-db/package.json +60 -0
- package/assets/api/vendor_modules/mime-types/HISTORY.md +397 -0
- package/assets/api/vendor_modules/mime-types/LICENSE +23 -0
- package/assets/api/vendor_modules/mime-types/README.md +113 -0
- package/assets/api/vendor_modules/mime-types/index.js +188 -0
- package/assets/api/vendor_modules/mime-types/package.json +44 -0
- package/assets/api/vendor_modules/ms/index.js +152 -0
- package/assets/api/vendor_modules/ms/license.md +21 -0
- package/assets/api/vendor_modules/ms/package.json +37 -0
- package/assets/api/vendor_modules/ms/readme.md +51 -0
- package/assets/api/vendor_modules/negotiator/HISTORY.md +108 -0
- package/assets/api/vendor_modules/negotiator/LICENSE +24 -0
- package/assets/api/vendor_modules/negotiator/README.md +203 -0
- package/assets/api/vendor_modules/negotiator/index.js +82 -0
- package/assets/api/vendor_modules/negotiator/lib/charset.js +169 -0
- package/assets/api/vendor_modules/negotiator/lib/encoding.js +184 -0
- package/assets/api/vendor_modules/negotiator/lib/language.js +179 -0
- package/assets/api/vendor_modules/negotiator/lib/mediaType.js +294 -0
- package/assets/api/vendor_modules/negotiator/package.json +42 -0
- package/assets/api/vendor_modules/object-inspect/.eslintrc +53 -0
- package/assets/api/vendor_modules/object-inspect/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/object-inspect/.nycrc +13 -0
- package/assets/api/vendor_modules/object-inspect/CHANGELOG.md +424 -0
- package/assets/api/vendor_modules/object-inspect/LICENSE +21 -0
- package/assets/api/vendor_modules/object-inspect/example/all.js +23 -0
- package/assets/api/vendor_modules/object-inspect/example/circular.js +6 -0
- package/assets/api/vendor_modules/object-inspect/example/fn.js +5 -0
- package/assets/api/vendor_modules/object-inspect/example/inspect.js +10 -0
- package/assets/api/vendor_modules/object-inspect/index.js +544 -0
- package/assets/api/vendor_modules/object-inspect/package-support.json +20 -0
- package/assets/api/vendor_modules/object-inspect/package.json +105 -0
- package/assets/api/vendor_modules/object-inspect/readme.markdown +84 -0
- package/assets/api/vendor_modules/object-inspect/test/bigint.js +58 -0
- package/assets/api/vendor_modules/object-inspect/test/browser/dom.js +15 -0
- package/assets/api/vendor_modules/object-inspect/test/circular.js +16 -0
- package/assets/api/vendor_modules/object-inspect/test/deep.js +12 -0
- package/assets/api/vendor_modules/object-inspect/test/element.js +53 -0
- package/assets/api/vendor_modules/object-inspect/test/err.js +48 -0
- package/assets/api/vendor_modules/object-inspect/test/fakes.js +29 -0
- package/assets/api/vendor_modules/object-inspect/test/fn.js +76 -0
- package/assets/api/vendor_modules/object-inspect/test/global.js +17 -0
- package/assets/api/vendor_modules/object-inspect/test/has.js +15 -0
- package/assets/api/vendor_modules/object-inspect/test/holes.js +15 -0
- package/assets/api/vendor_modules/object-inspect/test/indent-option.js +271 -0
- package/assets/api/vendor_modules/object-inspect/test/inspect.js +139 -0
- package/assets/api/vendor_modules/object-inspect/test/lowbyte.js +12 -0
- package/assets/api/vendor_modules/object-inspect/test/number.js +58 -0
- package/assets/api/vendor_modules/object-inspect/test/quoteStyle.js +26 -0
- package/assets/api/vendor_modules/object-inspect/test/toStringTag.js +40 -0
- package/assets/api/vendor_modules/object-inspect/test/undef.js +12 -0
- package/assets/api/vendor_modules/object-inspect/test/values.js +261 -0
- package/assets/api/vendor_modules/object-inspect/test-core-js.js +26 -0
- package/assets/api/vendor_modules/object-inspect/util.inspect.js +1 -0
- package/assets/api/vendor_modules/on-finished/HISTORY.md +98 -0
- package/assets/api/vendor_modules/on-finished/LICENSE +23 -0
- package/assets/api/vendor_modules/on-finished/README.md +162 -0
- package/assets/api/vendor_modules/on-finished/index.js +234 -0
- package/assets/api/vendor_modules/on-finished/package.json +39 -0
- package/assets/api/vendor_modules/parseurl/HISTORY.md +58 -0
- package/assets/api/vendor_modules/parseurl/LICENSE +24 -0
- package/assets/api/vendor_modules/parseurl/README.md +133 -0
- package/assets/api/vendor_modules/parseurl/index.js +158 -0
- package/assets/api/vendor_modules/parseurl/package.json +40 -0
- package/assets/api/vendor_modules/path-to-regexp/LICENSE +21 -0
- package/assets/api/vendor_modules/path-to-regexp/Readme.md +35 -0
- package/assets/api/vendor_modules/path-to-regexp/index.js +158 -0
- package/assets/api/vendor_modules/path-to-regexp/package.json +30 -0
- package/assets/api/vendor_modules/proxy-addr/HISTORY.md +167 -0
- package/assets/api/vendor_modules/proxy-addr/LICENSE +22 -0
- package/assets/api/vendor_modules/proxy-addr/README.md +139 -0
- package/assets/api/vendor_modules/proxy-addr/index.js +359 -0
- package/assets/api/vendor_modules/proxy-addr/package.json +51 -0
- package/assets/api/vendor_modules/qs/.editorconfig +46 -0
- package/assets/api/vendor_modules/qs/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/qs/.github/SECURITY.md +11 -0
- package/assets/api/vendor_modules/qs/.github/THREAT_MODEL.md +78 -0
- package/assets/api/vendor_modules/qs/.nycrc +13 -0
- package/assets/api/vendor_modules/qs/CHANGELOG.md +833 -0
- package/assets/api/vendor_modules/qs/LICENSE.md +29 -0
- package/assets/api/vendor_modules/qs/README.md +758 -0
- package/assets/api/vendor_modules/qs/dist/qs.js +141 -0
- package/assets/api/vendor_modules/qs/eslint.config.mjs +57 -0
- package/assets/api/vendor_modules/qs/lib/formats.js +23 -0
- package/assets/api/vendor_modules/qs/lib/index.js +11 -0
- package/assets/api/vendor_modules/qs/lib/parse.js +414 -0
- package/assets/api/vendor_modules/qs/lib/stringify.js +363 -0
- package/assets/api/vendor_modules/qs/lib/utils.js +381 -0
- package/assets/api/vendor_modules/qs/package.json +95 -0
- package/assets/api/vendor_modules/qs/test/empty-keys-cases.js +267 -0
- package/assets/api/vendor_modules/qs/test/parse.js +1933 -0
- package/assets/api/vendor_modules/qs/test/stringify.js +1448 -0
- package/assets/api/vendor_modules/qs/test/utils.js +626 -0
- package/assets/api/vendor_modules/range-parser/HISTORY.md +56 -0
- package/assets/api/vendor_modules/range-parser/LICENSE +23 -0
- package/assets/api/vendor_modules/range-parser/README.md +84 -0
- package/assets/api/vendor_modules/range-parser/index.js +162 -0
- package/assets/api/vendor_modules/range-parser/package.json +44 -0
- package/assets/api/vendor_modules/raw-body/LICENSE +22 -0
- package/assets/api/vendor_modules/raw-body/README.md +223 -0
- package/assets/api/vendor_modules/raw-body/index.d.ts +87 -0
- package/assets/api/vendor_modules/raw-body/index.js +336 -0
- package/assets/api/vendor_modules/raw-body/package.json +47 -0
- package/assets/api/vendor_modules/safe-buffer/LICENSE +21 -0
- package/assets/api/vendor_modules/safe-buffer/README.md +584 -0
- package/assets/api/vendor_modules/safe-buffer/index.d.ts +187 -0
- package/assets/api/vendor_modules/safe-buffer/index.js +65 -0
- package/assets/api/vendor_modules/safe-buffer/package.json +51 -0
- package/assets/api/vendor_modules/safer-buffer/LICENSE +21 -0
- package/assets/api/vendor_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/assets/api/vendor_modules/safer-buffer/Readme.md +156 -0
- package/assets/api/vendor_modules/safer-buffer/dangerous.js +58 -0
- package/assets/api/vendor_modules/safer-buffer/package.json +34 -0
- package/assets/api/vendor_modules/safer-buffer/safer.js +77 -0
- package/assets/api/vendor_modules/safer-buffer/tests.js +406 -0
- package/assets/api/vendor_modules/send/HISTORY.md +538 -0
- package/assets/api/vendor_modules/send/LICENSE +23 -0
- package/assets/api/vendor_modules/send/README.md +327 -0
- package/assets/api/vendor_modules/send/SECURITY.md +24 -0
- package/assets/api/vendor_modules/send/index.js +1142 -0
- package/assets/api/vendor_modules/send/node_modules/ms/index.js +162 -0
- package/assets/api/vendor_modules/send/node_modules/ms/license.md +21 -0
- package/assets/api/vendor_modules/send/node_modules/ms/package.json +38 -0
- package/assets/api/vendor_modules/send/node_modules/ms/readme.md +59 -0
- package/assets/api/vendor_modules/send/package.json +62 -0
- package/assets/api/vendor_modules/serve-static/HISTORY.md +493 -0
- package/assets/api/vendor_modules/serve-static/LICENSE +25 -0
- package/assets/api/vendor_modules/serve-static/README.md +257 -0
- package/assets/api/vendor_modules/serve-static/index.js +209 -0
- package/assets/api/vendor_modules/serve-static/package.json +42 -0
- package/assets/api/vendor_modules/serverless-http/LICENSE.txt +33 -0
- package/assets/api/vendor_modules/serverless-http/README.md +117 -0
- package/assets/api/vendor_modules/serverless-http/lib/finish.js +42 -0
- package/assets/api/vendor_modules/serverless-http/lib/framework/get-framework.js +79 -0
- package/assets/api/vendor_modules/serverless-http/lib/provider/aws/clean-up-event.js +98 -0
- package/assets/api/vendor_modules/serverless-http/lib/provider/aws/create-request.js +110 -0
- package/assets/api/vendor_modules/serverless-http/lib/provider/aws/format-response.js +45 -0
- package/assets/api/vendor_modules/serverless-http/lib/provider/aws/index.js +15 -0
- package/assets/api/vendor_modules/serverless-http/lib/provider/aws/is-binary.js +42 -0
- package/assets/api/vendor_modules/serverless-http/lib/provider/aws/sanitize-headers.js +21 -0
- package/assets/api/vendor_modules/serverless-http/lib/provider/azure/clean-up-request.js +41 -0
- package/assets/api/vendor_modules/serverless-http/lib/provider/azure/create-request.js +45 -0
- package/assets/api/vendor_modules/serverless-http/lib/provider/azure/format-response.js +18 -0
- package/assets/api/vendor_modules/serverless-http/lib/provider/azure/index.js +13 -0
- package/assets/api/vendor_modules/serverless-http/lib/provider/azure/is-binary.js +42 -0
- package/assets/api/vendor_modules/serverless-http/lib/provider/azure/sanitize-headers.js +23 -0
- package/assets/api/vendor_modules/serverless-http/lib/provider/azure/set-cookie.json +1 -0
- package/assets/api/vendor_modules/serverless-http/lib/provider/get-provider.js +17 -0
- package/assets/api/vendor_modules/serverless-http/lib/request.js +38 -0
- package/assets/api/vendor_modules/serverless-http/lib/response.js +135 -0
- package/assets/api/vendor_modules/serverless-http/package.json +93 -0
- package/assets/api/vendor_modules/serverless-http/serverless-http.d.ts +41 -0
- package/assets/api/vendor_modules/serverless-http/serverless-http.js +23 -0
- package/assets/api/vendor_modules/setprototypeof/LICENSE +13 -0
- package/assets/api/vendor_modules/setprototypeof/README.md +31 -0
- package/assets/api/vendor_modules/setprototypeof/index.d.ts +2 -0
- package/assets/api/vendor_modules/setprototypeof/index.js +17 -0
- package/assets/api/vendor_modules/setprototypeof/package.json +38 -0
- package/assets/api/vendor_modules/setprototypeof/test/index.js +24 -0
- package/assets/api/vendor_modules/side-channel/.editorconfig +9 -0
- package/assets/api/vendor_modules/side-channel/.eslintrc +12 -0
- package/assets/api/vendor_modules/side-channel/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/side-channel/.nycrc +13 -0
- package/assets/api/vendor_modules/side-channel/CHANGELOG.md +120 -0
- package/assets/api/vendor_modules/side-channel/LICENSE +21 -0
- package/assets/api/vendor_modules/side-channel/README.md +61 -0
- package/assets/api/vendor_modules/side-channel/index.d.ts +14 -0
- package/assets/api/vendor_modules/side-channel/index.js +46 -0
- package/assets/api/vendor_modules/side-channel/package.json +85 -0
- package/assets/api/vendor_modules/side-channel/test/index.js +120 -0
- package/assets/api/vendor_modules/side-channel/tsconfig.json +9 -0
- package/assets/api/vendor_modules/side-channel-list/.editorconfig +9 -0
- package/assets/api/vendor_modules/side-channel-list/.eslintrc +11 -0
- package/assets/api/vendor_modules/side-channel-list/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/side-channel-list/.nycrc +13 -0
- package/assets/api/vendor_modules/side-channel-list/CHANGELOG.md +36 -0
- package/assets/api/vendor_modules/side-channel-list/LICENSE +21 -0
- package/assets/api/vendor_modules/side-channel-list/README.md +62 -0
- package/assets/api/vendor_modules/side-channel-list/index.d.ts +13 -0
- package/assets/api/vendor_modules/side-channel-list/index.js +111 -0
- package/assets/api/vendor_modules/side-channel-list/list.d.ts +14 -0
- package/assets/api/vendor_modules/side-channel-list/package.json +77 -0
- package/assets/api/vendor_modules/side-channel-list/test/index.js +154 -0
- package/assets/api/vendor_modules/side-channel-list/tsconfig.json +9 -0
- package/assets/api/vendor_modules/side-channel-map/.editorconfig +9 -0
- package/assets/api/vendor_modules/side-channel-map/.eslintrc +11 -0
- package/assets/api/vendor_modules/side-channel-map/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/side-channel-map/.nycrc +13 -0
- package/assets/api/vendor_modules/side-channel-map/CHANGELOG.md +22 -0
- package/assets/api/vendor_modules/side-channel-map/LICENSE +21 -0
- package/assets/api/vendor_modules/side-channel-map/README.md +62 -0
- package/assets/api/vendor_modules/side-channel-map/index.d.ts +15 -0
- package/assets/api/vendor_modules/side-channel-map/index.js +68 -0
- package/assets/api/vendor_modules/side-channel-map/package.json +80 -0
- package/assets/api/vendor_modules/side-channel-map/test/index.js +114 -0
- package/assets/api/vendor_modules/side-channel-map/tsconfig.json +9 -0
- package/assets/api/vendor_modules/side-channel-weakmap/.editorconfig +9 -0
- package/assets/api/vendor_modules/side-channel-weakmap/.eslintrc +12 -0
- package/assets/api/vendor_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
- package/assets/api/vendor_modules/side-channel-weakmap/.nycrc +13 -0
- package/assets/api/vendor_modules/side-channel-weakmap/CHANGELOG.md +28 -0
- package/assets/api/vendor_modules/side-channel-weakmap/LICENSE +21 -0
- package/assets/api/vendor_modules/side-channel-weakmap/README.md +62 -0
- package/assets/api/vendor_modules/side-channel-weakmap/index.d.ts +15 -0
- package/assets/api/vendor_modules/side-channel-weakmap/index.js +84 -0
- package/assets/api/vendor_modules/side-channel-weakmap/package.json +87 -0
- package/assets/api/vendor_modules/side-channel-weakmap/test/index.js +114 -0
- package/assets/api/vendor_modules/side-channel-weakmap/tsconfig.json +9 -0
- package/assets/api/vendor_modules/statuses/HISTORY.md +87 -0
- package/assets/api/vendor_modules/statuses/LICENSE +23 -0
- package/assets/api/vendor_modules/statuses/README.md +139 -0
- package/assets/api/vendor_modules/statuses/codes.json +65 -0
- package/assets/api/vendor_modules/statuses/index.js +146 -0
- package/assets/api/vendor_modules/statuses/package.json +49 -0
- package/assets/api/vendor_modules/toidentifier/HISTORY.md +9 -0
- package/assets/api/vendor_modules/toidentifier/LICENSE +21 -0
- package/assets/api/vendor_modules/toidentifier/README.md +61 -0
- package/assets/api/vendor_modules/toidentifier/index.js +32 -0
- package/assets/api/vendor_modules/toidentifier/package.json +38 -0
- package/assets/api/vendor_modules/type-is/HISTORY.md +259 -0
- package/assets/api/vendor_modules/type-is/LICENSE +23 -0
- package/assets/api/vendor_modules/type-is/README.md +170 -0
- package/assets/api/vendor_modules/type-is/index.js +266 -0
- package/assets/api/vendor_modules/type-is/package.json +45 -0
- package/assets/api/vendor_modules/unpipe/HISTORY.md +4 -0
- package/assets/api/vendor_modules/unpipe/LICENSE +22 -0
- package/assets/api/vendor_modules/unpipe/README.md +43 -0
- package/assets/api/vendor_modules/unpipe/index.js +69 -0
- package/assets/api/vendor_modules/unpipe/package.json +27 -0
- package/assets/api/vendor_modules/utils-merge/LICENSE +20 -0
- package/assets/api/vendor_modules/utils-merge/README.md +34 -0
- package/assets/api/vendor_modules/utils-merge/index.js +23 -0
- package/assets/api/vendor_modules/utils-merge/package.json +40 -0
- package/assets/api/vendor_modules/vary/HISTORY.md +39 -0
- package/assets/api/vendor_modules/vary/LICENSE +22 -0
- package/assets/api/vendor_modules/vary/README.md +101 -0
- package/assets/api/vendor_modules/vary/index.js +149 -0
- package/assets/api/vendor_modules/vary/package.json +43 -0
- package/assets/federation-presignup/index.js +108 -0
- package/assets/firstadmin/index.js +361 -0
- package/assets/headscale-apikey/index.js +140 -0
- package/assets/invoke-relay/index.js +96 -0
- package/assets/issuer-canary/index.js +71 -0
- package/assets/issuer-publish/index.js +87 -0
- package/assets/keyminter/index.js +209 -0
- package/assets/plugin-authorizer/index.js +1740 -0
- package/assets/plugin-catalog/index.js +881 -0
- package/assets/reapproval/index.js +3761 -0
- package/assets/sg-manager/index.js +176 -0
- package/assets/tailnet-resolver/index.js +55 -0
- package/assets/web/chunk-2MOGDYK4.js +1 -0
- package/assets/web/chunk-2SO4BVIT.js +1 -0
- package/assets/web/chunk-2V6RSAAC.js +1 -0
- package/assets/web/chunk-32GNBTAL.js +1 -0
- package/assets/web/chunk-33SYY2JB.js +1 -0
- package/assets/web/chunk-3VWYT7AX.js +1 -0
- package/assets/web/chunk-4FG4DAWU.js +4 -0
- package/assets/web/chunk-4N2IUS6T.js +1 -0
- package/assets/web/chunk-4SK6XQ6C.js +1 -0
- package/assets/web/chunk-65WE5MXA.js +8 -0
- package/assets/web/chunk-6D7SSSJF.js +1 -0
- package/assets/web/chunk-6KFR7DYY.js +1 -0
- package/assets/web/chunk-A4WHI3ZG.js +8 -0
- package/assets/web/chunk-BNFKRZTP.js +1 -0
- package/assets/web/chunk-CG56PH3M.js +1 -0
- package/assets/web/chunk-CGO25AIM.js +1 -0
- package/assets/web/chunk-CP4XZPOA.js +1 -0
- package/assets/web/chunk-CV7EODPO.js +1 -0
- package/assets/web/chunk-D7TR2ORJ.js +1 -0
- package/assets/web/chunk-DCOFBAKJ.js +1 -0
- package/assets/web/chunk-DOLRLYW7.js +1 -0
- package/assets/web/chunk-EEJ3X466.js +1 -0
- package/assets/web/chunk-EQ4PF25J.js +1 -0
- package/assets/web/chunk-EVP5UVDQ.js +1 -0
- package/assets/web/chunk-EW2VMNHE.js +1 -0
- package/assets/web/chunk-FIUVIKAN.js +1 -0
- package/assets/web/chunk-GHEU25TG.js +1 -0
- package/assets/web/chunk-GK2T2SMO.js +1 -0
- package/assets/web/chunk-GKI3R2JB.js +1 -0
- package/assets/web/chunk-GPKKIOHD.js +2 -0
- package/assets/web/chunk-H4AVFUDM.js +1 -0
- package/assets/web/chunk-H5H727H6.js +1 -0
- package/assets/web/chunk-HGVFH6YM.js +1 -0
- package/assets/web/chunk-HHPIANBK.js +1 -0
- package/assets/web/chunk-HK56COCB.js +1 -0
- package/assets/web/chunk-HZUB7LFV.js +1 -0
- package/assets/web/chunk-I7NTNTBA.js +1 -0
- package/assets/web/chunk-IKK5DQ3Z.js +1 -0
- package/assets/web/chunk-IMH56UBX.js +1 -0
- package/assets/web/chunk-J3SSPCFV.js +1 -0
- package/assets/web/chunk-J4C7C5KO.js +1 -0
- package/assets/web/chunk-J57JB4MU.js +1 -0
- package/assets/web/chunk-JMBXRK3I.js +4 -0
- package/assets/web/chunk-KCCEQIXX.js +1 -0
- package/assets/web/chunk-KEBESIXR.js +1 -0
- package/assets/web/chunk-KPNHT4MK.js +1 -0
- package/assets/web/chunk-LMLXTVZG.js +1 -0
- package/assets/web/chunk-M6OAYNRE.js +1 -0
- package/assets/web/chunk-M7MGX5I4.js +1 -0
- package/assets/web/chunk-MU2VNTNY.js +1 -0
- package/assets/web/chunk-NABAVDRL.js +1 -0
- package/assets/web/chunk-NO5D6WDF.js +1 -0
- package/assets/web/chunk-O4QSFUXB.js +1 -0
- package/assets/web/chunk-OATVFQXO.js +1 -0
- package/assets/web/chunk-P5WRM37W.js +5 -0
- package/assets/web/chunk-PCP6D2SM.js +1 -0
- package/assets/web/chunk-PMMBJK7Q.js +1 -0
- package/assets/web/chunk-PSMER3HX.js +1 -0
- package/assets/web/chunk-QPBWZLCT.js +1 -0
- package/assets/web/chunk-QVABVDO5.js +1 -0
- package/assets/web/chunk-RI77LE5V.js +1 -0
- package/assets/web/chunk-RKGUEXZ2.js +1 -0
- package/assets/web/chunk-RMFH2YTZ.js +1 -0
- package/assets/web/chunk-RROPCBUH.js +1 -0
- package/assets/web/chunk-SJMLX5AT.js +1 -0
- package/assets/web/chunk-TKVALOE4.js +2 -0
- package/assets/web/chunk-TM43WUKM.js +1 -0
- package/assets/web/chunk-VKWV3ANT.js +1 -0
- package/assets/web/chunk-VTMYG6YW.js +1 -0
- package/assets/web/chunk-VWW4SA5R.js +1 -0
- package/assets/web/chunk-WEDAFMID.js +1 -0
- package/assets/web/chunk-WFIHWVQO.js +1 -0
- package/assets/web/chunk-XJM3HDJQ.js +1 -0
- package/assets/web/chunk-YVJV2RUY.js +1 -0
- package/assets/web/chunk-Z3KONI7L.js +1 -0
- package/assets/web/chunk-ZDCURXPS.js +1 -0
- package/assets/web/favicon.ico +0 -0
- package/assets/web/index.html +63 -0
- package/assets/web/main-S6E3BC5O.js +2 -0
- package/assets/web/polyfills-7RSNIJ6J.js +2 -0
- package/assets/web/styles-R6ZUWC6K.css +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +66 -0
- package/dist/lambdacode/api/services/brandingShapes.d.ts +5 -0
- package/dist/lambdacode/api/services/brandingShapes.js +15 -0
- package/dist/lambdacode/issuer/objects.d.ts +8 -0
- package/dist/lambdacode/issuer/objects.js +11 -0
- package/dist/lambdacode/network/naming.d.ts +52 -0
- package/dist/lambdacode/network/naming.js +67 -0
- package/dist/lib/access-portal-hub.d.ts +53 -0
- package/dist/lib/access-portal-hub.js +87 -0
- package/dist/lib/access-portal.d.ts +32 -0
- package/dist/lib/access-portal.js +174 -0
- package/dist/lib/audit-log.d.ts +18 -0
- package/dist/lib/audit-log.js +25 -0
- package/dist/lib/connector-stack.d.ts +28 -0
- package/dist/lib/connector-stack.js +81 -0
- package/dist/lib/constructs/app-function.d.ts +14 -0
- package/dist/lib/constructs/app-function.js +84 -0
- package/dist/lib/constructs/app-table.d.ts +12 -0
- package/dist/lib/constructs/app-table.js +58 -0
- package/dist/lib/constructs/mirrored-image.d.ts +12 -0
- package/dist/lib/constructs/mirrored-image.js +80 -0
- package/dist/lib/constructs/monitoring.d.ts +21 -0
- package/dist/lib/constructs/monitoring.js +133 -0
- package/dist/lib/constructs/oidc-issuer.d.ts +44 -0
- package/dist/lib/constructs/oidc-issuer.js +234 -0
- package/dist/lib/constructs/scratch-tmpfs.d.ts +5 -0
- package/dist/lib/constructs/scratch-tmpfs.js +48 -0
- package/dist/lib/constructs/sg-manager.d.ts +27 -0
- package/dist/lib/constructs/sg-manager.js +88 -0
- package/dist/lib/constructs/tailnet-connector.d.ts +29 -0
- package/dist/lib/constructs/tailnet-connector.js +177 -0
- package/dist/lib/constructs/tailnet-resolver.d.ts +30 -0
- package/dist/lib/constructs/tailnet-resolver.js +71 -0
- package/dist/lib/constructs/target-account-trust.d.ts +32 -0
- package/dist/lib/constructs/target-account-trust.js +81 -0
- package/dist/lib/constructs/vending-api.d.ts +103 -0
- package/dist/lib/constructs/vending-api.js +203 -0
- package/dist/lib/constructs/web-acl.d.ts +61 -0
- package/dist/lib/constructs/web-acl.js +213 -0
- package/dist/lib/constructs/web-identity.d.ts +49 -0
- package/dist/lib/constructs/web-identity.js +116 -0
- package/dist/lib/creds-stack.d.ts +151 -0
- package/dist/lib/creds-stack.js +592 -0
- package/dist/lib/data-stack.d.ts +53 -0
- package/dist/lib/data-stack.js +282 -0
- package/dist/lib/dimensions-validation.d.ts +20 -0
- package/dist/lib/dimensions-validation.js +51 -0
- package/dist/lib/federation.d.ts +113 -0
- package/dist/lib/federation.js +254 -0
- package/dist/lib/managed-login-branding.json +450 -0
- package/dist/lib/network-stack.d.ts +58 -0
- package/dist/lib/network-stack.js +776 -0
- package/dist/lib/network-validation.d.ts +54 -0
- package/dist/lib/network-validation.js +220 -0
- package/dist/lib/pkg-paths.d.ts +3 -0
- package/dist/lib/pkg-paths.js +51 -0
- package/dist/lib/plugins/plugin-api.d.ts +40 -0
- package/dist/lib/plugins/plugin-api.js +125 -0
- package/dist/lib/plugins/plugin-catalog-activation.d.ts +31 -0
- package/dist/lib/plugins/plugin-catalog-activation.js +109 -0
- package/dist/lib/plugins/registration.d.ts +41 -0
- package/dist/lib/plugins/registration.js +121 -0
- package/dist/lib/plugins/runtime.d.ts +10 -0
- package/dist/lib/plugins/runtime.js +17 -0
- package/dist/lib/project-config.d.ts +164 -0
- package/dist/lib/project-config.js +2 -0
- package/dist/lib/target-account-stack.d.ts +15 -0
- package/dist/lib/target-account-stack.js +59 -0
- package/dist/lib/target-account-template.d.ts +13 -0
- package/dist/lib/target-account-template.js +64 -0
- package/dist/lib/web-cert-stack.d.ts +30 -0
- package/dist/lib/web-cert-stack.js +90 -0
- package/dist/lib/web-stack.d.ts +103 -0
- package/dist/lib/web-stack.js +540 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/README.md +303 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/backend/context.d.ts +31 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/backend/context.js +58 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/backend/index.d.ts +9 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/backend/index.js +26 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/client.d.ts +59 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/client.js +290 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/errors.d.ts +14 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/errors.js +32 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/http.d.ts +72 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/http.js +170 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/index.d.ts +11 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/index.js +28 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/theme-apply.d.ts +22 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/theme-apply.js +22 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/access.d.ts +14 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/access.js +41 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/authorizer.d.ts +17 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/authorizer.js +44 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/canonical.d.ts +2 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/canonical.js +21 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/catalog.d.ts +39 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/catalog.js +18 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/discovery.d.ts +78 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/discovery.js +48 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/fields.d.ts +7 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/fields.js +2 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/manifest.d.ts +59 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/manifest.js +19 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/messages.d.ts +111 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/messages.js +109 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/paths.d.ts +20 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/paths.js +49 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/theme.d.ts +21 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/theme.js +60 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/transport.d.ts +14 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/transport.js +10 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/validate.d.ts +27 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/validate.js +321 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/devHost.d.ts +61 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/devHost.js +99 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/fakeDocument.d.ts +12 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/fakeDocument.js +22 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/fakeWindows.d.ts +22 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/fakeWindows.js +46 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/index.d.ts +4 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/index.js +20 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/samples.d.ts +37 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/samples.js +228 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/host/host.d.ts +47 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/host/host.js +121 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/host/index.d.ts +5 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/host/index.js +22 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/index.d.ts +10 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/dist/index.js +28 -0
- package/node_modules/@fntio/infra-client-plugin-sdk/package.json +99 -0
- package/openapi.yaml +4284 -0
- package/package.json +124 -4
|
@@ -0,0 +1,881 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// lambdacode/plugins/catalog-provider.ts
|
|
21
|
+
var catalog_provider_exports = {};
|
|
22
|
+
__export(catalog_provider_exports, {
|
|
23
|
+
handler: () => handler
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(catalog_provider_exports);
|
|
26
|
+
var import_client_dynamodb5 = require("@aws-sdk/client-dynamodb");
|
|
27
|
+
var import_lib_dynamodb5 = require("@aws-sdk/lib-dynamodb");
|
|
28
|
+
|
|
29
|
+
// lambdacode/api/services/access.ts
|
|
30
|
+
var import_client_dynamodb = require("@aws-sdk/client-dynamodb");
|
|
31
|
+
|
|
32
|
+
// ../infra-client-plugin-sdk/src/contracts/manifest.ts
|
|
33
|
+
var PLUGIN_PERMISSIONS = ["user", "admin"];
|
|
34
|
+
var PLUGIN_MANIFEST_SCHEMA_VERSION = 1;
|
|
35
|
+
var PLUGIN_HOST_API_VERSION = 1;
|
|
36
|
+
var PLUGIN_ID_PATTERN = /^[a-z][a-z0-9-]{0,63}$/;
|
|
37
|
+
var AWS_ACCOUNT_PATTERN = /^\d{12}$/;
|
|
38
|
+
|
|
39
|
+
// ../infra-client-plugin-sdk/src/contracts/access.ts
|
|
40
|
+
var PLUGIN_TARGET_PREFIX = "plugin#";
|
|
41
|
+
function pluginTargetKey(target) {
|
|
42
|
+
return `${PLUGIN_TARGET_PREFIX}${target.pluginId}#${target.accountNumber}#${target.permission}`;
|
|
43
|
+
}
|
|
44
|
+
function parsePluginTargetKey(key) {
|
|
45
|
+
if (!key.startsWith(PLUGIN_TARGET_PREFIX)) return null;
|
|
46
|
+
const parts = key.slice(PLUGIN_TARGET_PREFIX.length).split("#");
|
|
47
|
+
if (parts.length !== 3) return null;
|
|
48
|
+
const [pluginId, accountNumber, permission] = parts;
|
|
49
|
+
if (!PLUGIN_ID_PATTERN.test(pluginId) || !AWS_ACCOUNT_PATTERN.test(accountNumber)) return null;
|
|
50
|
+
if (!PLUGIN_PERMISSIONS.includes(permission)) return null;
|
|
51
|
+
return { pluginId, accountNumber, permission };
|
|
52
|
+
}
|
|
53
|
+
function pluginPermissionsImpliedBy(granted, declared) {
|
|
54
|
+
if (!declared.includes(granted)) return [];
|
|
55
|
+
if (granted === "admin" && declared.includes("user")) return ["admin", "user"];
|
|
56
|
+
return [granted];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// ../infra-client-plugin-sdk/src/contracts/catalog.ts
|
|
60
|
+
function pluginCatalogStatus(record) {
|
|
61
|
+
if (!record.installed) return "removed";
|
|
62
|
+
if (record.schemaVersion !== PLUGIN_MANIFEST_SCHEMA_VERSION || record.manifest.hostApiVersion !== PLUGIN_HOST_API_VERSION) {
|
|
63
|
+
return "unsupported";
|
|
64
|
+
}
|
|
65
|
+
return record.manifest.enabled ? "active" : "disabled";
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// lambdacode/api/services/access.ts
|
|
69
|
+
var import_lib_dynamodb = require("@aws-sdk/lib-dynamodb");
|
|
70
|
+
var ddb = import_lib_dynamodb.DynamoDBDocumentClient.from(new import_client_dynamodb.DynamoDBClient({}));
|
|
71
|
+
var ACCESS_TABLE_NAME = process.env.ACCESS_TABLE_NAME;
|
|
72
|
+
var userPrincipal = (sub) => `user#${sub}`;
|
|
73
|
+
var groupPrincipal = (groupId) => `group#${groupId}`;
|
|
74
|
+
var pluginTarget = (pluginId, accountNumber, permission) => pluginTargetKey({ pluginId, accountNumber, permission });
|
|
75
|
+
var SHARE_DEF_PRINCIPAL = "sharedef";
|
|
76
|
+
var PRESENCE_TARGET = "pref#presence";
|
|
77
|
+
function parsePrincipal(p) {
|
|
78
|
+
if (p.startsWith("user#")) return { kind: "user", userId: p.slice(5) };
|
|
79
|
+
if (p.startsWith("group#")) return { kind: "group", groupId: p.slice(6) };
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
function parseTarget(t) {
|
|
83
|
+
if (t.startsWith("role#")) {
|
|
84
|
+
const rest = t.slice(5);
|
|
85
|
+
const hash = rest.indexOf("#");
|
|
86
|
+
if (hash < 0) return null;
|
|
87
|
+
return { kind: "role", accountNumber: rest.slice(0, hash), roleName: rest.slice(hash + 1) };
|
|
88
|
+
}
|
|
89
|
+
if (t.startsWith("resource#")) return { kind: "resource", resourceId: t.slice(9) };
|
|
90
|
+
if (t.startsWith("share#")) return { kind: "share", shareId: t.slice(6) };
|
|
91
|
+
if (t.startsWith("plugin#")) {
|
|
92
|
+
const p = parsePluginTargetKey(t);
|
|
93
|
+
return p ? { kind: "plugin", ...p } : null;
|
|
94
|
+
}
|
|
95
|
+
if (t.startsWith("member#")) return { kind: "member", groupId: t.slice(7) };
|
|
96
|
+
if (t.startsWith("pref#role#")) {
|
|
97
|
+
const rest = t.slice(10);
|
|
98
|
+
const hash = rest.indexOf("#");
|
|
99
|
+
if (hash < 0) return null;
|
|
100
|
+
return { kind: "pref", accountNumber: rest.slice(0, hash), roleName: rest.slice(hash + 1) };
|
|
101
|
+
}
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
var isGrantTarget = (t) => t.startsWith("role#") || t.startsWith("resource#") || t.startsWith("share#") || t.startsWith("plugin#");
|
|
105
|
+
var consistentRead = (opts) => opts.consistent ? { ConsistentRead: true } : {};
|
|
106
|
+
function isExpired(row, now = Date.now()) {
|
|
107
|
+
return Boolean(row.expiresAt) && !(Date.parse(row.expiresAt) > now);
|
|
108
|
+
}
|
|
109
|
+
async function getRow(principal, target, opts = {}) {
|
|
110
|
+
const res = await ddb.send(
|
|
111
|
+
new import_lib_dynamodb.GetCommand({ TableName: ACCESS_TABLE_NAME, Key: { principal, target }, ...consistentRead(opts) })
|
|
112
|
+
);
|
|
113
|
+
return res.Item;
|
|
114
|
+
}
|
|
115
|
+
async function queryPrincipal(principal, targetPrefix, opts = {}) {
|
|
116
|
+
const rows = [];
|
|
117
|
+
let ExclusiveStartKey;
|
|
118
|
+
do {
|
|
119
|
+
const page = await ddb.send(
|
|
120
|
+
new import_lib_dynamodb.QueryCommand({
|
|
121
|
+
TableName: ACCESS_TABLE_NAME,
|
|
122
|
+
KeyConditionExpression: targetPrefix ? "principal = :p AND begins_with(#t, :pre)" : "principal = :p",
|
|
123
|
+
ExpressionAttributeValues: {
|
|
124
|
+
":p": principal,
|
|
125
|
+
...targetPrefix ? { ":pre": targetPrefix } : {}
|
|
126
|
+
},
|
|
127
|
+
...targetPrefix ? { ExpressionAttributeNames: { "#t": "target" } } : {},
|
|
128
|
+
...consistentRead(opts),
|
|
129
|
+
ExclusiveStartKey
|
|
130
|
+
})
|
|
131
|
+
);
|
|
132
|
+
rows.push(...page?.Items ?? []);
|
|
133
|
+
ExclusiveStartKey = page?.LastEvaluatedKey;
|
|
134
|
+
} while (ExclusiveStartKey);
|
|
135
|
+
return rows;
|
|
136
|
+
}
|
|
137
|
+
async function scanAll(opts = {}) {
|
|
138
|
+
const rows = [];
|
|
139
|
+
const prefixes = opts.targetPrefixes ?? [];
|
|
140
|
+
const filter = prefixes.length ? {
|
|
141
|
+
FilterExpression: prefixes.map((_, i) => `begins_with(#t, :p${i})`).join(" OR "),
|
|
142
|
+
ExpressionAttributeNames: { "#t": "target" },
|
|
143
|
+
ExpressionAttributeValues: Object.fromEntries(prefixes.map((p, i) => [`:p${i}`, p]))
|
|
144
|
+
} : {};
|
|
145
|
+
let ExclusiveStartKey;
|
|
146
|
+
do {
|
|
147
|
+
const page = await ddb.send(
|
|
148
|
+
new import_lib_dynamodb.ScanCommand({ TableName: ACCESS_TABLE_NAME, ExclusiveStartKey, ...filter })
|
|
149
|
+
);
|
|
150
|
+
rows.push(...page?.Items ?? []);
|
|
151
|
+
ExclusiveStartKey = page?.LastEvaluatedKey;
|
|
152
|
+
} while (ExclusiveStartKey);
|
|
153
|
+
return rows;
|
|
154
|
+
}
|
|
155
|
+
function entryOf(target, direct, groups, now) {
|
|
156
|
+
const d = direct ? { grantedBy: direct.grantedBy, grantedAt: direct.grantedAt, expiresAt: direct.expiresAt } : void 0;
|
|
157
|
+
const directActive = Boolean(direct && !isExpired(direct, now));
|
|
158
|
+
const active = directActive || groups.length > 0;
|
|
159
|
+
return {
|
|
160
|
+
target,
|
|
161
|
+
direct: d,
|
|
162
|
+
groups,
|
|
163
|
+
active,
|
|
164
|
+
expiresAt: groups.length === 0 && directActive ? direct?.expiresAt : void 0
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
async function effectiveAccess(userId) {
|
|
168
|
+
const now = Date.now();
|
|
169
|
+
const own = await queryPrincipal(userPrincipal(userId));
|
|
170
|
+
const directByTarget = /* @__PURE__ */ new Map();
|
|
171
|
+
const groupIds = [];
|
|
172
|
+
for (const r of own) {
|
|
173
|
+
if (isGrantTarget(r.target)) directByTarget.set(r.target, r);
|
|
174
|
+
else if (r.target.startsWith("member#")) groupIds.push(r.target.slice("member#".length));
|
|
175
|
+
}
|
|
176
|
+
const groupsByTarget = /* @__PURE__ */ new Map();
|
|
177
|
+
for (const g of groupIds) {
|
|
178
|
+
for (const r of await queryPrincipal(groupPrincipal(g))) {
|
|
179
|
+
if (!isGrantTarget(r.target) || isExpired(r, now)) continue;
|
|
180
|
+
const list = groupsByTarget.get(r.target) ?? [];
|
|
181
|
+
list.push(g);
|
|
182
|
+
groupsByTarget.set(r.target, list);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const out = /* @__PURE__ */ new Map();
|
|
186
|
+
const targets = /* @__PURE__ */ new Set([...directByTarget.keys(), ...groupsByTarget.keys()]);
|
|
187
|
+
for (const t of targets) {
|
|
188
|
+
out.set(t, entryOf(t, directByTarget.get(t), groupsByTarget.get(t) ?? [], now));
|
|
189
|
+
}
|
|
190
|
+
return out;
|
|
191
|
+
}
|
|
192
|
+
var BATCH_GET_ATTEMPTS = 5;
|
|
193
|
+
var sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
194
|
+
async function batchGetAll(table, keys, opts = {}) {
|
|
195
|
+
const out = [];
|
|
196
|
+
for (let i = 0; i < keys.length; i += 100) {
|
|
197
|
+
let chunk = keys.slice(i, i + 100);
|
|
198
|
+
for (let attempt = 0; chunk.length; attempt++) {
|
|
199
|
+
if (attempt >= BATCH_GET_ATTEMPTS) {
|
|
200
|
+
throw new Error(`${table} BatchGet left ${chunk.length} keys unprocessed after ${attempt} attempts`);
|
|
201
|
+
}
|
|
202
|
+
if (attempt) await sleep(20 * attempt);
|
|
203
|
+
const res = await ddb.send(
|
|
204
|
+
new import_lib_dynamodb.BatchGetCommand({ RequestItems: { [table]: { Keys: chunk, ...consistentRead(opts) } } })
|
|
205
|
+
);
|
|
206
|
+
out.push(...res?.Responses?.[table] ?? []);
|
|
207
|
+
chunk = res?.UnprocessedKeys?.[table]?.Keys ?? [];
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return out;
|
|
211
|
+
}
|
|
212
|
+
async function effectiveForMany(userId, targets, opts = {}) {
|
|
213
|
+
const out = /* @__PURE__ */ new Map();
|
|
214
|
+
const wanted = [...new Set(targets)];
|
|
215
|
+
if (!wanted.length) return out;
|
|
216
|
+
const [ownWanted, memberships] = await Promise.all([
|
|
217
|
+
batchGetAll(ACCESS_TABLE_NAME, wanted.map((target) => ({ principal: userPrincipal(userId), target })), opts),
|
|
218
|
+
queryPrincipal(userPrincipal(userId), "member#", opts)
|
|
219
|
+
]);
|
|
220
|
+
const direct = new Map(ownWanted.map((r) => [r.target, r]));
|
|
221
|
+
const groupIds = memberships.map((r) => r.target.slice("member#".length));
|
|
222
|
+
const holding = /* @__PURE__ */ new Map();
|
|
223
|
+
const keys = groupIds.flatMap((g) => wanted.map((target) => ({ principal: groupPrincipal(g), target })));
|
|
224
|
+
for (const it of await batchGetAll(ACCESS_TABLE_NAME, keys, opts)) {
|
|
225
|
+
const row = it;
|
|
226
|
+
const p = parsePrincipal(row.principal);
|
|
227
|
+
if (p?.kind !== "group" || isExpired(row)) continue;
|
|
228
|
+
const list = holding.get(row.target) ?? [];
|
|
229
|
+
list.push(p.groupId);
|
|
230
|
+
holding.set(row.target, list);
|
|
231
|
+
}
|
|
232
|
+
const now = Date.now();
|
|
233
|
+
for (const t of wanted) {
|
|
234
|
+
const d = direct.get(t);
|
|
235
|
+
const g = holding.get(t) ?? [];
|
|
236
|
+
if (!d && !g.length) continue;
|
|
237
|
+
out.set(t, entryOf(t, d, g, now));
|
|
238
|
+
}
|
|
239
|
+
return out;
|
|
240
|
+
}
|
|
241
|
+
function buildSnapshot(rows, now = Date.now()) {
|
|
242
|
+
const groupTargets = /* @__PURE__ */ new Map();
|
|
243
|
+
const groupMembers = /* @__PURE__ */ new Map();
|
|
244
|
+
const directRows = /* @__PURE__ */ new Map();
|
|
245
|
+
const userRows = [];
|
|
246
|
+
const presence = /* @__PURE__ */ new Map();
|
|
247
|
+
for (const r of rows) {
|
|
248
|
+
const p = parsePrincipal(r.principal);
|
|
249
|
+
if (!p) continue;
|
|
250
|
+
if (p.kind === "user" && r.target === PRESENCE_TARGET) {
|
|
251
|
+
if (typeof r.lastSeenAt === "string") presence.set(p.userId, r.lastSeenAt);
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
if (p.kind === "group") {
|
|
255
|
+
if (!isGrantTarget(r.target) || isExpired(r, now)) continue;
|
|
256
|
+
const list = groupTargets.get(p.groupId) ?? [];
|
|
257
|
+
list.push(r.target);
|
|
258
|
+
groupTargets.set(p.groupId, list);
|
|
259
|
+
} else if (r.target.startsWith("member#")) {
|
|
260
|
+
const g = r.target.slice("member#".length);
|
|
261
|
+
const list = groupMembers.get(g) ?? [];
|
|
262
|
+
list.push(p.userId);
|
|
263
|
+
groupMembers.set(g, list);
|
|
264
|
+
} else if (isGrantTarget(r.target)) {
|
|
265
|
+
const m = directRows.get(p.userId) ?? /* @__PURE__ */ new Map();
|
|
266
|
+
m.set(r.target, r);
|
|
267
|
+
directRows.set(p.userId, m);
|
|
268
|
+
userRows.push(r);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
const users = /* @__PURE__ */ new Map();
|
|
272
|
+
const groupsByUserTarget = /* @__PURE__ */ new Map();
|
|
273
|
+
for (const [g, members] of groupMembers) {
|
|
274
|
+
for (const u of members) {
|
|
275
|
+
const m = groupsByUserTarget.get(u) ?? /* @__PURE__ */ new Map();
|
|
276
|
+
for (const t of groupTargets.get(g) ?? []) {
|
|
277
|
+
const list = m.get(t) ?? [];
|
|
278
|
+
list.push(g);
|
|
279
|
+
m.set(t, list);
|
|
280
|
+
}
|
|
281
|
+
groupsByUserTarget.set(u, m);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
const userIds = /* @__PURE__ */ new Set([...directRows.keys(), ...groupsByUserTarget.keys()]);
|
|
285
|
+
for (const u of userIds) {
|
|
286
|
+
const direct = directRows.get(u) ?? /* @__PURE__ */ new Map();
|
|
287
|
+
const viaGroups = groupsByUserTarget.get(u) ?? /* @__PURE__ */ new Map();
|
|
288
|
+
const targets = /* @__PURE__ */ new Set([...direct.keys(), ...viaGroups.keys()]);
|
|
289
|
+
const m = /* @__PURE__ */ new Map();
|
|
290
|
+
for (const t of targets) m.set(t, entryOf(t, direct.get(t), viaGroups.get(t) ?? [], now));
|
|
291
|
+
users.set(u, m);
|
|
292
|
+
}
|
|
293
|
+
return { users, groupTargets, groupMembers, userRows, presence };
|
|
294
|
+
}
|
|
295
|
+
async function snapshot() {
|
|
296
|
+
return buildSnapshot(await scanAll());
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// lambdacode/api/services/pluginCatalog.ts
|
|
300
|
+
var import_client_dynamodb2 = require("@aws-sdk/client-dynamodb");
|
|
301
|
+
var import_lib_dynamodb2 = require("@aws-sdk/lib-dynamodb");
|
|
302
|
+
var ddb2 = import_lib_dynamodb2.DynamoDBDocumentClient.from(new import_client_dynamodb2.DynamoDBClient({}));
|
|
303
|
+
var emptyPluginCatalog = {
|
|
304
|
+
async list() {
|
|
305
|
+
return [];
|
|
306
|
+
},
|
|
307
|
+
async get() {
|
|
308
|
+
return void 0;
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
var log = (msg, extra = {}) => console.log(JSON.stringify({ msg, ...extra }));
|
|
312
|
+
function isPluginCatalogRecord(item) {
|
|
313
|
+
if (!item || typeof item !== "object") return false;
|
|
314
|
+
const r = item;
|
|
315
|
+
const m = r.manifest;
|
|
316
|
+
return typeof r.pluginId === "string" && typeof r.schemaVersion === "number" && typeof r.installed === "boolean" && typeof r.revision === "string" && !!m && typeof m === "object" && m.id === r.pluginId && typeof m.enabled === "boolean" && typeof m.hostApiVersion === "number" && Array.isArray(m.accounts) && Array.isArray(m.permissions) && Array.isArray(r.routes);
|
|
317
|
+
}
|
|
318
|
+
function dynamoPluginCatalog(tableName2) {
|
|
319
|
+
const accept = (item) => {
|
|
320
|
+
if (isPluginCatalogRecord(item)) return item;
|
|
321
|
+
log("WARN: malformed plugin catalog record skipped", {
|
|
322
|
+
pluginId: item?.pluginId
|
|
323
|
+
});
|
|
324
|
+
return void 0;
|
|
325
|
+
};
|
|
326
|
+
return {
|
|
327
|
+
async list(opts = {}) {
|
|
328
|
+
const out = [];
|
|
329
|
+
let ExclusiveStartKey;
|
|
330
|
+
do {
|
|
331
|
+
const page = await ddb2.send(
|
|
332
|
+
new import_lib_dynamodb2.ScanCommand({ TableName: tableName2, ExclusiveStartKey, ...opts.consistent ? { ConsistentRead: true } : {} })
|
|
333
|
+
);
|
|
334
|
+
for (const item of page?.Items ?? []) {
|
|
335
|
+
const r = accept(item);
|
|
336
|
+
if (r) out.push(r);
|
|
337
|
+
}
|
|
338
|
+
ExclusiveStartKey = page?.LastEvaluatedKey;
|
|
339
|
+
} while (ExclusiveStartKey);
|
|
340
|
+
return out;
|
|
341
|
+
},
|
|
342
|
+
async get(pluginId, opts = {}) {
|
|
343
|
+
const res = await ddb2.send(
|
|
344
|
+
new import_lib_dynamodb2.GetCommand({
|
|
345
|
+
TableName: tableName2,
|
|
346
|
+
Key: { pluginId },
|
|
347
|
+
...opts.consistent ? { ConsistentRead: true } : {}
|
|
348
|
+
})
|
|
349
|
+
);
|
|
350
|
+
return res.Item ? accept(res.Item) : void 0;
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
function pluginCatalog() {
|
|
355
|
+
const table = process.env.PLUGIN_CATALOG_TABLE_NAME;
|
|
356
|
+
return table ? dynamoPluginCatalog(table) : emptyPluginCatalog;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// lambdacode/api/services/pluginAccess.ts
|
|
360
|
+
function pluginAvailability(record, accountNumber, permission, registeredAccounts2) {
|
|
361
|
+
if (!record) return { available: false, reason: "plugin-unknown" };
|
|
362
|
+
const status = pluginCatalogStatus(record);
|
|
363
|
+
if (status !== "active") return { available: false, reason: `plugin-${status}` };
|
|
364
|
+
if (!record.manifest.permissions.some((p) => p.id === permission)) {
|
|
365
|
+
return { available: false, reason: "permission-undeclared" };
|
|
366
|
+
}
|
|
367
|
+
if (!record.manifest.accounts.some((a) => a.accountNumber === accountNumber)) {
|
|
368
|
+
return { available: false, reason: "account-unbound" };
|
|
369
|
+
}
|
|
370
|
+
if (!registeredAccounts2.has(accountNumber)) return { available: false, reason: "account-unregistered" };
|
|
371
|
+
return { available: true };
|
|
372
|
+
}
|
|
373
|
+
async function loadPluginContext(opts = {}) {
|
|
374
|
+
const records = await (opts.catalog ?? pluginCatalog()).list(opts);
|
|
375
|
+
const catalog = new Map(records.map((r) => [r.pluginId, r]));
|
|
376
|
+
const bound = /* @__PURE__ */ new Set();
|
|
377
|
+
for (const r of records) for (const a of r.manifest.accounts) bound.add(a.accountNumber);
|
|
378
|
+
return withAccounts(catalog, await registeredAccounts([...bound], opts));
|
|
379
|
+
}
|
|
380
|
+
function withAccounts(catalog, accounts) {
|
|
381
|
+
const accountNames = /* @__PURE__ */ new Map();
|
|
382
|
+
for (const [n, meta] of accounts) if (meta.name) accountNames.set(n, meta.name);
|
|
383
|
+
return { catalog, registeredAccounts: new Set(accounts.keys()), accountNames };
|
|
384
|
+
}
|
|
385
|
+
function deriveCapabilities(pluginId, accountNumber, held, ctx) {
|
|
386
|
+
const record = ctx.catalog.get(pluginId);
|
|
387
|
+
const declared = record?.manifest.permissions.map((p) => p.id) ?? [];
|
|
388
|
+
const out = [];
|
|
389
|
+
for (const permission of PLUGIN_PERMISSIONS) {
|
|
390
|
+
const sources = [...held.values()].filter(
|
|
391
|
+
(s) => s.permission === permission || pluginPermissionsImpliedBy(s.permission, declared).includes(permission)
|
|
392
|
+
);
|
|
393
|
+
if (!sources.length) continue;
|
|
394
|
+
const a = pluginAvailability(record, accountNumber, permission, ctx.registeredAccounts);
|
|
395
|
+
out.push({ pluginId, accountNumber, permission, sources, ...a.available ? { available: true } : a });
|
|
396
|
+
}
|
|
397
|
+
return out;
|
|
398
|
+
}
|
|
399
|
+
var sourceOf = (permission, direct, groups) => ({
|
|
400
|
+
permission,
|
|
401
|
+
...direct && !isExpired(direct) ? { direct } : {},
|
|
402
|
+
groups
|
|
403
|
+
});
|
|
404
|
+
var byBindingThenPermission = (a, b) => a.pluginId.localeCompare(b.pluginId) || a.accountNumber.localeCompare(b.accountNumber) || PLUGIN_PERMISSIONS.indexOf(a.permission) - PLUGIN_PERMISSIONS.indexOf(b.permission);
|
|
405
|
+
function resolvePluginCapabilities(entries, ctx) {
|
|
406
|
+
const byBinding = /* @__PURE__ */ new Map();
|
|
407
|
+
for (const e of entries) {
|
|
408
|
+
if (!e.active) continue;
|
|
409
|
+
const p = parseTarget(e.target);
|
|
410
|
+
if (p?.kind !== "plugin") continue;
|
|
411
|
+
const key = `${p.pluginId}#${p.accountNumber}`;
|
|
412
|
+
const b = byBinding.get(key) ?? { pluginId: p.pluginId, accountNumber: p.accountNumber, held: /* @__PURE__ */ new Map() };
|
|
413
|
+
b.held.set(p.permission, sourceOf(p.permission, e.direct, e.groups));
|
|
414
|
+
byBinding.set(key, b);
|
|
415
|
+
}
|
|
416
|
+
const out = [];
|
|
417
|
+
for (const b of byBinding.values()) out.push(...deriveCapabilities(b.pluginId, b.accountNumber, b.held, ctx));
|
|
418
|
+
return out.sort(byBindingThenPermission);
|
|
419
|
+
}
|
|
420
|
+
function availableCapabilityKeys(capabilities) {
|
|
421
|
+
return new Set(capabilities.filter((c) => c.available).map((c) => pluginTarget(c.pluginId, c.accountNumber, c.permission)));
|
|
422
|
+
}
|
|
423
|
+
async function pluginHolderUserIds(pluginId) {
|
|
424
|
+
const graph = await snapshot();
|
|
425
|
+
const out = [];
|
|
426
|
+
for (const [userId, entries] of graph.users) {
|
|
427
|
+
for (const e of entries.values()) {
|
|
428
|
+
if (!e.active) continue;
|
|
429
|
+
const p = parseTarget(e.target);
|
|
430
|
+
if (p?.kind === "plugin" && p.pluginId === pluginId) {
|
|
431
|
+
out.push(userId);
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
return out.sort();
|
|
437
|
+
}
|
|
438
|
+
async function registeredAccounts(numbers, opts = {}) {
|
|
439
|
+
const out = /* @__PURE__ */ new Map();
|
|
440
|
+
const ids = [...new Set(numbers)];
|
|
441
|
+
if (!ids.length) return out;
|
|
442
|
+
const table = process.env.ACCOUNTS_TABLE_NAME;
|
|
443
|
+
if (!table) throw new Error("ACCOUNTS_TABLE_NAME is not set (plugin catalog readers need the Accounts table)");
|
|
444
|
+
for (const item of await batchGetAll(table, ids.map((accountNumber) => ({ accountNumber })), opts)) {
|
|
445
|
+
out.set(item.accountNumber, { name: item.name || void 0 });
|
|
446
|
+
}
|
|
447
|
+
return out;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// lambdacode/api/services/revocationsService.ts
|
|
451
|
+
var import_crypto = require("crypto");
|
|
452
|
+
var import_client_dynamodb3 = require("@aws-sdk/client-dynamodb");
|
|
453
|
+
var import_lib_dynamodb3 = require("@aws-sdk/lib-dynamodb");
|
|
454
|
+
var ddb3 = import_lib_dynamodb3.DynamoDBDocumentClient.from(new import_client_dynamodb3.DynamoDBClient({}));
|
|
455
|
+
var REVOCATIONS_TABLE_NAME = process.env.REVOCATIONS_TABLE_NAME;
|
|
456
|
+
var log2 = (msg, extra = {}) => console.log(JSON.stringify({ msg, ...extra }));
|
|
457
|
+
var NOTICE_RETENTION_DAYS = 30;
|
|
458
|
+
function noticeItem(userId, input, revokedAt) {
|
|
459
|
+
return {
|
|
460
|
+
userId,
|
|
461
|
+
// Timestamp-first sort key: a plain descending Query returns
|
|
462
|
+
// newest-first without a GSI.
|
|
463
|
+
noticeId: `${revokedAt}#${(0, import_crypto.randomUUID)().slice(0, 8)}`,
|
|
464
|
+
change: input.change ?? "REVOKED",
|
|
465
|
+
kind: input.kind,
|
|
466
|
+
...input.accountNumber ? { accountNumber: input.accountNumber } : {},
|
|
467
|
+
...input.roleName ? { roleName: input.roleName } : {},
|
|
468
|
+
...input.resourceId ? { resourceId: input.resourceId } : {},
|
|
469
|
+
...input.resourceName ? { resourceName: input.resourceName } : {},
|
|
470
|
+
...input.pluginId ? { pluginId: input.pluginId } : {},
|
|
471
|
+
...input.permission ? { permission: input.permission } : {},
|
|
472
|
+
...input.pluginName ? { pluginName: input.pluginName } : {},
|
|
473
|
+
...input.count ? { count: input.count } : {},
|
|
474
|
+
...input.groupId ? { groupId: input.groupId } : {},
|
|
475
|
+
...input.groupName ? { groupName: input.groupName } : {},
|
|
476
|
+
revokedAt,
|
|
477
|
+
via: input.via,
|
|
478
|
+
seen: false,
|
|
479
|
+
ttl: Math.floor(Date.now() / 1e3) + NOTICE_RETENTION_DAYS * 24 * 60 * 60
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
async function recordRevocations(notices) {
|
|
483
|
+
if (!REVOCATIONS_TABLE_NAME) return;
|
|
484
|
+
const items = notices.filter((n) => n.userId).map((n) => noticeItem(n.userId, n.input, (/* @__PURE__ */ new Date()).toISOString()));
|
|
485
|
+
for (let i = 0; i < items.length; i += 25) {
|
|
486
|
+
let requests = items.slice(i, i + 25).map((Item) => ({ PutRequest: { Item } }));
|
|
487
|
+
try {
|
|
488
|
+
for (let attempt = 0; attempt < 3 && requests.length; attempt++) {
|
|
489
|
+
const res = await ddb3.send(new import_lib_dynamodb3.BatchWriteCommand({ RequestItems: { [REVOCATIONS_TABLE_NAME]: requests } }));
|
|
490
|
+
requests = res.UnprocessedItems?.[REVOCATIONS_TABLE_NAME] ?? [];
|
|
491
|
+
}
|
|
492
|
+
if (requests.length) log2("access notices left unprocessed", { count: requests.length });
|
|
493
|
+
} catch (err) {
|
|
494
|
+
log2("access notice batch write failed", { count: requests.length, error: err.message });
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
if (items.length) log2("recorded access notices", { count: items.length });
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
// lambdacode/api/services/auditService.ts
|
|
501
|
+
var import_crypto2 = require("crypto");
|
|
502
|
+
var import_client_dynamodb4 = require("@aws-sdk/client-dynamodb");
|
|
503
|
+
var import_lib_dynamodb4 = require("@aws-sdk/lib-dynamodb");
|
|
504
|
+
|
|
505
|
+
// lambdacode/api/services/actorContext.ts
|
|
506
|
+
var import_async_hooks = require("async_hooks");
|
|
507
|
+
var store = new import_async_hooks.AsyncLocalStorage();
|
|
508
|
+
function runAsActor(actor, fn) {
|
|
509
|
+
return store.run(actor, fn);
|
|
510
|
+
}
|
|
511
|
+
function currentActor() {
|
|
512
|
+
return store.getStore();
|
|
513
|
+
}
|
|
514
|
+
var systemActor = (job, name) => ({
|
|
515
|
+
kind: "system",
|
|
516
|
+
id: `system:${job}`,
|
|
517
|
+
name: name ?? job
|
|
518
|
+
});
|
|
519
|
+
|
|
520
|
+
// lambdacode/api/services/auditService.ts
|
|
521
|
+
var ddb4 = import_lib_dynamodb4.DynamoDBDocumentClient.from(new import_client_dynamodb4.DynamoDBClient({}));
|
|
522
|
+
var tableName = () => process.env.AUDIT_TABLE_NAME ?? "";
|
|
523
|
+
var log3 = (msg, extra = {}) => console.log(JSON.stringify({ msg, ...extra }));
|
|
524
|
+
var DEFAULT_RETENTION_DAYS = 400;
|
|
525
|
+
var REASON_MAX = 300;
|
|
526
|
+
var NOTE_MAX = 500;
|
|
527
|
+
var AFFECTED_CAP = 50;
|
|
528
|
+
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
529
|
+
function retentionDays() {
|
|
530
|
+
const n = Number(process.env.AUDIT_RETENTION_DAYS);
|
|
531
|
+
return Number.isInteger(n) && n > 0 ? n : DEFAULT_RETENTION_DAYS;
|
|
532
|
+
}
|
|
533
|
+
var newBatchId = () => (0, import_crypto2.randomUUID)();
|
|
534
|
+
var UNKNOWN_ACTOR = { kind: "system", id: "system:unknown" };
|
|
535
|
+
var warnedNoTable = false;
|
|
536
|
+
function tableOr() {
|
|
537
|
+
const table = tableName();
|
|
538
|
+
if (table) return table;
|
|
539
|
+
if (!warnedNoTable) {
|
|
540
|
+
warnedNoTable = true;
|
|
541
|
+
log3("WARN: AUDIT_TABLE_NAME unset \u2014 activity is not recorded");
|
|
542
|
+
}
|
|
543
|
+
return void 0;
|
|
544
|
+
}
|
|
545
|
+
function compact(value) {
|
|
546
|
+
if (Array.isArray(value)) return value.map(compact);
|
|
547
|
+
if (value && typeof value === "object" && !(value instanceof Set)) {
|
|
548
|
+
const out = {};
|
|
549
|
+
for (const [k, v] of Object.entries(value)) {
|
|
550
|
+
if (v !== void 0) out[k] = compact(v);
|
|
551
|
+
}
|
|
552
|
+
return out;
|
|
553
|
+
}
|
|
554
|
+
return value;
|
|
555
|
+
}
|
|
556
|
+
var SESSION_ACTIONS = /* @__PURE__ */ new Set(["vpn.connect", "vpn.disconnect"]);
|
|
557
|
+
function toRow(input, now) {
|
|
558
|
+
const bound = input.actor ?? currentActor();
|
|
559
|
+
if (!bound) log3("ERROR: activity row without a bound actor (missing runAsActor?)", { action: input.action, target: input.target });
|
|
560
|
+
const actor = bound ?? UNKNOWN_ACTOR;
|
|
561
|
+
const details = input.details ? { ...input.details } : void 0;
|
|
562
|
+
if (details?.note !== void 0) details.note = String(details.note).slice(0, NOTE_MAX);
|
|
563
|
+
if (details?.affected && details.affected.length > AFFECTED_CAP) {
|
|
564
|
+
details.affectedCount = details.affected.length;
|
|
565
|
+
details.affected = details.affected.slice(0, AFFECTED_CAP);
|
|
566
|
+
}
|
|
567
|
+
if (details?.unchanged && details.unchanged.length > AFFECTED_CAP) {
|
|
568
|
+
details.unchangedCount = details.unchanged.length;
|
|
569
|
+
details.unchanged = details.unchanged.slice(0, AFFECTED_CAP);
|
|
570
|
+
}
|
|
571
|
+
const accountNumber = input.accountNumber ?? accountOf(input.target);
|
|
572
|
+
return compact({
|
|
573
|
+
...input,
|
|
574
|
+
eventId: (0, import_crypto2.randomUUID)(),
|
|
575
|
+
outcome: input.outcome ?? "OK",
|
|
576
|
+
reason: input.reason === void 0 ? void 0 : String(input.reason).slice(0, REASON_MAX),
|
|
577
|
+
actor: { kind: actor.kind, id: actor.id, name: actor.name, claims: actor.claims && Object.keys(actor.claims).length ? actor.claims : void 0 },
|
|
578
|
+
accountNumber,
|
|
579
|
+
details,
|
|
580
|
+
at: now.toISOString(),
|
|
581
|
+
day: now.toISOString().slice(0, 10),
|
|
582
|
+
userId: input.subject?.id,
|
|
583
|
+
actorId: SESSION_ACTIONS.has(input.action) && input.subject?.kind === "user" ? input.subject.id : actor.id,
|
|
584
|
+
expiresAt: Math.floor(now.getTime() / 1e3) + retentionDays() * 24 * 60 * 60
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
function accountOf(target) {
|
|
588
|
+
if (!target) return void 0;
|
|
589
|
+
const p = parseTarget(target);
|
|
590
|
+
if (p?.kind === "role" || p?.kind === "plugin") return p.accountNumber;
|
|
591
|
+
if (target.startsWith("account#")) return target.slice("account#".length);
|
|
592
|
+
return void 0;
|
|
593
|
+
}
|
|
594
|
+
async function recordEvent(input) {
|
|
595
|
+
const table = tableOr();
|
|
596
|
+
if (!table) return;
|
|
597
|
+
const row = toRow(input, /* @__PURE__ */ new Date());
|
|
598
|
+
try {
|
|
599
|
+
await ddb4.send(new import_lib_dynamodb4.PutCommand({ TableName: table, Item: row }));
|
|
600
|
+
log3("activity recorded", { action: row.action, outcome: row.outcome, actor: row.actorId, subject: row.userId, target: row.target, eventId: row.eventId });
|
|
601
|
+
} catch (err) {
|
|
602
|
+
log3("ERROR: activity write failed (mutation unaffected)", { action: row.action, target: row.target, error: err.message });
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
async function recordEvents(inputs) {
|
|
606
|
+
if (!inputs.length) return;
|
|
607
|
+
const table = tableOr();
|
|
608
|
+
if (!table) return;
|
|
609
|
+
const start = Date.now();
|
|
610
|
+
const rows = inputs.map((input, i) => toRow(input, new Date(start + i)));
|
|
611
|
+
for (let i = 0; i < rows.length; i += 25) {
|
|
612
|
+
let requests = rows.slice(i, i + 25).map((Item) => ({ PutRequest: { Item } }));
|
|
613
|
+
try {
|
|
614
|
+
for (let attempt = 0; attempt < 3 && requests.length; attempt++) {
|
|
615
|
+
const res = await ddb4.send(new import_lib_dynamodb4.BatchWriteCommand({ RequestItems: { [table]: requests } }));
|
|
616
|
+
requests = res.UnprocessedItems?.[table] ?? [];
|
|
617
|
+
}
|
|
618
|
+
if (requests.length) log3("ERROR: activity batch left unprocessed rows", { count: requests.length });
|
|
619
|
+
} catch (err) {
|
|
620
|
+
log3("ERROR: activity batch write failed (mutation unaffected)", { count: requests.length, error: err.message });
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
log3("activity batch recorded", { count: rows.length, actions: [...new Set(rows.map((r) => r.action))] });
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
// lambdacode/api/services/accessNotices.ts
|
|
627
|
+
async function activeTargets(userId, plugins = loadPluginContext) {
|
|
628
|
+
const entries = await effectiveAccess(userId);
|
|
629
|
+
const out = /* @__PURE__ */ new Set();
|
|
630
|
+
const pluginEntries = [];
|
|
631
|
+
for (const [t, e] of entries) {
|
|
632
|
+
if (!e.active) continue;
|
|
633
|
+
if (parseTarget(t)?.kind === "plugin") pluginEntries.push(e);
|
|
634
|
+
else out.add(t);
|
|
635
|
+
}
|
|
636
|
+
if (pluginEntries.length) {
|
|
637
|
+
for (const k of availableCapabilityKeys(resolvePluginCapabilities(pluginEntries, await plugins()))) out.add(k);
|
|
638
|
+
}
|
|
639
|
+
return out;
|
|
640
|
+
}
|
|
641
|
+
var log4 = (msg, extra = {}) => console.log(JSON.stringify({ msg, ...extra }));
|
|
642
|
+
var memo = (load) => {
|
|
643
|
+
let p;
|
|
644
|
+
return () => p ??= load();
|
|
645
|
+
};
|
|
646
|
+
var DIFF_CONCURRENCY = 8;
|
|
647
|
+
async function mapLimit(items, fn) {
|
|
648
|
+
const out = new Array(items.length);
|
|
649
|
+
let next = 0;
|
|
650
|
+
const worker = async () => {
|
|
651
|
+
for (let i = next++; i < items.length; i = next++) out[i] = await fn(items[i]);
|
|
652
|
+
};
|
|
653
|
+
await Promise.all(Array.from({ length: Math.min(DIFF_CONCURRENCY, items.length) }, worker));
|
|
654
|
+
return out;
|
|
655
|
+
}
|
|
656
|
+
var NARROW_MAX_TARGETS = 100;
|
|
657
|
+
var NOTICE_BUNDLE_THRESHOLD = 5;
|
|
658
|
+
var BUNDLED_VIAS = /* @__PURE__ */ new Set(["GROUP", "CASCADE"]);
|
|
659
|
+
var bundled = (via, targets) => BUNDLED_VIAS.has(via) && targets.length > NOTICE_BUNDLE_THRESHOLD;
|
|
660
|
+
async function activeAmong(userId, targets) {
|
|
661
|
+
const out = /* @__PURE__ */ new Set();
|
|
662
|
+
for (const [t, e] of await effectiveForMany(userId, targets)) if (e.active) out.add(t);
|
|
663
|
+
return out;
|
|
664
|
+
}
|
|
665
|
+
async function withAccessDiff(userIds, via, mutate, resourceNames, opts = {}) {
|
|
666
|
+
const users = [...new Set(userIds)].filter(Boolean);
|
|
667
|
+
const scoped = opts.targets?.length ? [...new Set(opts.targets)] : void 0;
|
|
668
|
+
const narrow = scoped !== void 0 && scoped.length <= NARROW_MAX_TARGETS && !scoped.some((t) => parseTarget(t)?.kind === "plugin");
|
|
669
|
+
const read = (u, plugins) => narrow ? activeAmong(u, scoped) : activeTargets(u, plugins);
|
|
670
|
+
const pluginsBefore = memo(() => loadPluginContext());
|
|
671
|
+
const before = /* @__PURE__ */ new Map();
|
|
672
|
+
for (const [i, set] of (await mapLimit(users, (u) => read(u, pluginsBefore))).entries()) before.set(users[i], set);
|
|
673
|
+
const result = await mutate();
|
|
674
|
+
const pluginsAfter = opts.catalogChanges ? memo(() => loadPluginContext({ consistent: true })) : pluginsBefore;
|
|
675
|
+
const batchId = opts.batchId ?? newBatchId();
|
|
676
|
+
const changes = [];
|
|
677
|
+
const derived = [];
|
|
678
|
+
const notices = [];
|
|
679
|
+
const afterSets = await mapLimit(users, (u) => read(u, pluginsAfter));
|
|
680
|
+
const shareLabel = memoBy(
|
|
681
|
+
async (shareId, t) => resourceNames?.get(shareId) ?? (await getRow(SHARE_DEF_PRINCIPAL, t))?.label
|
|
682
|
+
);
|
|
683
|
+
const pluginName = memoBy(async (pluginId) => {
|
|
684
|
+
const record = (await pluginsAfter()).catalog.get(pluginId) ?? (await pluginsBefore()).catalog.get(pluginId);
|
|
685
|
+
return record?.manifest.displayName;
|
|
686
|
+
});
|
|
687
|
+
for (const [i, u] of users.entries()) {
|
|
688
|
+
const after = afterSets[i];
|
|
689
|
+
const change = { userId: u, gained: [], lost: [], after };
|
|
690
|
+
for (const t of after) if (!before.get(u).has(t)) change.gained.push(t);
|
|
691
|
+
for (const t of before.get(u)) if (!after.has(t)) change.lost.push(t);
|
|
692
|
+
const notice = async (t, kind) => {
|
|
693
|
+
const parsed = parseTarget(t);
|
|
694
|
+
let input;
|
|
695
|
+
if (parsed?.kind === "role") {
|
|
696
|
+
input = { change: kind, kind: "ROLE", accountNumber: parsed.accountNumber, roleName: parsed.roleName, via };
|
|
697
|
+
} else if (parsed?.kind === "resource") {
|
|
698
|
+
input = { change: kind, kind: "RESOURCE", resourceId: parsed.resourceId, resourceName: resourceNames?.get(parsed.resourceId), via };
|
|
699
|
+
} else if (parsed?.kind === "share") {
|
|
700
|
+
input = { change: kind, kind: "SHARE", resourceId: parsed.shareId, resourceName: await shareLabel(parsed.shareId, t), via };
|
|
701
|
+
} else if (parsed?.kind === "plugin") {
|
|
702
|
+
input = {
|
|
703
|
+
change: kind,
|
|
704
|
+
kind: "PLUGIN",
|
|
705
|
+
pluginId: parsed.pluginId,
|
|
706
|
+
accountNumber: parsed.accountNumber,
|
|
707
|
+
permission: parsed.permission,
|
|
708
|
+
pluginName: await pluginName(parsed.pluginId),
|
|
709
|
+
via
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
if (input) notices.push({ userId: u, input });
|
|
713
|
+
};
|
|
714
|
+
const noticeAll = async (targets, kind) => {
|
|
715
|
+
if (bundled(via, targets)) {
|
|
716
|
+
notices.push({
|
|
717
|
+
userId: u,
|
|
718
|
+
input: {
|
|
719
|
+
change: kind,
|
|
720
|
+
kind: "BUNDLE",
|
|
721
|
+
count: targets.length,
|
|
722
|
+
...opts.groupId ? { groupId: opts.groupId } : {},
|
|
723
|
+
...opts.groupName ? { groupName: opts.groupName } : {},
|
|
724
|
+
via
|
|
725
|
+
}
|
|
726
|
+
});
|
|
727
|
+
return;
|
|
728
|
+
}
|
|
729
|
+
for (const t of targets) await notice(t, kind);
|
|
730
|
+
};
|
|
731
|
+
await noticeAll(change.lost, "REVOKED");
|
|
732
|
+
if (opts.gainNotices !== false) await noticeAll(change.gained, "GRANTED");
|
|
733
|
+
changes.push(change);
|
|
734
|
+
if (opts.derived !== false) {
|
|
735
|
+
for (const [list, action] of [
|
|
736
|
+
[change.gained, "access.gain"],
|
|
737
|
+
[change.lost, "access.lose"]
|
|
738
|
+
]) {
|
|
739
|
+
const groupDetails = {
|
|
740
|
+
...opts.groupId ? { groupId: opts.groupId } : {},
|
|
741
|
+
...opts.groupName ? { groupName: opts.groupName } : {}
|
|
742
|
+
};
|
|
743
|
+
if (bundled(via, list)) {
|
|
744
|
+
derived.push({
|
|
745
|
+
category: "access",
|
|
746
|
+
action,
|
|
747
|
+
subject: { kind: "user", id: u },
|
|
748
|
+
details: { via, batchId, count: list.length, ...groupDetails },
|
|
749
|
+
derived: true
|
|
750
|
+
});
|
|
751
|
+
continue;
|
|
752
|
+
}
|
|
753
|
+
for (const t of list) {
|
|
754
|
+
derived.push({
|
|
755
|
+
category: "access",
|
|
756
|
+
action,
|
|
757
|
+
subject: { kind: "user", id: u },
|
|
758
|
+
target: t,
|
|
759
|
+
targetName: targetLabel(t, resourceNames),
|
|
760
|
+
details: { via, batchId, ...groupDetails },
|
|
761
|
+
derived: true
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
await recordRevocations(notices);
|
|
768
|
+
await recordEvents(derived);
|
|
769
|
+
opts.onDiff?.(changes);
|
|
770
|
+
if (notices.length || derived.length) log4("access diff", { via, users: users.length, notices: notices.length, derived: derived.length });
|
|
771
|
+
return result;
|
|
772
|
+
}
|
|
773
|
+
function memoBy(load) {
|
|
774
|
+
const cache = /* @__PURE__ */ new Map();
|
|
775
|
+
return (...args) => {
|
|
776
|
+
const k = args[0];
|
|
777
|
+
let p = cache.get(k);
|
|
778
|
+
if (!p) {
|
|
779
|
+
p = load(...args);
|
|
780
|
+
cache.set(k, p);
|
|
781
|
+
}
|
|
782
|
+
return p;
|
|
783
|
+
};
|
|
784
|
+
}
|
|
785
|
+
function targetLabel(target, names) {
|
|
786
|
+
const p = parseTarget(target);
|
|
787
|
+
if (p?.kind === "role") return p.roleName;
|
|
788
|
+
if (p?.kind === "resource") return names?.get(p.resourceId);
|
|
789
|
+
if (p?.kind === "share") return names?.get(p.shareId);
|
|
790
|
+
return void 0;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
// lambdacode/plugins/catalog-provider.ts
|
|
794
|
+
var ddb5 = import_lib_dynamodb5.DynamoDBDocumentClient.from(new import_client_dynamodb5.DynamoDBClient({}));
|
|
795
|
+
var log5 = (msg, extra = {}) => console.log(JSON.stringify({ msg, ...extra }));
|
|
796
|
+
var putRecord = (table, record) => ddb5.send(new import_lib_dynamodb5.PutCommand({ TableName: table, Item: record }));
|
|
797
|
+
var capabilityShape = (m) => JSON.stringify({
|
|
798
|
+
enabled: m.enabled,
|
|
799
|
+
permissions: m.permissions.map((p) => p.id).sort(),
|
|
800
|
+
accounts: m.accounts.map((a) => a.accountNumber).sort()
|
|
801
|
+
});
|
|
802
|
+
var sameCapabilities = (a, b) => capabilityShape(a) === capabilityShape(b);
|
|
803
|
+
function handler(event) {
|
|
804
|
+
return runAsActor(systemActor("deploy"), () => apply(event));
|
|
805
|
+
}
|
|
806
|
+
async function apply(event) {
|
|
807
|
+
const table = process.env.PLUGIN_CATALOG_TABLE_NAME;
|
|
808
|
+
if (!table) throw new Error("PLUGIN_CATALOG_TABLE_NAME is not set");
|
|
809
|
+
const p = event.ResourceProperties;
|
|
810
|
+
const pluginId = p.PluginId;
|
|
811
|
+
const PhysicalResourceId = `plugin-catalog:${pluginId}`;
|
|
812
|
+
const existing = await dynamoPluginCatalog(table).get(pluginId, { consistent: true });
|
|
813
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
814
|
+
const batchId = newBatchId();
|
|
815
|
+
const activity = (action, displayName, revision) => recordEvent({ category: "catalog", action, target: `plugin#${pluginId}`, targetName: displayName, details: { revision, owner: p.Owner, batchId } });
|
|
816
|
+
const putNoticing = async (record2) => {
|
|
817
|
+
let written = false;
|
|
818
|
+
try {
|
|
819
|
+
await withAccessDiff(
|
|
820
|
+
await pluginHolderUserIds(pluginId),
|
|
821
|
+
"CASCADE",
|
|
822
|
+
async () => {
|
|
823
|
+
await putRecord(table, record2);
|
|
824
|
+
written = true;
|
|
825
|
+
},
|
|
826
|
+
void 0,
|
|
827
|
+
{ catalogChanges: true, batchId }
|
|
828
|
+
);
|
|
829
|
+
} catch (err) {
|
|
830
|
+
if (!written) throw err;
|
|
831
|
+
log5("ERROR: plugin catalog record written but loss notices failed", { pluginId, error: err.message });
|
|
832
|
+
}
|
|
833
|
+
};
|
|
834
|
+
if (event.RequestType === "Delete") {
|
|
835
|
+
if (!existing || existing.owner !== p.Owner) {
|
|
836
|
+
log5("plugin catalog delete: nothing of ours to tombstone", { pluginId, owner: p.Owner, existingOwner: existing?.owner });
|
|
837
|
+
return { PhysicalResourceId, Data: { Revision: p.Revision, Status: "absent" } };
|
|
838
|
+
}
|
|
839
|
+
if (existing.ownerResourceId && event.LogicalResourceId && existing.ownerResourceId !== event.LogicalResourceId) {
|
|
840
|
+
log5("plugin catalog delete: record now owned by another resource, left alone", { pluginId, resource: event.LogicalResourceId, owner: existing.ownerResourceId });
|
|
841
|
+
return { PhysicalResourceId, Data: { Revision: existing.revision, Status: existing.installed ? existing.manifest.enabled ? "active" : "disabled" : "removed" } };
|
|
842
|
+
}
|
|
843
|
+
if (existing.installed) {
|
|
844
|
+
await putNoticing({ ...existing, installed: false, removedAt: now, updatedAt: now });
|
|
845
|
+
await activity("plugin.tombstone", existing.manifest.displayName, existing.revision);
|
|
846
|
+
log5("plugin catalog record tombstoned", { pluginId, revision: existing.revision });
|
|
847
|
+
}
|
|
848
|
+
return { PhysicalResourceId, Data: { Revision: existing.revision, Status: "removed" } };
|
|
849
|
+
}
|
|
850
|
+
if (existing?.installed && existing.owner !== p.Owner) {
|
|
851
|
+
throw new Error(`Plugin "${pluginId}" is already installed by ${existing.owner}; a plugin id belongs to one deployment.`);
|
|
852
|
+
}
|
|
853
|
+
const manifest = JSON.parse(p.Manifest);
|
|
854
|
+
const record = {
|
|
855
|
+
pluginId,
|
|
856
|
+
schemaVersion: manifest.schemaVersion,
|
|
857
|
+
manifest,
|
|
858
|
+
revision: p.Revision,
|
|
859
|
+
...p.AssetPrefix ? { assetPrefix: p.AssetPrefix } : {},
|
|
860
|
+
installed: true,
|
|
861
|
+
owner: p.Owner,
|
|
862
|
+
...event.LogicalResourceId ? { ownerResourceId: event.LogicalResourceId } : {},
|
|
863
|
+
ui: JSON.parse(p.Ui || "{}"),
|
|
864
|
+
routes: JSON.parse(p.Routes || "[]"),
|
|
865
|
+
installedAt: existing?.installed ? existing.installedAt : now,
|
|
866
|
+
updatedAt: now
|
|
867
|
+
};
|
|
868
|
+
if (!isPluginCatalogRecord(record) || record.manifest.id !== pluginId) {
|
|
869
|
+
throw new Error(`Plugin "${pluginId}": the registration is not a valid catalog record.`);
|
|
870
|
+
}
|
|
871
|
+
if (existing?.installed && sameCapabilities(existing.manifest, manifest)) await putRecord(table, record);
|
|
872
|
+
else await putNoticing(record);
|
|
873
|
+
await activity("plugin.activate", manifest.displayName, p.Revision);
|
|
874
|
+
const status = manifest.enabled ? "active" : "disabled";
|
|
875
|
+
log5(`plugin catalog record ${existing ? "updated" : "created"}`, { pluginId, revision: p.Revision, status, reinstall: Boolean(existing && !existing.installed) });
|
|
876
|
+
return { PhysicalResourceId, Data: { Revision: p.Revision, Status: status } };
|
|
877
|
+
}
|
|
878
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
879
|
+
0 && (module.exports = {
|
|
880
|
+
handler
|
|
881
|
+
});
|