@galadrim/galadmin 0.1.37 → 0.1.40
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/dist/api.js +8 -2
- package/dist/api.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/api.ts +9 -2
- package/src/front/build/asset-manifest.json +3 -3
- package/src/front/build/index.html +1 -1
- package/src/front/build/static/js/{main.4ce5340d.chunk.js → main.8a63b422.chunk.js} +2 -2
- package/src/front/build/static/js/main.8a63b422.chunk.js.map +1 -0
- package/src/front/node_modules/.cache/.eslintcache +1 -1
- package/src/front/node_modules/.cache/babel-loader/0046fa6def7297665aceff65675276fb.json +1 -0
- package/src/front/node_modules/.cache/babel-loader/6b6404ad16b4fb247c0dfe43c03f4a02.json +1 -0
- package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/ef/81/2c9ecc926af52757cb3670536bc07219d1ccfba4d898a451352553fa6634b48d69ec580dd7c756e5fbcdc72e870664ef6bd7dc1af98e94d9eb182ba93be9 +1 -0
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/{c2/e5/5451dd89bb0fd48f988bf27c7ee614c66eb91f7085c5b5c8cb33048d0c32 → 31/fe/6640db1983b9834e63d1a760fa17521e8cf616b567ef7114a0676aa6971a} +1 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/6c/19/fe86ba5d7c4062f185480ad22dd3b9fae9b30149827224339f9a633a9a94 +1 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/87/08/421190bfe6e50816e059da6c33526c9943732ef856ebd2752d0cbfb4a852 +1 -1
- package/src/front/node_modules/.package-lock.json +72 -72
- package/src/front/node_modules/@babel/code-frame/lib/index.js +5 -4
- package/src/front/node_modules/@babel/code-frame/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/code-frame/package.json +3 -2
- package/src/front/node_modules/@babel/core/lib/config/cache-contexts.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/caching.js +2 -2
- package/src/front/node_modules/@babel/core/lib/config/caching.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/config-chain.js +13 -13
- package/src/front/node_modules/@babel/core/lib/config/config-chain.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/config-descriptors.js +6 -6
- package/src/front/node_modules/@babel/core/lib/config/config-descriptors.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/configuration.js +44 -41
- package/src/front/node_modules/@babel/core/lib/config/files/configuration.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/import-meta-resolve.js +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/import-meta-resolve.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/index-browser.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/index.js +3 -3
- package/src/front/node_modules/@babel/core/lib/config/files/index.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/module-types.js +27 -8
- package/src/front/node_modules/@babel/core/lib/config/files/module-types.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/package.js +2 -2
- package/src/front/node_modules/@babel/core/lib/config/files/package.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/plugins.js +3 -3
- package/src/front/node_modules/@babel/core/lib/config/files/plugins.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/types.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/files/utils.js +2 -2
- package/src/front/node_modules/@babel/core/lib/config/files/utils.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/full.js +13 -13
- package/src/front/node_modules/@babel/core/lib/config/full.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/helpers/config-api.js +6 -6
- package/src/front/node_modules/@babel/core/lib/config/helpers/config-api.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/index.js +60 -40
- package/src/front/node_modules/@babel/core/lib/config/index.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/item.js +1 -1
- package/src/front/node_modules/@babel/core/lib/config/item.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/partial.js +15 -23
- package/src/front/node_modules/@babel/core/lib/config/partial.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/plugin.js +1 -1
- package/src/front/node_modules/@babel/core/lib/config/plugin.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/printer.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/resolve-targets-browser.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/resolve-targets.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/util.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/validation/option-assertions.js +1 -1
- package/src/front/node_modules/@babel/core/lib/config/validation/option-assertions.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/validation/options.js +3 -3
- package/src/front/node_modules/@babel/core/lib/config/validation/options.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/config/validation/plugins.js +1 -1
- package/src/front/node_modules/@babel/core/lib/config/validation/plugins.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/errors/config-error.js +1 -1
- package/src/front/node_modules/@babel/core/lib/errors/config-error.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/gensync-utils/functional.js +1 -1
- package/src/front/node_modules/@babel/core/lib/gensync-utils/functional.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/index.js +23 -23
- package/src/front/node_modules/@babel/core/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/parse.js +6 -6
- package/src/front/node_modules/@babel/core/lib/parse.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/parser/index.js +1 -1
- package/src/front/node_modules/@babel/core/lib/parser/index.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/tools/build-external-helpers.js +1 -1
- package/src/front/node_modules/@babel/core/lib/tools/build-external-helpers.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transform-ast.js +5 -5
- package/src/front/node_modules/@babel/core/lib/transform-ast.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transform-file.js +5 -5
- package/src/front/node_modules/@babel/core/lib/transform-file.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transform.js +5 -5
- package/src/front/node_modules/@babel/core/lib/transform.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/file/file.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/file/generate.js +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/file/generate.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/index.js +6 -6
- package/src/front/node_modules/@babel/core/lib/transformation/index.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/normalize-file.js +4 -4
- package/src/front/node_modules/@babel/core/lib/transformation/normalize-file.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/normalize-opts.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/transformation/plugin-pass.js.map +1 -1
- package/src/front/node_modules/@babel/core/lib/vendor/import-meta-resolve.js.map +1 -1
- package/src/front/node_modules/@babel/core/package.json +15 -15
- package/src/front/node_modules/@babel/core/src/config/files/index-browser.ts +2 -2
- package/src/front/node_modules/@babel/core/src/config/files/index.ts +4 -4
- package/src/front/node_modules/@babel/core/src/config/resolve-targets-browser.ts +1 -1
- package/src/front/node_modules/@babel/core/src/config/resolve-targets.ts +1 -1
- package/src/front/node_modules/@babel/core/src/transform-file.ts +5 -5
- package/src/front/node_modules/@babel/generator/lib/buffer.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/base.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/classes.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/expressions.js +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/expressions.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/flow.js +2 -2
- package/src/front/node_modules/@babel/generator/lib/generators/flow.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/index.js +11 -11
- package/src/front/node_modules/@babel/generator/lib/generators/index.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/jsx.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/methods.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/modules.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/statements.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/template-literals.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/types.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/generators/typescript.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/index.js +2 -2
- package/src/front/node_modules/@babel/generator/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/node/index.js +2 -2
- package/src/front/node_modules/@babel/generator/lib/node/index.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/node/whitespace.js.map +1 -1
- package/src/front/node_modules/@babel/generator/lib/printer.js +3 -3
- package/src/front/node_modules/@babel/generator/lib/printer.js.map +1 -1
- package/src/front/node_modules/@babel/generator/package.json +4 -4
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/debug.js +2 -2
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/debug.js.map +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/filter-items.js +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/filter-items.js.map +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/index.js +6 -6
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/pretty.js +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/pretty.js.map +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/utils.js +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/lib/utils.js.map +1 -1
- package/src/front/node_modules/@babel/helper-compilation-targets/package.json +2 -2
- package/src/front/node_modules/@babel/helper-module-imports/README.md +1 -1
- package/src/front/node_modules/@babel/helper-module-imports/lib/import-injector.js +2 -2
- package/src/front/node_modules/@babel/helper-module-imports/lib/import-injector.js.map +1 -1
- package/src/front/node_modules/@babel/helper-module-imports/lib/index.js +2 -2
- package/src/front/node_modules/@babel/helper-module-imports/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/helper-module-imports/package.json +4 -4
- package/src/front/node_modules/@babel/helper-module-transforms/lib/index.js +5 -5
- package/src/front/node_modules/@babel/helper-module-transforms/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js.map +1 -1
- package/src/front/node_modules/@babel/helper-module-transforms/package.json +5 -5
- package/src/front/node_modules/@babel/helper-validator-identifier/README.md +1 -1
- package/src/front/node_modules/@babel/helper-validator-identifier/lib/index.js +2 -2
- package/src/front/node_modules/@babel/helper-validator-identifier/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/helper-validator-identifier/package.json +1 -1
- package/src/front/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js +8 -6
- package/src/front/node_modules/@babel/helper-validator-option/README.md +1 -1
- package/src/front/node_modules/@babel/helper-validator-option/lib/index.js +2 -2
- package/src/front/node_modules/@babel/helper-validator-option/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/helper-validator-option/lib/validator.js +1 -1
- package/src/front/node_modules/@babel/helper-validator-option/lib/validator.js.map +1 -1
- package/src/front/node_modules/@babel/helper-validator-option/package.json +1 -1
- package/src/front/node_modules/@babel/helpers/lib/helpers-generated.js +21 -21
- package/src/front/node_modules/@babel/helpers/lib/helpers-generated.js.map +1 -1
- package/src/front/node_modules/@babel/helpers/lib/helpers.js +1 -1
- package/src/front/node_modules/@babel/helpers/lib/helpers.js.map +1 -1
- package/src/front/node_modules/@babel/helpers/lib/index.js +1 -1
- package/src/front/node_modules/@babel/helpers/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/helpers/package.json +7 -7
- package/src/front/node_modules/@babel/helpers/scripts/generate-helpers.js +1 -1
- package/src/front/node_modules/@babel/highlight/lib/index.js +6 -5
- package/src/front/node_modules/@babel/highlight/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/highlight/package.json +1 -1
- package/src/front/node_modules/@babel/parser/lib/index.js +52 -57
- package/src/front/node_modules/@babel/parser/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/parser/package.json +4 -4
- package/src/front/node_modules/@babel/template/README.md +1 -1
- package/src/front/node_modules/@babel/template/lib/builder.js +3 -3
- package/src/front/node_modules/@babel/template/lib/builder.js.map +1 -1
- package/src/front/node_modules/@babel/template/lib/index.js +2 -2
- package/src/front/node_modules/@babel/template/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/template/lib/literal.js +3 -3
- package/src/front/node_modules/@babel/template/lib/literal.js.map +1 -1
- package/src/front/node_modules/@babel/template/lib/parse.js.map +1 -1
- package/src/front/node_modules/@babel/template/lib/populate.js.map +1 -1
- package/src/front/node_modules/@babel/template/lib/string.js +3 -3
- package/src/front/node_modules/@babel/template/lib/string.js.map +1 -1
- package/src/front/node_modules/@babel/template/package.json +4 -4
- package/src/front/node_modules/@babel/traverse/lib/cache.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/context.js +2 -2
- package/src/front/node_modules/@babel/traverse/lib/context.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/hub.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/index.js +8 -8
- package/src/front/node_modules/@babel/traverse/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/ancestry.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/comments.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/context.js +2 -2
- package/src/front/node_modules/@babel/traverse/lib/path/context.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/conversion.js +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/conversion.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/evaluation.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/family.js +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/family.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/index.js +17 -17
- package/src/front/node_modules/@babel/traverse/lib/path/index.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/inference/index.js +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/inference/index.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/inference/inferers.js +2 -2
- package/src/front/node_modules/@babel/traverse/lib/path/inference/inferers.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/introspection.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/lib/hoister.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/lib/virtual-types-validator.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/modification.js +3 -3
- package/src/front/node_modules/@babel/traverse/lib/path/modification.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/removal.js +3 -3
- package/src/front/node_modules/@babel/traverse/lib/path/removal.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/path/replacement.js +3 -3
- package/src/front/node_modules/@babel/traverse/lib/path/replacement.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/scope/binding.js +1 -3
- package/src/front/node_modules/@babel/traverse/lib/scope/binding.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/scope/index.js +5 -5
- package/src/front/node_modules/@babel/traverse/lib/scope/index.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/scope/lib/renamer.js +2 -2
- package/src/front/node_modules/@babel/traverse/lib/scope/lib/renamer.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/traverse-node.js +1 -1
- package/src/front/node_modules/@babel/traverse/lib/traverse-node.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/types.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/lib/visitors.js +1 -1
- package/src/front/node_modules/@babel/traverse/lib/visitors.js.map +1 -1
- package/src/front/node_modules/@babel/traverse/package.json +6 -6
- package/src/front/node_modules/@babel/types/lib/asserts/assertNode.js +1 -1
- package/src/front/node_modules/@babel/types/lib/asserts/assertNode.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/asserts/generated/index.js +2 -2
- package/src/front/node_modules/@babel/types/lib/asserts/generated/index.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/ast-types/generated/index.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js +3 -3
- package/src/front/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js +9 -9
- package/src/front/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/builders/generated/index.js +2 -2
- package/src/front/node_modules/@babel/types/lib/builders/generated/index.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/builders/generated/uppercase.js +1 -1
- package/src/front/node_modules/@babel/types/lib/builders/generated/uppercase.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/builders/react/buildChildren.js +5 -5
- package/src/front/node_modules/@babel/types/lib/builders/react/buildChildren.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js +5 -5
- package/src/front/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/builders/validateNode.js +3 -3
- package/src/front/node_modules/@babel/types/lib/builders/validateNode.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/clone.js +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/clone.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/cloneDeep.js +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/cloneDeep.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/cloneNode.js +6 -6
- package/src/front/node_modules/@babel/types/lib/clone/cloneNode.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js +1 -1
- package/src/front/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/addComment.js +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/addComment.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/addComments.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/inheritInnerComments.js +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/inheritInnerComments.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/inheritLeadingComments.js +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/inheritLeadingComments.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/inheritTrailingComments.js +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/inheritTrailingComments.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/inheritsComments.js +3 -3
- package/src/front/node_modules/@babel/types/lib/comments/inheritsComments.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/comments/removeComments.js +2 -2
- package/src/front/node_modules/@babel/types/lib/comments/removeComments.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/constants/generated/index.js +50 -50
- package/src/front/node_modules/@babel/types/lib/constants/generated/index.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/ensureBlock.js +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/ensureBlock.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js +14 -14
- package/src/front/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toBlock.js +9 -9
- package/src/front/node_modules/@babel/types/lib/converters/toBlock.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toComputedKey.js +3 -3
- package/src/front/node_modules/@babel/types/lib/converters/toComputedKey.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toExpression.js +6 -6
- package/src/front/node_modules/@babel/types/lib/converters/toExpression.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toIdentifier.js +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toIdentifier.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toKeyAlias.js +5 -5
- package/src/front/node_modules/@babel/types/lib/converters/toKeyAlias.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toSequenceExpression.js +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toSequenceExpression.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/toStatement.js +7 -7
- package/src/front/node_modules/@babel/types/lib/converters/toStatement.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/converters/valueToNode.js +17 -17
- package/src/front/node_modules/@babel/types/lib/converters/valueToNode.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/core.js +9 -9
- package/src/front/node_modules/@babel/types/lib/definitions/core.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/experimental.js +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/experimental.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/flow.js +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/flow.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/index.js +9 -9
- package/src/front/node_modules/@babel/types/lib/definitions/index.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/jsx.js +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/jsx.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/misc.js +2 -2
- package/src/front/node_modules/@babel/types/lib/definitions/misc.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/placeholders.js +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/placeholders.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/typescript.js +4 -4
- package/src/front/node_modules/@babel/types/lib/definitions/typescript.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/definitions/utils.js +2 -2
- package/src/front/node_modules/@babel/types/lib/definitions/utils.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/index-legacy.d.ts +10 -10
- package/src/front/node_modules/@babel/types/lib/index.d.ts +12 -12
- package/src/front/node_modules/@babel/types/lib/index.js +84 -84
- package/src/front/node_modules/@babel/types/lib/index.js.flow +10 -10
- package/src/front/node_modules/@babel/types/lib/index.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js +2 -2
- package/src/front/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js +6 -6
- package/src/front/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/modifications/inherits.js +4 -4
- package/src/front/node_modules/@babel/types/lib/modifications/inherits.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js +4 -4
- package/src/front/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/modifications/removeProperties.js +2 -2
- package/src/front/node_modules/@babel/types/lib/modifications/removeProperties.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js +2 -2
- package/src/front/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js +6 -6
- package/src/front/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js +6 -6
- package/src/front/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js +1 -1
- package/src/front/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/traverse/traverse.js +2 -2
- package/src/front/node_modules/@babel/types/lib/traverse/traverse.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/traverse/traverseFast.js +2 -2
- package/src/front/node_modules/@babel/types/lib/traverse/traverseFast.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/utils/inherit.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js +3 -3
- package/src/front/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/generated/index.js +2 -2
- package/src/front/node_modules/@babel/types/lib/validators/generated/index.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/is.js +5 -5
- package/src/front/node_modules/@babel/types/lib/validators/is.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isBinding.js +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isBinding.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isBlockScoped.js +3 -3
- package/src/front/node_modules/@babel/types/lib/validators/isBlockScoped.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isImmutable.js +3 -3
- package/src/front/node_modules/@babel/types/lib/validators/isImmutable.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isLet.js +3 -3
- package/src/front/node_modules/@babel/types/lib/validators/isLet.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isNode.js +2 -2
- package/src/front/node_modules/@babel/types/lib/validators/isNode.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isNodesEquivalent.js +3 -3
- package/src/front/node_modules/@babel/types/lib/validators/isNodesEquivalent.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isPlaceholderType.js +2 -2
- package/src/front/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isReferenced.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isScope.js +4 -4
- package/src/front/node_modules/@babel/types/lib/validators/isScope.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isSpecifierDefault.js +2 -2
- package/src/front/node_modules/@babel/types/lib/validators/isSpecifierDefault.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isType.js +3 -3
- package/src/front/node_modules/@babel/types/lib/validators/isType.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isValidES3Identifier.js +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isValidES3Identifier.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/isVar.js +4 -4
- package/src/front/node_modules/@babel/types/lib/validators/isVar.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/matchesPattern.js +6 -6
- package/src/front/node_modules/@babel/types/lib/validators/matchesPattern.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/react/isReactComponent.js +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/react/isReactComponent.js.map +1 -1
- package/src/front/node_modules/@babel/types/lib/validators/validate.js +3 -3
- package/src/front/node_modules/@babel/types/lib/validators/validate.js.map +1 -1
- package/src/front/node_modules/@babel/types/package.json +4 -4
- package/src/front/node_modules/typescript/lib/lib.decorators.d.ts +17 -0
- package/src/front/node_modules/typescript/lib/lib.dom.d.ts +313 -90
- package/src/front/node_modules/typescript/lib/lib.es2015.collection.d.ts +9 -9
- package/src/front/node_modules/typescript/lib/lib.es2015.core.d.ts +2 -2
- package/src/front/node_modules/typescript/lib/lib.es2015.iterable.d.ts +4 -4
- package/src/front/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +2 -2
- package/src/front/node_modules/typescript/lib/lib.es2017.d.ts +1 -0
- package/src/front/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
- package/src/front/node_modules/typescript/lib/lib.es2020.bigint.d.ts +4 -4
- package/src/front/node_modules/typescript/lib/lib.es2021.weakref.d.ts +19 -16
- package/src/front/node_modules/typescript/lib/lib.es2023.array.d.ts +618 -36
- package/src/front/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
- package/src/front/node_modules/typescript/lib/lib.es2023.d.ts +1 -0
- package/src/front/node_modules/typescript/lib/lib.es5.d.ts +27 -18
- package/src/front/node_modules/typescript/lib/lib.esnext.d.ts +2 -0
- package/src/front/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
- package/src/front/node_modules/typescript/lib/lib.esnext.disposable.d.ts +185 -0
- package/src/front/node_modules/typescript/lib/lib.webworker.d.ts +172 -33
- package/src/front/node_modules/typescript/lib/tsc.js +8311 -6557
- package/src/front/node_modules/typescript/lib/tsserver.js +11796 -9281
- package/src/front/node_modules/typescript/lib/tsserverlibrary.d.ts +287 -249
- package/src/front/node_modules/typescript/lib/tsserverlibrary.js +11801 -9288
- package/src/front/node_modules/typescript/lib/typescript.d.ts +274 -248
- package/src/front/node_modules/typescript/lib/typescript.js +11678 -9231
- package/src/front/node_modules/typescript/lib/typingsInstaller.js +1852 -1645
- package/src/front/node_modules/typescript/package.json +7 -7
- package/src/front/package-lock.json +144 -144
- package/src/front/src/components/inputs/FileInput.js +1 -0
- package/src/front/src/pages/Records.js +1 -0
- package/src/front/build/static/js/main.4ce5340d.chunk.js.map +0 -1
- package/src/front/node_modules/.cache/babel-loader/1dbf9b1b83cdf813e9dc5f561b9b97ac.json +0 -1
- package/src/front/node_modules/.cache/babel-loader/d88f947a76ac5f78797e69c737b6267e.json +0 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/c3/3e/f2b5b90044b7bdbb4cff67b2c09e24bb506274240d920de24bb4b678f3f00b80f7e9f0900cd1de883484031488d8603e97ea6b4e39a9c6ab5160353d3be9 +0 -1
- package/src/front/node_modules/@babel/parser/lib/options.js +0 -44
- package/src/front/node_modules/@babel/parser/lib/options.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parse-error/credentials.js +0 -28
- package/src/front/node_modules/@babel/parser/lib/parse-error/credentials.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parse-error/module-errors.js +0 -20
- package/src/front/node_modules/@babel/parser/lib/parse-error/module-errors.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parse-error/pipeline-operator-errors.js +0 -32
- package/src/front/node_modules/@babel/parser/lib/parse-error/pipeline-operator-errors.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parse-error/standard-errors.js +0 -220
- package/src/front/node_modules/@babel/parser/lib/parse-error/standard-errors.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parse-error/strict-mode-errors.js +0 -22
- package/src/front/node_modules/@babel/parser/lib/parse-error/strict-mode-errors.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parse-error/to-node-description.js +0 -39
- package/src/front/node_modules/@babel/parser/lib/parse-error/to-node-description.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parse-error.js +0 -106
- package/src/front/node_modules/@babel/parser/lib/parse-error.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parser/base.js +0 -36
- package/src/front/node_modules/@babel/parser/lib/parser/base.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parser/comments.js +0 -190
- package/src/front/node_modules/@babel/parser/lib/parser/comments.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parser/expression.js +0 -1824
- package/src/front/node_modules/@babel/parser/lib/parser/expression.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parser/index.js +0 -43
- package/src/front/node_modules/@babel/parser/lib/parser/index.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parser/lval.js +0 -421
- package/src/front/node_modules/@babel/parser/lib/parser/lval.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parser/node.js +0 -127
- package/src/front/node_modules/@babel/parser/lib/parser/node.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parser/statement.js +0 -2033
- package/src/front/node_modules/@babel/parser/lib/parser/statement.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/parser/util.js +0 -238
- package/src/front/node_modules/@babel/parser/lib/parser/util.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugin-utils.js +0 -136
- package/src/front/node_modules/@babel/parser/lib/plugin-utils.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/estree.js +0 -340
- package/src/front/node_modules/@babel/parser/lib/plugins/estree.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/flow/index.js +0 -2474
- package/src/front/node_modules/@babel/parser/lib/plugins/flow/index.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/flow/scope.js +0 -44
- package/src/front/node_modules/@babel/parser/lib/plugins/flow/scope.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/jsx/index.js +0 -444
- package/src/front/node_modules/@babel/parser/lib/plugins/jsx/index.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/jsx/xhtml.js +0 -266
- package/src/front/node_modules/@babel/parser/lib/plugins/jsx/xhtml.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/placeholders.js +0 -198
- package/src/front/node_modules/@babel/parser/lib/plugins/placeholders.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/typescript/index.js +0 -2656
- package/src/front/node_modules/@babel/parser/lib/plugins/typescript/index.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/typescript/scope.js +0 -121
- package/src/front/node_modules/@babel/parser/lib/plugins/typescript/scope.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/plugins/v8intrinsic.js +0 -31
- package/src/front/node_modules/@babel/parser/lib/plugins/v8intrinsic.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/tokenizer/context.js +0 -27
- package/src/front/node_modules/@babel/parser/lib/tokenizer/context.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/tokenizer/index.js +0 -1119
- package/src/front/node_modules/@babel/parser/lib/tokenizer/index.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/tokenizer/state.js +0 -82
- package/src/front/node_modules/@babel/parser/lib/tokenizer/state.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/tokenizer/types.js +0 -586
- package/src/front/node_modules/@babel/parser/lib/tokenizer/types.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/util/class-scope.js +0 -92
- package/src/front/node_modules/@babel/parser/lib/util/class-scope.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/util/expression-scope.js +0 -142
- package/src/front/node_modules/@babel/parser/lib/util/expression-scope.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/util/identifier.js +0 -62
- package/src/front/node_modules/@babel/parser/lib/util/identifier.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/util/location.js +0 -39
- package/src/front/node_modules/@babel/parser/lib/util/location.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/util/production-parameter.js +0 -49
- package/src/front/node_modules/@babel/parser/lib/util/production-parameter.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/util/scope.js +0 -161
- package/src/front/node_modules/@babel/parser/lib/util/scope.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/util/scopeflags.js +0 -67
- package/src/front/node_modules/@babel/parser/lib/util/scopeflags.js.map +0 -1
- package/src/front/node_modules/@babel/parser/lib/util/whitespace.js +0 -59
- package/src/front/node_modules/@babel/parser/lib/util/whitespace.js.map +0 -1
|
@@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = is;
|
|
7
|
-
var _shallowEqual = require("../utils/shallowEqual");
|
|
8
|
-
var _isType = require("./isType");
|
|
9
|
-
var _isPlaceholderType = require("./isPlaceholderType");
|
|
10
|
-
var
|
|
7
|
+
var _shallowEqual = require("../utils/shallowEqual.js");
|
|
8
|
+
var _isType = require("./isType.js");
|
|
9
|
+
var _isPlaceholderType = require("./isPlaceholderType.js");
|
|
10
|
+
var _index = require("../definitions/index.js");
|
|
11
11
|
function is(type, node, opts) {
|
|
12
12
|
if (!node) return false;
|
|
13
13
|
const matches = (0, _isType.default)(node.type, type);
|
|
14
14
|
if (!matches) {
|
|
15
|
-
if (!opts && node.type === "Placeholder" && type in
|
|
15
|
+
if (!opts && node.type === "Placeholder" && type in _index.FLIPPED_ALIAS_KEYS) {
|
|
16
16
|
return (0, _isPlaceholderType.default)(node.expectedNode, type);
|
|
17
17
|
}
|
|
18
18
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_shallowEqual","require","_isType","_isPlaceholderType","
|
|
1
|
+
{"version":3,"names":["_shallowEqual","require","_isType","_isPlaceholderType","_index","is","type","node","opts","matches","isType","FLIPPED_ALIAS_KEYS","isPlaceholderType","expectedNode","shallowEqual"],"sources":["../../src/validators/is.ts"],"sourcesContent":["import shallowEqual from \"../utils/shallowEqual.ts\";\nimport isType from \"./isType.ts\";\nimport isPlaceholderType from \"./isPlaceholderType.ts\";\nimport { FLIPPED_ALIAS_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function is<T extends t.Node[\"type\"]>(\n type: T,\n node: t.Node | null | undefined,\n opts?: undefined,\n): node is Extract<t.Node, { type: T }>;\n\nexport default function is<\n T extends t.Node[\"type\"],\n P extends Extract<t.Node, { type: T }>,\n>(type: T, n: t.Node | null | undefined, required: Partial<P>): n is P;\n\nexport default function is<P extends t.Node>(\n type: string,\n node: t.Node | null | undefined,\n opts: Partial<P>,\n): node is P;\n\nexport default function is(\n type: string,\n node: t.Node | null | undefined,\n opts?: Partial<t.Node>,\n): node is t.Node;\n/**\n * Returns whether `node` is of given `type`.\n *\n * For better performance, use this instead of `is[Type]` when `type` is unknown.\n */\nexport default function is(\n type: string,\n node: t.Node | null | undefined,\n opts?: Partial<t.Node>,\n): node is t.Node {\n if (!node) return false;\n\n const matches = isType(node.type, type);\n if (!matches) {\n if (!opts && node.type === \"Placeholder\" && type in FLIPPED_ALIAS_KEYS) {\n // We can only return true if the placeholder doesn't replace a real node,\n // but it replaces a category of nodes (an alias).\n //\n // t.is(\"Identifier\", node) gives some guarantees about node's shape, so we\n // can't say that Placeholder(expectedNode: \"Identifier\") is an identifier\n // because it doesn't have the same properties.\n // On the other hand, t.is(\"Expression\", node) doesn't say anything about\n // the shape of node because Expression can be many different nodes: we can,\n // and should, safely report expression placeholders as Expressions.\n return isPlaceholderType(node.expectedNode, type);\n }\n return false;\n }\n\n if (typeof opts === \"undefined\") {\n return true;\n } else {\n return shallowEqual(node, opts);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AA8Be,SAASI,EAAEA,CACxBC,IAAY,EACZC,IAA+B,EAC/BC,IAAsB,EACN;EAChB,IAAI,CAACD,IAAI,EAAE,OAAO,KAAK;EAEvB,MAAME,OAAO,GAAG,IAAAC,eAAM,EAACH,IAAI,CAACD,IAAI,EAAEA,IAAI,CAAC;EACvC,IAAI,CAACG,OAAO,EAAE;IACZ,IAAI,CAACD,IAAI,IAAID,IAAI,CAACD,IAAI,KAAK,aAAa,IAAIA,IAAI,IAAIK,yBAAkB,EAAE;MAUtE,OAAO,IAAAC,0BAAiB,EAACL,IAAI,CAACM,YAAY,EAAEP,IAAI,CAAC;IACnD;IACA,OAAO,KAAK;EACd;EAEA,IAAI,OAAOE,IAAI,KAAK,WAAW,EAAE;IAC/B,OAAO,IAAI;EACb,CAAC,MAAM;IACL,OAAO,IAAAM,qBAAY,EAACP,IAAI,EAAEC,IAAI,CAAC;EACjC;AACF"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = isBinding;
|
|
7
|
-
var _getBindingIdentifiers = require("../retrievers/getBindingIdentifiers");
|
|
7
|
+
var _getBindingIdentifiers = require("../retrievers/getBindingIdentifiers.js");
|
|
8
8
|
function isBinding(node, parent, grandparent) {
|
|
9
9
|
if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
|
|
10
10
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_getBindingIdentifiers","require","isBinding","node","parent","grandparent","type","keys","getBindingIdentifiers","i","length","key","val","Array","isArray","indexOf"],"sources":["../../src/validators/isBinding.ts"],"sourcesContent":["import getBindingIdentifiers from \"../retrievers/getBindingIdentifiers\";\nimport type * as t from \"
|
|
1
|
+
{"version":3,"names":["_getBindingIdentifiers","require","isBinding","node","parent","grandparent","type","keys","getBindingIdentifiers","i","length","key","val","Array","isArray","indexOf"],"sources":["../../src/validators/isBinding.ts"],"sourcesContent":["import getBindingIdentifiers from \"../retrievers/getBindingIdentifiers.ts\";\nimport type * as t from \"../index.ts\";\n/**\n * Check if the input `node` is a binding identifier.\n */\nexport default function isBinding(\n node: t.Node,\n parent: t.Node,\n grandparent?: t.Node,\n): boolean {\n if (\n grandparent &&\n node.type === \"Identifier\" &&\n parent.type === \"ObjectProperty\" &&\n grandparent.type === \"ObjectExpression\"\n ) {\n // We need to special-case this, because getBindingIdentifiers\n // has an ObjectProperty->value entry for destructuring patterns.\n return false;\n }\n\n const keys =\n // @ts-expect-error getBindingIdentifiers.keys does not cover all AST types\n getBindingIdentifiers.keys[parent.type];\n if (keys) {\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const val =\n // @ts-expect-error key must present in parent\n parent[key];\n if (Array.isArray(val)) {\n if (val.indexOf(node) >= 0) return true;\n } else {\n if (val === node) return true;\n }\n }\n }\n\n return false;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAKe,SAASC,SAASA,CAC/BC,IAAY,EACZC,MAAc,EACdC,WAAoB,EACX;EACT,IACEA,WAAW,IACXF,IAAI,CAACG,IAAI,KAAK,YAAY,IAC1BF,MAAM,CAACE,IAAI,KAAK,gBAAgB,IAChCD,WAAW,CAACC,IAAI,KAAK,kBAAkB,EACvC;IAGA,OAAO,KAAK;EACd;EAEA,MAAMC,IAAI,GAERC,8BAAqB,CAACD,IAAI,CAACH,MAAM,CAACE,IAAI,CAAC;EACzC,IAAIC,IAAI,EAAE;IACR,KAAK,IAAIE,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,IAAI,CAACG,MAAM,EAAED,CAAC,EAAE,EAAE;MACpC,MAAME,GAAG,GAAGJ,IAAI,CAACE,CAAC,CAAC;MACnB,MAAMG,GAAG,GAEPR,MAAM,CAACO,GAAG,CAAC;MACb,IAAIE,KAAK,CAACC,OAAO,CAACF,GAAG,CAAC,EAAE;QACtB,IAAIA,GAAG,CAACG,OAAO,CAACZ,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO,IAAI;MACzC,CAAC,MAAM;QACL,IAAIS,GAAG,KAAKT,IAAI,EAAE,OAAO,IAAI;MAC/B;IACF;EACF;EAEA,OAAO,KAAK;AACd"}
|
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = isBlockScoped;
|
|
7
|
-
var
|
|
8
|
-
var _isLet = require("./isLet");
|
|
7
|
+
var _index = require("./generated/index.js");
|
|
8
|
+
var _isLet = require("./isLet.js");
|
|
9
9
|
function isBlockScoped(node) {
|
|
10
|
-
return (0,
|
|
10
|
+
return (0, _index.isFunctionDeclaration)(node) || (0, _index.isClassDeclaration)(node) || (0, _isLet.default)(node);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
//# sourceMappingURL=isBlockScoped.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_index","require","_isLet","isBlockScoped","node","isFunctionDeclaration","isClassDeclaration","isLet"],"sources":["../../src/validators/isBlockScoped.ts"],"sourcesContent":["import {\n isClassDeclaration,\n isFunctionDeclaration,\n} from \"./generated/index.ts\";\nimport isLet from \"./isLet.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is block scoped.\n */\nexport default function isBlockScoped(node: t.Node): boolean {\n return isFunctionDeclaration(node) || isClassDeclaration(node) || isLet(node);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,MAAA,GAAAD,OAAA;AAMe,SAASE,aAAaA,CAACC,IAAY,EAAW;EAC3D,OAAO,IAAAC,4BAAqB,EAACD,IAAI,CAAC,IAAI,IAAAE,yBAAkB,EAACF,IAAI,CAAC,IAAI,IAAAG,cAAK,EAACH,IAAI,CAAC;AAC/E"}
|
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = isImmutable;
|
|
7
|
-
var _isType = require("./isType");
|
|
8
|
-
var
|
|
7
|
+
var _isType = require("./isType.js");
|
|
8
|
+
var _index = require("./generated/index.js");
|
|
9
9
|
function isImmutable(node) {
|
|
10
10
|
if ((0, _isType.default)(node.type, "Immutable")) return true;
|
|
11
|
-
if ((0,
|
|
11
|
+
if ((0, _index.isIdentifier)(node)) {
|
|
12
12
|
if (node.name === "undefined") {
|
|
13
13
|
return true;
|
|
14
14
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_isType","require","
|
|
1
|
+
{"version":3,"names":["_isType","require","_index","isImmutable","node","isType","type","isIdentifier","name"],"sources":["../../src/validators/isImmutable.ts"],"sourcesContent":["import isType from \"./isType.ts\";\nimport { isIdentifier } from \"./generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is definitely immutable.\n */\nexport default function isImmutable(node: t.Node): boolean {\n if (isType(node.type, \"Immutable\")) return true;\n\n if (isIdentifier(node)) {\n if (node.name === \"undefined\") {\n // immutable!\n return true;\n } else {\n // no idea...\n return false;\n }\n }\n\n return false;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAMe,SAASE,WAAWA,CAACC,IAAY,EAAW;EACzD,IAAI,IAAAC,eAAM,EAACD,IAAI,CAACE,IAAI,EAAE,WAAW,CAAC,EAAE,OAAO,IAAI;EAE/C,IAAI,IAAAC,mBAAY,EAACH,IAAI,CAAC,EAAE;IACtB,IAAIA,IAAI,CAACI,IAAI,KAAK,WAAW,EAAE;MAE7B,OAAO,IAAI;IACb,CAAC,MAAM;MAEL,OAAO,KAAK;IACd;EACF;EAEA,OAAO,KAAK;AACd"}
|
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = isLet;
|
|
7
|
-
var
|
|
8
|
-
var
|
|
7
|
+
var _index = require("./generated/index.js");
|
|
8
|
+
var _index2 = require("../constants/index.js");
|
|
9
9
|
function isLet(node) {
|
|
10
|
-
return (0,
|
|
10
|
+
return (0, _index.isVariableDeclaration)(node) && (node.kind !== "var" || node[_index2.BLOCK_SCOPED_SYMBOL]);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
//# sourceMappingURL=isLet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_index","require","_index2","isLet","node","isVariableDeclaration","kind","BLOCK_SCOPED_SYMBOL"],"sources":["../../src/validators/isLet.ts"],"sourcesContent":["import { isVariableDeclaration } from \"./generated/index.ts\";\nimport { BLOCK_SCOPED_SYMBOL } from \"../constants/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is a `let` variable declaration.\n */\nexport default function isLet(node: t.Node): boolean {\n return (\n isVariableDeclaration(node) &&\n (node.kind !== \"var\" ||\n // @ts-expect-error Fixme: document private properties\n node[BLOCK_SCOPED_SYMBOL])\n );\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAMe,SAASE,KAAKA,CAACC,IAAY,EAAW;EACnD,OACE,IAAAC,4BAAqB,EAACD,IAAI,CAAC,KAC1BA,IAAI,CAACE,IAAI,KAAK,KAAK,IAElBF,IAAI,CAACG,2BAAmB,CAAC,CAAC;AAEhC"}
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = isNode;
|
|
7
|
-
var
|
|
7
|
+
var _index = require("../definitions/index.js");
|
|
8
8
|
function isNode(node) {
|
|
9
|
-
return !!(node &&
|
|
9
|
+
return !!(node && _index.VISITOR_KEYS[node.type]);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
//# sourceMappingURL=isNode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_index","require","isNode","node","VISITOR_KEYS","type"],"sources":["../../src/validators/isNode.ts"],"sourcesContent":["import { VISITOR_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function isNode(node: any): node is t.Node {\n return !!(node && VISITOR_KEYS[node.type]);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGe,SAASC,MAAMA,CAACC,IAAS,EAAkB;EACxD,OAAO,CAAC,EAAEA,IAAI,IAAIC,mBAAY,CAACD,IAAI,CAACE,IAAI,CAAC,CAAC;AAC5C"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = isNodesEquivalent;
|
|
7
|
-
var
|
|
7
|
+
var _index = require("../definitions/index.js");
|
|
8
8
|
function isNodesEquivalent(a, b) {
|
|
9
9
|
if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
|
|
10
10
|
return a === b;
|
|
@@ -12,8 +12,8 @@ function isNodesEquivalent(a, b) {
|
|
|
12
12
|
if (a.type !== b.type) {
|
|
13
13
|
return false;
|
|
14
14
|
}
|
|
15
|
-
const fields = Object.keys(
|
|
16
|
-
const visitorKeys =
|
|
15
|
+
const fields = Object.keys(_index.NODE_FIELDS[a.type] || a.type);
|
|
16
|
+
const visitorKeys = _index.VISITOR_KEYS[a.type];
|
|
17
17
|
for (const field of fields) {
|
|
18
18
|
const val_a = a[field];
|
|
19
19
|
const val_b = b[field];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_index","require","isNodesEquivalent","a","b","type","fields","Object","keys","NODE_FIELDS","visitorKeys","VISITOR_KEYS","field","val_a","val_b","Array","isArray","length","i","includes","key"],"sources":["../../src/validators/isNodesEquivalent.ts"],"sourcesContent":["import { NODE_FIELDS, VISITOR_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if two nodes are equivalent\n */\nexport default function isNodesEquivalent<T extends Partial<t.Node>>(\n a: T,\n b: any,\n): b is T {\n if (\n typeof a !== \"object\" ||\n typeof b !== \"object\" ||\n a == null ||\n b == null\n ) {\n return a === b;\n }\n\n if (a.type !== b.type) {\n return false;\n }\n\n const fields = Object.keys(NODE_FIELDS[a.type] || a.type);\n const visitorKeys = VISITOR_KEYS[a.type];\n\n for (const field of fields) {\n const val_a =\n // @ts-expect-error field must present in a\n a[field];\n const val_b = b[field];\n if (typeof val_a !== typeof val_b) {\n return false;\n }\n if (val_a == null && val_b == null) {\n continue;\n } else if (val_a == null || val_b == null) {\n return false;\n }\n\n if (Array.isArray(val_a)) {\n if (!Array.isArray(val_b)) {\n return false;\n }\n if (val_a.length !== val_b.length) {\n return false;\n }\n\n for (let i = 0; i < val_a.length; i++) {\n if (!isNodesEquivalent(val_a[i], val_b[i])) {\n return false;\n }\n }\n continue;\n }\n\n if (typeof val_a === \"object\" && !visitorKeys?.includes(field)) {\n for (const key of Object.keys(val_a)) {\n if (val_a[key] !== val_b[key]) {\n return false;\n }\n }\n continue;\n }\n\n if (!isNodesEquivalent(val_a, val_b)) {\n return false;\n }\n }\n\n return true;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAMe,SAASC,iBAAiBA,CACvCC,CAAI,EACJC,CAAM,EACE;EACR,IACE,OAAOD,CAAC,KAAK,QAAQ,IACrB,OAAOC,CAAC,KAAK,QAAQ,IACrBD,CAAC,IAAI,IAAI,IACTC,CAAC,IAAI,IAAI,EACT;IACA,OAAOD,CAAC,KAAKC,CAAC;EAChB;EAEA,IAAID,CAAC,CAACE,IAAI,KAAKD,CAAC,CAACC,IAAI,EAAE;IACrB,OAAO,KAAK;EACd;EAEA,MAAMC,MAAM,GAAGC,MAAM,CAACC,IAAI,CAACC,kBAAW,CAACN,CAAC,CAACE,IAAI,CAAC,IAAIF,CAAC,CAACE,IAAI,CAAC;EACzD,MAAMK,WAAW,GAAGC,mBAAY,CAACR,CAAC,CAACE,IAAI,CAAC;EAExC,KAAK,MAAMO,KAAK,IAAIN,MAAM,EAAE;IAC1B,MAAMO,KAAK,GAETV,CAAC,CAACS,KAAK,CAAC;IACV,MAAME,KAAK,GAAGV,CAAC,CAACQ,KAAK,CAAC;IACtB,IAAI,OAAOC,KAAK,KAAK,OAAOC,KAAK,EAAE;MACjC,OAAO,KAAK;IACd;IACA,IAAID,KAAK,IAAI,IAAI,IAAIC,KAAK,IAAI,IAAI,EAAE;MAClC;IACF,CAAC,MAAM,IAAID,KAAK,IAAI,IAAI,IAAIC,KAAK,IAAI,IAAI,EAAE;MACzC,OAAO,KAAK;IACd;IAEA,IAAIC,KAAK,CAACC,OAAO,CAACH,KAAK,CAAC,EAAE;MACxB,IAAI,CAACE,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EAAE;QACzB,OAAO,KAAK;MACd;MACA,IAAID,KAAK,CAACI,MAAM,KAAKH,KAAK,CAACG,MAAM,EAAE;QACjC,OAAO,KAAK;MACd;MAEA,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGL,KAAK,CAACI,MAAM,EAAEC,CAAC,EAAE,EAAE;QACrC,IAAI,CAAChB,iBAAiB,CAACW,KAAK,CAACK,CAAC,CAAC,EAAEJ,KAAK,CAACI,CAAC,CAAC,CAAC,EAAE;UAC1C,OAAO,KAAK;QACd;MACF;MACA;IACF;IAEA,IAAI,OAAOL,KAAK,KAAK,QAAQ,IAAI,EAACH,WAAW,YAAXA,WAAW,CAAES,QAAQ,CAACP,KAAK,CAAC,GAAE;MAC9D,KAAK,MAAMQ,GAAG,IAAIb,MAAM,CAACC,IAAI,CAACK,KAAK,CAAC,EAAE;QACpC,IAAIA,KAAK,CAACO,GAAG,CAAC,KAAKN,KAAK,CAACM,GAAG,CAAC,EAAE;UAC7B,OAAO,KAAK;QACd;MACF;MACA;IACF;IAEA,IAAI,CAAClB,iBAAiB,CAACW,KAAK,EAAEC,KAAK,CAAC,EAAE;MACpC,OAAO,KAAK;IACd;EACF;EAEA,OAAO,IAAI;AACb"}
|
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = isPlaceholderType;
|
|
7
|
-
var
|
|
7
|
+
var _index = require("../definitions/index.js");
|
|
8
8
|
function isPlaceholderType(placeholderType, targetType) {
|
|
9
9
|
if (placeholderType === targetType) return true;
|
|
10
|
-
const aliases =
|
|
10
|
+
const aliases = _index.PLACEHOLDERS_ALIAS[placeholderType];
|
|
11
11
|
if (aliases) {
|
|
12
12
|
for (const alias of aliases) {
|
|
13
13
|
if (targetType === alias) return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_index","require","isPlaceholderType","placeholderType","targetType","aliases","PLACEHOLDERS_ALIAS","alias"],"sources":["../../src/validators/isPlaceholderType.ts"],"sourcesContent":["import { PLACEHOLDERS_ALIAS } from \"../definitions/index.ts\";\n\n/**\n * Test if a `placeholderType` is a `targetType` or if `targetType` is an alias of `placeholderType`.\n */\nexport default function isPlaceholderType(\n placeholderType: string,\n targetType: string,\n): boolean {\n if (placeholderType === targetType) return true;\n\n const aliases: Array<string> | undefined =\n PLACEHOLDERS_ALIAS[placeholderType];\n if (aliases) {\n for (const alias of aliases) {\n if (targetType === alias) return true;\n }\n }\n\n return false;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKe,SAASC,iBAAiBA,CACvCC,eAAuB,EACvBC,UAAkB,EACT;EACT,IAAID,eAAe,KAAKC,UAAU,EAAE,OAAO,IAAI;EAE/C,MAAMC,OAAkC,GACtCC,yBAAkB,CAACH,eAAe,CAAC;EACrC,IAAIE,OAAO,EAAE;IACX,KAAK,MAAME,KAAK,IAAIF,OAAO,EAAE;MAC3B,IAAID,UAAU,KAAKG,KAAK,EAAE,OAAO,IAAI;IACvC;EACF;EAEA,OAAO,KAAK;AACd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isReferenced","node","parent","grandparent","type","property","computed","object","init","body","key","superClass","right","source","local","id"],"sources":["../../src/validators/isReferenced.ts"],"sourcesContent":["import type * as t from \"
|
|
1
|
+
{"version":3,"names":["isReferenced","node","parent","grandparent","type","property","computed","object","init","body","key","superClass","right","source","local","id"],"sources":["../../src/validators/isReferenced.ts"],"sourcesContent":["import type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is a reference to a bound variable.\n */\nexport default function isReferenced(\n node: t.Node,\n parent: t.Node,\n grandparent?: t.Node,\n): boolean {\n switch (parent.type) {\n // yes: PARENT[NODE]\n // yes: NODE.child\n // no: parent.NODE\n case \"MemberExpression\":\n case \"OptionalMemberExpression\":\n if (parent.property === node) {\n return !!parent.computed;\n }\n return parent.object === node;\n\n case \"JSXMemberExpression\":\n return parent.object === node;\n // no: let NODE = init;\n // yes: let id = NODE;\n case \"VariableDeclarator\":\n return parent.init === node;\n\n // yes: () => NODE\n // no: (NODE) => {}\n case \"ArrowFunctionExpression\":\n return parent.body === node;\n\n // no: class { #NODE; }\n // no: class { get #NODE() {} }\n // no: class { #NODE() {} }\n // no: class { fn() { return this.#NODE; } }\n case \"PrivateName\":\n return false;\n\n // no: class { NODE() {} }\n // yes: class { [NODE]() {} }\n // no: class { foo(NODE) {} }\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n case \"ObjectMethod\":\n if (parent.key === node) {\n return !!parent.computed;\n }\n return false;\n\n // yes: { [NODE]: \"\" }\n // no: { NODE: \"\" }\n // depends: { NODE }\n // depends: { key: NODE }\n case \"ObjectProperty\":\n if (parent.key === node) {\n return !!parent.computed;\n }\n // parent.value === node\n return !grandparent || grandparent.type !== \"ObjectPattern\";\n // no: class { NODE = value; }\n // yes: class { [NODE] = value; }\n // yes: class { key = NODE; }\n case \"ClassProperty\":\n case \"ClassAccessorProperty\":\n if (parent.key === node) {\n return !!parent.computed;\n }\n return true;\n case \"ClassPrivateProperty\":\n return parent.key !== node;\n\n // no: class NODE {}\n // yes: class Foo extends NODE {}\n case \"ClassDeclaration\":\n case \"ClassExpression\":\n return parent.superClass === node;\n\n // yes: left = NODE;\n // no: NODE = right;\n case \"AssignmentExpression\":\n return parent.right === node;\n\n // no: [NODE = foo] = [];\n // yes: [foo = NODE] = [];\n case \"AssignmentPattern\":\n return parent.right === node;\n\n // no: NODE: for (;;) {}\n case \"LabeledStatement\":\n return false;\n\n // no: try {} catch (NODE) {}\n case \"CatchClause\":\n return false;\n\n // no: function foo(...NODE) {}\n case \"RestElement\":\n return false;\n\n case \"BreakStatement\":\n case \"ContinueStatement\":\n return false;\n\n // no: function NODE() {}\n // no: function foo(NODE) {}\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n return false;\n\n // no: export NODE from \"foo\";\n // no: export * as NODE from \"foo\";\n case \"ExportNamespaceSpecifier\":\n case \"ExportDefaultSpecifier\":\n return false;\n\n // no: export { foo as NODE };\n // yes: export { NODE as foo };\n // no: export { NODE as foo } from \"foo\";\n case \"ExportSpecifier\":\n // @ts-expect-error todo(flow->ts): Property 'source' does not exist on type 'AnyTypeAnnotation'.\n if (grandparent?.source) {\n return false;\n }\n return parent.local === node;\n\n // no: import NODE from \"foo\";\n // no: import * as NODE from \"foo\";\n // no: import { NODE as foo } from \"foo\";\n // no: import { foo as NODE } from \"foo\";\n // no: import NODE from \"bar\";\n case \"ImportDefaultSpecifier\":\n case \"ImportNamespaceSpecifier\":\n case \"ImportSpecifier\":\n return false;\n\n // no: import \"foo\" assert { NODE: \"json\" }\n case \"ImportAttribute\":\n return false;\n\n // no: <div NODE=\"foo\" />\n case \"JSXAttribute\":\n return false;\n\n // no: [NODE] = [];\n // no: ({ NODE }) = [];\n case \"ObjectPattern\":\n case \"ArrayPattern\":\n return false;\n\n // no: new.NODE\n // no: NODE.target\n case \"MetaProperty\":\n return false;\n\n // yes: type X = { someProperty: NODE }\n // no: type X = { NODE: OtherType }\n case \"ObjectTypeProperty\":\n return parent.key !== node;\n\n // yes: enum X { Foo = NODE }\n // no: enum X { NODE }\n case \"TSEnumMember\":\n return parent.id !== node;\n\n // yes: { [NODE]: value }\n // no: { NODE: value }\n case \"TSPropertySignature\":\n if (parent.key === node) {\n return !!parent.computed;\n }\n\n return true;\n }\n\n return true;\n}\n"],"mappings":";;;;;;AAKe,SAASA,YAAYA,CAClCC,IAAY,EACZC,MAAc,EACdC,WAAoB,EACX;EACT,QAAQD,MAAM,CAACE,IAAI;IAIjB,KAAK,kBAAkB;IACvB,KAAK,0BAA0B;MAC7B,IAAIF,MAAM,CAACG,QAAQ,KAAKJ,IAAI,EAAE;QAC5B,OAAO,CAAC,CAACC,MAAM,CAACI,QAAQ;MAC1B;MACA,OAAOJ,MAAM,CAACK,MAAM,KAAKN,IAAI;IAE/B,KAAK,qBAAqB;MACxB,OAAOC,MAAM,CAACK,MAAM,KAAKN,IAAI;IAG/B,KAAK,oBAAoB;MACvB,OAAOC,MAAM,CAACM,IAAI,KAAKP,IAAI;IAI7B,KAAK,yBAAyB;MAC5B,OAAOC,MAAM,CAACO,IAAI,KAAKR,IAAI;IAM7B,KAAK,aAAa;MAChB,OAAO,KAAK;IAKd,KAAK,aAAa;IAClB,KAAK,oBAAoB;IACzB,KAAK,cAAc;MACjB,IAAIC,MAAM,CAACQ,GAAG,KAAKT,IAAI,EAAE;QACvB,OAAO,CAAC,CAACC,MAAM,CAACI,QAAQ;MAC1B;MACA,OAAO,KAAK;IAMd,KAAK,gBAAgB;MACnB,IAAIJ,MAAM,CAACQ,GAAG,KAAKT,IAAI,EAAE;QACvB,OAAO,CAAC,CAACC,MAAM,CAACI,QAAQ;MAC1B;MAEA,OAAO,CAACH,WAAW,IAAIA,WAAW,CAACC,IAAI,KAAK,eAAe;IAI7D,KAAK,eAAe;IACpB,KAAK,uBAAuB;MAC1B,IAAIF,MAAM,CAACQ,GAAG,KAAKT,IAAI,EAAE;QACvB,OAAO,CAAC,CAACC,MAAM,CAACI,QAAQ;MAC1B;MACA,OAAO,IAAI;IACb,KAAK,sBAAsB;MACzB,OAAOJ,MAAM,CAACQ,GAAG,KAAKT,IAAI;IAI5B,KAAK,kBAAkB;IACvB,KAAK,iBAAiB;MACpB,OAAOC,MAAM,CAACS,UAAU,KAAKV,IAAI;IAInC,KAAK,sBAAsB;MACzB,OAAOC,MAAM,CAACU,KAAK,KAAKX,IAAI;IAI9B,KAAK,mBAAmB;MACtB,OAAOC,MAAM,CAACU,KAAK,KAAKX,IAAI;IAG9B,KAAK,kBAAkB;MACrB,OAAO,KAAK;IAGd,KAAK,aAAa;MAChB,OAAO,KAAK;IAGd,KAAK,aAAa;MAChB,OAAO,KAAK;IAEd,KAAK,gBAAgB;IACrB,KAAK,mBAAmB;MACtB,OAAO,KAAK;IAId,KAAK,qBAAqB;IAC1B,KAAK,oBAAoB;MACvB,OAAO,KAAK;IAId,KAAK,0BAA0B;IAC/B,KAAK,wBAAwB;MAC3B,OAAO,KAAK;IAKd,KAAK,iBAAiB;MAEpB,IAAIE,WAAW,YAAXA,WAAW,CAAEU,MAAM,EAAE;QACvB,OAAO,KAAK;MACd;MACA,OAAOX,MAAM,CAACY,KAAK,KAAKb,IAAI;IAO9B,KAAK,wBAAwB;IAC7B,KAAK,0BAA0B;IAC/B,KAAK,iBAAiB;MACpB,OAAO,KAAK;IAGd,KAAK,iBAAiB;MACpB,OAAO,KAAK;IAGd,KAAK,cAAc;MACjB,OAAO,KAAK;IAId,KAAK,eAAe;IACpB,KAAK,cAAc;MACjB,OAAO,KAAK;IAId,KAAK,cAAc;MACjB,OAAO,KAAK;IAId,KAAK,oBAAoB;MACvB,OAAOC,MAAM,CAACQ,GAAG,KAAKT,IAAI;IAI5B,KAAK,cAAc;MACjB,OAAOC,MAAM,CAACa,EAAE,KAAKd,IAAI;IAI3B,KAAK,qBAAqB;MACxB,IAAIC,MAAM,CAACQ,GAAG,KAAKT,IAAI,EAAE;QACvB,OAAO,CAAC,CAACC,MAAM,CAACI,QAAQ;MAC1B;MAEA,OAAO,IAAI;EACf;EAEA,OAAO,IAAI;AACb"}
|
|
@@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = isScope;
|
|
7
|
-
var
|
|
7
|
+
var _index = require("./generated/index.js");
|
|
8
8
|
function isScope(node, parent) {
|
|
9
|
-
if ((0,
|
|
9
|
+
if ((0, _index.isBlockStatement)(node) && ((0, _index.isFunction)(parent) || (0, _index.isCatchClause)(parent))) {
|
|
10
10
|
return false;
|
|
11
11
|
}
|
|
12
|
-
if ((0,
|
|
12
|
+
if ((0, _index.isPattern)(node) && ((0, _index.isFunction)(parent) || (0, _index.isCatchClause)(parent))) {
|
|
13
13
|
return true;
|
|
14
14
|
}
|
|
15
|
-
return (0,
|
|
15
|
+
return (0, _index.isScopable)(node);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
//# sourceMappingURL=isScope.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_index","require","isScope","node","parent","isBlockStatement","isFunction","isCatchClause","isPattern","isScopable"],"sources":["../../src/validators/isScope.ts"],"sourcesContent":["import {\n isFunction,\n isCatchClause,\n isBlockStatement,\n isScopable,\n isPattern,\n} from \"./generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is a scope.\n */\nexport default function isScope(node: t.Node, parent: t.Node): boolean {\n // If a BlockStatement is an immediate descendent of a Function/CatchClause, it must be in the body.\n // Hence we skipped the parentKey === \"params\" check\n if (isBlockStatement(node) && (isFunction(parent) || isCatchClause(parent))) {\n return false;\n }\n\n // If a Pattern is an immediate descendent of a Function/CatchClause, it must be in the params.\n // Hence we skipped the parentKey === \"params\" check\n if (isPattern(node) && (isFunction(parent) || isCatchClause(parent))) {\n return true;\n }\n\n return isScopable(node);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAYe,SAASC,OAAOA,CAACC,IAAY,EAAEC,MAAc,EAAW;EAGrE,IAAI,IAAAC,uBAAgB,EAACF,IAAI,CAAC,KAAK,IAAAG,iBAAU,EAACF,MAAM,CAAC,IAAI,IAAAG,oBAAa,EAACH,MAAM,CAAC,CAAC,EAAE;IAC3E,OAAO,KAAK;EACd;EAIA,IAAI,IAAAI,gBAAS,EAACL,IAAI,CAAC,KAAK,IAAAG,iBAAU,EAACF,MAAM,CAAC,IAAI,IAAAG,oBAAa,EAACH,MAAM,CAAC,CAAC,EAAE;IACpE,OAAO,IAAI;EACb;EAEA,OAAO,IAAAK,iBAAU,EAACN,IAAI,CAAC;AACzB"}
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = isSpecifierDefault;
|
|
7
|
-
var
|
|
7
|
+
var _index = require("./generated/index.js");
|
|
8
8
|
function isSpecifierDefault(specifier) {
|
|
9
|
-
return (0,
|
|
9
|
+
return (0, _index.isImportDefaultSpecifier)(specifier) || (0, _index.isIdentifier)(specifier.imported || specifier.exported, {
|
|
10
10
|
name: "default"
|
|
11
11
|
});
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_index","require","isSpecifierDefault","specifier","isImportDefaultSpecifier","isIdentifier","imported","exported","name"],"sources":["../../src/validators/isSpecifierDefault.ts"],"sourcesContent":["import { isIdentifier, isImportDefaultSpecifier } from \"./generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `specifier` is a `default` import or export.\n */\nexport default function isSpecifierDefault(\n specifier: t.ModuleSpecifier,\n): boolean {\n return (\n isImportDefaultSpecifier(specifier) ||\n // @ts-expect-error todo(flow->ts): stricter type for specifier\n isIdentifier(specifier.imported || specifier.exported, {\n name: \"default\",\n })\n );\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAMe,SAASC,kBAAkBA,CACxCC,SAA4B,EACnB;EACT,OACE,IAAAC,+BAAwB,EAACD,SAAS,CAAC,IAEnC,IAAAE,mBAAY,EAACF,SAAS,CAACG,QAAQ,IAAIH,SAAS,CAACI,QAAQ,EAAE;IACrDC,IAAI,EAAE;EACR,CAAC,CAAC;AAEN"}
|
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = isType;
|
|
7
|
-
var
|
|
7
|
+
var _index = require("../definitions/index.js");
|
|
8
8
|
function isType(nodeType, targetType) {
|
|
9
9
|
if (nodeType === targetType) return true;
|
|
10
10
|
if (nodeType == null) return false;
|
|
11
|
-
if (
|
|
12
|
-
const aliases =
|
|
11
|
+
if (_index.ALIAS_KEYS[targetType]) return false;
|
|
12
|
+
const aliases = _index.FLIPPED_ALIAS_KEYS[targetType];
|
|
13
13
|
if (aliases) {
|
|
14
14
|
if (aliases[0] === nodeType) return true;
|
|
15
15
|
for (const alias of aliases) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_index","require","isType","nodeType","targetType","ALIAS_KEYS","aliases","FLIPPED_ALIAS_KEYS","alias"],"sources":["../../src/validators/isType.ts"],"sourcesContent":["import { FLIPPED_ALIAS_KEYS, ALIAS_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function isType<T extends t.Node[\"type\"]>(\n nodeType: string,\n targetType: T,\n): nodeType is T;\n\nexport default function isType(\n nodeType: string | null | undefined,\n targetType: string,\n): boolean;\n\n/**\n * Test if a `nodeType` is a `targetType` or if `targetType` is an alias of `nodeType`.\n */\nexport default function isType(nodeType: string, targetType: string): boolean {\n if (nodeType === targetType) return true;\n\n // If nodeType is nullish, it can't be an alias of targetType.\n if (nodeType == null) return false;\n\n // This is a fast-path. If the test above failed, but an alias key is found, then the\n // targetType was a primary node type, so there's no need to check the aliases.\n // @ts-expect-error targetType may not index ALIAS_KEYS\n if (ALIAS_KEYS[targetType]) return false;\n\n const aliases: Array<string> | undefined = FLIPPED_ALIAS_KEYS[targetType];\n if (aliases) {\n if (aliases[0] === nodeType) return true;\n\n for (const alias of aliases) {\n if (nodeType === alias) return true;\n }\n }\n\n return false;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAgBe,SAASC,MAAMA,CAACC,QAAgB,EAAEC,UAAkB,EAAW;EAC5E,IAAID,QAAQ,KAAKC,UAAU,EAAE,OAAO,IAAI;EAGxC,IAAID,QAAQ,IAAI,IAAI,EAAE,OAAO,KAAK;EAKlC,IAAIE,iBAAU,CAACD,UAAU,CAAC,EAAE,OAAO,KAAK;EAExC,MAAME,OAAkC,GAAGC,yBAAkB,CAACH,UAAU,CAAC;EACzE,IAAIE,OAAO,EAAE;IACX,IAAIA,OAAO,CAAC,CAAC,CAAC,KAAKH,QAAQ,EAAE,OAAO,IAAI;IAExC,KAAK,MAAMK,KAAK,IAAIF,OAAO,EAAE;MAC3B,IAAIH,QAAQ,KAAKK,KAAK,EAAE,OAAO,IAAI;IACrC;EACF;EAEA,OAAO,KAAK;AACd"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = isValidES3Identifier;
|
|
7
|
-
var _isValidIdentifier = require("./isValidIdentifier");
|
|
7
|
+
var _isValidIdentifier = require("./isValidIdentifier.js");
|
|
8
8
|
const RESERVED_WORDS_ES3_ONLY = new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]);
|
|
9
9
|
function isValidES3Identifier(name) {
|
|
10
10
|
return (0, _isValidIdentifier.default)(name) && !RESERVED_WORDS_ES3_ONLY.has(name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_isValidIdentifier","require","RESERVED_WORDS_ES3_ONLY","Set","isValidES3Identifier","name","isValidIdentifier","has"],"sources":["../../src/validators/isValidES3Identifier.ts"],"sourcesContent":["import isValidIdentifier from \"./isValidIdentifier\";\n\nconst RESERVED_WORDS_ES3_ONLY: Set<string> = new Set([\n \"abstract\",\n \"boolean\",\n \"byte\",\n \"char\",\n \"double\",\n \"enum\",\n \"final\",\n \"float\",\n \"goto\",\n \"implements\",\n \"int\",\n \"interface\",\n \"long\",\n \"native\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"short\",\n \"static\",\n \"synchronized\",\n \"throws\",\n \"transient\",\n \"volatile\",\n]);\n\n/**\n * Check if the input `name` is a valid identifier name according to the ES3 specification.\n *\n * Additional ES3 reserved words are\n */\nexport default function isValidES3Identifier(name: string): boolean {\n return isValidIdentifier(name) && !RESERVED_WORDS_ES3_ONLY.has(name);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAEA,MAAMC,uBAAoC,GAAG,IAAIC,GAAG,CAAC,CACnD,UAAU,EACV,SAAS,EACT,MAAM,EACN,MAAM,EACN,QAAQ,EACR,MAAM,EACN,OAAO,EACP,OAAO,EACP,MAAM,EACN,YAAY,EACZ,KAAK,EACL,WAAW,EACX,MAAM,EACN,QAAQ,EACR,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,WAAW,EACX,UAAU,CACX,CAAC;AAOa,SAASC,oBAAoBA,CAACC,IAAY,EAAW;EAClE,OAAO,IAAAC,0BAAiB,EAACD,IAAI,CAAC,IAAI,CAACH,uBAAuB,CAACK,GAAG,CAACF,IAAI,CAAC;AACtE"}
|
|
1
|
+
{"version":3,"names":["_isValidIdentifier","require","RESERVED_WORDS_ES3_ONLY","Set","isValidES3Identifier","name","isValidIdentifier","has"],"sources":["../../src/validators/isValidES3Identifier.ts"],"sourcesContent":["import isValidIdentifier from \"./isValidIdentifier.ts\";\n\nconst RESERVED_WORDS_ES3_ONLY: Set<string> = new Set([\n \"abstract\",\n \"boolean\",\n \"byte\",\n \"char\",\n \"double\",\n \"enum\",\n \"final\",\n \"float\",\n \"goto\",\n \"implements\",\n \"int\",\n \"interface\",\n \"long\",\n \"native\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"short\",\n \"static\",\n \"synchronized\",\n \"throws\",\n \"transient\",\n \"volatile\",\n]);\n\n/**\n * Check if the input `name` is a valid identifier name according to the ES3 specification.\n *\n * Additional ES3 reserved words are\n */\nexport default function isValidES3Identifier(name: string): boolean {\n return isValidIdentifier(name) && !RESERVED_WORDS_ES3_ONLY.has(name);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAEA,MAAMC,uBAAoC,GAAG,IAAIC,GAAG,CAAC,CACnD,UAAU,EACV,SAAS,EACT,MAAM,EACN,MAAM,EACN,QAAQ,EACR,MAAM,EACN,OAAO,EACP,OAAO,EACP,MAAM,EACN,YAAY,EACZ,KAAK,EACL,WAAW,EACX,MAAM,EACN,QAAQ,EACR,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,WAAW,EACX,UAAU,CACX,CAAC;AAOa,SAASC,oBAAoBA,CAACC,IAAY,EAAW;EAClE,OAAO,IAAAC,0BAAiB,EAACD,IAAI,CAAC,IAAI,CAACH,uBAAuB,CAACK,GAAG,CAACF,IAAI,CAAC;AACtE"}
|
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = isVar;
|
|
7
|
-
var
|
|
8
|
-
var
|
|
7
|
+
var _index = require("./generated/index.js");
|
|
8
|
+
var _index2 = require("../constants/index.js");
|
|
9
9
|
function isVar(node) {
|
|
10
|
-
return (0,
|
|
10
|
+
return (0, _index.isVariableDeclaration)(node, {
|
|
11
11
|
kind: "var"
|
|
12
|
-
}) && !node[
|
|
12
|
+
}) && !node[_index2.BLOCK_SCOPED_SYMBOL];
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
//# sourceMappingURL=isVar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_index","require","_index2","isVar","node","isVariableDeclaration","kind","BLOCK_SCOPED_SYMBOL"],"sources":["../../src/validators/isVar.ts"],"sourcesContent":["import { isVariableDeclaration } from \"./generated/index.ts\";\nimport { BLOCK_SCOPED_SYMBOL } from \"../constants/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is a variable declaration.\n */\nexport default function isVar(node: t.Node): boolean {\n return (\n isVariableDeclaration(node, { kind: \"var\" }) &&\n !(\n // @ts-expect-error document private properties\n node[BLOCK_SCOPED_SYMBOL]\n )\n );\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAMe,SAASE,KAAKA,CAACC,IAAY,EAAW;EACnD,OACE,IAAAC,4BAAqB,EAACD,IAAI,EAAE;IAAEE,IAAI,EAAE;EAAM,CAAC,CAAC,IAC5C,CAEEF,IAAI,CAACG,2BAAmB,CACzB;AAEL"}
|
|
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = matchesPattern;
|
|
7
|
-
var
|
|
7
|
+
var _index = require("./generated/index.js");
|
|
8
8
|
function matchesPattern(member, match, allowPartial) {
|
|
9
|
-
if (!(0,
|
|
9
|
+
if (!(0, _index.isMemberExpression)(member)) return false;
|
|
10
10
|
const parts = Array.isArray(match) ? match : match.split(".");
|
|
11
11
|
const nodes = [];
|
|
12
12
|
let node;
|
|
13
|
-
for (node = member; (0,
|
|
13
|
+
for (node = member; (0, _index.isMemberExpression)(node); node = node.object) {
|
|
14
14
|
nodes.push(node.property);
|
|
15
15
|
}
|
|
16
16
|
nodes.push(node);
|
|
@@ -19,11 +19,11 @@ function matchesPattern(member, match, allowPartial) {
|
|
|
19
19
|
for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
|
|
20
20
|
const node = nodes[j];
|
|
21
21
|
let value;
|
|
22
|
-
if ((0,
|
|
22
|
+
if ((0, _index.isIdentifier)(node)) {
|
|
23
23
|
value = node.name;
|
|
24
|
-
} else if ((0,
|
|
24
|
+
} else if ((0, _index.isStringLiteral)(node)) {
|
|
25
25
|
value = node.value;
|
|
26
|
-
} else if ((0,
|
|
26
|
+
} else if ((0, _index.isThisExpression)(node)) {
|
|
27
27
|
value = "this";
|
|
28
28
|
} else {
|
|
29
29
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_index","require","matchesPattern","member","match","allowPartial","isMemberExpression","parts","Array","isArray","split","nodes","node","object","push","property","length","i","j","value","isIdentifier","name","isStringLiteral","isThisExpression"],"sources":["../../src/validators/matchesPattern.ts"],"sourcesContent":["import {\n isIdentifier,\n isMemberExpression,\n isStringLiteral,\n isThisExpression,\n} from \"./generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Determines whether or not the input node `member` matches the\n * input `match`.\n *\n * For example, given the match `React.createClass` it would match the\n * parsed nodes of `React.createClass` and `React[\"createClass\"]`.\n */\nexport default function matchesPattern(\n member: t.Node | null | undefined,\n match: string | string[],\n allowPartial?: boolean,\n): boolean {\n // not a member expression\n if (!isMemberExpression(member)) return false;\n\n const parts = Array.isArray(match) ? match : match.split(\".\");\n const nodes = [];\n\n let node;\n for (node = member; isMemberExpression(node); node = node.object) {\n nodes.push(node.property);\n }\n nodes.push(node);\n\n if (nodes.length < parts.length) return false;\n if (!allowPartial && nodes.length > parts.length) return false;\n\n for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {\n const node = nodes[j];\n let value;\n if (isIdentifier(node)) {\n value = node.name;\n } else if (isStringLiteral(node)) {\n value = node.value;\n } else if (isThisExpression(node)) {\n value = \"this\";\n } else {\n return false;\n }\n\n if (parts[i] !== value) return false;\n }\n\n return true;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAee,SAASC,cAAcA,CACpCC,MAAiC,EACjCC,KAAwB,EACxBC,YAAsB,EACb;EAET,IAAI,CAAC,IAAAC,yBAAkB,EAACH,MAAM,CAAC,EAAE,OAAO,KAAK;EAE7C,MAAMI,KAAK,GAAGC,KAAK,CAACC,OAAO,CAACL,KAAK,CAAC,GAAGA,KAAK,GAAGA,KAAK,CAACM,KAAK,CAAC,GAAG,CAAC;EAC7D,MAAMC,KAAK,GAAG,EAAE;EAEhB,IAAIC,IAAI;EACR,KAAKA,IAAI,GAAGT,MAAM,EAAE,IAAAG,yBAAkB,EAACM,IAAI,CAAC,EAAEA,IAAI,GAAGA,IAAI,CAACC,MAAM,EAAE;IAChEF,KAAK,CAACG,IAAI,CAACF,IAAI,CAACG,QAAQ,CAAC;EAC3B;EACAJ,KAAK,CAACG,IAAI,CAACF,IAAI,CAAC;EAEhB,IAAID,KAAK,CAACK,MAAM,GAAGT,KAAK,CAACS,MAAM,EAAE,OAAO,KAAK;EAC7C,IAAI,CAACX,YAAY,IAAIM,KAAK,CAACK,MAAM,GAAGT,KAAK,CAACS,MAAM,EAAE,OAAO,KAAK;EAE9D,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEC,CAAC,GAAGP,KAAK,CAACK,MAAM,GAAG,CAAC,EAAEC,CAAC,GAAGV,KAAK,CAACS,MAAM,EAAEC,CAAC,EAAE,EAAEC,CAAC,EAAE,EAAE;IAChE,MAAMN,IAAI,GAAGD,KAAK,CAACO,CAAC,CAAC;IACrB,IAAIC,KAAK;IACT,IAAI,IAAAC,mBAAY,EAACR,IAAI,CAAC,EAAE;MACtBO,KAAK,GAAGP,IAAI,CAACS,IAAI;IACnB,CAAC,MAAM,IAAI,IAAAC,sBAAe,EAACV,IAAI,CAAC,EAAE;MAChCO,KAAK,GAAGP,IAAI,CAACO,KAAK;IACpB,CAAC,MAAM,IAAI,IAAAI,uBAAgB,EAACX,IAAI,CAAC,EAAE;MACjCO,KAAK,GAAG,MAAM;IAChB,CAAC,MAAM;MACL,OAAO,KAAK;IACd;IAEA,IAAIZ,KAAK,CAACU,CAAC,CAAC,KAAKE,KAAK,EAAE,OAAO,KAAK;EACtC;EAEA,OAAO,IAAI;AACb"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _buildMatchMemberExpression = require("../buildMatchMemberExpression");
|
|
7
|
+
var _buildMatchMemberExpression = require("../buildMatchMemberExpression.js");
|
|
8
8
|
const isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
|
|
9
9
|
var _default = isReactComponent;
|
|
10
10
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_buildMatchMemberExpression","require","isReactComponent","buildMatchMemberExpression","_default","exports","default"],"sources":["../../../src/validators/react/isReactComponent.ts"],"sourcesContent":["import buildMatchMemberExpression from \"../buildMatchMemberExpression\";\n\nconst isReactComponent = buildMatchMemberExpression(\"React.Component\");\n\nexport default isReactComponent;\n"],"mappings":";;;;;;AAAA,IAAAA,2BAAA,GAAAC,OAAA;AAEA,MAAMC,gBAAgB,GAAG,IAAAC,mCAA0B,EAAC,iBAAiB,CAAC;AAAC,IAAAC,QAAA,GAExDF,gBAAgB;AAAAG,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
1
|
+
{"version":3,"names":["_buildMatchMemberExpression","require","isReactComponent","buildMatchMemberExpression","_default","exports","default"],"sources":["../../../src/validators/react/isReactComponent.ts"],"sourcesContent":["import buildMatchMemberExpression from \"../buildMatchMemberExpression.ts\";\n\nconst isReactComponent = buildMatchMemberExpression(\"React.Component\");\n\nexport default isReactComponent;\n"],"mappings":";;;;;;AAAA,IAAAA,2BAAA,GAAAC,OAAA;AAEA,MAAMC,gBAAgB,GAAG,IAAAC,mCAA0B,EAAC,iBAAiB,CAAC;AAAC,IAAAC,QAAA,GAExDF,gBAAgB;AAAAG,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = validate;
|
|
7
7
|
exports.validateChild = validateChild;
|
|
8
8
|
exports.validateField = validateField;
|
|
9
|
-
var
|
|
9
|
+
var _index = require("../definitions/index.js");
|
|
10
10
|
function validate(node, key, val) {
|
|
11
11
|
if (!node) return;
|
|
12
|
-
const fields =
|
|
12
|
+
const fields = _index.NODE_FIELDS[node.type];
|
|
13
13
|
if (!fields) return;
|
|
14
14
|
const field = fields[key];
|
|
15
15
|
validateField(node, key, val, field);
|
|
@@ -22,7 +22,7 @@ function validateField(node, key, val, field) {
|
|
|
22
22
|
}
|
|
23
23
|
function validateChild(node, key, val) {
|
|
24
24
|
if (val == null) return;
|
|
25
|
-
const validate =
|
|
25
|
+
const validate = _index.NODE_PARENT_VALIDATIONS[val.type];
|
|
26
26
|
if (!validate) return;
|
|
27
27
|
validate(node, key, val);
|
|
28
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_index","require","validate","node","key","val","fields","NODE_FIELDS","type","field","validateField","validateChild","optional","NODE_PARENT_VALIDATIONS"],"sources":["../../src/validators/validate.ts"],"sourcesContent":["import {\n NODE_FIELDS,\n NODE_PARENT_VALIDATIONS,\n type FieldOptions,\n} from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function validate(\n node: t.Node | undefined | null,\n key: string,\n val: any,\n): void {\n if (!node) return;\n\n const fields = NODE_FIELDS[node.type];\n if (!fields) return;\n\n const field = fields[key];\n validateField(node, key, val, field);\n validateChild(node, key, val);\n}\n\nexport function validateField(\n node: t.Node | undefined | null,\n key: string,\n val: any,\n field: FieldOptions | undefined | null,\n): void {\n if (!field?.validate) return;\n if (field.optional && val == null) return;\n\n field.validate(node, key, val);\n}\n\nexport function validateChild(\n node: t.Node | undefined | null,\n key: string,\n val?: t.Node | undefined | null,\n) {\n if (val == null) return;\n const validate = NODE_PARENT_VALIDATIONS[val.type];\n if (!validate) return;\n validate(node, key, val);\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAOe,SAASC,QAAQA,CAC9BC,IAA+B,EAC/BC,GAAW,EACXC,GAAQ,EACF;EACN,IAAI,CAACF,IAAI,EAAE;EAEX,MAAMG,MAAM,GAAGC,kBAAW,CAACJ,IAAI,CAACK,IAAI,CAAC;EACrC,IAAI,CAACF,MAAM,EAAE;EAEb,MAAMG,KAAK,GAAGH,MAAM,CAACF,GAAG,CAAC;EACzBM,aAAa,CAACP,IAAI,EAAEC,GAAG,EAAEC,GAAG,EAAEI,KAAK,CAAC;EACpCE,aAAa,CAACR,IAAI,EAAEC,GAAG,EAAEC,GAAG,CAAC;AAC/B;AAEO,SAASK,aAAaA,CAC3BP,IAA+B,EAC/BC,GAAW,EACXC,GAAQ,EACRI,KAAsC,EAChC;EACN,IAAI,EAACA,KAAK,YAALA,KAAK,CAAEP,QAAQ,GAAE;EACtB,IAAIO,KAAK,CAACG,QAAQ,IAAIP,GAAG,IAAI,IAAI,EAAE;EAEnCI,KAAK,CAACP,QAAQ,CAACC,IAAI,EAAEC,GAAG,EAAEC,GAAG,CAAC;AAChC;AAEO,SAASM,aAAaA,CAC3BR,IAA+B,EAC/BC,GAAW,EACXC,GAA+B,EAC/B;EACA,IAAIA,GAAG,IAAI,IAAI,EAAE;EACjB,MAAMH,QAAQ,GAAGW,8BAAuB,CAACR,GAAG,CAACG,IAAI,CAAC;EAClD,IAAI,CAACN,QAAQ,EAAE;EACfA,QAAQ,CAACC,IAAI,EAAEC,GAAG,EAAEC,GAAG,CAAC;AAC1B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babel/types",
|
|
3
|
-
"version": "7.22.
|
|
3
|
+
"version": "7.22.15",
|
|
4
4
|
"description": "Babel Types is a Lodash-esque utility library for AST nodes",
|
|
5
5
|
"author": "The Babel Team (https://babel.dev/team)",
|
|
6
6
|
"homepage": "https://babel.dev/docs/en/next/babel-types",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/helper-string-parser": "^7.22.5",
|
|
28
|
-
"@babel/helper-validator-identifier": "^7.22.
|
|
28
|
+
"@babel/helper-validator-identifier": "^7.22.15",
|
|
29
29
|
"to-fast-properties": "^2.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@babel/generator": "^7.22.
|
|
33
|
-
"@babel/parser": "^7.22.
|
|
32
|
+
"@babel/generator": "^7.22.15",
|
|
33
|
+
"@babel/parser": "^7.22.15",
|
|
34
34
|
"glob": "^7.2.0"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
@@ -35,6 +35,11 @@ type DecoratorContext =
|
|
|
35
35
|
| ClassMemberDecoratorContext
|
|
36
36
|
;
|
|
37
37
|
|
|
38
|
+
type DecoratorMetadataObject = Record<PropertyKey, unknown> & object;
|
|
39
|
+
|
|
40
|
+
type DecoratorMetadata =
|
|
41
|
+
typeof globalThis extends { Symbol: { readonly metadata: symbol } } ? DecoratorMetadataObject : DecoratorMetadataObject | undefined;
|
|
42
|
+
|
|
38
43
|
/**
|
|
39
44
|
* Context provided to a class decorator.
|
|
40
45
|
* @template Class The type of the decorated class associated with this context.
|
|
@@ -66,6 +71,8 @@ interface ClassDecoratorContext<
|
|
|
66
71
|
* ```
|
|
67
72
|
*/
|
|
68
73
|
addInitializer(initializer: (this: Class) => void): void;
|
|
74
|
+
|
|
75
|
+
readonly metadata: DecoratorMetadata;
|
|
69
76
|
}
|
|
70
77
|
|
|
71
78
|
/**
|
|
@@ -130,6 +137,8 @@ interface ClassMethodDecoratorContext<
|
|
|
130
137
|
* ```
|
|
131
138
|
*/
|
|
132
139
|
addInitializer(initializer: (this: This) => void): void;
|
|
140
|
+
|
|
141
|
+
readonly metadata: DecoratorMetadata;
|
|
133
142
|
}
|
|
134
143
|
|
|
135
144
|
/**
|
|
@@ -175,6 +184,8 @@ interface ClassGetterDecoratorContext<
|
|
|
175
184
|
* decorating a non-`static` element).
|
|
176
185
|
*/
|
|
177
186
|
addInitializer(initializer: (this: This) => void): void;
|
|
187
|
+
|
|
188
|
+
readonly metadata: DecoratorMetadata;
|
|
178
189
|
}
|
|
179
190
|
|
|
180
191
|
/**
|
|
@@ -220,6 +231,8 @@ interface ClassSetterDecoratorContext<
|
|
|
220
231
|
* decorating a non-`static` element).
|
|
221
232
|
*/
|
|
222
233
|
addInitializer(initializer: (this: This) => void): void;
|
|
234
|
+
|
|
235
|
+
readonly metadata: DecoratorMetadata;
|
|
223
236
|
}
|
|
224
237
|
|
|
225
238
|
/**
|
|
@@ -274,6 +287,8 @@ interface ClassAccessorDecoratorContext<
|
|
|
274
287
|
* decorating a non-`static` element).
|
|
275
288
|
*/
|
|
276
289
|
addInitializer(initializer: (this: This) => void): void;
|
|
290
|
+
|
|
291
|
+
readonly metadata: DecoratorMetadata;
|
|
277
292
|
}
|
|
278
293
|
|
|
279
294
|
/**
|
|
@@ -369,4 +384,6 @@ interface ClassFieldDecoratorContext<
|
|
|
369
384
|
* decorating a non-`static` element).
|
|
370
385
|
*/
|
|
371
386
|
addInitializer(initializer: (this: This) => void): void;
|
|
387
|
+
|
|
388
|
+
readonly metadata: DecoratorMetadata;
|
|
372
389
|
}
|