@tachybase/module-workflow 0.23.8
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/.turbo/turbo-build.log +12 -0
- package/README.md +9 -0
- package/README.zh-CN.md +9 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/Branch.d.ts +9 -0
- package/dist/client/CanvasContent.d.ts +4 -0
- package/dist/client/CanvasContentWrapper.d.ts +4 -0
- package/dist/client/ExecutionCanvas.d.ts +2 -0
- package/dist/client/ExecutionContextProvider.d.ts +7 -0
- package/dist/client/ExecutionLink.d.ts +2 -0
- package/dist/client/ExecutionPage.d.ts +2 -0
- package/dist/client/ExecutionResourceProvider.d.ts +6 -0
- package/dist/client/FlowContext.d.ts +3 -0
- package/dist/client/Plugin.d.ts +39 -0
- package/dist/client/WorkflowCanvas.d.ts +2 -0
- package/dist/client/WorkflowLink.d.ts +2 -0
- package/dist/client/WorkflowPage.d.ts +2 -0
- package/dist/client/WorkflowPane.d.ts +2 -0
- package/dist/client/components/AddNotifiedPerson.d.ts +3 -0
- package/dist/client/components/AutoResizeInput.d.ts +4 -0
- package/dist/client/components/CheckboxGroupWithTooltip.d.ts +7 -0
- package/dist/client/components/CollectionBlockInitializer.d.ts +2 -0
- package/dist/client/components/CollectionFieldset.d.ts +3 -0
- package/dist/client/components/ColumnShowCollection.d.ts +2 -0
- package/dist/client/components/ColumnShowTitle.d.ts +2 -0
- package/dist/client/components/ConfigButtonMessage.d.ts +2 -0
- package/dist/client/components/DetailsBlockProvider.d.ts +6 -0
- package/dist/client/components/DrawerDescription.d.ts +5 -0
- package/dist/client/components/DrawerForm.d.ts +5 -0
- package/dist/client/components/ExecutionStatus.d.ts +5 -0
- package/dist/client/components/ExecutionTime.d.ts +3 -0
- package/dist/client/components/FieldsSelect.d.ts +2 -0
- package/dist/client/components/FilterDynamicComponent.d.ts +6 -0
- package/dist/client/components/GoBackButton.d.ts +2 -0
- package/dist/client/components/OpenDrawer.d.ts +7 -0
- package/dist/client/components/RadioWithTooltip.d.ts +7 -0
- package/dist/client/components/SelectNotifiedPerson.d.ts +2 -0
- package/dist/client/components/ShowNodeTypesInWorkflow.d.ts +2 -0
- package/dist/client/components/SimpleDesigner.d.ts +2 -0
- package/dist/client/components/StatusButton.d.ts +2 -0
- package/dist/client/components/ValueBlock.d.ts +5 -0
- package/dist/client/components/WorkflowLink.d.ts +2 -0
- package/dist/client/components/index.d.ts +15 -0
- package/dist/client/components/renderEngineReference.d.ts +2 -0
- package/dist/client/constants.d.ts +37 -0
- package/dist/client/features/aggregate/AggregateInstruction.d.ts +217 -0
- package/dist/client/features/aggregate/index.d.ts +4 -0
- package/dist/client/features/common/constants.d.ts +3 -0
- package/dist/client/features/delay/DelayInstruction.d.ts +48 -0
- package/dist/client/features/delay/index.d.ts +4 -0
- package/dist/client/features/dynamic-calculation/DynamicCalculation.d.ts +76 -0
- package/dist/client/features/dynamic-calculation/DynamicExpression.d.ts +6 -0
- package/dist/client/features/dynamic-calculation/expression.d.ts +35 -0
- package/dist/client/features/dynamic-calculation/index.d.ts +4 -0
- package/dist/client/features/interceptor/WorkflowTriggerInterceptor.d.ts +100 -0
- package/dist/client/features/interceptor/index.d.ts +4 -0
- package/dist/client/features/js-parse/JSParse.instruction.d.ts +123 -0
- package/dist/client/features/js-parse/index.d.ts +5 -0
- package/dist/client/features/json-parse/JSONParse.instruction.d.ts +119 -0
- package/dist/client/features/json-parse/index.d.ts +5 -0
- package/dist/client/features/loop/LoopInstruction.d.ts +33 -0
- package/dist/client/features/loop/index.d.ts +4 -0
- package/dist/client/features/manual/WorkflowTodo.d.ts +5 -0
- package/dist/client/features/manual/WorkflowTodoBlockInitializer.d.ts +2 -0
- package/dist/client/features/manual/index.d.ts +5 -0
- package/dist/client/features/manual/instruction/AssigneesSelect.d.ts +6 -0
- package/dist/client/features/manual/instruction/FormBlockInitializer.d.ts +2 -0
- package/dist/client/features/manual/instruction/FormBlockProvider.d.ts +2 -0
- package/dist/client/features/manual/instruction/ModeConfig.d.ts +5 -0
- package/dist/client/features/manual/instruction/SchemaConfig.d.ts +50 -0
- package/dist/client/features/manual/instruction/createManualFormBlockUISchema.d.ts +57 -0
- package/dist/client/features/manual/instruction/forms/create.d.ts +3 -0
- package/dist/client/features/manual/instruction/forms/custom.d.ts +5 -0
- package/dist/client/features/manual/instruction/forms/update.d.ts +3 -0
- package/dist/client/features/manual/instruction/index.d.ts +91 -0
- package/dist/client/features/manual/instruction/utils.d.ts +1 -0
- package/dist/client/features/notice/common/flowNodes.collection.d.ts +38 -0
- package/dist/client/features/notice/common/notice.collection.d.ts +127 -0
- package/dist/client/features/notice/common/workflow.collection.d.ts +30 -0
- package/dist/client/features/notice/configuration/Notice.instruction.d.ts +76 -0
- package/dist/client/features/notice/configuration/config-items/AddNotifiedPerson.view.d.ts +2 -0
- package/dist/client/features/notice/configuration/config-items/ConfigButtonNotice.view.d.ts +2 -0
- package/dist/client/features/notice/configuration/config-items/SelectNotifiedPerson.view.d.ts +2 -0
- package/dist/client/features/notice/configuration/kit.d.ts +5 -0
- package/dist/client/features/notice/configuration/show-interface/NoticeDetail.block.d.ts +2 -0
- package/dist/client/features/notice/configuration/show-interface/NoticeDetail.initializer.d.ts +2 -0
- package/dist/client/features/notice/configuration/show-interface/NoticeDetail.schema.d.ts +6 -0
- package/dist/client/features/notice/configuration/show-interface/NoticeDetailContainer.schema.d.ts +2 -0
- package/dist/client/features/notice/configuration/show-interface/style.d.ts +3 -0
- package/dist/client/features/notice/configuration/style.d.ts +5 -0
- package/dist/client/features/notice/index.d.ts +5 -0
- package/dist/client/features/notice/locale.d.ts +7 -0
- package/dist/client/features/notice/usage/NoticeBlock.initializer.d.ts +6 -0
- package/dist/client/features/notice/usage/NoticeBlock.provider.d.ts +5 -0
- package/dist/client/features/notice/usage/NoticeCenter.schema.d.ts +2 -0
- package/dist/client/features/notice/usage/column/column.action.d.ts +2 -0
- package/dist/client/features/notice/usage/column/column.node.d.ts +1 -0
- package/dist/client/features/notice/usage/column/column.status.d.ts +8 -0
- package/dist/client/features/notice/usage/column/column.user.d.ts +1 -0
- package/dist/client/features/notice/usage/column/column.workflow.d.ts +2 -0
- package/dist/client/features/notice/usage/kit.d.ts +5 -0
- package/dist/client/features/notice/usage/show-detail/NoticeDetail.provider.d.ts +5 -0
- package/dist/client/features/notice/usage/show-detail/NoticeDetail.schema.d.ts +2 -0
- package/dist/client/features/notice/usage/show-detail/contexts/MyComponent.context.d.ts +9 -0
- package/dist/client/features/notice/usage/show-detail/contexts/WorkflowNotice.context.d.ts +4 -0
- package/dist/client/features/notice/usage/show-detail/hooks/usePropsNoticeDetail.d.ts +3 -0
- package/dist/client/features/omni-trigger/OmniActionTrigger.d.ts +84 -0
- package/dist/client/features/omni-trigger/index.d.ts +5 -0
- package/dist/client/features/omni-trigger/usage/APIRegular.schema.d.ts +2 -0
- package/dist/client/features/omni-trigger/usage/APIRegular.setting.d.ts +2 -0
- package/dist/client/features/omni-trigger/usage/hooks.d.ts +3 -0
- package/dist/client/features/omni-trigger/usage/kit.d.ts +4 -0
- package/dist/client/features/omni-trigger/useFormWorkflowCustomActionProps.d.ts +3 -0
- package/dist/client/features/omni-trigger/useRecordWorkflowCustomTriggerActionProps.d.ts +3 -0
- package/dist/client/features/parallel/ParallelInstruction.d.ts +34 -0
- package/dist/client/features/parallel/index.d.ts +4 -0
- package/dist/client/features/request/RequestInstruction.d.ts +220 -0
- package/dist/client/features/request/index.d.ts +4 -0
- package/dist/client/features/response/index.d.ts +4 -0
- package/dist/client/features/script/Script.instruction.d.ts +198 -0
- package/dist/client/features/script/index.d.ts +5 -0
- package/dist/client/features/sql/SQLInstruction.d.ts +54 -0
- package/dist/client/features/sql/index.d.ts +4 -0
- package/dist/client/features/trigger-instruction/TriggerInstruction.d.ts +93 -0
- package/dist/client/features/trigger-instruction/index.d.ts +0 -0
- package/dist/client/features/trigger-instruction/plugin.d.ts +4 -0
- package/dist/client/features/variables/VariableTargetSelect.d.ts +5 -0
- package/dist/client/features/variables/VariablesInstruction.d.ts +54 -0
- package/dist/client/features/variables/index.d.ts +4 -0
- package/dist/client/features/variables/useStyles.d.ts +3 -0
- package/dist/client/hooks/index.d.ts +3 -0
- package/dist/client/hooks/useGetAriaLabelOfAddButton.d.ts +6 -0
- package/dist/client/hooks/useTriggerWorkflowActionProps.d.ts +6 -0
- package/dist/client/hooks/useWorkflowExecuted.d.ts +2 -0
- package/dist/client/index.d.ts +19 -0
- package/dist/client/index.js +876 -0
- package/dist/client/locale/index.d.ts +4 -0
- package/dist/client/nodes/calculation.d.ts +88 -0
- package/dist/client/nodes/condition.d.ts +108 -0
- package/dist/client/nodes/create.d.ts +68 -0
- package/dist/client/nodes/default-node/Node.context.d.ts +3 -0
- package/dist/client/nodes/default-node/Node.d.ts +4 -0
- package/dist/client/nodes/default-node/Node.style.d.ts +4 -0
- package/dist/client/nodes/default-node/buttons/ArrowDownButton.d.ts +2 -0
- package/dist/client/nodes/default-node/buttons/ArrowUpButton.d.ts +2 -0
- package/dist/client/nodes/default-node/buttons/DragButton.d.ts +2 -0
- package/dist/client/nodes/default-node/buttons/JobButton.d.ts +2 -0
- package/dist/client/nodes/default-node/buttons/JobButton.style.d.ts +5 -0
- package/dist/client/nodes/default-node/buttons/RemoveButton.d.ts +2 -0
- package/dist/client/nodes/default-node/components/AddButton.d.ts +11 -0
- package/dist/client/nodes/default-node/components/AddButton.props.d.ts +11 -0
- package/dist/client/nodes/default-node/components/AddButton.style.d.ts +6 -0
- package/dist/client/nodes/default-node/components/NodeConfig.d.ts +2 -0
- package/dist/client/nodes/default-node/components/NodeConfig.provider.d.ts +2 -0
- package/dist/client/nodes/default-node/components/NodeConfig.schema.d.ts +15 -0
- package/dist/client/nodes/default-node/components/NodeConfig.view.d.ts +2 -0
- package/dist/client/nodes/default-node/components/NodeConfigTitle.d.ts +2 -0
- package/dist/client/nodes/default-node/components/NodeDefaultView.d.ts +2 -0
- package/dist/client/nodes/default-node/components/NodeDefaultView.style.d.ts +5 -0
- package/dist/client/nodes/default-node/components/NodePoint.d.ts +2 -0
- package/dist/client/nodes/default-node/components/NodePoint.style.d.ts +4 -0
- package/dist/client/nodes/default-node/hooks/useAvailableUpstreams.d.ts +1 -0
- package/dist/client/nodes/default-node/hooks/useFormProviderProps.d.ts +3 -0
- package/dist/client/nodes/default-node/hooks/useUpdateAction.d.ts +3 -0
- package/dist/client/nodes/default-node/hooks/useUpstreamScopes.d.ts +1 -0
- package/dist/client/nodes/default-node/index.d.ts +4 -0
- package/dist/client/nodes/default-node/interface.d.ts +49 -0
- package/dist/client/nodes/destroy.d.ts +46 -0
- package/dist/client/nodes/end.d.ts +25 -0
- package/dist/client/nodes/query.d.ts +221 -0
- package/dist/client/nodes/update.d.ts +82 -0
- package/dist/client/schemas/collection.d.ts +162 -0
- package/dist/client/schemas/executions.d.ts +380 -0
- package/dist/client/schemas/workflows.d.ts +47 -0
- package/dist/client/settings/customizeSubmitToWorkflowActionSettings.d.ts +2 -0
- package/dist/client/style.d.ts +19 -0
- package/dist/client/triggers/collection.d.ts +133 -0
- package/dist/client/triggers/index.d.ts +25 -0
- package/dist/client/triggers/schedule/EndsByField.d.ts +5 -0
- package/dist/client/triggers/schedule/OnField.d.ts +5 -0
- package/dist/client/triggers/schedule/RepeatField.d.ts +5 -0
- package/dist/client/triggers/schedule/ScheduleConfig.d.ts +2 -0
- package/dist/client/triggers/schedule/constants.d.ts +4 -0
- package/dist/client/triggers/schedule/index.d.ts +22 -0
- package/dist/client/triggers/schedule/locale/Cron.zh-CN.d.ts +34 -0
- package/dist/client/utils.d.ts +5 -0
- package/dist/client/variable.d.ts +97 -0
- package/dist/common/constants.d.ts +5 -0
- package/dist/common/constants.js +39 -0
- package/dist/externalVersion.js +25 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +39 -0
- package/dist/locale/en-US.json +319 -0
- package/dist/locale/es-ES.json +129 -0
- package/dist/locale/fr-FR.json +129 -0
- package/dist/locale/ja-JP.json +87 -0
- package/dist/locale/ko_KR.json +246 -0
- package/dist/locale/pt-BR.json +129 -0
- package/dist/locale/ru-RU.json +87 -0
- package/dist/locale/tr-TR.json +87 -0
- package/dist/locale/zh-CN.json +399 -0
- package/dist/node_modules/@babel/core/LICENSE +22 -0
- package/dist/node_modules/@babel/core/cjs-proxy.cjs +68 -0
- package/dist/node_modules/@babel/core/lib/config/cache-contexts.js +3 -0
- package/dist/node_modules/@babel/core/lib/config/caching.js +261 -0
- package/dist/node_modules/@babel/core/lib/config/config-chain.js +469 -0
- package/dist/node_modules/@babel/core/lib/config/config-descriptors.js +190 -0
- package/dist/node_modules/@babel/core/lib/config/files/configuration.js +287 -0
- package/dist/node_modules/@babel/core/lib/config/files/import.cjs +6 -0
- package/dist/node_modules/@babel/core/lib/config/files/index-browser.js +58 -0
- package/dist/node_modules/@babel/core/lib/config/files/index.js +78 -0
- package/dist/node_modules/@babel/core/lib/config/files/module-types.js +195 -0
- package/dist/node_modules/@babel/core/lib/config/files/package.js +61 -0
- package/dist/node_modules/@babel/core/lib/config/files/plugins.js +229 -0
- package/dist/node_modules/@babel/core/lib/config/files/types.js +3 -0
- package/dist/node_modules/@babel/core/lib/config/files/utils.js +36 -0
- package/dist/node_modules/@babel/core/lib/config/full.js +312 -0
- package/dist/node_modules/@babel/core/lib/config/helpers/config-api.js +84 -0
- package/dist/node_modules/@babel/core/lib/config/helpers/deep-array.js +23 -0
- package/dist/node_modules/@babel/core/lib/config/helpers/environment.js +12 -0
- package/dist/node_modules/@babel/core/lib/config/index.js +93 -0
- package/dist/node_modules/@babel/core/lib/config/item.js +67 -0
- package/dist/node_modules/@babel/core/lib/config/partial.js +158 -0
- package/dist/node_modules/@babel/core/lib/config/pattern-to-regex.js +38 -0
- package/dist/node_modules/@babel/core/lib/config/plugin.js +33 -0
- package/dist/node_modules/@babel/core/lib/config/printer.js +113 -0
- package/dist/node_modules/@babel/core/lib/config/resolve-targets-browser.js +41 -0
- package/dist/node_modules/@babel/core/lib/config/resolve-targets.js +61 -0
- package/dist/node_modules/@babel/core/lib/config/util.js +31 -0
- package/dist/node_modules/@babel/core/lib/config/validation/option-assertions.js +277 -0
- package/dist/node_modules/@babel/core/lib/config/validation/options.js +189 -0
- package/dist/node_modules/@babel/core/lib/config/validation/plugins.js +67 -0
- package/dist/node_modules/@babel/core/lib/config/validation/removed.js +68 -0
- package/dist/node_modules/@babel/core/lib/errors/config-error.js +18 -0
- package/dist/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js +98 -0
- package/dist/node_modules/@babel/core/lib/gensync-utils/async.js +90 -0
- package/dist/node_modules/@babel/core/lib/gensync-utils/fs.js +31 -0
- package/dist/node_modules/@babel/core/lib/gensync-utils/functional.js +58 -0
- package/dist/node_modules/@babel/core/lib/index.js +227 -0
- package/dist/node_modules/@babel/core/lib/parse.js +47 -0
- package/dist/node_modules/@babel/core/lib/parser/index.js +79 -0
- package/dist/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js +339 -0
- package/dist/node_modules/@babel/core/lib/tools/build-external-helpers.js +144 -0
- package/dist/node_modules/@babel/core/lib/transform-ast.js +50 -0
- package/dist/node_modules/@babel/core/lib/transform-file-browser.js +23 -0
- package/dist/node_modules/@babel/core/lib/transform-file.js +40 -0
- package/dist/node_modules/@babel/core/lib/transform.js +49 -0
- package/dist/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js +84 -0
- package/dist/node_modules/@babel/core/lib/transformation/file/babel-7-helpers.cjs +4 -0
- package/dist/node_modules/@babel/core/lib/transformation/file/file.js +214 -0
- package/dist/node_modules/@babel/core/lib/transformation/file/generate.js +84 -0
- package/dist/node_modules/@babel/core/lib/transformation/file/merge-map.js +37 -0
- package/dist/node_modules/@babel/core/lib/transformation/index.js +92 -0
- package/dist/node_modules/@babel/core/lib/transformation/normalize-file.js +129 -0
- package/dist/node_modules/@babel/core/lib/transformation/normalize-opts.js +59 -0
- package/dist/node_modules/@babel/core/lib/transformation/plugin-pass.js +50 -0
- package/dist/node_modules/@babel/core/lib/transformation/util/clone-deep.js +36 -0
- package/dist/node_modules/@babel/core/lib/vendor/import-meta-resolve.js +1043 -0
- package/dist/node_modules/@babel/core/node_modules/.bin/json5 +17 -0
- package/dist/node_modules/@babel/core/node_modules/.bin/parser +17 -0
- package/dist/node_modules/@babel/core/node_modules/.bin/semver +17 -0
- package/dist/node_modules/@babel/core/package.json +1 -0
- package/dist/node_modules/@babel/core/src/config/files/index-browser.ts +113 -0
- package/dist/node_modules/@babel/core/src/config/files/index.ts +29 -0
- package/dist/node_modules/@babel/core/src/config/resolve-targets-browser.ts +40 -0
- package/dist/node_modules/@babel/core/src/config/resolve-targets.ts +56 -0
- package/dist/node_modules/@babel/core/src/transform-file-browser.ts +31 -0
- package/dist/node_modules/@babel/core/src/transform-file.ts +55 -0
- package/dist/node_modules/cron-parser/LICENSE +21 -0
- package/dist/node_modules/cron-parser/lib/date.js +252 -0
- package/dist/node_modules/cron-parser/lib/expression.js +1002 -0
- package/dist/node_modules/cron-parser/lib/field_compactor.js +70 -0
- package/dist/node_modules/cron-parser/lib/field_stringify.js +58 -0
- package/dist/node_modules/cron-parser/lib/parser.js +1 -0
- package/dist/node_modules/cron-parser/package.json +1 -0
- package/dist/node_modules/cron-parser/types/common.d.ts +131 -0
- package/dist/node_modules/cron-parser/types/index.d.ts +45 -0
- package/dist/node_modules/cron-parser/types/ts3/index.d.ts +28 -0
- package/dist/node_modules/form-data/License +19 -0
- package/dist/node_modules/form-data/index.d.ts +62 -0
- package/dist/node_modules/form-data/lib/browser.js +2 -0
- package/dist/node_modules/form-data/lib/form_data.js +14 -0
- package/dist/node_modules/form-data/lib/populate.js +10 -0
- package/dist/node_modules/form-data/package.json +1 -0
- package/dist/node_modules/jsonata/LICENSE +19 -0
- package/dist/node_modules/jsonata/jsonata-es5.js +9875 -0
- package/dist/node_modules/jsonata/jsonata-es5.min.js +1 -0
- package/dist/node_modules/jsonata/jsonata.d.ts +72 -0
- package/dist/node_modules/jsonata/jsonata.js +1 -0
- package/dist/node_modules/jsonata/jsonata.min.js +1 -0
- package/dist/node_modules/jsonata/package.json +1 -0
- package/dist/node_modules/lru-cache/index-cjs.d.ts +7 -0
- package/dist/node_modules/lru-cache/index-cjs.js +1 -0
- package/dist/node_modules/lru-cache/index.d.ts +807 -0
- package/dist/node_modules/lru-cache/index.js +1334 -0
- package/dist/node_modules/lru-cache/index.min.js +2 -0
- package/dist/node_modules/lru-cache/package.json +1 -0
- package/dist/node_modules/mime-types/LICENSE +23 -0
- package/dist/node_modules/mime-types/index.js +14 -0
- package/dist/node_modules/mime-types/package.json +1 -0
- package/dist/node_modules/qrcode/bin/qrcode +159 -0
- package/dist/node_modules/qrcode/helper/to-sjis-browser.js +2 -0
- package/dist/node_modules/qrcode/helper/to-sjis.js +105 -0
- package/dist/node_modules/qrcode/lib/browser.js +76 -0
- package/dist/node_modules/qrcode/lib/can-promise.js +7 -0
- package/dist/node_modules/qrcode/lib/core/alignment-pattern.js +83 -0
- package/dist/node_modules/qrcode/lib/core/alphanumeric-data.js +59 -0
- package/dist/node_modules/qrcode/lib/core/bit-buffer.js +37 -0
- package/dist/node_modules/qrcode/lib/core/bit-matrix.js +65 -0
- package/dist/node_modules/qrcode/lib/core/byte-data.js +30 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-code.js +135 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-level.js +50 -0
- package/dist/node_modules/qrcode/lib/core/finder-pattern.js +22 -0
- package/dist/node_modules/qrcode/lib/core/format-info.js +29 -0
- package/dist/node_modules/qrcode/lib/core/galois-field.js +69 -0
- package/dist/node_modules/qrcode/lib/core/kanji-data.js +54 -0
- package/dist/node_modules/qrcode/lib/core/mask-pattern.js +234 -0
- package/dist/node_modules/qrcode/lib/core/mode.js +167 -0
- package/dist/node_modules/qrcode/lib/core/numeric-data.js +43 -0
- package/dist/node_modules/qrcode/lib/core/polynomial.js +62 -0
- package/dist/node_modules/qrcode/lib/core/qrcode.js +495 -0
- package/dist/node_modules/qrcode/lib/core/reed-solomon-encoder.js +56 -0
- package/dist/node_modules/qrcode/lib/core/regex.js +31 -0
- package/dist/node_modules/qrcode/lib/core/segments.js +330 -0
- package/dist/node_modules/qrcode/lib/core/utils.js +63 -0
- package/dist/node_modules/qrcode/lib/core/version-check.js +9 -0
- package/dist/node_modules/qrcode/lib/core/version.js +163 -0
- package/dist/node_modules/qrcode/lib/index.js +1 -0
- package/dist/node_modules/qrcode/lib/renderer/canvas.js +63 -0
- package/dist/node_modules/qrcode/lib/renderer/png.js +78 -0
- package/dist/node_modules/qrcode/lib/renderer/svg-tag.js +81 -0
- package/dist/node_modules/qrcode/lib/renderer/svg.js +19 -0
- package/dist/node_modules/qrcode/lib/renderer/terminal/terminal-small.js +85 -0
- package/dist/node_modules/qrcode/lib/renderer/terminal/terminal.js +49 -0
- package/dist/node_modules/qrcode/lib/renderer/terminal.js +9 -0
- package/dist/node_modules/qrcode/lib/renderer/utf8.js +71 -0
- package/dist/node_modules/qrcode/lib/renderer/utils.js +99 -0
- package/dist/node_modules/qrcode/lib/server.js +138 -0
- package/dist/node_modules/qrcode/license +10 -0
- package/dist/node_modules/qrcode/package.json +1 -0
- package/dist/server/Plugin.d.ts +50 -0
- package/dist/server/Plugin.js +498 -0
- package/dist/server/Processor.d.ts +59 -0
- package/dist/server/Processor.js +306 -0
- package/dist/server/actions/executions.d.ts +3 -0
- package/dist/server/actions/executions.js +87 -0
- package/dist/server/actions/index.d.ts +3 -0
- package/dist/server/actions/index.js +59 -0
- package/dist/server/actions/nodes.d.ts +6 -0
- package/dist/server/actions/nodes.js +322 -0
- package/dist/server/actions/workflows.d.ts +10 -0
- package/dist/server/actions/workflows.js +347 -0
- package/dist/server/collections/1-users_jobs.d.ts +2 -0
- package/dist/server/collections/1-users_jobs.js +73 -0
- package/dist/server/collections/2-jobs.d.ts +2 -0
- package/dist/server/collections/2-jobs.js +40 -0
- package/dist/server/collections/3-users.d.ts +2 -0
- package/dist/server/collections/3-users.js +38 -0
- package/dist/server/collections/executions.d.ts +3 -0
- package/dist/server/collections/executions.js +64 -0
- package/dist/server/collections/flow_nodes.d.ts +3 -0
- package/dist/server/collections/flow_nodes.js +78 -0
- package/dist/server/collections/jobs.d.ts +3 -0
- package/dist/server/collections/jobs.js +61 -0
- package/dist/server/collections/workflows.d.ts +2 -0
- package/dist/server/collections/workflows.js +130 -0
- package/dist/server/constants.d.ts +22 -0
- package/dist/server/constants.js +52 -0
- package/dist/server/features/_deprecated-js-parse/JSParse.instruction.d.ts +10 -0
- package/dist/server/features/_deprecated-js-parse/JSParse.instruction.js +100 -0
- package/dist/server/features/_deprecated-js-parse/index.d.ts +1 -0
- package/dist/server/features/_deprecated-js-parse/index.js +33 -0
- package/dist/server/features/_deprecated-js-parse/plugin.d.ts +5 -0
- package/dist/server/features/_deprecated-js-parse/plugin.js +48 -0
- package/dist/server/features/_deprecated-json-parse/JSONParse.instruction.d.ts +11 -0
- package/dist/server/features/_deprecated-json-parse/JSONParse.instruction.js +81 -0
- package/dist/server/features/_deprecated-json-parse/index.d.ts +1 -0
- package/dist/server/features/_deprecated-json-parse/index.js +33 -0
- package/dist/server/features/_deprecated-json-parse/plugin.d.ts +5 -0
- package/dist/server/features/_deprecated-json-parse/plugin.js +48 -0
- package/dist/server/features/aggregate/AggregateInstruction.d.ts +7 -0
- package/dist/server/features/aggregate/AggregateInstruction.js +56 -0
- package/dist/server/features/aggregate/Plugin.d.ts +4 -0
- package/dist/server/features/aggregate/Plugin.js +45 -0
- package/dist/server/features/common/constants.d.ts +4 -0
- package/dist/server/features/common/constants.js +36 -0
- package/dist/server/features/delay/DelayInstruction.d.ts +12 -0
- package/dist/server/features/delay/DelayInstruction.js +106 -0
- package/dist/server/features/delay/Plugin.d.ts +4 -0
- package/dist/server/features/delay/Plugin.js +45 -0
- package/dist/server/features/dynamic-calculation/DynamicCalculation.d.ts +10 -0
- package/dist/server/features/dynamic-calculation/DynamicCalculation.js +62 -0
- package/dist/server/features/dynamic-calculation/Plugin.d.ts +4 -0
- package/dist/server/features/dynamic-calculation/Plugin.js +49 -0
- package/dist/server/features/dynamic-calculation/expression-field.d.ts +7 -0
- package/dist/server/features/dynamic-calculation/expression-field.js +32 -0
- package/dist/server/features/interception/RequestInterceptionTrigger.d.ts +11 -0
- package/dist/server/features/interception/RequestInterceptionTrigger.js +146 -0
- package/dist/server/features/interception/index.d.ts +4 -0
- package/dist/server/features/interception/index.js +35 -0
- package/dist/server/features/loop/LoopInstruction.d.ts +13 -0
- package/dist/server/features/loop/LoopInstruction.js +100 -0
- package/dist/server/features/loop/Plugin.d.ts +4 -0
- package/dist/server/features/loop/Plugin.js +45 -0
- package/dist/server/features/manual/ManualInstruction.d.ts +28 -0
- package/dist/server/features/manual/ManualInstruction.js +152 -0
- package/dist/server/features/manual/Plugin.d.ts +4 -0
- package/dist/server/features/manual/Plugin.js +70 -0
- package/dist/server/features/manual/actions.d.ts +2 -0
- package/dist/server/features/manual/actions.js +104 -0
- package/dist/server/features/manual/forms/create.d.ts +6 -0
- package/dist/server/features/manual/forms/create.js +41 -0
- package/dist/server/features/manual/forms/index.d.ts +6 -0
- package/dist/server/features/manual/forms/index.js +38 -0
- package/dist/server/features/manual/forms/update.d.ts +7 -0
- package/dist/server/features/manual/forms/update.js +41 -0
- package/dist/server/features/notice/NoticeInstruction.d.ts +9 -0
- package/dist/server/features/notice/NoticeInstruction.js +172 -0
- package/dist/server/features/notice/actions.d.ts +3 -0
- package/dist/server/features/notice/actions.js +124 -0
- package/dist/server/features/notice/collections/workflowNotice.d.ts +3 -0
- package/dist/server/features/notice/collections/workflowNotice.js +90 -0
- package/dist/server/features/notice/constants.d.ts +16 -0
- package/dist/server/features/notice/constants.js +44 -0
- package/dist/server/features/notice/index.d.ts +1 -0
- package/dist/server/features/notice/index.js +33 -0
- package/dist/server/features/notice/plugin.d.ts +12 -0
- package/dist/server/features/notice/plugin.js +83 -0
- package/dist/server/features/notice/tools.d.ts +17 -0
- package/dist/server/features/notice/tools.js +163 -0
- package/dist/server/features/omni-trigger/CustomActionTrigger.d.ts +11 -0
- package/dist/server/features/omni-trigger/CustomActionTrigger.js +270 -0
- package/dist/server/features/omni-trigger/Plugin.d.ts +4 -0
- package/dist/server/features/omni-trigger/Plugin.js +45 -0
- package/dist/server/features/omni-trigger/index.d.ts +1 -0
- package/dist/server/features/omni-trigger/index.js +21 -0
- package/dist/server/features/parallel/ParallelInstruction.d.ts +11 -0
- package/dist/server/features/parallel/ParallelInstruction.js +137 -0
- package/dist/server/features/parallel/Plugin.d.ts +4 -0
- package/dist/server/features/parallel/Plugin.js +45 -0
- package/dist/server/features/request/Plugin.d.ts +4 -0
- package/dist/server/features/request/Plugin.js +45 -0
- package/dist/server/features/request/RequestInstruction.d.ts +14 -0
- package/dist/server/features/request/RequestInstruction.js +183 -0
- package/dist/server/features/response/Plugin.d.ts +4 -0
- package/dist/server/features/response/Plugin.js +45 -0
- package/dist/server/features/response/ResponseMessageInstruction.d.ts +7 -0
- package/dist/server/features/response/ResponseMessageInstruction.js +57 -0
- package/dist/server/features/response/index.d.ts +1 -0
- package/dist/server/features/response/index.js +21 -0
- package/dist/server/features/script/index.d.ts +1 -0
- package/dist/server/features/script/index.js +33 -0
- package/dist/server/features/script/plugin.d.ts +5 -0
- package/dist/server/features/script/plugin.js +48 -0
- package/dist/server/features/script/script.instruction.d.ts +10 -0
- package/dist/server/features/script/script.instruction.js +212 -0
- package/dist/server/features/sql/Plugin.d.ts +4 -0
- package/dist/server/features/sql/Plugin.js +45 -0
- package/dist/server/features/sql/SQLInstruction.d.ts +10 -0
- package/dist/server/features/sql/SQLInstruction.js +48 -0
- package/dist/server/features/trigger-instruction/TriggerInstruction.d.ts +15 -0
- package/dist/server/features/trigger-instruction/TriggerInstruction.js +71 -0
- package/dist/server/features/trigger-instruction/flownode-check.d.ts +2 -0
- package/dist/server/features/trigger-instruction/flownode-check.js +114 -0
- package/dist/server/features/trigger-instruction/index.d.ts +0 -0
- package/dist/server/features/trigger-instruction/index.js +0 -0
- package/dist/server/features/trigger-instruction/plugin.d.ts +4 -0
- package/dist/server/features/trigger-instruction/plugin.js +37 -0
- package/dist/server/features/variables/Plugin.d.ts +4 -0
- package/dist/server/features/variables/Plugin.js +45 -0
- package/dist/server/features/variables/VariableInstruction.d.ts +7 -0
- package/dist/server/features/variables/VariableInstruction.js +61 -0
- package/dist/server/features/variables/index.d.ts +1 -0
- package/dist/server/features/variables/index.js +27 -0
- package/dist/server/features/webhook/Plugin.d.ts +4 -0
- package/dist/server/features/webhook/Plugin.js +109 -0
- package/dist/server/features/webhook/index.d.ts +1 -0
- package/dist/server/features/webhook/index.js +27 -0
- package/dist/server/features/webhook/webhooks.d.ts +9 -0
- package/dist/server/features/webhook/webhooks.js +286 -0
- package/dist/server/functions/index.d.ts +9 -0
- package/dist/server/functions/index.js +31 -0
- package/dist/server/index.d.ts +8 -0
- package/dist/server/index.js +54 -0
- package/dist/server/instructions/CalculationInstruction.d.ts +17 -0
- package/dist/server/instructions/CalculationInstruction.js +59 -0
- package/dist/server/instructions/ConditionInstruction.d.ts +29 -0
- package/dist/server/instructions/ConditionInstruction.js +160 -0
- package/dist/server/instructions/CreateInstruction.d.ts +10 -0
- package/dist/server/instructions/CreateInstruction.js +175 -0
- package/dist/server/instructions/DestroyInstruction.d.ts +10 -0
- package/dist/server/instructions/DestroyInstruction.js +50 -0
- package/dist/server/instructions/EndInstruction.d.ts +6 -0
- package/dist/server/instructions/EndInstruction.js +47 -0
- package/dist/server/instructions/QueryInstruction.d.ts +13 -0
- package/dist/server/instructions/QueryInstruction.js +78 -0
- package/dist/server/instructions/UpdateInstruction.d.ts +10 -0
- package/dist/server/instructions/UpdateInstruction.js +159 -0
- package/dist/server/instructions/index.d.ts +23 -0
- package/dist/server/instructions/index.js +33 -0
- package/dist/server/migrations/20241118104303-add-initAt.d.ts +6 -0
- package/dist/server/migrations/20241118104303-add-initAt.js +47 -0
- package/dist/server/migrations/20241206122842-add-createdBy.d.ts +6 -0
- package/dist/server/migrations/20241206122842-add-createdBy.js +46 -0
- package/dist/server/migrations/20241220001154-bigInt.d.ts +6 -0
- package/dist/server/migrations/20241220001154-bigInt.js +39 -0
- package/dist/server/triggers/CollectionTrigger.d.ts +14 -0
- package/dist/server/triggers/CollectionTrigger.js +188 -0
- package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.d.ts +31 -0
- package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.js +342 -0
- package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.d.ts +15 -0
- package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.js +143 -0
- package/dist/server/triggers/ScheduleTrigger/index.d.ts +13 -0
- package/dist/server/triggers/ScheduleTrigger/index.js +74 -0
- package/dist/server/triggers/ScheduleTrigger/utils.d.ts +5 -0
- package/dist/server/triggers/ScheduleTrigger/utils.js +35 -0
- package/dist/server/triggers/index.d.ts +13 -0
- package/dist/server/triggers/index.js +37 -0
- package/dist/server/types/Execution.d.ts +17 -0
- package/dist/server/types/Execution.js +25 -0
- package/dist/server/types/FlowNode.d.ts +16 -0
- package/dist/server/types/FlowNode.js +25 -0
- package/dist/server/types/Job.d.ts +14 -0
- package/dist/server/types/Job.js +25 -0
- package/dist/server/types/Workflow.d.ts +27 -0
- package/dist/server/types/Workflow.js +25 -0
- package/dist/server/types/index.d.ts +4 -0
- package/dist/server/types/index.js +15 -0
- package/dist/server/utils.d.ts +1 -0
- package/dist/server/utils.js +42 -0
- package/dist/swagger/index.d.ts +754 -0
- package/dist/swagger/index.js +798 -0
- package/package.json +63 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.loadPlugin = loadPlugin;
|
|
7
|
+
exports.loadPreset = loadPreset;
|
|
8
|
+
exports.resolvePreset = exports.resolvePlugin = void 0;
|
|
9
|
+
function _debug() {
|
|
10
|
+
const data = require("debug");
|
|
11
|
+
_debug = function () {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
return data;
|
|
15
|
+
}
|
|
16
|
+
function _path() {
|
|
17
|
+
const data = require("path");
|
|
18
|
+
_path = function () {
|
|
19
|
+
return data;
|
|
20
|
+
};
|
|
21
|
+
return data;
|
|
22
|
+
}
|
|
23
|
+
var _async = require("../../gensync-utils/async.js");
|
|
24
|
+
var _moduleTypes = require("./module-types.js");
|
|
25
|
+
function _url() {
|
|
26
|
+
const data = require("url");
|
|
27
|
+
_url = function () {
|
|
28
|
+
return data;
|
|
29
|
+
};
|
|
30
|
+
return data;
|
|
31
|
+
}
|
|
32
|
+
var _importMetaResolve = require("../../vendor/import-meta-resolve.js");
|
|
33
|
+
function _fs() {
|
|
34
|
+
const data = require("fs");
|
|
35
|
+
_fs = function () {
|
|
36
|
+
return data;
|
|
37
|
+
};
|
|
38
|
+
return data;
|
|
39
|
+
}
|
|
40
|
+
const debug = _debug()("babel:config:loading:files:plugins");
|
|
41
|
+
const EXACT_RE = /^module:/;
|
|
42
|
+
const BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-plugin-)/;
|
|
43
|
+
const BABEL_PRESET_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-preset-)/;
|
|
44
|
+
const BABEL_PLUGIN_ORG_RE = /^(@babel\/)(?!plugin-|[^/]+\/)/;
|
|
45
|
+
const BABEL_PRESET_ORG_RE = /^(@babel\/)(?!preset-|[^/]+\/)/;
|
|
46
|
+
const OTHER_PLUGIN_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-plugin(?:-|\/|$)|[^/]+\/)/;
|
|
47
|
+
const OTHER_PRESET_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-preset(?:-|\/|$)|[^/]+\/)/;
|
|
48
|
+
const OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/;
|
|
49
|
+
const resolvePlugin = exports.resolvePlugin = resolveStandardizedName.bind(null, "plugin");
|
|
50
|
+
const resolvePreset = exports.resolvePreset = resolveStandardizedName.bind(null, "preset");
|
|
51
|
+
function* loadPlugin(name, dirname) {
|
|
52
|
+
const {
|
|
53
|
+
filepath,
|
|
54
|
+
loader
|
|
55
|
+
} = resolvePlugin(name, dirname, yield* (0, _async.isAsync)());
|
|
56
|
+
const value = yield* requireModule("plugin", loader, filepath);
|
|
57
|
+
debug("Loaded plugin %o from %o.", name, dirname);
|
|
58
|
+
return {
|
|
59
|
+
filepath,
|
|
60
|
+
value
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function* loadPreset(name, dirname) {
|
|
64
|
+
const {
|
|
65
|
+
filepath,
|
|
66
|
+
loader
|
|
67
|
+
} = resolvePreset(name, dirname, yield* (0, _async.isAsync)());
|
|
68
|
+
const value = yield* requireModule("preset", loader, filepath);
|
|
69
|
+
debug("Loaded preset %o from %o.", name, dirname);
|
|
70
|
+
return {
|
|
71
|
+
filepath,
|
|
72
|
+
value
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function standardizeName(type, name) {
|
|
76
|
+
if (_path().isAbsolute(name)) return name;
|
|
77
|
+
const isPreset = type === "preset";
|
|
78
|
+
return name.replace(isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE, `babel-${type}-`).replace(isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE, `$1${type}-`).replace(isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE, `$1babel-${type}-`).replace(OTHER_ORG_DEFAULT_RE, `$1/babel-${type}`).replace(EXACT_RE, "");
|
|
79
|
+
}
|
|
80
|
+
function* resolveAlternativesHelper(type, name) {
|
|
81
|
+
const standardizedName = standardizeName(type, name);
|
|
82
|
+
const {
|
|
83
|
+
error,
|
|
84
|
+
value
|
|
85
|
+
} = yield standardizedName;
|
|
86
|
+
if (!error) return value;
|
|
87
|
+
if (error.code !== "MODULE_NOT_FOUND") throw error;
|
|
88
|
+
if (standardizedName !== name && !(yield name).error) {
|
|
89
|
+
error.message += `\n- If you want to resolve "${name}", use "module:${name}"`;
|
|
90
|
+
}
|
|
91
|
+
if (!(yield standardizeName(type, "@babel/" + name)).error) {
|
|
92
|
+
error.message += `\n- Did you mean "@babel/${name}"?`;
|
|
93
|
+
}
|
|
94
|
+
const oppositeType = type === "preset" ? "plugin" : "preset";
|
|
95
|
+
if (!(yield standardizeName(oppositeType, name)).error) {
|
|
96
|
+
error.message += `\n- Did you accidentally pass a ${oppositeType} as a ${type}?`;
|
|
97
|
+
}
|
|
98
|
+
if (type === "plugin") {
|
|
99
|
+
const transformName = standardizedName.replace("-proposal-", "-transform-");
|
|
100
|
+
if (transformName !== standardizedName && !(yield transformName).error) {
|
|
101
|
+
error.message += `\n- Did you mean "${transformName}"?`;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
error.message += `\n
|
|
105
|
+
Make sure that all the Babel plugins and presets you are using
|
|
106
|
+
are defined as dependencies or devDependencies in your package.json
|
|
107
|
+
file. It's possible that the missing plugin is loaded by a preset
|
|
108
|
+
you are using that forgot to add the plugin to its dependencies: you
|
|
109
|
+
can workaround this problem by explicitly adding the missing package
|
|
110
|
+
to your top-level package.json.
|
|
111
|
+
`;
|
|
112
|
+
throw error;
|
|
113
|
+
}
|
|
114
|
+
function tryRequireResolve(id, dirname) {
|
|
115
|
+
try {
|
|
116
|
+
if (dirname) {
|
|
117
|
+
return {
|
|
118
|
+
error: null,
|
|
119
|
+
value: (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, {
|
|
120
|
+
paths: [b]
|
|
121
|
+
}, M = require("module")) => {
|
|
122
|
+
let f = M._findPath(r, M._nodeModulePaths(b).concat(b));
|
|
123
|
+
if (f) return f;
|
|
124
|
+
f = new Error(`Cannot resolve module '${r}'`);
|
|
125
|
+
f.code = "MODULE_NOT_FOUND";
|
|
126
|
+
throw f;
|
|
127
|
+
})(id, {
|
|
128
|
+
paths: [dirname]
|
|
129
|
+
})
|
|
130
|
+
};
|
|
131
|
+
} else {
|
|
132
|
+
return {
|
|
133
|
+
error: null,
|
|
134
|
+
value: require.resolve(id)
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
} catch (error) {
|
|
138
|
+
return {
|
|
139
|
+
error,
|
|
140
|
+
value: null
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
function tryImportMetaResolve(id, options) {
|
|
145
|
+
try {
|
|
146
|
+
return {
|
|
147
|
+
error: null,
|
|
148
|
+
value: (0, _importMetaResolve.resolve)(id, options)
|
|
149
|
+
};
|
|
150
|
+
} catch (error) {
|
|
151
|
+
return {
|
|
152
|
+
error,
|
|
153
|
+
value: null
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function resolveStandardizedNameForRequire(type, name, dirname) {
|
|
158
|
+
const it = resolveAlternativesHelper(type, name);
|
|
159
|
+
let res = it.next();
|
|
160
|
+
while (!res.done) {
|
|
161
|
+
res = it.next(tryRequireResolve(res.value, dirname));
|
|
162
|
+
}
|
|
163
|
+
return {
|
|
164
|
+
loader: "require",
|
|
165
|
+
filepath: res.value
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
function resolveStandardizedNameForImport(type, name, dirname) {
|
|
169
|
+
const parentUrl = (0, _url().pathToFileURL)(_path().join(dirname, "./babel-virtual-resolve-base.js")).href;
|
|
170
|
+
const it = resolveAlternativesHelper(type, name);
|
|
171
|
+
let res = it.next();
|
|
172
|
+
while (!res.done) {
|
|
173
|
+
res = it.next(tryImportMetaResolve(res.value, parentUrl));
|
|
174
|
+
}
|
|
175
|
+
return {
|
|
176
|
+
loader: "auto",
|
|
177
|
+
filepath: (0, _url().fileURLToPath)(res.value)
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
function resolveStandardizedName(type, name, dirname, allowAsync) {
|
|
181
|
+
if (!_moduleTypes.supportsESM || !allowAsync) {
|
|
182
|
+
return resolveStandardizedNameForRequire(type, name, dirname);
|
|
183
|
+
}
|
|
184
|
+
try {
|
|
185
|
+
const resolved = resolveStandardizedNameForImport(type, name, dirname);
|
|
186
|
+
if (!(0, _fs().existsSync)(resolved.filepath)) {
|
|
187
|
+
throw Object.assign(new Error(`Could not resolve "${name}" in file ${dirname}.`), {
|
|
188
|
+
type: "MODULE_NOT_FOUND"
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
return resolved;
|
|
192
|
+
} catch (e) {
|
|
193
|
+
try {
|
|
194
|
+
return resolveStandardizedNameForRequire(type, name, dirname);
|
|
195
|
+
} catch (e2) {
|
|
196
|
+
if (e.type === "MODULE_NOT_FOUND") throw e;
|
|
197
|
+
if (e2.type === "MODULE_NOT_FOUND") throw e2;
|
|
198
|
+
throw e;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
{
|
|
203
|
+
var LOADING_MODULES = new Set();
|
|
204
|
+
}
|
|
205
|
+
function* requireModule(type, loader, name) {
|
|
206
|
+
{
|
|
207
|
+
if (!(yield* (0, _async.isAsync)()) && LOADING_MODULES.has(name)) {
|
|
208
|
+
throw new Error(`Reentrant ${type} detected trying to load "${name}". This module is not ignored ` + "and is trying to load itself while compiling itself, leading to a dependency cycle. " + 'We recommend adding it to your "ignore" list in your babelrc, or to a .babelignore.');
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
try {
|
|
212
|
+
{
|
|
213
|
+
LOADING_MODULES.add(name);
|
|
214
|
+
}
|
|
215
|
+
{
|
|
216
|
+
return yield* (0, _moduleTypes.default)(name, loader, `You appear to be using a native ECMAScript module ${type}, ` + "which is only supported when running Babel asynchronously " + "or when using the Node.js `--experimental-require-module` flag.", `You appear to be using a ${type} that contains top-level await, ` + "which is only supported when running Babel asynchronously.", true);
|
|
217
|
+
}
|
|
218
|
+
} catch (err) {
|
|
219
|
+
err.message = `[BABEL]: ${err.message} (While processing: ${name})`;
|
|
220
|
+
throw err;
|
|
221
|
+
} finally {
|
|
222
|
+
{
|
|
223
|
+
LOADING_MODULES.delete(name);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
0 && 0;
|
|
228
|
+
|
|
229
|
+
//# sourceMappingURL=plugins.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.makeStaticFileCache = makeStaticFileCache;
|
|
7
|
+
var _caching = require("../caching.js");
|
|
8
|
+
var fs = require("../../gensync-utils/fs.js");
|
|
9
|
+
function _fs2() {
|
|
10
|
+
const data = require("fs");
|
|
11
|
+
_fs2 = function () {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
return data;
|
|
15
|
+
}
|
|
16
|
+
function makeStaticFileCache(fn) {
|
|
17
|
+
return (0, _caching.makeStrongCache)(function* (filepath, cache) {
|
|
18
|
+
const cached = cache.invalidate(() => fileMtime(filepath));
|
|
19
|
+
if (cached === null) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return fn(filepath, yield* fs.readFile(filepath, "utf8"));
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function fileMtime(filepath) {
|
|
26
|
+
if (!_fs2().existsSync(filepath)) return null;
|
|
27
|
+
try {
|
|
28
|
+
return +_fs2().statSync(filepath).mtime;
|
|
29
|
+
} catch (e) {
|
|
30
|
+
if (e.code !== "ENOENT" && e.code !== "ENOTDIR") throw e;
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
0 && 0;
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
function _gensync() {
|
|
8
|
+
const data = require("gensync");
|
|
9
|
+
_gensync = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
var _async = require("../gensync-utils/async.js");
|
|
15
|
+
var _util = require("./util.js");
|
|
16
|
+
var context = require("../index.js");
|
|
17
|
+
var _plugin = require("./plugin.js");
|
|
18
|
+
var _item = require("./item.js");
|
|
19
|
+
var _configChain = require("./config-chain.js");
|
|
20
|
+
var _deepArray = require("./helpers/deep-array.js");
|
|
21
|
+
function _traverse() {
|
|
22
|
+
const data = require("@babel/traverse");
|
|
23
|
+
_traverse = function () {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
28
|
+
var _caching = require("./caching.js");
|
|
29
|
+
var _options = require("./validation/options.js");
|
|
30
|
+
var _plugins = require("./validation/plugins.js");
|
|
31
|
+
var _configApi = require("./helpers/config-api.js");
|
|
32
|
+
var _partial = require("./partial.js");
|
|
33
|
+
var _configError = require("../errors/config-error.js");
|
|
34
|
+
var _default = exports.default = _gensync()(function* loadFullConfig(inputOpts) {
|
|
35
|
+
var _opts$assumptions;
|
|
36
|
+
const result = yield* (0, _partial.default)(inputOpts);
|
|
37
|
+
if (!result) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
const {
|
|
41
|
+
options,
|
|
42
|
+
context,
|
|
43
|
+
fileHandling
|
|
44
|
+
} = result;
|
|
45
|
+
if (fileHandling === "ignored") {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
const optionDefaults = {};
|
|
49
|
+
const {
|
|
50
|
+
plugins,
|
|
51
|
+
presets
|
|
52
|
+
} = options;
|
|
53
|
+
if (!plugins || !presets) {
|
|
54
|
+
throw new Error("Assertion failure - plugins and presets exist");
|
|
55
|
+
}
|
|
56
|
+
const presetContext = Object.assign({}, context, {
|
|
57
|
+
targets: options.targets
|
|
58
|
+
});
|
|
59
|
+
const toDescriptor = item => {
|
|
60
|
+
const desc = (0, _item.getItemDescriptor)(item);
|
|
61
|
+
if (!desc) {
|
|
62
|
+
throw new Error("Assertion failure - must be config item");
|
|
63
|
+
}
|
|
64
|
+
return desc;
|
|
65
|
+
};
|
|
66
|
+
const presetsDescriptors = presets.map(toDescriptor);
|
|
67
|
+
const initialPluginsDescriptors = plugins.map(toDescriptor);
|
|
68
|
+
const pluginDescriptorsByPass = [[]];
|
|
69
|
+
const passes = [];
|
|
70
|
+
const externalDependencies = [];
|
|
71
|
+
const ignored = yield* enhanceError(context, function* recursePresetDescriptors(rawPresets, pluginDescriptorsPass) {
|
|
72
|
+
const presets = [];
|
|
73
|
+
for (let i = 0; i < rawPresets.length; i++) {
|
|
74
|
+
const descriptor = rawPresets[i];
|
|
75
|
+
if (descriptor.options !== false) {
|
|
76
|
+
try {
|
|
77
|
+
var preset = yield* loadPresetDescriptor(descriptor, presetContext);
|
|
78
|
+
} catch (e) {
|
|
79
|
+
if (e.code === "BABEL_UNKNOWN_OPTION") {
|
|
80
|
+
(0, _options.checkNoUnwrappedItemOptionPairs)(rawPresets, i, "preset", e);
|
|
81
|
+
}
|
|
82
|
+
throw e;
|
|
83
|
+
}
|
|
84
|
+
externalDependencies.push(preset.externalDependencies);
|
|
85
|
+
if (descriptor.ownPass) {
|
|
86
|
+
presets.push({
|
|
87
|
+
preset: preset.chain,
|
|
88
|
+
pass: []
|
|
89
|
+
});
|
|
90
|
+
} else {
|
|
91
|
+
presets.unshift({
|
|
92
|
+
preset: preset.chain,
|
|
93
|
+
pass: pluginDescriptorsPass
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (presets.length > 0) {
|
|
99
|
+
pluginDescriptorsByPass.splice(1, 0, ...presets.map(o => o.pass).filter(p => p !== pluginDescriptorsPass));
|
|
100
|
+
for (const {
|
|
101
|
+
preset,
|
|
102
|
+
pass
|
|
103
|
+
} of presets) {
|
|
104
|
+
if (!preset) return true;
|
|
105
|
+
pass.push(...preset.plugins);
|
|
106
|
+
const ignored = yield* recursePresetDescriptors(preset.presets, pass);
|
|
107
|
+
if (ignored) return true;
|
|
108
|
+
preset.options.forEach(opts => {
|
|
109
|
+
(0, _util.mergeOptions)(optionDefaults, opts);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
})(presetsDescriptors, pluginDescriptorsByPass[0]);
|
|
114
|
+
if (ignored) return null;
|
|
115
|
+
const opts = optionDefaults;
|
|
116
|
+
(0, _util.mergeOptions)(opts, options);
|
|
117
|
+
const pluginContext = Object.assign({}, presetContext, {
|
|
118
|
+
assumptions: (_opts$assumptions = opts.assumptions) != null ? _opts$assumptions : {}
|
|
119
|
+
});
|
|
120
|
+
yield* enhanceError(context, function* loadPluginDescriptors() {
|
|
121
|
+
pluginDescriptorsByPass[0].unshift(...initialPluginsDescriptors);
|
|
122
|
+
for (const descs of pluginDescriptorsByPass) {
|
|
123
|
+
const pass = [];
|
|
124
|
+
passes.push(pass);
|
|
125
|
+
for (let i = 0; i < descs.length; i++) {
|
|
126
|
+
const descriptor = descs[i];
|
|
127
|
+
if (descriptor.options !== false) {
|
|
128
|
+
try {
|
|
129
|
+
var plugin = yield* loadPluginDescriptor(descriptor, pluginContext);
|
|
130
|
+
} catch (e) {
|
|
131
|
+
if (e.code === "BABEL_UNKNOWN_PLUGIN_PROPERTY") {
|
|
132
|
+
(0, _options.checkNoUnwrappedItemOptionPairs)(descs, i, "plugin", e);
|
|
133
|
+
}
|
|
134
|
+
throw e;
|
|
135
|
+
}
|
|
136
|
+
pass.push(plugin);
|
|
137
|
+
externalDependencies.push(plugin.externalDependencies);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
})();
|
|
142
|
+
opts.plugins = passes[0];
|
|
143
|
+
opts.presets = passes.slice(1).filter(plugins => plugins.length > 0).map(plugins => ({
|
|
144
|
+
plugins
|
|
145
|
+
}));
|
|
146
|
+
opts.passPerPreset = opts.presets.length > 0;
|
|
147
|
+
return {
|
|
148
|
+
options: opts,
|
|
149
|
+
passes: passes,
|
|
150
|
+
externalDependencies: (0, _deepArray.finalize)(externalDependencies)
|
|
151
|
+
};
|
|
152
|
+
});
|
|
153
|
+
function enhanceError(context, fn) {
|
|
154
|
+
return function* (arg1, arg2) {
|
|
155
|
+
try {
|
|
156
|
+
return yield* fn(arg1, arg2);
|
|
157
|
+
} catch (e) {
|
|
158
|
+
if (!/^\[BABEL\]/.test(e.message)) {
|
|
159
|
+
var _context$filename;
|
|
160
|
+
e.message = `[BABEL] ${(_context$filename = context.filename) != null ? _context$filename : "unknown file"}: ${e.message}`;
|
|
161
|
+
}
|
|
162
|
+
throw e;
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
const makeDescriptorLoader = apiFactory => (0, _caching.makeWeakCache)(function* ({
|
|
167
|
+
value,
|
|
168
|
+
options,
|
|
169
|
+
dirname,
|
|
170
|
+
alias
|
|
171
|
+
}, cache) {
|
|
172
|
+
if (options === false) throw new Error("Assertion failure");
|
|
173
|
+
options = options || {};
|
|
174
|
+
const externalDependencies = [];
|
|
175
|
+
let item = value;
|
|
176
|
+
if (typeof value === "function") {
|
|
177
|
+
const factory = (0, _async.maybeAsync)(value, `You appear to be using an async plugin/preset, but Babel has been called synchronously`);
|
|
178
|
+
const api = Object.assign({}, context, apiFactory(cache, externalDependencies));
|
|
179
|
+
try {
|
|
180
|
+
item = yield* factory(api, options, dirname);
|
|
181
|
+
} catch (e) {
|
|
182
|
+
if (alias) {
|
|
183
|
+
e.message += ` (While processing: ${JSON.stringify(alias)})`;
|
|
184
|
+
}
|
|
185
|
+
throw e;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if (!item || typeof item !== "object") {
|
|
189
|
+
throw new Error("Plugin/Preset did not return an object.");
|
|
190
|
+
}
|
|
191
|
+
if ((0, _async.isThenable)(item)) {
|
|
192
|
+
yield* [];
|
|
193
|
+
throw new Error(`You appear to be using a promise as a plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, ` + `you may need to upgrade your @babel/core version. ` + `As an alternative, you can prefix the promise with "await". ` + `(While processing: ${JSON.stringify(alias)})`);
|
|
194
|
+
}
|
|
195
|
+
if (externalDependencies.length > 0 && (!cache.configured() || cache.mode() === "forever")) {
|
|
196
|
+
let error = `A plugin/preset has external untracked dependencies ` + `(${externalDependencies[0]}), but the cache `;
|
|
197
|
+
if (!cache.configured()) {
|
|
198
|
+
error += `has not been configured to be invalidated when the external dependencies change. `;
|
|
199
|
+
} else {
|
|
200
|
+
error += ` has been configured to never be invalidated. `;
|
|
201
|
+
}
|
|
202
|
+
error += `Plugins/presets should configure their cache to be invalidated when the external ` + `dependencies change, for example using \`api.cache.invalidate(() => ` + `statSync(filepath).mtimeMs)\` or \`api.cache.never()\`\n` + `(While processing: ${JSON.stringify(alias)})`;
|
|
203
|
+
throw new Error(error);
|
|
204
|
+
}
|
|
205
|
+
return {
|
|
206
|
+
value: item,
|
|
207
|
+
options,
|
|
208
|
+
dirname,
|
|
209
|
+
alias,
|
|
210
|
+
externalDependencies: (0, _deepArray.finalize)(externalDependencies)
|
|
211
|
+
};
|
|
212
|
+
});
|
|
213
|
+
const pluginDescriptorLoader = makeDescriptorLoader(_configApi.makePluginAPI);
|
|
214
|
+
const presetDescriptorLoader = makeDescriptorLoader(_configApi.makePresetAPI);
|
|
215
|
+
const instantiatePlugin = (0, _caching.makeWeakCache)(function* ({
|
|
216
|
+
value,
|
|
217
|
+
options,
|
|
218
|
+
dirname,
|
|
219
|
+
alias,
|
|
220
|
+
externalDependencies
|
|
221
|
+
}, cache) {
|
|
222
|
+
const pluginObj = (0, _plugins.validatePluginObject)(value);
|
|
223
|
+
const plugin = Object.assign({}, pluginObj);
|
|
224
|
+
if (plugin.visitor) {
|
|
225
|
+
plugin.visitor = _traverse().default.explode(Object.assign({}, plugin.visitor));
|
|
226
|
+
}
|
|
227
|
+
if (plugin.inherits) {
|
|
228
|
+
const inheritsDescriptor = {
|
|
229
|
+
name: undefined,
|
|
230
|
+
alias: `${alias}$inherits`,
|
|
231
|
+
value: plugin.inherits,
|
|
232
|
+
options,
|
|
233
|
+
dirname
|
|
234
|
+
};
|
|
235
|
+
const inherits = yield* (0, _async.forwardAsync)(loadPluginDescriptor, run => {
|
|
236
|
+
return cache.invalidate(data => run(inheritsDescriptor, data));
|
|
237
|
+
});
|
|
238
|
+
plugin.pre = chainMaybeAsync(inherits.pre, plugin.pre);
|
|
239
|
+
plugin.post = chainMaybeAsync(inherits.post, plugin.post);
|
|
240
|
+
plugin.manipulateOptions = chainMaybeAsync(inherits.manipulateOptions, plugin.manipulateOptions);
|
|
241
|
+
plugin.visitor = _traverse().default.visitors.merge([inherits.visitor || {}, plugin.visitor || {}]);
|
|
242
|
+
if (inherits.externalDependencies.length > 0) {
|
|
243
|
+
if (externalDependencies.length === 0) {
|
|
244
|
+
externalDependencies = inherits.externalDependencies;
|
|
245
|
+
} else {
|
|
246
|
+
externalDependencies = (0, _deepArray.finalize)([externalDependencies, inherits.externalDependencies]);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return new _plugin.default(plugin, options, alias, externalDependencies);
|
|
251
|
+
});
|
|
252
|
+
function* loadPluginDescriptor(descriptor, context) {
|
|
253
|
+
if (descriptor.value instanceof _plugin.default) {
|
|
254
|
+
if (descriptor.options) {
|
|
255
|
+
throw new Error("Passed options to an existing Plugin instance will not work.");
|
|
256
|
+
}
|
|
257
|
+
return descriptor.value;
|
|
258
|
+
}
|
|
259
|
+
return yield* instantiatePlugin(yield* pluginDescriptorLoader(descriptor, context), context);
|
|
260
|
+
}
|
|
261
|
+
const needsFilename = val => val && typeof val !== "function";
|
|
262
|
+
const validateIfOptionNeedsFilename = (options, descriptor) => {
|
|
263
|
+
if (needsFilename(options.test) || needsFilename(options.include) || needsFilename(options.exclude)) {
|
|
264
|
+
const formattedPresetName = descriptor.name ? `"${descriptor.name}"` : "/* your preset */";
|
|
265
|
+
throw new _configError.default([`Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`, `\`\`\``, `babel.transformSync(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`, `\`\`\``, `See https://babeljs.io/docs/en/options#filename for more information.`].join("\n"));
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
const validatePreset = (preset, context, descriptor) => {
|
|
269
|
+
if (!context.filename) {
|
|
270
|
+
var _options$overrides;
|
|
271
|
+
const {
|
|
272
|
+
options
|
|
273
|
+
} = preset;
|
|
274
|
+
validateIfOptionNeedsFilename(options, descriptor);
|
|
275
|
+
(_options$overrides = options.overrides) == null || _options$overrides.forEach(overrideOptions => validateIfOptionNeedsFilename(overrideOptions, descriptor));
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
const instantiatePreset = (0, _caching.makeWeakCacheSync)(({
|
|
279
|
+
value,
|
|
280
|
+
dirname,
|
|
281
|
+
alias,
|
|
282
|
+
externalDependencies
|
|
283
|
+
}) => {
|
|
284
|
+
return {
|
|
285
|
+
options: (0, _options.validate)("preset", value),
|
|
286
|
+
alias,
|
|
287
|
+
dirname,
|
|
288
|
+
externalDependencies
|
|
289
|
+
};
|
|
290
|
+
});
|
|
291
|
+
function* loadPresetDescriptor(descriptor, context) {
|
|
292
|
+
const preset = instantiatePreset(yield* presetDescriptorLoader(descriptor, context));
|
|
293
|
+
validatePreset(preset, context, descriptor);
|
|
294
|
+
return {
|
|
295
|
+
chain: yield* (0, _configChain.buildPresetChain)(preset, context),
|
|
296
|
+
externalDependencies: preset.externalDependencies
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
function chainMaybeAsync(a, b) {
|
|
300
|
+
if (!a) return b;
|
|
301
|
+
if (!b) return a;
|
|
302
|
+
return function (...args) {
|
|
303
|
+
const res = a.apply(this, args);
|
|
304
|
+
if (res && typeof res.then === "function") {
|
|
305
|
+
return res.then(() => b.apply(this, args));
|
|
306
|
+
}
|
|
307
|
+
return b.apply(this, args);
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
0 && 0;
|
|
311
|
+
|
|
312
|
+
//# sourceMappingURL=full.js.map
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.makeConfigAPI = makeConfigAPI;
|
|
7
|
+
exports.makePluginAPI = makePluginAPI;
|
|
8
|
+
exports.makePresetAPI = makePresetAPI;
|
|
9
|
+
function _semver() {
|
|
10
|
+
const data = require("semver");
|
|
11
|
+
_semver = function () {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
return data;
|
|
15
|
+
}
|
|
16
|
+
var _index = require("../../index.js");
|
|
17
|
+
var _caching = require("../caching.js");
|
|
18
|
+
function makeConfigAPI(cache) {
|
|
19
|
+
const env = value => cache.using(data => {
|
|
20
|
+
if (value === undefined) return data.envName;
|
|
21
|
+
if (typeof value === "function") {
|
|
22
|
+
return (0, _caching.assertSimpleType)(value(data.envName));
|
|
23
|
+
}
|
|
24
|
+
return (Array.isArray(value) ? value : [value]).some(entry => {
|
|
25
|
+
if (typeof entry !== "string") {
|
|
26
|
+
throw new Error("Unexpected non-string value");
|
|
27
|
+
}
|
|
28
|
+
return entry === data.envName;
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
const caller = cb => cache.using(data => (0, _caching.assertSimpleType)(cb(data.caller)));
|
|
32
|
+
return {
|
|
33
|
+
version: _index.version,
|
|
34
|
+
cache: cache.simple(),
|
|
35
|
+
env,
|
|
36
|
+
async: () => false,
|
|
37
|
+
caller,
|
|
38
|
+
assertVersion
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function makePresetAPI(cache, externalDependencies) {
|
|
42
|
+
const targets = () => JSON.parse(cache.using(data => JSON.stringify(data.targets)));
|
|
43
|
+
const addExternalDependency = ref => {
|
|
44
|
+
externalDependencies.push(ref);
|
|
45
|
+
};
|
|
46
|
+
return Object.assign({}, makeConfigAPI(cache), {
|
|
47
|
+
targets,
|
|
48
|
+
addExternalDependency
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function makePluginAPI(cache, externalDependencies) {
|
|
52
|
+
const assumption = name => cache.using(data => data.assumptions[name]);
|
|
53
|
+
return Object.assign({}, makePresetAPI(cache, externalDependencies), {
|
|
54
|
+
assumption
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function assertVersion(range) {
|
|
58
|
+
if (typeof range === "number") {
|
|
59
|
+
if (!Number.isInteger(range)) {
|
|
60
|
+
throw new Error("Expected string or integer value.");
|
|
61
|
+
}
|
|
62
|
+
range = `^${range}.0.0-0`;
|
|
63
|
+
}
|
|
64
|
+
if (typeof range !== "string") {
|
|
65
|
+
throw new Error("Expected string or integer value.");
|
|
66
|
+
}
|
|
67
|
+
if (range === "*" || _semver().satisfies(_index.version, range)) return;
|
|
68
|
+
const limit = Error.stackTraceLimit;
|
|
69
|
+
if (typeof limit === "number" && limit < 25) {
|
|
70
|
+
Error.stackTraceLimit = 25;
|
|
71
|
+
}
|
|
72
|
+
const err = new Error(`Requires Babel "${range}", but was loaded with "${_index.version}". ` + `If you are sure you have a compatible version of @babel/core, ` + `it is likely that something in your build process is loading the ` + `wrong version. Inspect the stack trace of this error to look for ` + `the first entry that doesn't mention "@babel/core" or "babel-core" ` + `to see what is calling Babel.`);
|
|
73
|
+
if (typeof limit === "number") {
|
|
74
|
+
Error.stackTraceLimit = limit;
|
|
75
|
+
}
|
|
76
|
+
throw Object.assign(err, {
|
|
77
|
+
code: "BABEL_VERSION_UNSUPPORTED",
|
|
78
|
+
version: _index.version,
|
|
79
|
+
range
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
0 && 0;
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=config-api.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.finalize = finalize;
|
|
7
|
+
exports.flattenToSet = flattenToSet;
|
|
8
|
+
function finalize(deepArr) {
|
|
9
|
+
return Object.freeze(deepArr);
|
|
10
|
+
}
|
|
11
|
+
function flattenToSet(arr) {
|
|
12
|
+
const result = new Set();
|
|
13
|
+
const stack = [arr];
|
|
14
|
+
while (stack.length > 0) {
|
|
15
|
+
for (const el of stack.pop()) {
|
|
16
|
+
if (Array.isArray(el)) stack.push(el);else result.add(el);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return result;
|
|
20
|
+
}
|
|
21
|
+
0 && 0;
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=deep-array.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getEnv = getEnv;
|
|
7
|
+
function getEnv(defaultValue = "development") {
|
|
8
|
+
return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;
|
|
9
|
+
}
|
|
10
|
+
0 && 0;
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=environment.js.map
|