@plitzi/sdk-shared 0.39.1 → 0.39.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/_virtual/_rolldown/runtime.mjs +1 -2
- package/dist/actions/access.mjs +1 -2
- package/dist/actions/cron.mjs +1 -2
- package/dist/actions/failureHandler.mjs +1 -2
- package/dist/actions/flowDelay.d.ts +6 -0
- package/dist/actions/flowDelay.mjs +3 -0
- package/dist/actions/functions.d.ts +6 -3
- package/dist/actions/functions.mjs +12 -8
- package/dist/actions/index.d.ts +2 -1
- package/dist/actions/index.mjs +10 -9
- package/dist/actions/jobs.mjs +1 -2
- package/dist/actions/smtp.mjs +1 -2
- package/dist/actions/triggerParams.mjs +1 -2
- package/dist/actions/triggers.mjs +1 -2
- package/dist/actions/validateDocument.mjs +133 -123
- package/dist/activity/describe.mjs +1 -2
- package/dist/activity/guard.mjs +1 -2
- package/dist/activity/types.mjs +1 -2
- package/dist/auth/failureChannel.mjs +1 -2
- package/dist/auth/visitorRoles.mjs +1 -2
- package/dist/authoring/builder.mjs +1 -2
- package/dist/authoring/declare.mjs +1 -2
- package/dist/authoring/elementCallbacks.mjs +1 -2
- package/dist/authoring/index.mjs +3 -3
- package/dist/authoring/paramSpec.mjs +1 -2
- package/dist/authoring/spaceCallbacks.mjs +1 -2
- package/dist/builder/contexts/BuilderContext.mjs +1 -2
- package/dist/builder/contexts/index.mjs +1 -2
- package/dist/conditions/dates.d.ts +2 -0
- package/dist/conditions/dates.mjs +12 -0
- package/dist/conditions/evaluateRuleGroup.d.ts +13 -0
- package/dist/conditions/evaluateRuleGroup.mjs +4 -0
- package/dist/conditions/evaluator.d.ts +39 -0
- package/dist/conditions/evaluator.mjs +75 -0
- package/dist/conditions/index.d.ts +10 -0
- package/dist/conditions/index.mjs +5 -0
- package/dist/conditions/rules.d.ts +3 -0
- package/dist/conditions/rules.mjs +3 -0
- package/dist/conditions/types.d.ts +44 -0
- package/dist/connectors/constants.mjs +1 -2
- package/dist/connectors/manifestTokens.mjs +1 -2
- package/dist/connectors/presets.mjs +1 -2
- package/dist/connectors/validateManifest.mjs +56 -57
- package/dist/dataSource/computed.mjs +16 -17
- package/dist/dataSource/getBindingsDetails.d.ts +5 -6
- package/dist/dataSource/getBindingsDetails.mjs +65 -40
- package/dist/dataSource/globalSources.d.ts +1 -1
- package/dist/dataSource/globalSources.mjs +1 -2
- package/dist/dataSource/helpers/getSourceName.mjs +1 -2
- package/dist/dataSource/index.mjs +5 -5
- package/dist/dataSource/utility/arrayMap.mjs +2 -2
- package/dist/dataSource/utility/capitalize.mjs +1 -2
- package/dist/dataSource/utility/checkboxParams.mjs +1 -2
- package/dist/dataSource/utility/dateConverter.mjs +0 -1
- package/dist/dataSource/utility/index.mjs +15 -16
- package/dist/dataSource/utility/not.mjs +1 -2
- package/dist/dataSource/utility/staticValue.mjs +0 -1
- package/dist/dataSource/utility/stringToArray.mjs +0 -1
- package/dist/dataSource/utility/styleSelector.mjs +1 -2
- package/dist/dataSource/utility/styleVariant.mjs +2 -3
- package/dist/dataSource/utility/truthiness.mjs +1 -2
- package/dist/dataSource/utility/twigTemplate.mjs +0 -1
- package/dist/dataSource/variables/resolveVariables.mjs +2 -3
- package/dist/dates/formatDate.mjs +29 -30
- package/dist/dates/isDate.mjs +1 -2
- package/dist/devTools/chrome.mjs +1 -2
- package/dist/devTools/debugCookie.mjs +1 -2
- package/dist/devTools/index.mjs +5 -5
- package/dist/devTools/interactionLog.mjs +1 -2
- package/dist/devTools/react/DevToolsContext.mjs +1 -2
- package/dist/devTools/sight/sight.mjs +1 -2
- package/dist/devTools/utils/PlitziConsole.mjs +1 -2
- package/dist/elements/ComponentContext.mjs +1 -2
- package/dist/flags/flagsCookie.mjs +5 -6
- package/dist/flags/index.d.ts +1 -0
- package/dist/flags/index.mjs +4 -3
- package/dist/flags/overrides.d.ts +36 -0
- package/dist/flags/overrides.mjs +13 -0
- package/dist/flags/react/useFlagResolution.mjs +5 -6
- package/dist/flags/resolveFlags.d.ts +1 -1
- package/dist/flags/resolveFlags.mjs +2 -3
- package/dist/flags/schemaFlag.mjs +1 -2
- package/dist/functions/contract.d.ts +326 -0
- package/dist/functions/contract.mjs +3 -0
- package/dist/functions/index.d.ts +15 -0
- package/dist/functions/index.mjs +9 -0
- package/dist/functions/kv.d.ts +80 -0
- package/dist/functions/kvChange.d.ts +67 -0
- package/dist/functions/kvChange.mjs +24 -0
- package/dist/functions/later.d.ts +18 -0
- package/dist/functions/messages.d.ts +4 -0
- package/dist/functions/messages.mjs +205 -0
- package/dist/functions/protocol.d.ts +416 -0
- package/dist/functions/protocol.mjs +37 -0
- package/dist/functions/rateLimit.d.ts +17 -0
- package/dist/functions/rateLimit.mjs +0 -0
- package/dist/functions/refusal.d.ts +26 -0
- package/dist/functions/refusal.mjs +11 -0
- package/dist/functions/runtime.d.ts +44 -0
- package/dist/functions/runtime.mjs +13 -0
- package/dist/functions/sizes.d.ts +27 -0
- package/dist/functions/sizes.mjs +7 -0
- package/dist/functions/wire.d.ts +11 -0
- package/dist/functions/wire.mjs +39 -0
- package/dist/helpers/canonicalJson.mjs +1 -2
- package/dist/helpers/clipboard.mjs +1 -2
- package/dist/helpers/cookies.mjs +1 -2
- package/dist/helpers/deepEqual/deepEqual.d.ts +5 -0
- package/dist/helpers/deepEqual/deepEqual.mjs +44 -0
- package/dist/helpers/deepEqual/index.d.ts +1 -0
- package/dist/helpers/deepEqual/index.mjs +1 -0
- package/dist/helpers/eventTarget.mjs +1 -2
- package/dist/helpers/fetchManifest.mjs +1 -2
- package/dist/helpers/images.mjs +1 -2
- package/dist/helpers/index.d.ts +4 -6
- package/dist/helpers/index.mjs +24 -20
- package/dist/helpers/interval.mjs +1 -2
- package/dist/helpers/isRecord.mjs +1 -2
- package/dist/helpers/keys.mjs +1 -2
- package/dist/helpers/lodash/camelCase.d.ts +1 -0
- package/dist/helpers/lodash/camelCase.mjs +7 -0
- package/dist/helpers/lodash/capitalize.d.ts +1 -0
- package/dist/helpers/lodash/capitalize.mjs +5 -0
- package/dist/helpers/lodash/cloneDeep.d.ts +8 -0
- package/dist/helpers/lodash/cloneDeep.mjs +53 -0
- package/dist/helpers/lodash/get.d.ts +11 -0
- package/dist/helpers/lodash/get.mjs +14 -0
- package/dist/helpers/lodash/has.d.ts +2 -0
- package/dist/helpers/lodash/has.mjs +12 -0
- package/dist/helpers/lodash/index.d.ts +11 -0
- package/dist/helpers/lodash/index.mjs +7 -0
- package/dist/helpers/lodash/omit.d.ts +4 -0
- package/dist/helpers/lodash/omit.mjs +35 -0
- package/dist/helpers/lodash/set.d.ts +2 -0
- package/dist/helpers/lodash/set.mjs +20 -0
- package/dist/helpers/lodash/shared.d.ts +2 -0
- package/dist/helpers/lodash/shared.mjs +37 -0
- package/dist/helpers/reducerOrigin.mjs +1 -2
- package/dist/helpers/replaceEqualDeep/index.d.ts +1 -0
- package/dist/helpers/replaceEqualDeep/index.mjs +1 -0
- package/dist/helpers/replaceEqualDeep/replaceEqualDeep.d.ts +12 -0
- package/dist/helpers/replaceEqualDeep/replaceEqualDeep.mjs +30 -0
- package/dist/helpers/resources.d.ts +21 -0
- package/dist/helpers/resources.mjs +40 -0
- package/dist/helpers/scroll.mjs +1 -2
- package/dist/helpers/security.d.ts +15 -0
- package/dist/helpers/security.mjs +8 -4
- package/dist/helpers/spaceRoot.mjs +1 -2
- package/dist/helpers/syntaxHighlight.mjs +1 -2
- package/dist/helpers/twigWrapper/Evaluator/Evaluator.mjs +75 -76
- package/dist/helpers/twigWrapper/Evaluator/helpers.mjs +1 -2
- package/dist/helpers/twigWrapper/Lexer/Lexer.mjs +1 -2
- package/dist/helpers/twigWrapper/Lexer/types.mjs +1 -2
- package/dist/helpers/twigWrapper/Parser/Cursor.mjs +1 -2
- package/dist/helpers/twigWrapper/Parser/ExpressionParser.mjs +1 -2
- package/dist/helpers/twigWrapper/Parser/Parser.mjs +1 -2
- package/dist/helpers/twigWrapper/Parser/helpers.mjs +1 -2
- package/dist/helpers/twigWrapper/TemplateCache/TemplateCache.mjs +1 -2
- package/dist/helpers/twigWrapper/charClass.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/arrays.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/catalog/index.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/dateParts.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/dates.mjs +13 -14
- package/dist/helpers/twigWrapper/filters/filters.mjs +21 -22
- package/dist/helpers/twigWrapper/filters/hashing.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/misc.mjs +27 -28
- package/dist/helpers/twigWrapper/filters/numbers.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/objects.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/raw.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/strings.mjs +23 -24
- package/dist/helpers/twigWrapper/filters/types.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/values.mjs +1 -2
- package/dist/helpers/twigWrapper/index.mjs +8 -8
- package/dist/helpers/twigWrapper/inspectTemplate.mjs +12 -13
- package/dist/helpers/twigWrapper/processTwig/helpers.mjs +1 -2
- package/dist/helpers/twigWrapper/processTwig/processTwig.mjs +1 -2
- package/dist/helpers/twigWrapper/processTwig/resolveStepParam.mjs +1 -2
- package/dist/helpers/twigWrapper/templateRoots.d.ts +3 -9
- package/dist/helpers/twigWrapper/templateRoots.mjs +14 -9
- package/dist/helpers/twigWrapper/tokens/hasTemplateSyntax.mjs +1 -2
- package/dist/helpers/twigWrapper/tokens/hasValidToken.mjs +1 -2
- package/dist/helpers/twigWrapper/tokens/tokenPatterns.mjs +1 -2
- package/dist/helpers/utils.mjs +2 -3
- package/dist/history/describe.mjs +1 -2
- package/dist/history/diff.mjs +1 -2
- package/dist/hooks/index.mjs +5 -5
- package/dist/hooks/useFontHead.mjs +1 -2
- package/dist/hooks/useNetwork.mjs +1 -2
- package/dist/hooks/usePlitzi.d.ts +7 -6
- package/dist/hooks/usePlitzi.mjs +1 -2
- package/dist/hooks/useStableValue.mjs +5 -6
- package/dist/navigation/index.mjs +3 -3
- package/dist/navigation/matchPath.mjs +19 -11
- package/dist/navigation/routes.mjs +57 -38
- package/dist/navigation/sitemap.mjs +9 -10
- package/dist/network/entitlements.d.ts +21 -0
- package/dist/network/entitlements.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddPluginMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddSnippetMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceCloneElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceDeployMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceFixIssuesMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceMoveElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpacePublishMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceRemoveElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceRemovePluginMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceRenameElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceRunE2eTestsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceSetTestsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdatePluginMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSchemaMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSettingsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/actions/SpaceAddActionMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRemoveActionMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRunActionMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/actions/SpaceUpdateActionMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceAddCdnBucketMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceAddCdnMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceRemoveCdnBucketMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceRemoveCdnMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceSetCdnCredentialMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceUpdateCdnBucketMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceUpdateCdnMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceAddComponentMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceDetachInstanceMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceRemoveComponentMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceUpdateComponentMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceAddConnectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceRemoveConnectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceUpdateConnectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceAddCredentialMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceRemoveCredentialMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceUpdateCredentialMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/data/SpaceSaveDataMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/flags/SpacePublishFlagsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/flags/SpaceRemoveFlagMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/flags/SpaceSetFlagMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/folders/SpaceAddPageFolderMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/folders/SpaceRemovePageFolderMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/folders/SpaceUpdatePageFolderMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/functions/SpaceInstallTemplateFunctionsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/functions/SpaceRemoveFunctionsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/functions/SpaceSaveFunctionsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/functions/SpaceTryFunctionMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/jobs/SpaceControlJobMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceAddPageMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceHomePageMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceRemovePageMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceUpdatePageMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/resources/SpaceAddResourceMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/resources/SpaceMoveResourceMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/resources/SpaceRemoveResourceMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeSizeMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStartRuntimeMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStopRuntimeMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/variables/SpaceAddVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/variables/SpaceRemoveVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/variables/SpaceUpdateVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceAddVisitorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceRemoveVisitorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/StyleUpdateMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/StyleUpdateSettingsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/fonts/StyleAddFontMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/fonts/StyleRemoveFontMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/fonts/StyleUpdateFontMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleAddSelectorVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleRemoveSelectorVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleUpdateSelectorVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleAddSelectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleUpdateSelectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/variables/StyleAddVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/variables/StyleRemoveVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/variables/StyleUpdateVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/index.mjs +155 -156
- package/dist/network/graphql/builder/Queries/InitQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceActionEventsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceActionTasksQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceActionsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceCdnsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceChangesQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceCheckActionQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceConnectorsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceCredentialsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceDataQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceDeploymentsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceFunctionsQuery.d.ts +1 -1
- package/dist/network/graphql/builder/Queries/Space/SpaceFunctionsQuery.mjs +2 -3
- package/dist/network/graphql/builder/Queries/Space/SpaceIssuesQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceJobsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceLatestRevisionQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceQuotaQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceResourcesQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceRuntimeQuery.d.ts +1 -1
- package/dist/network/graphql/builder/Queries/Space/SpaceRuntimeQuery.mjs +2 -3
- package/dist/network/graphql/builder/Queries/Space/SpaceTestsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceVersionContentsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceVisitorsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/index.mjs +37 -38
- package/dist/network/graphql/builder/Subscriptions/SpaceEventSubscription.mjs +1 -2
- package/dist/network/graphql/builder/Subscriptions/index.mjs +1 -2
- package/dist/network/graphql/builder/fragments/cdnFields.mjs +1 -2
- package/dist/network/graphql/index.d.ts +0 -1
- package/dist/network/graphql/index.mjs +1 -3
- package/dist/network/index.d.ts +1 -5
- package/dist/network/index.mjs +7 -11
- package/dist/network/{NetworkContext.d.ts → react/NetworkContext.d.ts} +12 -11
- package/dist/network/{NetworkContext.mjs → react/NetworkContext.mjs} +1 -2
- package/dist/network/{NetworkInternalContext.d.ts → react/NetworkInternalContext.d.ts} +1 -1
- package/dist/network/react/NetworkInternalContext.mjs +4 -0
- package/dist/network/react/index.d.ts +5 -0
- package/dist/network/react/index.mjs +3 -0
- package/dist/network/spaceEvents.mjs +16 -17
- package/dist/plugins/bundle/bundle.mjs +1 -2
- package/dist/plugins/declaration.mjs +1 -2
- package/dist/plugins/react/ElementRegistryContext.d.ts +26 -0
- package/dist/plugins/react/ElementRegistryContext.mjs +17 -0
- package/dist/plugins/react/PluginAssetsContext.d.ts +11 -0
- package/dist/plugins/react/PluginAssetsContext.mjs +4 -0
- package/dist/plugins/react/PluginsContext.mjs +6 -3
- package/dist/plugins/react/index.d.ts +3 -0
- package/dist/plugins/react/index.mjs +4 -1
- package/dist/project/index.mjs +7 -7
- package/dist/project/layout/check.mjs +26 -27
- package/dist/project/layout/codes.mjs +1 -2
- package/dist/project/layout/contents.mjs +12 -13
- package/dist/project/layout/files.mjs +1 -2
- package/dist/project/layout/folders.mjs +43 -44
- package/dist/project/layout/index.mjs +3 -3
- package/dist/project/layout/plugins.mjs +56 -57
- package/dist/project/layout/vendor.mjs +14 -15
- package/dist/project/network.mjs +1 -2
- package/dist/project/pages/index.mjs +1 -2
- package/dist/project/paths/index.d.ts +8 -2
- package/dist/project/paths/index.mjs +3 -4
- package/dist/project/root.mjs +1 -2
- package/dist/queries/index.mjs +1 -2
- package/dist/queries/queryCache.mjs +1 -2
- package/dist/queries/serverQueries.mjs +1 -2
- package/dist/queries/useQuery.mjs +1 -2
- package/dist/queries/useServerQuery.mjs +1 -2
- package/dist/{helpers → react}/enclosingSpace.mjs +1 -2
- package/dist/react/generateFacade.d.ts +1 -0
- package/dist/{helpers → react}/generateFacade.mjs +4 -5
- package/dist/react/index.d.ts +8 -0
- package/dist/react/index.mjs +4 -0
- package/dist/{helpers → react}/sharedContext.mjs +0 -1
- package/dist/realtime/client.mjs +3 -4
- package/dist/realtime/index.mjs +4 -4
- package/dist/realtime/presence.mjs +1 -2
- package/dist/realtime/topics.mjs +1 -2
- package/dist/runs/index.mjs +1 -2
- package/dist/runs/report.mjs +1 -2
- package/dist/schema/anchor.mjs +1 -2
- package/dist/schema/index.mjs +18 -18
- package/dist/schema/layoutChain.mjs +1 -2
- package/dist/schema/markdownHeadings.mjs +1 -2
- package/dist/schema/motion.mjs +1 -2
- package/dist/schema/motionReveal.mjs +1 -2
- package/dist/schema/pageAccess.d.ts +9 -0
- package/dist/schema/pageAccess.mjs +42 -36
- package/dist/schema/pageElements.d.ts +3 -1
- package/dist/schema/pageElements.mjs +9 -3
- package/dist/schema/pageHead.d.ts +5 -2
- package/dist/schema/pageHead.mjs +3 -4
- package/dist/schema/providerAnswer.mjs +1 -2
- package/dist/schema/providerWhen.d.ts +1 -1
- package/dist/schema/providerWhen.mjs +6 -7
- package/dist/schema/react/SchemaContext.mjs +1 -2
- package/dist/schema/schemaConstants.mjs +1 -2
- package/dist/schema/schemaSettings.mjs +1 -2
- package/dist/schema/serverElements.d.ts +0 -24
- package/dist/schema/serverElements.mjs +60 -39
- package/dist/schema/serverInput.mjs +23 -24
- package/dist/schema/serverQuery.d.ts +15 -5
- package/dist/schema/serverQuery.mjs +47 -35
- package/dist/schema/snippet.mjs +1 -2
- package/dist/schema/wire.mjs +1 -2
- package/dist/security/index.d.ts +49 -0
- package/dist/security/index.mjs +44 -0
- package/dist/server/actions/useActionsSync.mjs +1 -2
- package/dist/server/actions/useImagesSync.mjs +1 -2
- package/dist/server/actions/useRealtimeSync.mjs +1 -2
- package/dist/server/index.mjs +7 -7
- package/dist/server/rsc/refreshRsc.mjs +23 -24
- package/dist/server/rsc/useRscRefresh.mjs +1 -2
- package/dist/server/rsc/useRscSync.mjs +1 -2
- package/dist/server/usePluginRoute.mjs +1 -2
- package/dist/source/export.d.ts +1 -1
- package/dist/source/export.mjs +1 -2
- package/dist/source/import.mjs +1 -2
- package/dist/source/index.mjs +4 -4
- package/dist/source/snapshot.mjs +1 -2
- package/dist/state/index.d.ts +0 -1
- package/dist/state/index.mjs +1 -3
- package/dist/state/paintedState.mjs +10 -11
- package/dist/store/actionRuns/actionRunsRecorder.mjs +1 -2
- package/dist/store/actionRuns/actionRunsStore.mjs +1 -2
- package/dist/store/actionRuns/index.mjs +3 -3
- package/dist/store/actionRuns/useActionRuns.mjs +5 -6
- package/dist/store/index.d.ts +1 -0
- package/dist/store/index.mjs +2 -1
- package/dist/store/renderSettings.d.ts +1 -1
- package/dist/store/renderSettings.mjs +1 -2
- package/dist/{state → store}/runtimeStatePersist.mjs +29 -30
- package/dist/store/storeHooks.d.ts +45 -45
- package/dist/store/storeHooks.mjs +1 -2
- package/dist/store/tracing/index.mjs +5 -5
- package/dist/store/tracing/preview.mjs +1 -2
- package/dist/store/tracing/tracingCollector.d.ts +2 -2
- package/dist/store/tracing/tracingCollector.mjs +79 -78
- package/dist/store/tracing/tracingMiddleware.mjs +1 -2
- package/dist/store/tracing/tracingStore.mjs +1 -2
- package/dist/store/tracing/useTracing.mjs +6 -7
- package/dist/style/breakpoints.mjs +1 -2
- package/dist/style/cssLayers.mjs +1 -2
- package/dist/style/displayModes.mjs +1 -2
- package/dist/style/fontAssets.mjs +1 -2
- package/dist/style/fontValidation.mjs +14 -15
- package/dist/style/fonts.d.ts +5 -3
- package/dist/style/fonts.mjs +23 -24
- package/dist/style/fontsFromCss.mjs +1 -2
- package/dist/style/index.mjs +18 -18
- package/dist/style/keyframes.mjs +1 -2
- package/dist/style/layoutGrid.mjs +1 -2
- package/dist/style/notifications.mjs +1 -2
- package/dist/style/react/useDisplayMode.mjs +1 -2
- package/dist/style/react/useElementSize.mjs +1 -2
- package/dist/style/runtimeStyle.d.ts +19 -21
- package/dist/style/runtimeStyle.mjs +4 -7
- package/dist/style/snippetStyle.mjs +5 -6
- package/dist/style/styleConditions.mjs +1 -2
- package/dist/style/styleConstants.mjs +1 -2
- package/dist/style/stylePseudos.mjs +1 -2
- package/dist/style/styleStates.mjs +1 -2
- package/dist/style/styleTarget.mjs +24 -25
- package/dist/theme/cookie/index.mjs +1 -1
- package/dist/theme/cookie/themeCookie.d.ts +21 -1
- package/dist/theme/cookie/themeCookie.mjs +19 -4
- package/dist/theme/index.d.ts +1 -9
- package/dist/theme/index.mjs +1 -6
- package/dist/theme/{ThemeProvider.d.ts → react/ThemeProvider.d.ts} +8 -2
- package/dist/theme/react/ThemeProvider.mjs +78 -0
- package/dist/theme/{ThemeScope.d.ts → react/ThemeScope.d.ts} +6 -2
- package/dist/theme/react/ThemeScope.mjs +9 -0
- package/dist/theme/react/index.d.ts +9 -0
- package/dist/theme/react/index.mjs +5 -0
- package/dist/theme/{themeStore.d.ts → react/themeStore.d.ts} +5 -5
- package/dist/theme/{themeStore.mjs → react/themeStore.mjs} +4 -4
- package/dist/theme/{useTheme.d.ts → react/useTheme.d.ts} +1 -1
- package/dist/theme/react/useTheme.mjs +19 -0
- package/dist/types/ActionTypes.d.ts +33 -0
- package/dist/types/AuthTypes.d.ts +6 -0
- package/dist/types/CommonTypes.d.ts +14 -3
- package/dist/types/DataSourceTypes.d.ts +1 -1
- package/dist/types/FunctionTypes.d.ts +16 -6
- package/dist/types/InteractionTypes.d.ts +1 -1
- package/dist/types/JobTypes.d.ts +56 -182
- package/dist/types/PluginTypes.d.ts +8 -1
- package/dist/types/SchemaTypes.d.ts +1 -1
- package/dist/types/SchemaTypes.mjs +1 -2
- package/dist/types/ServerAdapterTypes.d.ts +0 -326
- package/dist/types/ServerTypes.d.ts +0 -311
- package/dist/types/SpaceTypes.d.ts +5 -2
- package/dist/types/StoreTypes.d.ts +9 -3
- package/dist/types/StyleTypes.d.ts +6 -0
- package/dist/types/StyleTypes.mjs +1 -2
- package/dist/types/index.d.ts +0 -3
- package/dist/websockets/RTCodec.mjs +1 -2
- package/eslint.config.mjs +25 -0
- package/package.json +29 -18
- package/vite.config.ts +58 -0
- package/dist/helpers/generateFacade.d.ts +0 -2
- package/dist/helpers/ruleEvaluator.d.ts +0 -16
- package/dist/helpers/ruleEvaluator.mjs +0 -5
- package/dist/network/NetworkInternalContext.mjs +0 -5
- package/dist/network/graphql/sdk/Mutations/index.d.ts +0 -3
- package/dist/network/graphql/sdk/Mutations/index.mjs +0 -4
- package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +0 -16
- package/dist/network/graphql/sdk/Queries/InitQuery.mjs +0 -4
- package/dist/network/graphql/sdk/Queries/index.d.ts +0 -6
- package/dist/network/graphql/sdk/Queries/index.mjs +0 -5
- package/dist/network/graphql/sdk/index.d.ts +0 -5
- package/dist/network/graphql/sdk/index.mjs +0 -3
- package/dist/theme/ThemeProvider.mjs +0 -69
- package/dist/theme/ThemeScope.mjs +0 -10
- package/dist/theme/useTheme.mjs +0 -20
- package/dist/types/OAuthTypes.d.ts +0 -246
- package/dist/types/ServerConfigTypes.d.ts +0 -527
- package/dist/types/ServerLogTypes.d.ts +0 -119
- /package/dist/{types/OAuthTypes.mjs → conditions/types.mjs} +0 -0
- /package/dist/{types/ServerConfigTypes.mjs → functions/kv.mjs} +0 -0
- /package/dist/{types/ServerLogTypes.mjs → functions/later.mjs} +0 -0
- /package/dist/{helpers → react}/enclosingSpace.d.ts +0 -0
- /package/dist/{helpers → react}/sharedContext.d.ts +0 -0
- /package/dist/{state → store}/runtimeStatePersist.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @plitzi/sdk-shared
|
|
2
2
|
|
|
3
|
+
## 0.39.3
|
|
4
|
+
|
|
5
|
+
No changes in this release.
|
|
6
|
+
|
|
7
|
+
## 0.39.2
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- fad1264: Released with every `@plitzi` package at this version. What changed in each, and what to do when you upgrade, is in
|
|
12
|
+
`@plitzi/cli`'s `CHANGELOG.md`: one copy of the notes, not one per package.
|
|
13
|
+
|
|
3
14
|
## 0.39.1
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var e = Object.defineProperty, t = (t, n) => {
|
|
3
3
|
let r = {};
|
|
4
4
|
for (var i in t) e(r, i, {
|
|
@@ -7,5 +7,4 @@ var e = Object.defineProperty, t = (t, n) => {
|
|
|
7
7
|
});
|
|
8
8
|
return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
9
|
};
|
|
10
|
-
//#endregion
|
|
11
10
|
export { t as __exportAll };
|
package/dist/actions/access.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isRecord as e } from "../helpers/isRecord.mjs";
|
|
2
|
-
|
|
2
|
+
// src/actions/access.ts
|
|
3
3
|
var t = (e, t) => {
|
|
4
4
|
if (!e) return "forbidden";
|
|
5
5
|
if (e.mode !== "public") {
|
|
@@ -18,5 +18,4 @@ var t = (e, t) => {
|
|
|
18
18
|
permissions: n.filter((e) => typeof e == "string")
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
//#endregion
|
|
22
21
|
export { t as accessRefusal, n as actionAccessOf };
|
package/dist/actions/cron.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/actions/cron.ts
|
|
2
2
|
var e = [
|
|
3
3
|
[0, 59],
|
|
4
4
|
[0, 23],
|
|
@@ -95,5 +95,4 @@ var e = [
|
|
|
95
95
|
}
|
|
96
96
|
return a;
|
|
97
97
|
}, h = (e) => o(/* @__PURE__ */ new Date(), e) !== void 0;
|
|
98
|
-
//#endregion
|
|
99
98
|
export { m as cronFiresBetween, u as cronMatches, p as cronNextFire, h as isKnownTimeZone, n as parseCron, o as zonedClock };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The longest a `flow.delay` step waits, in ms. A run holds a connection and a concurrency slot its whole life, so a
|
|
3
|
+
* longer wait spends both on nothing: anything longer is a schedule, not a step. Read by the step that caps what it is
|
|
4
|
+
* asked to it, saying so on its log, and by the validator that warns of a longer one written as it is.
|
|
5
|
+
*/
|
|
6
|
+
export declare const FLOW_DELAY_MAX_MS = 5000;
|
|
@@ -15,13 +15,16 @@ export declare const PLUGIN_FUNCTIONS_SOURCE = "functions.source.json";
|
|
|
15
15
|
/** Where a plugin's route answers: `pluginRoutePath('board', '/layout')` is `/fn/plugins/board/layout`. */
|
|
16
16
|
export declare const pluginRoutePath: (plugin: string, path?: string) => string;
|
|
17
17
|
/**
|
|
18
|
-
* The CPU and
|
|
19
|
-
* shows as "default". A task asks for more in its `limits`, up to what its deployment
|
|
18
|
+
* The CPU, time and size an invocation gets when its task asks for none: what the server runs it with, and what the
|
|
19
|
+
* builder shows as "default". A task asks for more in its `limits`, up to what its plan and its deployment allow.
|
|
20
20
|
*/
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const DEFAULT_FUNCTION_ASKED_LIMITS: {
|
|
22
22
|
readonly cpuMs: 100;
|
|
23
23
|
readonly wallMs: 10000;
|
|
24
|
+
readonly size: "small";
|
|
24
25
|
};
|
|
26
|
+
/** Every limit a task may ask for, in the order they are written: what the manifest reads and the builder writes. */
|
|
27
|
+
export declare const FUNCTION_ASKED_KEYS: readonly ["cpuMs", "wallMs", "size"];
|
|
25
28
|
/** Whether a page at `path` would sit where the space's functions answer. */
|
|
26
29
|
export declare const isFunctionRoutePath: (path: string) => boolean;
|
|
27
30
|
/**
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
// src/actions/functions.ts
|
|
2
2
|
var e = "/fn", t = "plugins", n = "functions.source.json", r = (e, n = "/") => `/fn/${t}/${encodeURIComponent(e)}${n.startsWith("/") ? n : `/${n}`}`, i = {
|
|
3
3
|
cpuMs: 100,
|
|
4
|
-
wallMs: 1e4
|
|
5
|
-
|
|
4
|
+
wallMs: 1e4,
|
|
5
|
+
size: "small"
|
|
6
|
+
}, a = [
|
|
7
|
+
"cpuMs",
|
|
8
|
+
"wallMs",
|
|
9
|
+
"size"
|
|
10
|
+
], o = (e) => e === "/fn" || e.startsWith("/fn/"), s = (e) => /^[A-Za-z0-9_][A-Za-z0-9_./-]*\.(ts|js|mjs|json)$/.test(e) && !e.split("/").some((e) => e === ".." || e === "." || e === ""), c = (e) => !e.includes("/") && /\.(ts|js|mjs)$/.test(e) && !/\.(test|spec)\.(ts|js|mjs)$/.test(e) && !e.endsWith(".d.ts"), l = (e) => /^\s*export\s+default\b|\bas\s+default\s*[,}]/m.test(e), u = (e) => /\.(test|spec|fixture)\.[A-Za-z0-9]+$/.test(e), d = async (e, t) => {
|
|
6
11
|
let n = {}, r = async (i) => {
|
|
7
12
|
let a;
|
|
8
13
|
try {
|
|
@@ -10,12 +15,11 @@ var e = "/fn", t = "plugins", n = "functions.source.json", r = (e, n = "/") => `
|
|
|
10
15
|
} catch {
|
|
11
16
|
return;
|
|
12
17
|
}
|
|
13
|
-
for (let
|
|
14
|
-
let a = i ? `${i}/${
|
|
15
|
-
|
|
18
|
+
for (let o of a) {
|
|
19
|
+
let a = i ? `${i}/${o.name}` : o.name;
|
|
20
|
+
o.directory ? o.name !== "node_modules" && !o.name.startsWith(".") && await r(a) : s(a) && !u(a) && (n[a] = await t.read(`${e}/${a}`));
|
|
16
21
|
}
|
|
17
22
|
};
|
|
18
23
|
return await r(""), n;
|
|
19
24
|
};
|
|
20
|
-
|
|
21
|
-
export { i as DEFAULT_FUNCTION_TIME_LIMITS, e as FUNCTION_ROUTES_PREFIX, n as PLUGIN_FUNCTIONS_SOURCE, t as PLUGIN_ROUTES_SEGMENT, c as exportsByDefault, a as isFunctionRoutePath, s as isFunctionsDefinitionFile, o as isFunctionsSourcePath, l as isFunctionsTestPath, r as pluginRoutePath, u as readFunctionsSource };
|
|
25
|
+
export { i as DEFAULT_FUNCTION_ASKED_LIMITS, a as FUNCTION_ASKED_KEYS, e as FUNCTION_ROUTES_PREFIX, n as PLUGIN_FUNCTIONS_SOURCE, t as PLUGIN_ROUTES_SEGMENT, l as exportsByDefault, o as isFunctionRoutePath, c as isFunctionsDefinitionFile, s as isFunctionsSourcePath, u as isFunctionsTestPath, r as pluginRoutePath, d as readFunctionsSource };
|
package/dist/actions/index.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ export { accessRefusal, actionAccessOf } from './access';
|
|
|
2
2
|
export { JOB_KINDS, JOB_STATUSES, TERMINAL_JOB_STATUSES, isJobKind, isJobStatus, isTerminalJobStatus } from './jobs';
|
|
3
3
|
export { cronFiresBetween, cronMatches, cronNextFire, isKnownTimeZone, parseCron, zonedClock } from './cron';
|
|
4
4
|
export { FAILURE_HANDLER_TASK } from './failureHandler';
|
|
5
|
-
export {
|
|
5
|
+
export { FLOW_DELAY_MAX_MS } from './flowDelay';
|
|
6
|
+
export { DEFAULT_FUNCTION_ASKED_LIMITS, FUNCTION_ASKED_KEYS, FUNCTION_ROUTES_PREFIX, isFunctionRoutePath, exportsByDefault, isFunctionsDefinitionFile, isFunctionsSourcePath, isFunctionsTestPath, PLUGIN_FUNCTIONS_SOURCE, PLUGIN_ROUTES_SEGMENT, pluginRoutePath, readFunctionsSource } from './functions';
|
|
6
7
|
export { triggerAccess, triggerCacheMs, triggerHasStaleVerify, triggerInput, triggerVerify } from './triggerParams';
|
|
7
8
|
export { actionName, actionTriggers, isActionEnabled } from './triggers';
|
|
8
9
|
export { isActionDocument, validateActionDocument } from './validateDocument';
|
package/dist/actions/index.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { accessRefusal as e, actionAccessOf as t } from "./access.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
2
|
+
import { JOB_KINDS as n, JOB_STATUSES as r, TERMINAL_JOB_STATUSES as i, isJobKind as a, isJobStatus as o, isTerminalJobStatus as s } from "./jobs.mjs";
|
|
3
|
+
import { cronFiresBetween as c, cronMatches as l, cronNextFire as u, isKnownTimeZone as d, parseCron as f, zonedClock as p } from "./cron.mjs";
|
|
4
|
+
import { FAILURE_HANDLER_TASK as m } from "./failureHandler.mjs";
|
|
5
|
+
import { FLOW_DELAY_MAX_MS as h } from "./flowDelay.mjs";
|
|
6
|
+
import { DEFAULT_FUNCTION_ASKED_LIMITS as g, FUNCTION_ASKED_KEYS as _, FUNCTION_ROUTES_PREFIX as v, PLUGIN_FUNCTIONS_SOURCE as y, PLUGIN_ROUTES_SEGMENT as b, exportsByDefault as x, isFunctionRoutePath as S, isFunctionsDefinitionFile as C, isFunctionsSourcePath as w, isFunctionsTestPath as T, pluginRoutePath as E, readFunctionsSource as D } from "./functions.mjs";
|
|
7
|
+
import { triggerAccess as O, triggerCacheMs as k, triggerHasStaleVerify as A, triggerInput as j, triggerVerify as M } from "./triggerParams.mjs";
|
|
8
|
+
import { actionName as N, actionTriggers as P, isActionEnabled as F } from "./triggers.mjs";
|
|
9
|
+
import { isActionDocument as I, validateActionDocument as L } from "./validateDocument.mjs";
|
|
10
|
+
import { SMTP_CREDENTIAL_KEYS as R, isSingleEmailAddress as z, readSmtpCredential as B } from "./smtp.mjs";
|
|
11
|
+
export { g as DEFAULT_FUNCTION_ASKED_LIMITS, m as FAILURE_HANDLER_TASK, h as FLOW_DELAY_MAX_MS, _ as FUNCTION_ASKED_KEYS, v as FUNCTION_ROUTES_PREFIX, n as JOB_KINDS, r as JOB_STATUSES, y as PLUGIN_FUNCTIONS_SOURCE, b as PLUGIN_ROUTES_SEGMENT, R as SMTP_CREDENTIAL_KEYS, i as TERMINAL_JOB_STATUSES, e as accessRefusal, t as actionAccessOf, N as actionName, P as actionTriggers, c as cronFiresBetween, l as cronMatches, u as cronNextFire, x as exportsByDefault, I as isActionDocument, F as isActionEnabled, S as isFunctionRoutePath, C as isFunctionsDefinitionFile, w as isFunctionsSourcePath, T as isFunctionsTestPath, a as isJobKind, o as isJobStatus, d as isKnownTimeZone, z as isSingleEmailAddress, s as isTerminalJobStatus, f as parseCron, E as pluginRoutePath, D as readFunctionsSource, B as readSmtpCredential, O as triggerAccess, k as triggerCacheMs, A as triggerHasStaleVerify, j as triggerInput, M as triggerVerify, L as validateActionDocument, p as zonedClock };
|
package/dist/actions/jobs.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/actions/jobs.ts
|
|
2
2
|
var e = [
|
|
3
3
|
"pending",
|
|
4
4
|
"running",
|
|
@@ -13,5 +13,4 @@ var e = [
|
|
|
13
13
|
"dead",
|
|
14
14
|
"cancelled"
|
|
15
15
|
], n = (t) => e.some((e) => e === t), r = (e) => t.some((t) => t === e), i = ["action", "function"], a = (e) => i.some((t) => t === e);
|
|
16
|
-
//#endregion
|
|
17
16
|
export { i as JOB_KINDS, e as JOB_STATUSES, t as TERMINAL_JOB_STATUSES, a as isJobKind, n as isJobStatus, r as isTerminalJobStatus };
|
package/dist/actions/smtp.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isRecord as e } from "../helpers/isRecord.mjs";
|
|
2
|
-
|
|
2
|
+
// src/actions/triggerParams.ts
|
|
3
3
|
var t = (e) => {
|
|
4
4
|
if (typeof e == "string" && e.trim() !== "") try {
|
|
5
5
|
return JSON.parse(e);
|
|
@@ -37,5 +37,4 @@ var t = (e) => {
|
|
|
37
37
|
let t = Number.parseFloat(e.cacheSeconds ?? "");
|
|
38
38
|
return Number.isFinite(t) && t > 0 ? Math.round(t * 1e3) : 0;
|
|
39
39
|
};
|
|
40
|
-
//#endregion
|
|
41
40
|
export { n as triggerAccess, o as triggerCacheMs, a as triggerHasStaleVerify, r as triggerInput, i as triggerVerify };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// src/actions/triggers.ts
|
|
2
2
|
var e = (e) => Object.values(e.nodes).filter((e) => e.type === "trigger"), t = (t) => e(t).some((e) => e.enabled), n = (t) => e(t).find((e) => {
|
|
3
3
|
let t = e.title.trim();
|
|
4
4
|
return t !== "" && t !== e.action;
|
|
5
5
|
})?.title.trim() ?? t.name;
|
|
6
|
-
//#endregion
|
|
7
6
|
export { n as actionName, e as actionTriggers, t as isActionEnabled };
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { isKnownTimeZone as e, parseCron as t } from "./cron.mjs";
|
|
2
|
+
import { FAILURE_HANDLER_TASK as n } from "./failureHandler.mjs";
|
|
3
|
+
import { FLOW_DELAY_MAX_MS as r } from "./flowDelay.mjs";
|
|
4
4
|
import { triggerAccess as i, triggerHasStaleVerify as a, triggerVerify as o } from "./triggerParams.mjs";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { isRecord as s } from "../helpers/isRecord.mjs";
|
|
6
|
+
// src/actions/validateDocument.ts
|
|
7
|
+
var c = [
|
|
7
8
|
"text",
|
|
8
9
|
"number",
|
|
9
10
|
"boolean",
|
|
10
11
|
"date",
|
|
11
12
|
"json",
|
|
12
13
|
"file"
|
|
13
|
-
],
|
|
14
|
+
], l = [
|
|
14
15
|
"public",
|
|
15
16
|
"session",
|
|
16
17
|
"role"
|
|
17
|
-
],
|
|
18
|
+
], u = [
|
|
18
19
|
"call",
|
|
19
20
|
"webhook",
|
|
20
21
|
"schedule",
|
|
21
22
|
"later",
|
|
22
23
|
"render",
|
|
23
24
|
"custom"
|
|
24
|
-
],
|
|
25
|
+
], d = ["sha256", "sha1"], f = /* @__PURE__ */ new Set([
|
|
25
26
|
"input",
|
|
26
27
|
"user",
|
|
27
28
|
"spaceId",
|
|
@@ -30,183 +31,183 @@ var s = [
|
|
|
30
31
|
"runId",
|
|
31
32
|
"now",
|
|
32
33
|
"failure"
|
|
33
|
-
]),
|
|
34
|
+
]), p = /^[a-z][a-zA-Z0-9]*\.[a-z][a-zA-Z0-9]*$/, m = (e) => typeof e == "string" && e.trim() !== "", h = (e) => {
|
|
34
35
|
try {
|
|
35
|
-
let
|
|
36
|
-
return
|
|
36
|
+
let t = JSON.parse(e);
|
|
37
|
+
return s(t) ? t : void 0;
|
|
37
38
|
} catch {
|
|
38
39
|
return;
|
|
39
40
|
}
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
!
|
|
43
|
-
path: `${
|
|
41
|
+
}, g = (e, t, n) => {
|
|
42
|
+
e !== void 0 && (s(e) ? Object.entries(e).forEach(([e, r]) => {
|
|
43
|
+
!s(r) || !m(r.type) ? n.push({
|
|
44
|
+
path: `${t}.${e}`,
|
|
44
45
|
message: "must declare a type"
|
|
45
|
-
}) :
|
|
46
|
-
path: `${
|
|
47
|
-
message: `unknown field type "${
|
|
48
|
-
hint: `one of ${
|
|
46
|
+
}) : c.includes(r.type) || n.push({
|
|
47
|
+
path: `${t}.${e}.type`,
|
|
48
|
+
message: `unknown field type "${r.type}"`,
|
|
49
|
+
hint: `one of ${c.join(", ")}`
|
|
49
50
|
});
|
|
50
|
-
}) :
|
|
51
|
-
path:
|
|
51
|
+
}) : n.push({
|
|
52
|
+
path: t,
|
|
52
53
|
message: "must be an object of field definitions"
|
|
53
54
|
}));
|
|
54
|
-
},
|
|
55
|
-
let
|
|
56
|
-
if (!
|
|
57
|
-
|
|
58
|
-
path: `${
|
|
55
|
+
}, _ = (n, r, c, f) => {
|
|
56
|
+
let p = `nodes.${n}`, _ = r.action;
|
|
57
|
+
if (!m(_) || !u.includes(_)) {
|
|
58
|
+
c.push({
|
|
59
|
+
path: `${p}.action`,
|
|
59
60
|
message: `"${String(_)}" is not a way an action can be started`,
|
|
60
|
-
hint: `one of ${
|
|
61
|
+
hint: `one of ${u.join(", ")}`
|
|
61
62
|
});
|
|
62
63
|
return;
|
|
63
64
|
}
|
|
64
|
-
let v =
|
|
65
|
-
if (
|
|
66
|
-
let e =
|
|
67
|
-
e === void 0 ?
|
|
68
|
-
path: `${
|
|
65
|
+
let v = s(r.params) ? r.params : {};
|
|
66
|
+
if (m(v.input)) {
|
|
67
|
+
let e = h(v.input);
|
|
68
|
+
e === void 0 ? c.push({
|
|
69
|
+
path: `${p}.params.input`,
|
|
69
70
|
message: "is not valid JSON"
|
|
70
|
-
}) :
|
|
71
|
+
}) : g(e, `${p}.params.input`, c);
|
|
71
72
|
}
|
|
72
73
|
if (_ !== "schedule" && _ !== "later") {
|
|
73
|
-
if (!
|
|
74
|
-
path: `${
|
|
74
|
+
if (!m(v.access) || !l.includes(v.access)) c.push({
|
|
75
|
+
path: `${p}.params.access`,
|
|
75
76
|
message: "must say who may start a run this way",
|
|
76
|
-
hint: `one of ${
|
|
77
|
+
hint: `one of ${l.join(", ")}`
|
|
77
78
|
});
|
|
78
79
|
else if (v.access === "role") {
|
|
79
80
|
let e = i(v);
|
|
80
|
-
e?.mode === "role" && e.permissions.length === 0 &&
|
|
81
|
-
path: `${
|
|
81
|
+
e?.mode === "role" && e.permissions.length === 0 && c.push({
|
|
82
|
+
path: `${p}.params.permissions`,
|
|
82
83
|
message: "role access must name at least one permission"
|
|
83
84
|
});
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
|
-
if (_ === "schedule" && (
|
|
87
|
-
path: `${
|
|
87
|
+
if (_ === "schedule" && (m(v.cron) ? t(v.cron) || c.push({
|
|
88
|
+
path: `${p}.params.cron`,
|
|
88
89
|
message: `"${v.cron}" is not an expression this server can read, so it would never fire`,
|
|
89
90
|
hint: "five fields — minute hour day-of-month month day-of-week — with *, lists, ranges and steps"
|
|
90
|
-
}) :
|
|
91
|
-
path: `${
|
|
91
|
+
}) : c.push({
|
|
92
|
+
path: `${p}.params.cron`,
|
|
92
93
|
message: "a scheduled trigger needs a cron expression"
|
|
93
|
-
}),
|
|
94
|
-
path: `${
|
|
94
|
+
}), m(v.timezone) && !e(v.timezone) && c.push({
|
|
95
|
+
path: `${p}.params.timezone`,
|
|
95
96
|
message: `"${v.timezone}" is not a time zone this server knows, so the schedule would never fire`,
|
|
96
97
|
hint: "an IANA name like America/Santiago or Europe/Madrid — leave it empty for UTC"
|
|
97
|
-
})),
|
|
98
|
+
})), m(v.cacheSeconds)) {
|
|
98
99
|
let e = Number.parseFloat(v.cacheSeconds);
|
|
99
|
-
!Number.isFinite(e) || e < 0 ?
|
|
100
|
-
path: `${
|
|
100
|
+
!Number.isFinite(e) || e < 0 ? c.push({
|
|
101
|
+
path: `${p}.params.cacheSeconds`,
|
|
101
102
|
message: "must be a number of seconds, or left empty"
|
|
102
103
|
}) : _ !== "render" && f.push({
|
|
103
|
-
path: `${
|
|
104
|
+
path: `${p}.params.cacheSeconds`,
|
|
104
105
|
message: `a "${_}" trigger is never answered from a cache`,
|
|
105
106
|
hint: "reuse only applies to a render, where the same page is built for one visitor after another"
|
|
106
107
|
});
|
|
107
108
|
}
|
|
108
|
-
_ === "custom" && !
|
|
109
|
-
path: `${
|
|
109
|
+
_ === "custom" && !m(v.name) && c.push({
|
|
110
|
+
path: `${p}.params.name`,
|
|
110
111
|
message: "a custom trigger needs a name to be mounted under"
|
|
111
|
-
}), _ === "webhook" && (a(v) &&
|
|
112
|
-
path: `${
|
|
112
|
+
}), _ === "webhook" && (a(v) && c.push({
|
|
113
|
+
path: `${p}.params.signatureCredential`,
|
|
113
114
|
message: "this signature check is in a format nothing reads any more, so the webhook is unverified",
|
|
114
115
|
hint: "name the credential holding the signing secret in \"Signing secret\", and its header beside it"
|
|
115
116
|
}), o(v) || f.push({
|
|
116
|
-
path: `${
|
|
117
|
+
path: `${p}.params.signatureCredential`,
|
|
117
118
|
message: "this webhook accepts unsigned requests",
|
|
118
119
|
hint: "name the credential holding the signing secret, and only the sender you expect can start a run"
|
|
119
|
-
}),
|
|
120
|
-
path: `${
|
|
120
|
+
}), m(v.signatureAlgorithm) && !d.includes(v.signatureAlgorithm) && f.push({
|
|
121
|
+
path: `${p}.params.signatureAlgorithm`,
|
|
121
122
|
message: `"${v.signatureAlgorithm}" is not an algorithm this server signs with, so sha256 is used`,
|
|
122
|
-
hint: `one of ${
|
|
123
|
-
}),
|
|
124
|
-
path: `${
|
|
123
|
+
hint: `one of ${d.join(", ")}`
|
|
124
|
+
}), m(v.signatureToleranceSeconds) && !m(v.signatureTimestampHeader) && f.push({
|
|
125
|
+
path: `${p}.params.signatureToleranceSeconds`,
|
|
125
126
|
message: "a tolerance with no timestamp header expires nothing",
|
|
126
127
|
hint: "name the header the sender puts the signing time in, or drop the tolerance"
|
|
127
128
|
})), _ === "call" && v.access === "public" && f.push({
|
|
128
|
-
path: `${
|
|
129
|
+
path: `${p}.params.access`,
|
|
129
130
|
message: "anyone can run this action, including signed-out visitors",
|
|
130
131
|
hint: "use session access unless the page needs it before anyone signs in"
|
|
131
132
|
});
|
|
132
|
-
},
|
|
133
|
-
if (!e
|
|
134
|
-
|
|
133
|
+
}, v = (e, t, r, i) => {
|
|
134
|
+
if (!s(e)) {
|
|
135
|
+
r.push({
|
|
135
136
|
path: "nodes",
|
|
136
137
|
message: "must be an object of steps"
|
|
137
138
|
});
|
|
138
139
|
return;
|
|
139
140
|
}
|
|
140
|
-
let
|
|
141
|
-
|
|
141
|
+
let a = Object.entries(e), o = a.filter(([, e]) => s(e) && e.type === "trigger");
|
|
142
|
+
o.length === 0 && r.push({
|
|
142
143
|
path: "nodes",
|
|
143
144
|
message: "this action has no way in",
|
|
144
145
|
hint: "add a trigger step — call, webhook, schedule, render or custom"
|
|
145
146
|
});
|
|
146
147
|
let c = /* @__PURE__ */ new Map();
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
o.forEach(([e, t]) => {
|
|
149
|
+
m(t.action) && c.set(t.action, [...c.get(t.action) ?? [], e]);
|
|
149
150
|
}), c.forEach((e, t) => {
|
|
150
|
-
e.length > 1 &&
|
|
151
|
+
e.length > 1 && r.push({
|
|
151
152
|
path: `nodes.${e[1]}`,
|
|
152
153
|
message: `this action has ${e.length} "${t}" triggers`,
|
|
153
154
|
hint: "one step per way in — a second flow starts from a different kind of trigger"
|
|
154
155
|
});
|
|
155
|
-
}),
|
|
156
|
-
let
|
|
157
|
-
|
|
158
|
-
path: `${
|
|
156
|
+
}), a.forEach(([t, n]) => {
|
|
157
|
+
let a = `nodes.${t}`;
|
|
158
|
+
s(n) ? n.type === "trigger" ? _(t, n, r, i) : n.type === "task" ? !m(n.action) || !p.test(n.action) ? r.push({
|
|
159
|
+
path: `${a}.action`,
|
|
159
160
|
message: "must name a task as <namespace>.<action>",
|
|
160
161
|
hint: "for example flow.output or http.request"
|
|
161
|
-
}) :
|
|
162
|
-
path: `${
|
|
163
|
-
message: `points at "${
|
|
164
|
-
}) :
|
|
165
|
-
path: `${
|
|
166
|
-
message: `"${String(
|
|
162
|
+
}) : m(n.afterNode) && !Object.hasOwn(e, n.afterNode) && r.push({
|
|
163
|
+
path: `${a}.afterNode`,
|
|
164
|
+
message: `points at "${n.afterNode}", which is not a step here`
|
|
165
|
+
}) : r.push({
|
|
166
|
+
path: `${a}.type`,
|
|
167
|
+
message: `"${String(n.type)}" steps run in the browser and cannot run on the server`,
|
|
167
168
|
hint: "a server action is made of task steps"
|
|
168
|
-
}) :
|
|
169
|
-
path:
|
|
169
|
+
}) : r.push({
|
|
170
|
+
path: a,
|
|
170
171
|
message: "must be an object"
|
|
171
172
|
});
|
|
172
|
-
}),
|
|
173
|
-
|
|
173
|
+
}), a.forEach(([e]) => {
|
|
174
|
+
f.has(e) && r.push({
|
|
174
175
|
path: `nodes.${e}`,
|
|
175
176
|
message: `"${e}" is what the run itself publishes in the flow scope, so a step may not take the name`,
|
|
176
177
|
hint: `rename the step — every later step reads {{ ${e} }} expecting the run's own value`
|
|
177
178
|
});
|
|
178
179
|
});
|
|
179
|
-
let l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(),
|
|
180
|
-
|
|
181
|
-
let n = /* @__PURE__ */ new Set(), r = [], i =
|
|
180
|
+
let l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), d = [];
|
|
181
|
+
o.forEach(([t]) => {
|
|
182
|
+
let n = /* @__PURE__ */ new Set(), r = [], i = t;
|
|
182
183
|
for (; i;) {
|
|
183
184
|
if (n.has(i)) {
|
|
184
185
|
u.add(i);
|
|
185
186
|
break;
|
|
186
187
|
}
|
|
187
188
|
n.add(i), r.push(i), l.add(i);
|
|
188
|
-
let
|
|
189
|
-
i =
|
|
189
|
+
let t = e[i];
|
|
190
|
+
i = m(t?.afterNode) ? t.afterNode : "";
|
|
190
191
|
}
|
|
191
|
-
|
|
192
|
+
d.push(r);
|
|
192
193
|
}), u.forEach((e) => {
|
|
193
|
-
|
|
194
|
+
r.push({
|
|
194
195
|
path: `nodes.${e}`,
|
|
195
196
|
message: "this step is reached again by its own chain, so the flow never ends",
|
|
196
197
|
hint: "break the `afterNode` chain that comes back to it"
|
|
197
198
|
});
|
|
198
|
-
}),
|
|
199
|
-
l.has(e) ||
|
|
199
|
+
}), a.forEach(([e]) => {
|
|
200
|
+
l.has(e) || i.push({
|
|
200
201
|
path: `nodes.${e}`,
|
|
201
202
|
message: "no trigger reaches this step, so it never runs",
|
|
202
203
|
hint: "chain it with `afterNode` from a trigger, or delete it"
|
|
203
204
|
});
|
|
204
205
|
});
|
|
205
|
-
let h = (
|
|
206
|
-
for (let [
|
|
207
|
-
let r =
|
|
208
|
-
|
|
209
|
-
path: `nodes.${
|
|
206
|
+
let h = (t) => e[t]?.action, g = a.filter(([, e]) => s(e) && e.action === "flow.output");
|
|
207
|
+
for (let [t, n] of g) {
|
|
208
|
+
let r = m(n.afterNode) && h(n.afterNode) === "flow.onFailure";
|
|
209
|
+
m(n.afterNode) && Object.hasOwn(e, n.afterNode) && !r && i.push({
|
|
210
|
+
path: `nodes.${t}.afterNode`,
|
|
210
211
|
message: "the output step is not the last one, so the steps after it run for nothing",
|
|
211
212
|
hint: "move flow.output to the end of the flow"
|
|
212
213
|
});
|
|
@@ -214,63 +215,72 @@ var s = [
|
|
|
214
215
|
let v = /* @__PURE__ */ new Set(), y = (e, t) => {
|
|
215
216
|
v.has(`${t.path}|${t.message}`) || (v.add(`${t.path}|${t.message}`), e.push(t));
|
|
216
217
|
};
|
|
217
|
-
|
|
218
|
-
let t = e.findIndex((e) => h(e) ===
|
|
218
|
+
d.forEach((e) => {
|
|
219
|
+
let t = e.findIndex((e) => h(e) === n);
|
|
219
220
|
if (t === -1) return;
|
|
220
|
-
let
|
|
221
|
-
t === 1 && y(
|
|
222
|
-
path: `nodes.${
|
|
221
|
+
let a = e[t];
|
|
222
|
+
t === 1 && y(i, {
|
|
223
|
+
path: `nodes.${a}`,
|
|
223
224
|
message: "nothing runs before this step, so nothing can fail and the steps after it never run",
|
|
224
225
|
hint: "put On Failure after the steps whose work it undoes"
|
|
225
|
-
}), t === e.length - 1 && y(
|
|
226
|
-
path: `nodes.${
|
|
226
|
+
}), t === e.length - 1 && y(i, {
|
|
227
|
+
path: `nodes.${a}`,
|
|
227
228
|
message: "nothing follows this step, so a failed run undoes nothing",
|
|
228
229
|
hint: "add the steps that give back what the flow already did"
|
|
229
230
|
}), e.slice(t + 1).forEach((e) => {
|
|
230
|
-
h(e) === "flow.onFailure" && y(
|
|
231
|
+
h(e) === "flow.onFailure" && y(r, {
|
|
231
232
|
path: `nodes.${e}`,
|
|
232
233
|
message: "a flow has one place its undo begins, and this is a second one",
|
|
233
234
|
hint: "keep one On Failure step and put every undo step after it"
|
|
234
|
-
}), h(e) === "flow.output" && y(
|
|
235
|
+
}), h(e) === "flow.output" && y(r, {
|
|
235
236
|
path: `nodes.${e}`,
|
|
236
237
|
message: "an output step after On Failure answers a run that has already failed",
|
|
237
238
|
hint: "move flow.output before On Failure"
|
|
238
239
|
});
|
|
239
240
|
});
|
|
240
|
-
}),
|
|
241
|
+
}), g.length === 0 && s(t) && Object.keys(t).length > 0 && i.push({
|
|
241
242
|
path: "nodes",
|
|
242
243
|
message: "this action is expected to answer values but no step names any",
|
|
243
244
|
hint: "add a flow.output step at the end naming what the caller should get"
|
|
244
245
|
});
|
|
245
|
-
},
|
|
246
|
-
Object.entries(
|
|
247
|
-
if (!
|
|
248
|
-
let
|
|
249
|
-
Object.entries(
|
|
250
|
-
typeof
|
|
251
|
-
path: `nodes.${
|
|
246
|
+
}, y = /\{\{\s*credential\./, b = (e, t) => {
|
|
247
|
+
Object.entries(e).forEach(([e, n]) => {
|
|
248
|
+
if (!s(n) || !s(n.params)) return;
|
|
249
|
+
let r = m(n.params.credential) ? n.params.credential : "";
|
|
250
|
+
Object.entries(n.params).forEach(([n, i]) => {
|
|
251
|
+
typeof i == "string" && y.test(i) && r === "" && t.push({
|
|
252
|
+
path: `nodes.${e}.params.${n}`,
|
|
252
253
|
message: "this step reads a credential it did not ask for, so the token resolves to nothing",
|
|
253
254
|
hint: "set the step’s `credential` to the identifier it should use"
|
|
254
255
|
});
|
|
255
256
|
});
|
|
256
257
|
});
|
|
257
|
-
},
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
}, x = (e, t) => {
|
|
259
|
+
Object.entries(e).forEach(([e, n]) => {
|
|
260
|
+
if (!s(n) || n.action !== "flow.delay" || !s(n.params)) return;
|
|
261
|
+
let i = n.params.milliseconds, a = typeof i == "number" ? i : typeof i == "string" ? Number(i.trim()) : NaN;
|
|
262
|
+
Number.isFinite(a) && a > 5e3 && t.push({
|
|
263
|
+
path: `nodes.${e}.params.milliseconds`,
|
|
264
|
+
message: `this step waits ${String(a)} ms, and a step waits at most ${String(r)} ms`,
|
|
265
|
+
hint: "a longer wait is a schedule: enqueue the rest of the work for later instead of holding the run"
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
}, S = (e) => {
|
|
269
|
+
let t = [], n = [];
|
|
270
|
+
return s(e) ? (m(e.name) || t.push({
|
|
260
271
|
path: "name",
|
|
261
272
|
message: "must have a name"
|
|
262
|
-
}),
|
|
263
|
-
valid:
|
|
264
|
-
errors:
|
|
265
|
-
warnings:
|
|
273
|
+
}), g(e.output, "output", t), v(e.nodes, e.output, t, n), b(s(e.nodes) ? e.nodes : {}, n), x(s(e.nodes) ? e.nodes : {}, n), {
|
|
274
|
+
valid: t.length === 0,
|
|
275
|
+
errors: t,
|
|
276
|
+
warnings: n
|
|
266
277
|
}) : {
|
|
267
278
|
valid: !1,
|
|
268
279
|
errors: [{
|
|
269
280
|
path: "",
|
|
270
281
|
message: "the document must be an object"
|
|
271
282
|
}],
|
|
272
|
-
warnings:
|
|
283
|
+
warnings: n
|
|
273
284
|
};
|
|
274
|
-
},
|
|
275
|
-
|
|
276
|
-
export { x as isActionDocument, b as validateActionDocument };
|
|
285
|
+
}, C = (e) => S(e).valid;
|
|
286
|
+
export { C as isActionDocument, S as validateActionDocument };
|