@galadrim/galadmin 0.1.38 → 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/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- 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
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.ExpressionErrors = void 0;
|
|
7
|
-
var _types = require("../tokenizer/types");
|
|
8
|
-
var _tokenizer = require("../tokenizer");
|
|
9
|
-
var _whitespace = require("../util/whitespace");
|
|
10
|
-
var _identifier = require("../util/identifier");
|
|
11
|
-
var _classScope = require("../util/class-scope");
|
|
12
|
-
var _expressionScope = require("../util/expression-scope");
|
|
13
|
-
var _scopeflags = require("../util/scopeflags");
|
|
14
|
-
var _productionParameter = require("../util/production-parameter");
|
|
15
|
-
var _parseError = require("../parse-error");
|
|
16
|
-
class UtilParser extends _tokenizer.default {
|
|
17
|
-
addExtra(node, key, value, enumerable = true) {
|
|
18
|
-
if (!node) return;
|
|
19
|
-
const extra = node.extra = node.extra || {};
|
|
20
|
-
if (enumerable) {
|
|
21
|
-
extra[key] = value;
|
|
22
|
-
} else {
|
|
23
|
-
Object.defineProperty(extra, key, {
|
|
24
|
-
enumerable,
|
|
25
|
-
value
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
isContextual(token) {
|
|
30
|
-
return this.state.type === token && !this.state.containsEsc;
|
|
31
|
-
}
|
|
32
|
-
isUnparsedContextual(nameStart, name) {
|
|
33
|
-
const nameEnd = nameStart + name.length;
|
|
34
|
-
if (this.input.slice(nameStart, nameEnd) === name) {
|
|
35
|
-
const nextCh = this.input.charCodeAt(nameEnd);
|
|
36
|
-
return !((0, _identifier.isIdentifierChar)(nextCh) || (nextCh & 0xfc00) === 0xd800);
|
|
37
|
-
}
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
isLookaheadContextual(name) {
|
|
41
|
-
const next = this.nextTokenStart();
|
|
42
|
-
return this.isUnparsedContextual(next, name);
|
|
43
|
-
}
|
|
44
|
-
eatContextual(token) {
|
|
45
|
-
if (this.isContextual(token)) {
|
|
46
|
-
this.next();
|
|
47
|
-
return true;
|
|
48
|
-
}
|
|
49
|
-
return false;
|
|
50
|
-
}
|
|
51
|
-
expectContextual(token, toParseError) {
|
|
52
|
-
if (!this.eatContextual(token)) {
|
|
53
|
-
if (toParseError != null) {
|
|
54
|
-
throw this.raise(toParseError, {
|
|
55
|
-
at: this.state.startLoc
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
this.unexpected(null, token);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
canInsertSemicolon() {
|
|
62
|
-
return this.match(137) || this.match(8) || this.hasPrecedingLineBreak();
|
|
63
|
-
}
|
|
64
|
-
hasPrecedingLineBreak() {
|
|
65
|
-
return _whitespace.lineBreak.test(this.input.slice(this.state.lastTokEndLoc.index, this.state.start));
|
|
66
|
-
}
|
|
67
|
-
hasFollowingLineBreak() {
|
|
68
|
-
_whitespace.skipWhiteSpaceToLineBreak.lastIndex = this.state.end;
|
|
69
|
-
return _whitespace.skipWhiteSpaceToLineBreak.test(this.input);
|
|
70
|
-
}
|
|
71
|
-
isLineTerminator() {
|
|
72
|
-
return this.eat(13) || this.canInsertSemicolon();
|
|
73
|
-
}
|
|
74
|
-
semicolon(allowAsi = true) {
|
|
75
|
-
if (allowAsi ? this.isLineTerminator() : this.eat(13)) return;
|
|
76
|
-
this.raise(_parseError.Errors.MissingSemicolon, {
|
|
77
|
-
at: this.state.lastTokEndLoc
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
expect(type, loc) {
|
|
81
|
-
this.eat(type) || this.unexpected(loc, type);
|
|
82
|
-
}
|
|
83
|
-
tryParse(fn, oldState = this.state.clone()) {
|
|
84
|
-
const abortSignal = {
|
|
85
|
-
node: null
|
|
86
|
-
};
|
|
87
|
-
try {
|
|
88
|
-
const node = fn((node = null) => {
|
|
89
|
-
abortSignal.node = node;
|
|
90
|
-
throw abortSignal;
|
|
91
|
-
});
|
|
92
|
-
if (this.state.errors.length > oldState.errors.length) {
|
|
93
|
-
const failState = this.state;
|
|
94
|
-
this.state = oldState;
|
|
95
|
-
this.state.tokensLength = failState.tokensLength;
|
|
96
|
-
return {
|
|
97
|
-
node,
|
|
98
|
-
error: failState.errors[oldState.errors.length],
|
|
99
|
-
thrown: false,
|
|
100
|
-
aborted: false,
|
|
101
|
-
failState
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
return {
|
|
105
|
-
node,
|
|
106
|
-
error: null,
|
|
107
|
-
thrown: false,
|
|
108
|
-
aborted: false,
|
|
109
|
-
failState: null
|
|
110
|
-
};
|
|
111
|
-
} catch (error) {
|
|
112
|
-
const failState = this.state;
|
|
113
|
-
this.state = oldState;
|
|
114
|
-
if (error instanceof SyntaxError) {
|
|
115
|
-
return {
|
|
116
|
-
node: null,
|
|
117
|
-
error,
|
|
118
|
-
thrown: true,
|
|
119
|
-
aborted: false,
|
|
120
|
-
failState
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
if (error === abortSignal) {
|
|
124
|
-
return {
|
|
125
|
-
node: abortSignal.node,
|
|
126
|
-
error: null,
|
|
127
|
-
thrown: false,
|
|
128
|
-
aborted: true,
|
|
129
|
-
failState
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
throw error;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
checkExpressionErrors(refExpressionErrors, andThrow) {
|
|
136
|
-
if (!refExpressionErrors) return false;
|
|
137
|
-
const {
|
|
138
|
-
shorthandAssignLoc,
|
|
139
|
-
doubleProtoLoc,
|
|
140
|
-
privateKeyLoc,
|
|
141
|
-
optionalParametersLoc
|
|
142
|
-
} = refExpressionErrors;
|
|
143
|
-
const hasErrors = !!shorthandAssignLoc || !!doubleProtoLoc || !!optionalParametersLoc || !!privateKeyLoc;
|
|
144
|
-
if (!andThrow) {
|
|
145
|
-
return hasErrors;
|
|
146
|
-
}
|
|
147
|
-
if (shorthandAssignLoc != null) {
|
|
148
|
-
this.raise(_parseError.Errors.InvalidCoverInitializedName, {
|
|
149
|
-
at: shorthandAssignLoc
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
if (doubleProtoLoc != null) {
|
|
153
|
-
this.raise(_parseError.Errors.DuplicateProto, {
|
|
154
|
-
at: doubleProtoLoc
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
if (privateKeyLoc != null) {
|
|
158
|
-
this.raise(_parseError.Errors.UnexpectedPrivateField, {
|
|
159
|
-
at: privateKeyLoc
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
if (optionalParametersLoc != null) {
|
|
163
|
-
this.unexpected(optionalParametersLoc);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
isLiteralPropertyName() {
|
|
167
|
-
return (0, _types.tokenIsLiteralPropertyName)(this.state.type);
|
|
168
|
-
}
|
|
169
|
-
isPrivateName(node) {
|
|
170
|
-
return node.type === "PrivateName";
|
|
171
|
-
}
|
|
172
|
-
getPrivateNameSV(node) {
|
|
173
|
-
return node.id.name;
|
|
174
|
-
}
|
|
175
|
-
hasPropertyAsPrivateName(node) {
|
|
176
|
-
return (node.type === "MemberExpression" || node.type === "OptionalMemberExpression") && this.isPrivateName(node.property);
|
|
177
|
-
}
|
|
178
|
-
isObjectProperty(node) {
|
|
179
|
-
return node.type === "ObjectProperty";
|
|
180
|
-
}
|
|
181
|
-
isObjectMethod(node) {
|
|
182
|
-
return node.type === "ObjectMethod";
|
|
183
|
-
}
|
|
184
|
-
initializeScopes(inModule = this.options.sourceType === "module") {
|
|
185
|
-
const oldLabels = this.state.labels;
|
|
186
|
-
this.state.labels = [];
|
|
187
|
-
const oldExportedIdentifiers = this.exportedIdentifiers;
|
|
188
|
-
this.exportedIdentifiers = new Set();
|
|
189
|
-
const oldInModule = this.inModule;
|
|
190
|
-
this.inModule = inModule;
|
|
191
|
-
const oldScope = this.scope;
|
|
192
|
-
const ScopeHandler = this.getScopeHandler();
|
|
193
|
-
this.scope = new ScopeHandler(this, inModule);
|
|
194
|
-
const oldProdParam = this.prodParam;
|
|
195
|
-
this.prodParam = new _productionParameter.default();
|
|
196
|
-
const oldClassScope = this.classScope;
|
|
197
|
-
this.classScope = new _classScope.default(this);
|
|
198
|
-
const oldExpressionScope = this.expressionScope;
|
|
199
|
-
this.expressionScope = new _expressionScope.default(this);
|
|
200
|
-
return () => {
|
|
201
|
-
this.state.labels = oldLabels;
|
|
202
|
-
this.exportedIdentifiers = oldExportedIdentifiers;
|
|
203
|
-
this.inModule = oldInModule;
|
|
204
|
-
this.scope = oldScope;
|
|
205
|
-
this.prodParam = oldProdParam;
|
|
206
|
-
this.classScope = oldClassScope;
|
|
207
|
-
this.expressionScope = oldExpressionScope;
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
enterInitialScopes() {
|
|
211
|
-
let paramFlags = _productionParameter.PARAM;
|
|
212
|
-
if (this.inModule) {
|
|
213
|
-
paramFlags |= _productionParameter.PARAM_AWAIT;
|
|
214
|
-
}
|
|
215
|
-
this.scope.enter(_scopeflags.ScopeFlag.PROGRAM);
|
|
216
|
-
this.prodParam.enter(paramFlags);
|
|
217
|
-
}
|
|
218
|
-
checkDestructuringPrivate(refExpressionErrors) {
|
|
219
|
-
const {
|
|
220
|
-
privateKeyLoc
|
|
221
|
-
} = refExpressionErrors;
|
|
222
|
-
if (privateKeyLoc !== null) {
|
|
223
|
-
this.expectPlugin("destructuringPrivate", privateKeyLoc);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
exports.default = UtilParser;
|
|
228
|
-
class ExpressionErrors {
|
|
229
|
-
constructor() {
|
|
230
|
-
this.shorthandAssignLoc = null;
|
|
231
|
-
this.doubleProtoLoc = null;
|
|
232
|
-
this.privateKeyLoc = null;
|
|
233
|
-
this.optionalParametersLoc = null;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
exports.ExpressionErrors = ExpressionErrors;
|
|
237
|
-
|
|
238
|
-
//# sourceMappingURL=util.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_types","require","_tokenizer","_whitespace","_identifier","_classScope","_expressionScope","_scopeflags","_productionParameter","_parseError","UtilParser","Tokenizer","addExtra","node","key","value","enumerable","extra","Object","defineProperty","isContextual","token","state","type","containsEsc","isUnparsedContextual","nameStart","name","nameEnd","length","input","slice","nextCh","charCodeAt","isIdentifierChar","isLookaheadContextual","next","nextTokenStart","eatContextual","expectContextual","toParseError","raise","at","startLoc","unexpected","canInsertSemicolon","match","hasPrecedingLineBreak","lineBreak","test","lastTokEndLoc","index","start","hasFollowingLineBreak","skipWhiteSpaceToLineBreak","lastIndex","end","isLineTerminator","eat","semicolon","allowAsi","Errors","MissingSemicolon","expect","loc","tryParse","fn","oldState","clone","abortSignal","errors","failState","tokensLength","error","thrown","aborted","SyntaxError","checkExpressionErrors","refExpressionErrors","andThrow","shorthandAssignLoc","doubleProtoLoc","privateKeyLoc","optionalParametersLoc","hasErrors","InvalidCoverInitializedName","DuplicateProto","UnexpectedPrivateField","isLiteralPropertyName","tokenIsLiteralPropertyName","isPrivateName","getPrivateNameSV","id","hasPropertyAsPrivateName","property","isObjectProperty","isObjectMethod","initializeScopes","inModule","options","sourceType","oldLabels","labels","oldExportedIdentifiers","exportedIdentifiers","Set","oldInModule","oldScope","scope","ScopeHandler","getScopeHandler","oldProdParam","prodParam","ProductionParameterHandler","oldClassScope","classScope","ClassScopeHandler","oldExpressionScope","expressionScope","ExpressionScopeHandler","enterInitialScopes","paramFlags","PARAM","PARAM_AWAIT","enter","ScopeFlag","PROGRAM","checkDestructuringPrivate","expectPlugin","exports","default","ExpressionErrors","constructor"],"sources":["../../src/parser/util.ts"],"sourcesContent":["import type { Position } from \"../util/location\";\nimport {\n tokenIsLiteralPropertyName,\n tt,\n type TokenType,\n} from \"../tokenizer/types\";\nimport Tokenizer from \"../tokenizer\";\nimport type State from \"../tokenizer/state\";\nimport type { EstreePropertyDefinition, Node, ObjectProperty } from \"../types\";\nimport { lineBreak, skipWhiteSpaceToLineBreak } from \"../util/whitespace\";\nimport { isIdentifierChar } from \"../util/identifier\";\nimport ClassScopeHandler from \"../util/class-scope\";\nimport ExpressionScopeHandler from \"../util/expression-scope\";\nimport { ScopeFlag } from \"../util/scopeflags\";\nimport ProductionParameterHandler, {\n PARAM_AWAIT,\n PARAM,\n} from \"../util/production-parameter\";\nimport {\n Errors,\n type ParseError,\n type ParseErrorConstructor,\n} from \"../parse-error\";\nimport type Parser from \".\";\n\nimport type ScopeHandler from \"../util/scope\";\n\ntype TryParse<Node, Error, Thrown, Aborted, FailState> = {\n node: Node;\n error: Error;\n thrown: Thrown;\n aborted: Aborted;\n failState: FailState;\n};\n\n// ## Parser utilities\n\nexport default abstract class UtilParser extends Tokenizer {\n // Forward-declaration: defined in parser/index.js\n abstract getScopeHandler(): { new (...args: any): ScopeHandler };\n\n addExtra(\n node: Partial<Node>,\n key: string,\n value: any,\n enumerable: boolean = true,\n ): void {\n if (!node) return;\n\n const extra = (node.extra = node.extra || {});\n if (enumerable) {\n extra[key] = value;\n } else {\n Object.defineProperty(extra, key, { enumerable, value });\n }\n }\n\n // Tests whether parsed token is a contextual keyword.\n\n isContextual(token: TokenType): boolean {\n return this.state.type === token && !this.state.containsEsc;\n }\n\n isUnparsedContextual(nameStart: number, name: string): boolean {\n const nameEnd = nameStart + name.length;\n if (this.input.slice(nameStart, nameEnd) === name) {\n const nextCh = this.input.charCodeAt(nameEnd);\n return !(\n isIdentifierChar(nextCh) ||\n // check if `nextCh is between 0xd800 - 0xdbff,\n // if `nextCh` is NaN, `NaN & 0xfc00` is 0, the function\n // returns true\n (nextCh & 0xfc00) === 0xd800\n );\n }\n return false;\n }\n\n isLookaheadContextual(name: string): boolean {\n const next = this.nextTokenStart();\n return this.isUnparsedContextual(next, name);\n }\n\n // Consumes contextual keyword if possible.\n\n eatContextual(token: TokenType): boolean {\n if (this.isContextual(token)) {\n this.next();\n return true;\n }\n return false;\n }\n\n // Asserts that following token is given contextual keyword.\n\n expectContextual(\n token: TokenType,\n toParseError?: ParseErrorConstructor<any>,\n ): void {\n if (!this.eatContextual(token)) {\n if (toParseError != null) {\n throw this.raise(toParseError, { at: this.state.startLoc });\n }\n this.unexpected(null, token);\n }\n }\n\n // Test whether a semicolon can be inserted at the current position.\n\n canInsertSemicolon(): boolean {\n return (\n this.match(tt.eof) ||\n this.match(tt.braceR) ||\n this.hasPrecedingLineBreak()\n );\n }\n\n hasPrecedingLineBreak(): boolean {\n return lineBreak.test(\n this.input.slice(this.state.lastTokEndLoc.index, this.state.start),\n );\n }\n\n hasFollowingLineBreak(): boolean {\n skipWhiteSpaceToLineBreak.lastIndex = this.state.end;\n return skipWhiteSpaceToLineBreak.test(this.input);\n }\n\n isLineTerminator(): boolean {\n return this.eat(tt.semi) || this.canInsertSemicolon();\n }\n\n // Consume a semicolon, or, failing that, see if we are allowed to\n // pretend that there is a semicolon at this position.\n\n semicolon(allowAsi: boolean = true): void {\n if (allowAsi ? this.isLineTerminator() : this.eat(tt.semi)) return;\n this.raise(Errors.MissingSemicolon, { at: this.state.lastTokEndLoc });\n }\n\n // Expect a token of a given type. If found, consume it, otherwise,\n // raise an unexpected token error at given pos.\n\n expect(type: TokenType, loc?: Position | null): void {\n this.eat(type) || this.unexpected(loc, type);\n }\n\n // tryParse will clone parser state.\n // It is expensive and should be used with cautions\n tryParse<T extends Node | ReadonlyArray<Node>>(\n fn: (abort: (node?: T) => never) => T,\n oldState: State = this.state.clone(),\n ):\n | TryParse<T, null, false, false, null>\n | TryParse<T | null, ParseError<any>, boolean, false, State>\n | TryParse<T | null, null, false, true, State> {\n const abortSignal: {\n node: T | null;\n } = { node: null };\n try {\n const node = fn((node = null) => {\n abortSignal.node = node;\n throw abortSignal;\n });\n if (this.state.errors.length > oldState.errors.length) {\n const failState = this.state;\n this.state = oldState;\n // tokensLength should be preserved during error recovery mode\n // since the parser does not halt and will instead parse the\n // remaining tokens\n this.state.tokensLength = failState.tokensLength;\n return {\n node,\n error: failState.errors[oldState.errors.length],\n thrown: false,\n aborted: false,\n failState,\n };\n }\n\n return {\n node,\n error: null,\n thrown: false,\n aborted: false,\n failState: null,\n };\n } catch (error) {\n const failState = this.state;\n this.state = oldState;\n if (error instanceof SyntaxError) {\n // @ts-expect-error casting general syntax error to parse error\n return { node: null, error, thrown: true, aborted: false, failState };\n }\n if (error === abortSignal) {\n return {\n node: abortSignal.node,\n error: null,\n thrown: false,\n aborted: true,\n failState,\n };\n }\n\n throw error;\n }\n }\n\n checkExpressionErrors(\n refExpressionErrors: ExpressionErrors | undefined | null,\n andThrow: boolean,\n ) {\n if (!refExpressionErrors) return false;\n const {\n shorthandAssignLoc,\n doubleProtoLoc,\n privateKeyLoc,\n optionalParametersLoc,\n } = refExpressionErrors;\n\n const hasErrors =\n !!shorthandAssignLoc ||\n !!doubleProtoLoc ||\n !!optionalParametersLoc ||\n !!privateKeyLoc;\n\n if (!andThrow) {\n return hasErrors;\n }\n\n if (shorthandAssignLoc != null) {\n this.raise(Errors.InvalidCoverInitializedName, {\n at: shorthandAssignLoc,\n });\n }\n\n if (doubleProtoLoc != null) {\n this.raise(Errors.DuplicateProto, { at: doubleProtoLoc });\n }\n\n if (privateKeyLoc != null) {\n this.raise(Errors.UnexpectedPrivateField, { at: privateKeyLoc });\n }\n\n if (optionalParametersLoc != null) {\n this.unexpected(optionalParametersLoc);\n }\n }\n\n /**\n * Test if current token is a literal property name\n * https://tc39.es/ecma262/#prod-LiteralPropertyName\n * LiteralPropertyName:\n * IdentifierName\n * StringLiteral\n * NumericLiteral\n * BigIntLiteral\n */\n isLiteralPropertyName(): boolean {\n return tokenIsLiteralPropertyName(this.state.type);\n }\n\n /**\n * Test if given node is a PrivateName\n * will be overridden in ESTree plugin\n */\n isPrivateName(node: Node): boolean {\n return node.type === \"PrivateName\";\n }\n\n /**\n * Return the string value of a given private name\n * WITHOUT `#`\n * @see {@link https://tc39.es/ecma262/#sec-static-semantics-stringvalue}\n */\n getPrivateNameSV(node: Node): string {\n return node.id.name;\n }\n\n /**\n * Return whether the given node is a member/optional chain that\n * contains a private name as its property\n * It is overridden in ESTree plugin\n */\n hasPropertyAsPrivateName(node: Node): boolean {\n return (\n (node.type === \"MemberExpression\" ||\n node.type === \"OptionalMemberExpression\") &&\n this.isPrivateName(node.property)\n );\n }\n\n isObjectProperty(\n node: Node,\n ): node is ObjectProperty | EstreePropertyDefinition {\n return node.type === \"ObjectProperty\";\n }\n\n isObjectMethod(node: Node): boolean {\n return node.type === \"ObjectMethod\";\n }\n\n initializeScopes(\n this: Parser,\n inModule: boolean = this.options.sourceType === \"module\",\n ): () => void {\n // Initialize state\n const oldLabels = this.state.labels;\n this.state.labels = [];\n\n const oldExportedIdentifiers = this.exportedIdentifiers;\n this.exportedIdentifiers = new Set();\n\n // initialize scopes\n const oldInModule = this.inModule;\n this.inModule = inModule;\n\n const oldScope = this.scope;\n const ScopeHandler = this.getScopeHandler();\n this.scope = new ScopeHandler(this, inModule);\n\n const oldProdParam = this.prodParam;\n this.prodParam = new ProductionParameterHandler();\n\n const oldClassScope = this.classScope;\n this.classScope = new ClassScopeHandler(this);\n\n const oldExpressionScope = this.expressionScope;\n this.expressionScope = new ExpressionScopeHandler(this);\n\n return () => {\n // Revert state\n this.state.labels = oldLabels;\n this.exportedIdentifiers = oldExportedIdentifiers;\n\n // Revert scopes\n this.inModule = oldInModule;\n this.scope = oldScope;\n this.prodParam = oldProdParam;\n this.classScope = oldClassScope;\n this.expressionScope = oldExpressionScope;\n };\n }\n\n enterInitialScopes() {\n let paramFlags = PARAM;\n if (this.inModule) {\n paramFlags |= PARAM_AWAIT;\n }\n this.scope.enter(ScopeFlag.PROGRAM);\n this.prodParam.enter(paramFlags);\n }\n\n checkDestructuringPrivate(refExpressionErrors: ExpressionErrors) {\n const { privateKeyLoc } = refExpressionErrors;\n if (privateKeyLoc !== null) {\n this.expectPlugin(\"destructuringPrivate\", privateKeyLoc);\n }\n }\n}\n\n/**\n * The ExpressionErrors is a context struct used to track ambiguous patterns\n * When we are sure the parsed pattern is a RHS, which means it is not a pattern,\n * we will throw on this position on invalid assign syntax, otherwise it will be reset to -1\n *\n * Types of ExpressionErrors:\n *\n * - **shorthandAssignLoc**: track initializer `=` position\n * - **doubleProtoLoc**: track the duplicate `__proto__` key position\n * - **privateKey**: track private key `#p` position\n * - **optionalParametersLoc**: track the optional parameter (`?`).\n * It's only used by typescript and flow plugins\n */\nexport class ExpressionErrors {\n shorthandAssignLoc: Position | undefined | null = null;\n doubleProtoLoc: Position | undefined | null = null;\n privateKeyLoc: Position | undefined | null = null;\n optionalParametersLoc: Position | undefined | null = null;\n}\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAD,OAAA;AAGA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AAIA,IAAAQ,WAAA,GAAAR,OAAA;AAmBe,MAAeS,UAAU,SAASC,kBAAS,CAAC;EAIzDC,QAAQA,CACNC,IAAmB,EACnBC,GAAW,EACXC,KAAU,EACVC,UAAmB,GAAG,IAAI,EACpB;IACN,IAAI,CAACH,IAAI,EAAE;IAEX,MAAMI,KAAK,GAAIJ,IAAI,CAACI,KAAK,GAAGJ,IAAI,CAACI,KAAK,IAAI,CAAC,CAAE;IAC7C,IAAID,UAAU,EAAE;MACdC,KAAK,CAACH,GAAG,CAA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
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getPluginOption = getPluginOption;
|
|
7
|
-
exports.hasPlugin = hasPlugin;
|
|
8
|
-
exports.mixinPlugins = exports.mixinPluginNames = void 0;
|
|
9
|
-
exports.validatePlugins = validatePlugins;
|
|
10
|
-
var _estree = require("./plugins/estree");
|
|
11
|
-
var _flow = require("./plugins/flow");
|
|
12
|
-
var _jsx = require("./plugins/jsx");
|
|
13
|
-
var _typescript = require("./plugins/typescript");
|
|
14
|
-
var _placeholders = require("./plugins/placeholders");
|
|
15
|
-
var _v8intrinsic = require("./plugins/v8intrinsic");
|
|
16
|
-
function hasPlugin(plugins, expectedConfig) {
|
|
17
|
-
const [expectedName, expectedOptions] = typeof expectedConfig === "string" ? [expectedConfig, {}] : expectedConfig;
|
|
18
|
-
const expectedKeys = Object.keys(expectedOptions);
|
|
19
|
-
const expectedOptionsIsEmpty = expectedKeys.length === 0;
|
|
20
|
-
return plugins.some(p => {
|
|
21
|
-
if (typeof p === "string") {
|
|
22
|
-
return expectedOptionsIsEmpty && p === expectedName;
|
|
23
|
-
} else {
|
|
24
|
-
const [pluginName, pluginOptions] = p;
|
|
25
|
-
if (pluginName !== expectedName) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
for (const key of expectedKeys) {
|
|
29
|
-
if (pluginOptions[key] !== expectedOptions[key]) {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
function getPluginOption(plugins, name, option) {
|
|
38
|
-
const plugin = plugins.find(plugin => {
|
|
39
|
-
if (Array.isArray(plugin)) {
|
|
40
|
-
return plugin[0] === name;
|
|
41
|
-
} else {
|
|
42
|
-
return plugin === name;
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
if (plugin && Array.isArray(plugin) && plugin.length > 1) {
|
|
46
|
-
return plugin[1][option];
|
|
47
|
-
}
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
const PIPELINE_PROPOSALS = ["minimal", "fsharp", "hack", "smart"];
|
|
51
|
-
const TOPIC_TOKENS = ["^^", "@@", "^", "%", "#"];
|
|
52
|
-
const RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"];
|
|
53
|
-
function validatePlugins(plugins) {
|
|
54
|
-
if (hasPlugin(plugins, "decorators")) {
|
|
55
|
-
if (hasPlugin(plugins, "decorators-legacy")) {
|
|
56
|
-
throw new Error("Cannot use the decorators and decorators-legacy plugin together");
|
|
57
|
-
}
|
|
58
|
-
const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport");
|
|
59
|
-
if (decoratorsBeforeExport != null && typeof decoratorsBeforeExport !== "boolean") {
|
|
60
|
-
throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");
|
|
61
|
-
}
|
|
62
|
-
const allowCallParenthesized = getPluginOption(plugins, "decorators", "allowCallParenthesized");
|
|
63
|
-
if (allowCallParenthesized != null && typeof allowCallParenthesized !== "boolean") {
|
|
64
|
-
throw new Error("'allowCallParenthesized' must be a boolean.");
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) {
|
|
68
|
-
throw new Error("Cannot combine flow and typescript plugins.");
|
|
69
|
-
}
|
|
70
|
-
if (hasPlugin(plugins, "placeholders") && hasPlugin(plugins, "v8intrinsic")) {
|
|
71
|
-
throw new Error("Cannot combine placeholders and v8intrinsic plugins.");
|
|
72
|
-
}
|
|
73
|
-
if (hasPlugin(plugins, "pipelineOperator")) {
|
|
74
|
-
const proposal = getPluginOption(plugins, "pipelineOperator", "proposal");
|
|
75
|
-
if (!PIPELINE_PROPOSALS.includes(proposal)) {
|
|
76
|
-
const proposalList = PIPELINE_PROPOSALS.map(p => `"${p}"`).join(", ");
|
|
77
|
-
throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${proposalList}.`);
|
|
78
|
-
}
|
|
79
|
-
const tupleSyntaxIsHash = hasPlugin(plugins, ["recordAndTuple", {
|
|
80
|
-
syntaxType: "hash"
|
|
81
|
-
}]);
|
|
82
|
-
if (proposal === "hack") {
|
|
83
|
-
if (hasPlugin(plugins, "placeholders")) {
|
|
84
|
-
throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");
|
|
85
|
-
}
|
|
86
|
-
if (hasPlugin(plugins, "v8intrinsic")) {
|
|
87
|
-
throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");
|
|
88
|
-
}
|
|
89
|
-
const topicToken = getPluginOption(plugins, "pipelineOperator", "topicToken");
|
|
90
|
-
if (!TOPIC_TOKENS.includes(topicToken)) {
|
|
91
|
-
const tokenList = TOPIC_TOKENS.map(t => `"${t}"`).join(", ");
|
|
92
|
-
throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${tokenList}.`);
|
|
93
|
-
}
|
|
94
|
-
if (topicToken === "#" && tupleSyntaxIsHash) {
|
|
95
|
-
throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.');
|
|
96
|
-
}
|
|
97
|
-
} else if (proposal === "smart" && tupleSyntaxIsHash) {
|
|
98
|
-
throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.');
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
if (hasPlugin(plugins, "moduleAttributes")) {
|
|
102
|
-
{
|
|
103
|
-
if (hasPlugin(plugins, "importAssertions") || hasPlugin(plugins, "importAttributes")) {
|
|
104
|
-
throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");
|
|
105
|
-
}
|
|
106
|
-
const moduleAttributesVersionPluginOption = getPluginOption(plugins, "moduleAttributes", "version");
|
|
107
|
-
if (moduleAttributesVersionPluginOption !== "may-2020") {
|
|
108
|
-
throw new Error("The 'moduleAttributes' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is 'may-2020'.");
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
if (hasPlugin(plugins, "importAssertions") && hasPlugin(plugins, "importAttributes")) {
|
|
113
|
-
throw new Error("Cannot combine importAssertions and importAttributes plugins.");
|
|
114
|
-
}
|
|
115
|
-
if (hasPlugin(plugins, "recordAndTuple") && getPluginOption(plugins, "recordAndTuple", "syntaxType") != null && !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(getPluginOption(plugins, "recordAndTuple", "syntaxType"))) {
|
|
116
|
-
throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map(p => `'${p}'`).join(", "));
|
|
117
|
-
}
|
|
118
|
-
if (hasPlugin(plugins, "asyncDoExpressions") && !hasPlugin(plugins, "doExpressions")) {
|
|
119
|
-
const error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");
|
|
120
|
-
error.missingPlugins = "doExpressions";
|
|
121
|
-
throw error;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
const mixinPlugins = {
|
|
125
|
-
estree: _estree.default,
|
|
126
|
-
jsx: _jsx.default,
|
|
127
|
-
flow: _flow.default,
|
|
128
|
-
typescript: _typescript.default,
|
|
129
|
-
v8intrinsic: _v8intrinsic.default,
|
|
130
|
-
placeholders: _placeholders.default
|
|
131
|
-
};
|
|
132
|
-
exports.mixinPlugins = mixinPlugins;
|
|
133
|
-
const mixinPluginNames = Object.keys(mixinPlugins);
|
|
134
|
-
exports.mixinPluginNames = mixinPluginNames;
|
|
135
|
-
|
|
136
|
-
//# sourceMappingURL=plugin-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_estree","require","_flow","_jsx","_typescript","_placeholders","_v8intrinsic","hasPlugin","plugins","expectedConfig","expectedName","expectedOptions","expectedKeys","Object","keys","expectedOptionsIsEmpty","length","some","p","pluginName","pluginOptions","key","getPluginOption","name","option","plugin","find","Array","isArray","PIPELINE_PROPOSALS","TOPIC_TOKENS","RECORD_AND_TUPLE_SYNTAX_TYPES","validatePlugins","Error","decoratorsBeforeExport","allowCallParenthesized","proposal","includes","proposalList","map","join","tupleSyntaxIsHash","syntaxType","topicToken","tokenList","t","moduleAttributesVersionPluginOption","error","missingPlugins","mixinPlugins","estree","jsx","flow","typescript","v8intrinsic","placeholders","exports","mixinPluginNames"],"sources":["../src/plugin-utils.ts"],"sourcesContent":["import type Parser from \"./parser\";\nimport type {\n ParserPluginWithOptions,\n PluginConfig,\n PluginOptions,\n} from \"./typings\";\n\nexport type Plugin = PluginConfig;\n\nexport type PluginList = PluginConfig[];\n\nexport type MixinPlugin = (superClass: { new (...args: any): Parser }) => {\n new (...args: any): Parser;\n};\n\n// This function’s second parameter accepts either a string (plugin name) or an\n// array pair (plugin name and options object). If an options object is given,\n// then each value is non-recursively checked for identity with the actual\n// option value of each plugin in the first argument (which is an array of\n// plugin names or array pairs).\nexport function hasPlugin(\n plugins: PluginList,\n expectedConfig: PluginConfig,\n): boolean {\n // The expectedOptions object is by default an empty object if the given\n // expectedConfig argument does not give an options object (i.e., if it is a\n // string).\n const [expectedName, expectedOptions] =\n typeof expectedConfig === \"string\" ? [expectedConfig, {}] : expectedConfig;\n\n const expectedKeys = Object.keys(expectedOptions);\n\n const expectedOptionsIsEmpty = expectedKeys.length === 0;\n\n return plugins.some(p => {\n if (typeof p === \"string\") {\n return expectedOptionsIsEmpty && p === expectedName;\n } else {\n const [pluginName, pluginOptions] = p;\n if (pluginName !== expectedName) {\n return false;\n }\n for (const key of expectedKeys) {\n // @ts-expect-error key may not exist in plugin options\n if (pluginOptions[key] !== expectedOptions[key]) {\n return false;\n }\n }\n return true;\n }\n });\n}\n\nexport function getPluginOption<\n PluginName extends ParserPluginWithOptions[0],\n OptionName extends keyof PluginOptions<PluginName>,\n>(plugins: PluginList, name: PluginName, option: OptionName) {\n const plugin = plugins.find(plugin => {\n if (Array.isArray(plugin)) {\n return plugin[0] === name;\n } else {\n return plugin === name;\n }\n });\n\n if (plugin && Array.isArray(plugin) && plugin.length > 1) {\n return (plugin[1] as PluginOptions<PluginName>)[option];\n }\n\n return null;\n}\n\nconst PIPELINE_PROPOSALS = [\"minimal\", \"fsharp\", \"hack\", \"smart\"];\nconst TOPIC_TOKENS = [\"^^\", \"@@\", \"^\", \"%\", \"#\"];\nconst RECORD_AND_TUPLE_SYNTAX_TYPES = [\"hash\", \"bar\"];\n\nexport function validatePlugins(plugins: PluginList) {\n if (hasPlugin(plugins, \"decorators\")) {\n if (hasPlugin(plugins, \"decorators-legacy\")) {\n throw new Error(\n \"Cannot use the decorators and decorators-legacy plugin together\",\n );\n }\n\n const decoratorsBeforeExport = getPluginOption(\n plugins,\n \"decorators\",\n \"decoratorsBeforeExport\",\n );\n if (\n decoratorsBeforeExport != null &&\n typeof decoratorsBeforeExport !== \"boolean\"\n ) {\n throw new Error(\n \"'decoratorsBeforeExport' must be a boolean, if specified.\",\n );\n }\n\n const allowCallParenthesized = getPluginOption(\n plugins,\n \"decorators\",\n \"allowCallParenthesized\",\n );\n if (\n allowCallParenthesized != null &&\n typeof allowCallParenthesized !== \"boolean\"\n ) {\n throw new Error(\"'allowCallParenthesized' must be a boolean.\");\n }\n }\n\n if (hasPlugin(plugins, \"flow\") && hasPlugin(plugins, \"typescript\")) {\n throw new Error(\"Cannot combine flow and typescript plugins.\");\n }\n\n if (hasPlugin(plugins, \"placeholders\") && hasPlugin(plugins, \"v8intrinsic\")) {\n throw new Error(\"Cannot combine placeholders and v8intrinsic plugins.\");\n }\n\n if (hasPlugin(plugins, \"pipelineOperator\")) {\n const proposal = getPluginOption(plugins, \"pipelineOperator\", \"proposal\");\n\n if (!PIPELINE_PROPOSALS.includes(proposal)) {\n const proposalList = PIPELINE_PROPOSALS.map(p => `\"${p}\"`).join(\", \");\n throw new Error(\n `\"pipelineOperator\" requires \"proposal\" option whose value must be one of: ${proposalList}.`,\n );\n }\n\n const tupleSyntaxIsHash = hasPlugin(plugins, [\n \"recordAndTuple\",\n { syntaxType: \"hash\" },\n ]);\n\n if (proposal === \"hack\") {\n if (hasPlugin(plugins, \"placeholders\")) {\n throw new Error(\n \"Cannot combine placeholders plugin and Hack-style pipes.\",\n );\n }\n\n if (hasPlugin(plugins, \"v8intrinsic\")) {\n throw new Error(\n \"Cannot combine v8intrinsic plugin and Hack-style pipes.\",\n );\n }\n\n const topicToken = getPluginOption(\n plugins,\n \"pipelineOperator\",\n \"topicToken\",\n );\n\n if (!TOPIC_TOKENS.includes(topicToken)) {\n const tokenList = TOPIC_TOKENS.map(t => `\"${t}\"`).join(\", \");\n\n throw new Error(\n `\"pipelineOperator\" in \"proposal\": \"hack\" mode also requires a \"topicToken\" option whose value must be one of: ${tokenList}.`,\n );\n }\n\n if (topicToken === \"#\" && tupleSyntaxIsHash) {\n throw new Error(\n 'Plugin conflict between `[\"pipelineOperator\", { proposal: \"hack\", topicToken: \"#\" }]` and `[\"recordAndtuple\", { syntaxType: \"hash\"}]`.',\n );\n }\n } else if (proposal === \"smart\" && tupleSyntaxIsHash) {\n throw new Error(\n 'Plugin conflict between `[\"pipelineOperator\", { proposal: \"smart\" }]` and `[\"recordAndtuple\", { syntaxType: \"hash\"}]`.',\n );\n }\n }\n\n if (hasPlugin(plugins, \"moduleAttributes\")) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"`moduleAttributes` has been removed in Babel 8, please use `importAttributes` parser plugin, or `@babel/plugin-syntax-import-attributes`.\",\n );\n } else {\n if (\n hasPlugin(plugins, \"importAssertions\") ||\n hasPlugin(plugins, \"importAttributes\")\n ) {\n throw new Error(\n \"Cannot combine importAssertions, importAttributes and moduleAttributes plugins.\",\n );\n }\n const moduleAttributesVersionPluginOption = getPluginOption(\n plugins,\n \"moduleAttributes\",\n \"version\",\n );\n if (moduleAttributesVersionPluginOption !== \"may-2020\") {\n throw new Error(\n \"The 'moduleAttributes' plugin requires a 'version' option,\" +\n \" representing the last proposal update. Currently, the\" +\n \" only supported value is 'may-2020'.\",\n );\n }\n }\n }\n if (\n hasPlugin(plugins, \"importAssertions\") &&\n hasPlugin(plugins, \"importAttributes\")\n ) {\n throw new Error(\n \"Cannot combine importAssertions and importAttributes plugins.\",\n );\n }\n\n if (\n hasPlugin(plugins, \"recordAndTuple\") &&\n getPluginOption(plugins, \"recordAndTuple\", \"syntaxType\") != null &&\n !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(\n getPluginOption(plugins, \"recordAndTuple\", \"syntaxType\"),\n )\n ) {\n throw new Error(\n \"The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: \" +\n RECORD_AND_TUPLE_SYNTAX_TYPES.map(p => `'${p}'`).join(\", \"),\n );\n }\n\n if (\n hasPlugin(plugins, \"asyncDoExpressions\") &&\n !hasPlugin(plugins, \"doExpressions\")\n ) {\n const error = new Error(\n \"'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.\",\n );\n // @ts-expect-error so @babel/core can provide better error message\n error.missingPlugins = \"doExpressions\";\n throw error;\n }\n}\n\n// These plugins are defined using a mixin which extends the parser class.\n\nimport estree from \"./plugins/estree\";\nimport flow from \"./plugins/flow\";\nimport jsx from \"./plugins/jsx\";\nimport typescript from \"./plugins/typescript\";\nimport placeholders from \"./plugins/placeholders\";\nimport v8intrinsic from \"./plugins/v8intrinsic\";\n\n// NOTE: order is important. estree must come first; placeholders must come last.\nexport const mixinPlugins = {\n estree,\n jsx,\n flow,\n typescript,\n v8intrinsic,\n placeholders,\n};\n\nexport const mixinPluginNames = Object.keys(mixinPlugins) as ReadonlyArray<\n \"estree\" | \"jsx\" | \"flow\" | \"typescript\" | \"v8intrinsic\" | \"placeholders\"\n>;\n"],"mappings":";;;;;;;;;AA8OA,IAAAA,O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