@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,17 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
+
esac
|
|
7
|
+
|
|
8
|
+
if [ -z "$NODE_PATH" ]; then
|
|
9
|
+
export NODE_PATH="/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/json5@2.2.3/node_modules/json5/lib/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/json5@2.2.3/node_modules/json5/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/json5@2.2.3/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/json5@2.2.3/node_modules/json5/lib/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/json5@2.2.3/node_modules/json5/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/json5@2.2.3/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../../json5@2.2.3/node_modules/json5/lib/cli.js" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../../json5@2.2.3/node_modules/json5/lib/cli.js" "$@"
|
|
17
|
+
fi
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
+
esac
|
|
7
|
+
|
|
8
|
+
if [ -z "$NODE_PATH" ]; then
|
|
9
|
+
export NODE_PATH="/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/@babel+parser@7.26.2/node_modules/@babel/parser/bin/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/@babel+parser@7.26.2/node_modules/@babel/parser/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/@babel+parser@7.26.2/node_modules/@babel/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/@babel+parser@7.26.2/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/@babel+parser@7.26.2/node_modules/@babel/parser/bin/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/@babel+parser@7.26.2/node_modules/@babel/parser/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/@babel+parser@7.26.2/node_modules/@babel/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/@babel+parser@7.26.2/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../../@babel+parser@7.26.2/node_modules/@babel/parser/bin/babel-parser.js" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../../@babel+parser@7.26.2/node_modules/@babel/parser/bin/babel-parser.js" "$@"
|
|
17
|
+
fi
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
+
esac
|
|
7
|
+
|
|
8
|
+
if [ -z "$NODE_PATH" ]; then
|
|
9
|
+
export NODE_PATH="/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/semver@6.3.1/node_modules/semver/bin/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/semver@6.3.1/node_modules/semver/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/semver@6.3.1/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/semver@6.3.1/node_modules/semver/bin/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/semver@6.3.1/node_modules/semver/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/semver@6.3.1/node_modules:/Users/seal/Documents/projects/tachybase/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../../semver@6.3.1/node_modules/semver/bin/semver.js" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../../semver@6.3.1/node_modules/semver/bin/semver.js" "$@"
|
|
17
|
+
fi
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"@babel/core","version":"7.26.0","description":"Babel compiler core.","main":"./lib/index.js","author":"The Babel Team (https://babel.dev/team)","license":"MIT","publishConfig":{"access":"public"},"repository":{"type":"git","url":"https://github.com/babel/babel.git","directory":"packages/babel-core"},"homepage":"https://babel.dev/docs/en/next/babel-core","bugs":"https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen","keywords":["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var","babel-core","compiler"],"engines":{"node":">=6.9.0"},"funding":{"type":"opencollective","url":"https://opencollective.com/babel"},"browser":{"./lib/config/files/index.js":"./lib/config/files/index-browser.js","./lib/config/resolve-targets.js":"./lib/config/resolve-targets-browser.js","./lib/transform-file.js":"./lib/transform-file-browser.js","./src/config/files/index.ts":"./src/config/files/index-browser.ts","./src/config/resolve-targets.ts":"./src/config/resolve-targets-browser.ts","./src/transform-file.ts":"./src/transform-file-browser.ts"},"dependencies":{"@ampproject/remapping":"^2.2.0","@babel/code-frame":"^7.26.0","@babel/generator":"^7.26.0","@babel/helper-compilation-targets":"^7.25.9","@babel/helper-module-transforms":"^7.26.0","@babel/helpers":"^7.26.0","@babel/parser":"^7.26.0","@babel/template":"^7.25.9","@babel/traverse":"^7.25.9","@babel/types":"^7.26.0","convert-source-map":"^2.0.0","debug":"^4.1.0","gensync":"^1.0.0-beta.2","json5":"^2.2.3","semver":"^6.3.1"},"devDependencies":{"@babel/helper-transform-fixture-test-runner":"^7.26.0","@babel/plugin-syntax-flow":"^7.26.0","@babel/plugin-transform-flow-strip-types":"^7.25.9","@babel/plugin-transform-modules-commonjs":"^7.25.9","@babel/preset-env":"^7.26.0","@babel/preset-typescript":"^7.26.0","@jridgewell/trace-mapping":"^0.3.25","@types/convert-source-map":"^2.0.0","@types/debug":"^4.1.0","@types/gensync":"^1.0.0","@types/resolve":"^1.3.2","@types/semver":"^5.4.0","rimraf":"^3.0.0","ts-node":"^11.0.0-beta.1"},"type":"commonjs","_lastModified":"2024-12-22T16:07:28.742Z"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { Handler } from "gensync";
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
ConfigFile,
|
|
5
|
+
IgnoreFile,
|
|
6
|
+
RelativeConfig,
|
|
7
|
+
FilePackageData,
|
|
8
|
+
} from "./types.ts";
|
|
9
|
+
|
|
10
|
+
import type { CallerMetadata } from "../validation/options.ts";
|
|
11
|
+
|
|
12
|
+
export type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData };
|
|
13
|
+
|
|
14
|
+
export function findConfigUpwards(
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16
|
+
rootDir: string,
|
|
17
|
+
): string | null {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// eslint-disable-next-line require-yield
|
|
22
|
+
export function* findPackageData(filepath: string): Handler<FilePackageData> {
|
|
23
|
+
return {
|
|
24
|
+
filepath,
|
|
25
|
+
directories: [],
|
|
26
|
+
pkg: null,
|
|
27
|
+
isPackage: false,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// eslint-disable-next-line require-yield
|
|
32
|
+
export function* findRelativeConfig(
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
34
|
+
pkgData: FilePackageData,
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
36
|
+
envName: string,
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
38
|
+
caller: CallerMetadata | undefined,
|
|
39
|
+
): Handler<RelativeConfig> {
|
|
40
|
+
return { config: null, ignore: null };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// eslint-disable-next-line require-yield
|
|
44
|
+
export function* findRootConfig(
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
46
|
+
dirname: string,
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
48
|
+
envName: string,
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
50
|
+
caller: CallerMetadata | undefined,
|
|
51
|
+
): Handler<ConfigFile | null> {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// eslint-disable-next-line require-yield
|
|
56
|
+
export function* loadConfig(
|
|
57
|
+
name: string,
|
|
58
|
+
dirname: string,
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
60
|
+
envName: string,
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
62
|
+
caller: CallerMetadata | undefined,
|
|
63
|
+
): Handler<ConfigFile> {
|
|
64
|
+
throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// eslint-disable-next-line require-yield
|
|
68
|
+
export function* resolveShowConfigPath(
|
|
69
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
70
|
+
dirname: string,
|
|
71
|
+
): Handler<string | null> {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export const ROOT_CONFIG_FILENAMES: string[] = [];
|
|
76
|
+
|
|
77
|
+
type Resolved =
|
|
78
|
+
| { loader: "require"; filepath: string }
|
|
79
|
+
| { loader: "import"; filepath: string };
|
|
80
|
+
|
|
81
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
82
|
+
export function resolvePlugin(name: string, dirname: string): Resolved | null {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
87
|
+
export function resolvePreset(name: string, dirname: string): Resolved | null {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function loadPlugin(
|
|
92
|
+
name: string,
|
|
93
|
+
dirname: string,
|
|
94
|
+
): Handler<{
|
|
95
|
+
filepath: string;
|
|
96
|
+
value: unknown;
|
|
97
|
+
}> {
|
|
98
|
+
throw new Error(
|
|
99
|
+
`Cannot load plugin ${name} relative to ${dirname} in a browser`,
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function loadPreset(
|
|
104
|
+
name: string,
|
|
105
|
+
dirname: string,
|
|
106
|
+
): Handler<{
|
|
107
|
+
filepath: string;
|
|
108
|
+
value: unknown;
|
|
109
|
+
}> {
|
|
110
|
+
throw new Error(
|
|
111
|
+
`Cannot load preset ${name} relative to ${dirname} in a browser`,
|
|
112
|
+
);
|
|
113
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type indexBrowserType = typeof import("./index-browser");
|
|
2
|
+
type indexType = typeof import("./index");
|
|
3
|
+
|
|
4
|
+
// Kind of gross, but essentially asserting that the exports of this module are the same as the
|
|
5
|
+
// exports of index-browser, since this file may be replaced at bundle time with index-browser.
|
|
6
|
+
({}) as any as indexBrowserType as indexType;
|
|
7
|
+
|
|
8
|
+
export { findPackageData } from "./package.ts";
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
findConfigUpwards,
|
|
12
|
+
findRelativeConfig,
|
|
13
|
+
findRootConfig,
|
|
14
|
+
loadConfig,
|
|
15
|
+
resolveShowConfigPath,
|
|
16
|
+
ROOT_CONFIG_FILENAMES,
|
|
17
|
+
} from "./configuration.ts";
|
|
18
|
+
export type {
|
|
19
|
+
ConfigFile,
|
|
20
|
+
IgnoreFile,
|
|
21
|
+
RelativeConfig,
|
|
22
|
+
FilePackageData,
|
|
23
|
+
} from "./types.ts";
|
|
24
|
+
export {
|
|
25
|
+
loadPlugin,
|
|
26
|
+
loadPreset,
|
|
27
|
+
resolvePlugin,
|
|
28
|
+
resolvePreset,
|
|
29
|
+
} from "./plugins.ts";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ValidatedOptions } from "./validation/options.ts";
|
|
2
|
+
import getTargets, {
|
|
3
|
+
type InputTargets,
|
|
4
|
+
} from "@babel/helper-compilation-targets";
|
|
5
|
+
|
|
6
|
+
import type { Targets } from "@babel/helper-compilation-targets";
|
|
7
|
+
|
|
8
|
+
export function resolveBrowserslistConfigFile(
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10
|
+
browserslistConfigFile: string,
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
12
|
+
configFilePath: string,
|
|
13
|
+
): string | void {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function resolveTargets(
|
|
18
|
+
options: ValidatedOptions,
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20
|
+
root: string,
|
|
21
|
+
): Targets {
|
|
22
|
+
const optTargets = options.targets;
|
|
23
|
+
let targets: InputTargets;
|
|
24
|
+
|
|
25
|
+
if (typeof optTargets === "string" || Array.isArray(optTargets)) {
|
|
26
|
+
targets = { browsers: optTargets };
|
|
27
|
+
} else if (optTargets) {
|
|
28
|
+
if ("esmodules" in optTargets) {
|
|
29
|
+
targets = { ...optTargets, esmodules: "intersect" };
|
|
30
|
+
} else {
|
|
31
|
+
// https://github.com/microsoft/TypeScript/issues/17002
|
|
32
|
+
targets = optTargets as InputTargets;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return getTargets(targets, {
|
|
37
|
+
ignoreBrowserslistConfig: true,
|
|
38
|
+
browserslistEnv: options.browserslistEnv,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
type browserType = typeof import("./resolve-targets-browser");
|
|
2
|
+
type nodeType = typeof import("./resolve-targets");
|
|
3
|
+
|
|
4
|
+
// Kind of gross, but essentially asserting that the exports of this module are the same as the
|
|
5
|
+
// exports of index-browser, since this file may be replaced at bundle time with index-browser.
|
|
6
|
+
({}) as any as browserType as nodeType;
|
|
7
|
+
|
|
8
|
+
import type { ValidatedOptions } from "./validation/options.ts";
|
|
9
|
+
import path from "path";
|
|
10
|
+
import getTargets, {
|
|
11
|
+
type InputTargets,
|
|
12
|
+
} from "@babel/helper-compilation-targets";
|
|
13
|
+
|
|
14
|
+
import type { Targets } from "@babel/helper-compilation-targets";
|
|
15
|
+
|
|
16
|
+
export function resolveBrowserslistConfigFile(
|
|
17
|
+
browserslistConfigFile: string,
|
|
18
|
+
configFileDir: string,
|
|
19
|
+
): string | undefined {
|
|
20
|
+
return path.resolve(configFileDir, browserslistConfigFile);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function resolveTargets(
|
|
24
|
+
options: ValidatedOptions,
|
|
25
|
+
root: string,
|
|
26
|
+
): Targets {
|
|
27
|
+
const optTargets = options.targets;
|
|
28
|
+
let targets: InputTargets;
|
|
29
|
+
|
|
30
|
+
if (typeof optTargets === "string" || Array.isArray(optTargets)) {
|
|
31
|
+
targets = { browsers: optTargets };
|
|
32
|
+
} else if (optTargets) {
|
|
33
|
+
if ("esmodules" in optTargets) {
|
|
34
|
+
targets = { ...optTargets, esmodules: "intersect" };
|
|
35
|
+
} else {
|
|
36
|
+
// https://github.com/microsoft/TypeScript/issues/17002
|
|
37
|
+
targets = optTargets as InputTargets;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const { browserslistConfigFile } = options;
|
|
42
|
+
let configFile;
|
|
43
|
+
let ignoreBrowserslistConfig = false;
|
|
44
|
+
if (typeof browserslistConfigFile === "string") {
|
|
45
|
+
configFile = browserslistConfigFile;
|
|
46
|
+
} else {
|
|
47
|
+
ignoreBrowserslistConfig = browserslistConfigFile === false;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return getTargets(targets, {
|
|
51
|
+
ignoreBrowserslistConfig,
|
|
52
|
+
configFile,
|
|
53
|
+
configPath: root,
|
|
54
|
+
browserslistEnv: options.browserslistEnv,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// duplicated from transform-file so we do not have to import anything here
|
|
2
|
+
type TransformFile = {
|
|
3
|
+
(filename: string, callback: (error: Error, file: null) => void): void;
|
|
4
|
+
(
|
|
5
|
+
filename: string,
|
|
6
|
+
opts: any,
|
|
7
|
+
callback: (error: Error, file: null) => void,
|
|
8
|
+
): void;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const transformFile: TransformFile = function transformFile(
|
|
12
|
+
filename,
|
|
13
|
+
opts,
|
|
14
|
+
callback?: (error: Error, file: null) => void,
|
|
15
|
+
) {
|
|
16
|
+
if (typeof opts === "function") {
|
|
17
|
+
callback = opts;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
callback(new Error("Transforming files is not supported in browsers"), null);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export function transformFileSync(): never {
|
|
24
|
+
throw new Error("Transforming files is not supported in browsers");
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function transformFileAsync() {
|
|
28
|
+
return Promise.reject(
|
|
29
|
+
new Error("Transforming files is not supported in browsers"),
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import gensync, { type Handler } from "gensync";
|
|
2
|
+
|
|
3
|
+
import loadConfig from "./config/index.ts";
|
|
4
|
+
import type { InputOptions, ResolvedConfig } from "./config/index.ts";
|
|
5
|
+
import { run } from "./transformation/index.ts";
|
|
6
|
+
import type { FileResult, FileResultCallback } from "./transformation/index.ts";
|
|
7
|
+
import * as fs from "./gensync-utils/fs.ts";
|
|
8
|
+
|
|
9
|
+
type transformFileBrowserType = typeof import("./transform-file-browser");
|
|
10
|
+
type transformFileType = typeof import("./transform-file");
|
|
11
|
+
|
|
12
|
+
// Kind of gross, but essentially asserting that the exports of this module are the same as the
|
|
13
|
+
// exports of transform-file-browser, since this file may be replaced at bundle time with
|
|
14
|
+
// transform-file-browser.
|
|
15
|
+
({}) as any as transformFileBrowserType as transformFileType;
|
|
16
|
+
|
|
17
|
+
const transformFileRunner = gensync(function* (
|
|
18
|
+
filename: string,
|
|
19
|
+
opts?: InputOptions,
|
|
20
|
+
): Handler<FileResult | null> {
|
|
21
|
+
const options = { ...opts, filename };
|
|
22
|
+
|
|
23
|
+
const config: ResolvedConfig | null = yield* loadConfig(options);
|
|
24
|
+
if (config === null) return null;
|
|
25
|
+
|
|
26
|
+
const code = yield* fs.readFile(filename, "utf8");
|
|
27
|
+
return yield* run(config, code);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// @ts-expect-error TS doesn't detect that this signature is compatible
|
|
31
|
+
export function transformFile(
|
|
32
|
+
filename: string,
|
|
33
|
+
callback: FileResultCallback,
|
|
34
|
+
): void;
|
|
35
|
+
export function transformFile(
|
|
36
|
+
filename: string,
|
|
37
|
+
opts: InputOptions | undefined | null,
|
|
38
|
+
callback: FileResultCallback,
|
|
39
|
+
): void;
|
|
40
|
+
export function transformFile(
|
|
41
|
+
...args: Parameters<typeof transformFileRunner.errback>
|
|
42
|
+
) {
|
|
43
|
+
transformFileRunner.errback(...args);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function transformFileSync(
|
|
47
|
+
...args: Parameters<typeof transformFileRunner.sync>
|
|
48
|
+
) {
|
|
49
|
+
return transformFileRunner.sync(...args);
|
|
50
|
+
}
|
|
51
|
+
export function transformFileAsync(
|
|
52
|
+
...args: Parameters<typeof transformFileRunner.async>
|
|
53
|
+
) {
|
|
54
|
+
return transformFileRunner.async(...args);
|
|
55
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014-2016 Harri Siirak
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var luxon = require('luxon');
|
|
4
|
+
|
|
5
|
+
CronDate.prototype.addYear = function() {
|
|
6
|
+
this._date = this._date.plus({ years: 1 });
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
CronDate.prototype.addMonth = function() {
|
|
10
|
+
this._date = this._date.plus({ months: 1 }).startOf('month');
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
CronDate.prototype.addDay = function() {
|
|
14
|
+
this._date = this._date.plus({ days: 1 }).startOf('day');
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
CronDate.prototype.addHour = function() {
|
|
18
|
+
var prev = this._date;
|
|
19
|
+
this._date = this._date.plus({ hours: 1 }).startOf('hour');
|
|
20
|
+
if (this._date <= prev) {
|
|
21
|
+
this._date = this._date.plus({ hours: 1 });
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
CronDate.prototype.addMinute = function() {
|
|
26
|
+
var prev = this._date;
|
|
27
|
+
this._date = this._date.plus({ minutes: 1 }).startOf('minute');
|
|
28
|
+
if (this._date < prev) {
|
|
29
|
+
this._date = this._date.plus({ hours: 1 });
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
CronDate.prototype.addSecond = function() {
|
|
34
|
+
var prev = this._date;
|
|
35
|
+
this._date = this._date.plus({ seconds: 1 }).startOf('second');
|
|
36
|
+
if (this._date < prev) {
|
|
37
|
+
this._date = this._date.plus({ hours: 1 });
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
CronDate.prototype.subtractYear = function() {
|
|
42
|
+
this._date = this._date.minus({ years: 1 });
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
CronDate.prototype.subtractMonth = function() {
|
|
46
|
+
this._date = this._date
|
|
47
|
+
.minus({ months: 1 })
|
|
48
|
+
.endOf('month')
|
|
49
|
+
.startOf('second');
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
CronDate.prototype.subtractDay = function() {
|
|
53
|
+
this._date = this._date
|
|
54
|
+
.minus({ days: 1 })
|
|
55
|
+
.endOf('day')
|
|
56
|
+
.startOf('second');
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
CronDate.prototype.subtractHour = function() {
|
|
60
|
+
var prev = this._date;
|
|
61
|
+
this._date = this._date
|
|
62
|
+
.minus({ hours: 1 })
|
|
63
|
+
.endOf('hour')
|
|
64
|
+
.startOf('second');
|
|
65
|
+
if (this._date >= prev) {
|
|
66
|
+
this._date = this._date.minus({ hours: 1 });
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
CronDate.prototype.subtractMinute = function() {
|
|
71
|
+
var prev = this._date;
|
|
72
|
+
this._date = this._date.minus({ minutes: 1 })
|
|
73
|
+
.endOf('minute')
|
|
74
|
+
.startOf('second');
|
|
75
|
+
if (this._date > prev) {
|
|
76
|
+
this._date = this._date.minus({ hours: 1 });
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
CronDate.prototype.subtractSecond = function() {
|
|
81
|
+
var prev = this._date;
|
|
82
|
+
this._date = this._date
|
|
83
|
+
.minus({ seconds: 1 })
|
|
84
|
+
.startOf('second');
|
|
85
|
+
if (this._date > prev) {
|
|
86
|
+
this._date = this._date.minus({ hours: 1 });
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
CronDate.prototype.getDate = function() {
|
|
91
|
+
return this._date.day;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
CronDate.prototype.getFullYear = function() {
|
|
95
|
+
return this._date.year;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
CronDate.prototype.getDay = function() {
|
|
99
|
+
var weekday = this._date.weekday;
|
|
100
|
+
return weekday == 7 ? 0 : weekday;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
CronDate.prototype.getMonth = function() {
|
|
104
|
+
return this._date.month - 1;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
CronDate.prototype.getHours = function() {
|
|
108
|
+
return this._date.hour;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
CronDate.prototype.getMinutes = function() {
|
|
112
|
+
return this._date.minute;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
CronDate.prototype.getSeconds = function() {
|
|
116
|
+
return this._date.second;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
CronDate.prototype.getMilliseconds = function() {
|
|
120
|
+
return this._date.millisecond;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
CronDate.prototype.getTime = function() {
|
|
124
|
+
return this._date.valueOf();
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
CronDate.prototype.getUTCDate = function() {
|
|
128
|
+
return this._getUTC().day;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
CronDate.prototype.getUTCFullYear = function() {
|
|
132
|
+
return this._getUTC().year;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
CronDate.prototype.getUTCDay = function() {
|
|
136
|
+
var weekday = this._getUTC().weekday;
|
|
137
|
+
return weekday == 7 ? 0 : weekday;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
CronDate.prototype.getUTCMonth = function() {
|
|
141
|
+
return this._getUTC().month - 1;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
CronDate.prototype.getUTCHours = function() {
|
|
145
|
+
return this._getUTC().hour;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
CronDate.prototype.getUTCMinutes = function() {
|
|
149
|
+
return this._getUTC().minute;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
CronDate.prototype.getUTCSeconds = function() {
|
|
153
|
+
return this._getUTC().second;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
CronDate.prototype.toISOString = function() {
|
|
157
|
+
return this._date.toUTC().toISO();
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
CronDate.prototype.toJSON = function() {
|
|
161
|
+
return this._date.toJSON();
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
CronDate.prototype.setDate = function(d) {
|
|
165
|
+
this._date = this._date.set({ day: d });
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
CronDate.prototype.setFullYear = function(y) {
|
|
169
|
+
this._date = this._date.set({ year: y });
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
CronDate.prototype.setDay = function(d) {
|
|
173
|
+
this._date = this._date.set({ weekday: d });
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
CronDate.prototype.setMonth = function(m) {
|
|
177
|
+
this._date = this._date.set({ month: m + 1 });
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
CronDate.prototype.setHours = function(h) {
|
|
181
|
+
this._date = this._date.set({ hour: h });
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
CronDate.prototype.setMinutes = function(m) {
|
|
185
|
+
this._date = this._date.set({ minute: m });
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
CronDate.prototype.setSeconds = function(s) {
|
|
189
|
+
this._date = this._date.set({ second: s });
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
CronDate.prototype.setMilliseconds = function(s) {
|
|
193
|
+
this._date = this._date.set({ millisecond: s });
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
CronDate.prototype._getUTC = function() {
|
|
197
|
+
return this._date.toUTC();
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
CronDate.prototype.toString = function() {
|
|
201
|
+
return this.toDate().toString();
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
CronDate.prototype.toDate = function() {
|
|
205
|
+
return this._date.toJSDate();
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
CronDate.prototype.isLastDayOfMonth = function() {
|
|
209
|
+
//next day
|
|
210
|
+
var newDate = this._date.plus({ days: 1 }).startOf('day');
|
|
211
|
+
return this._date.month !== newDate.month;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Returns true when the current weekday is the last occurrence of this weekday
|
|
216
|
+
* for the present month.
|
|
217
|
+
*/
|
|
218
|
+
CronDate.prototype.isLastWeekdayOfMonth = function() {
|
|
219
|
+
// Check this by adding 7 days to the current date and seeing if it's
|
|
220
|
+
// a different month
|
|
221
|
+
var newDate = this._date.plus({ days: 7 }).startOf('day');
|
|
222
|
+
return this._date.month !== newDate.month;
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
function CronDate (timestamp, tz) {
|
|
226
|
+
var dateOpts = { zone: tz };
|
|
227
|
+
if (!timestamp) {
|
|
228
|
+
this._date = luxon.DateTime.local();
|
|
229
|
+
} else if (timestamp instanceof CronDate) {
|
|
230
|
+
this._date = timestamp._date;
|
|
231
|
+
} else if (timestamp instanceof Date) {
|
|
232
|
+
this._date = luxon.DateTime.fromJSDate(timestamp, dateOpts);
|
|
233
|
+
} else if (typeof timestamp === 'number') {
|
|
234
|
+
this._date = luxon.DateTime.fromMillis(timestamp, dateOpts);
|
|
235
|
+
} else if (typeof timestamp === 'string') {
|
|
236
|
+
this._date = luxon.DateTime.fromISO(timestamp, dateOpts);
|
|
237
|
+
this._date.isValid || (this._date = luxon.DateTime.fromRFC2822(timestamp, dateOpts));
|
|
238
|
+
this._date.isValid || (this._date = luxon.DateTime.fromSQL(timestamp, dateOpts));
|
|
239
|
+
// RFC2822-like format without the required timezone offset (used in tests)
|
|
240
|
+
this._date.isValid || (this._date = luxon.DateTime.fromFormat(timestamp, 'EEE, d MMM yyyy HH:mm:ss', dateOpts));
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
if (!this._date || !this._date.isValid) {
|
|
244
|
+
throw new Error('CronDate: unhandled timestamp: ' + JSON.stringify(timestamp));
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
if (tz && tz !== this._date.zoneName) {
|
|
248
|
+
this._date = this._date.setZone(tz);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
module.exports = CronDate;
|