zitejs 0.10.0-start.9 → 0.10.1-device.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/auth/actions.d.ts +28 -0
- package/dist/cjs/auth/actions.js +95 -0
- package/dist/cjs/auth/client.d.ts +357 -0
- package/dist/cjs/auth/client.js +71 -0
- package/dist/cjs/auth/config.js +9 -3
- package/dist/cjs/auth/index.d.ts +2 -249
- package/dist/cjs/auth/index.js +11 -108
- package/dist/cjs/auth/index.test.js +60 -0
- package/dist/cjs/auth/previewClaim.d.ts +7 -0
- package/dist/cjs/auth/previewClaim.js +16 -0
- package/dist/cjs/auth/profileUpdates.d.ts +9 -0
- package/dist/cjs/auth/profileUpdates.js +11 -0
- package/dist/cjs/auth/useAuth.test.js +1 -0
- package/dist/cjs/backend/index.d.ts +15 -9
- package/dist/cjs/backend/index.js +13 -13
- package/dist/cjs/backend/index.test.js +102 -102
- package/dist/cjs/bundle/index.d.ts +8 -0
- package/dist/cjs/bundle/index.js +38 -24
- package/dist/cjs/caller/index.js +37 -48
- package/dist/cjs/check/index.d.ts +20 -9
- package/dist/cjs/check/index.js +113 -88
- package/dist/cjs/check/start/routeTree.d.ts +8 -0
- package/dist/cjs/check/start/routeTree.js +118 -0
- package/dist/cjs/check/start/tsgo.d.ts +2 -0
- package/dist/cjs/check/start/tsgo.js +35 -0
- package/dist/cjs/cli.js +10 -4
- package/dist/cjs/client/index.d.ts +26 -2
- package/dist/cjs/client/index.js +25 -25
- package/dist/cjs/dev/index.js +79 -54
- package/dist/cjs/dev/signin.d.ts +16 -0
- package/dist/cjs/dev/signin.js +84 -0
- package/dist/cjs/index.d.ts +5 -5
- package/dist/cjs/integrations/client.d.ts +3 -3
- package/dist/cjs/integrations/client.js +5 -4
- package/dist/cjs/integrations/client.test-d.js +15 -15
- package/dist/cjs/integrations/index.d.ts +2 -2
- package/dist/cjs/integrations/rules.d.ts +1 -0
- package/dist/cjs/integrations/rules.js +48 -43
- package/dist/cjs/integrations/rules.test.js +60 -54
- package/dist/cjs/internal/appMode.d.ts +14 -0
- package/dist/cjs/internal/appMode.js +19 -0
- package/dist/cjs/internal/browserMode.d.ts +2 -0
- package/dist/cjs/internal/browserMode.js +18 -0
- package/dist/cjs/internal/deviceCache.d.ts +11 -0
- package/dist/cjs/internal/deviceCache.js +29 -0
- package/dist/cjs/internal/env.js +3 -2
- package/dist/cjs/internal/platformFetch.d.ts +2 -0
- package/dist/cjs/internal/platformFetch.js +14 -0
- package/dist/cjs/internal/reservedIds.d.ts +8 -0
- package/dist/cjs/internal/reservedIds.js +14 -0
- package/dist/cjs/internal/serviceUrls.d.ts +5 -0
- package/dist/cjs/internal/serviceUrls.js +14 -0
- package/dist/cjs/pdf/index.js +2 -1
- package/dist/cjs/query/deviceCache.d.ts +14 -0
- package/dist/cjs/query/deviceCache.js +304 -0
- package/dist/cjs/query/index.d.ts +19 -0
- package/dist/cjs/query/index.js +369 -0
- package/dist/cjs/runtime/filterConditionTypes.test-d.js +11 -11
- package/dist/cjs/runtime/index.d.ts +126 -39
- package/dist/cjs/runtime/index.js +32 -26
- package/dist/cjs/runtime/index.test.js +34 -34
- package/dist/cjs/runtime/sendEmailParamsTypes.test-d.js +50 -0
- package/dist/cjs/runtime/writeResultTypes.test-d.js +8 -8
- package/dist/cjs/sourceRoots.js +15 -15
- package/dist/cjs/sourceRoots.test.js +29 -27
- package/dist/cjs/start/{entries.d.ts → build/entries.d.ts} +9 -4
- package/dist/cjs/start/{entries.js → build/entries.js} +38 -21
- package/dist/cjs/start/build/placeholders/devApp.d.ts +1 -0
- package/dist/cjs/start/build/placeholders/devApp.js +6 -0
- package/dist/cjs/start/{describeBuilt.d.ts → describe/describeBuilt.d.ts} +2 -0
- package/dist/cjs/start/{describeBuilt.js → describe/describeBuilt.js} +55 -17
- package/dist/cjs/start/platform/aiUsage.d.ts +29 -0
- package/dist/cjs/start/platform/aiUsage.js +215 -0
- package/dist/cjs/start/platform/airtable/cache.d.ts +17 -0
- package/dist/cjs/start/platform/airtable/cache.js +93 -0
- package/dist/cjs/start/protocol.d.ts +19 -0
- package/dist/cjs/start/protocol.js +33 -0
- package/dist/cjs/start/serve/local/provider.d.ts +25 -0
- package/dist/cjs/start/serve/local/provider.js +196 -0
- package/dist/cjs/start/serve/provider.d.ts +19 -0
- package/dist/cjs/start/serve/provider.js +86 -0
- package/dist/cjs/start/types.d.ts +373 -0
- package/dist/cjs/start/types.js +2 -0
- package/dist/cjs/steps/index.d.ts +78 -0
- package/dist/cjs/steps/index.js +507 -0
- package/dist/cjs/steps/index.test.js +635 -0
- package/dist/cjs/sync/index.d.ts +1 -1
- package/dist/cjs/sync/index.js +28 -27
- package/dist/cjs/sync/lib.d.ts +15 -8
- package/dist/cjs/sync/lib.js +655 -655
- package/dist/cjs/sync/lib.test.js +177 -46
- package/dist/cjs/sync/sdkNames.d.ts +67 -9
- package/dist/cjs/sync/sdkNames.js +97 -31
- package/dist/cjs/sync/sdkNames.test.js +189 -113
- package/dist/cjs/types/fields.d.ts +9 -2
- package/dist/cjs/types/fields.js +110 -96
- package/dist/cjs/types/index.d.ts +2 -2
- package/dist/cjs/types/tables.d.ts +17 -1
- package/dist/cjs/upload/index.js +89 -24
- package/dist/cjs/upload/index.test.js +104 -1
- package/dist/cjs/vite/domTagNames.js +252 -252
- package/dist/cjs/vite/index.d.ts +1 -1
- package/dist/cjs/vite/index.js +87 -42
- package/dist/cjs/vite/index.test.js +36 -0
- package/dist/esm/auth/actions.d.ts +28 -0
- package/dist/esm/auth/actions.js +57 -0
- package/dist/esm/auth/client.d.ts +357 -0
- package/dist/esm/auth/client.js +67 -0
- package/dist/esm/auth/config.js +9 -3
- package/dist/esm/auth/index.d.ts +2 -249
- package/dist/esm/auth/index.js +2 -103
- package/dist/esm/auth/index.test.js +60 -0
- package/dist/esm/auth/previewClaim.d.ts +7 -0
- package/dist/esm/auth/previewClaim.js +12 -0
- package/dist/esm/auth/profileUpdates.d.ts +9 -0
- package/dist/esm/auth/profileUpdates.js +6 -0
- package/dist/esm/auth/useAuth.test.js +1 -0
- package/dist/esm/backend/index.d.ts +15 -9
- package/dist/esm/backend/index.js +13 -13
- package/dist/esm/backend/index.test.js +106 -106
- package/dist/esm/bundle/index.d.ts +8 -0
- package/dist/esm/bundle/index.js +37 -24
- package/dist/esm/caller/index.js +37 -48
- package/dist/esm/check/index.d.ts +20 -9
- package/dist/esm/check/index.js +117 -93
- package/dist/esm/check/start/routeTree.d.ts +8 -0
- package/dist/esm/check/start/routeTree.js +77 -0
- package/dist/esm/check/start/tsgo.d.ts +2 -0
- package/dist/esm/check/start/tsgo.js +29 -0
- package/dist/esm/cli.js +10 -4
- package/dist/esm/client/index.d.ts +26 -2
- package/dist/esm/client/index.js +25 -25
- package/dist/esm/dev/index.js +86 -61
- package/dist/esm/dev/signin.d.ts +16 -0
- package/dist/esm/dev/signin.js +80 -0
- package/dist/esm/index.d.ts +5 -5
- package/dist/esm/index.js +3 -3
- package/dist/esm/integrations/client.d.ts +3 -3
- package/dist/esm/integrations/client.js +6 -5
- package/dist/esm/integrations/client.test-d.js +19 -19
- package/dist/esm/integrations/index.d.ts +2 -2
- package/dist/esm/integrations/index.js +1 -1
- package/dist/esm/integrations/rules.d.ts +1 -0
- package/dist/esm/integrations/rules.js +48 -43
- package/dist/esm/integrations/rules.test.js +62 -56
- package/dist/esm/internal/appMode.d.ts +14 -0
- package/dist/esm/internal/appMode.js +13 -0
- package/dist/esm/internal/browserMode.d.ts +2 -0
- package/dist/esm/internal/browserMode.js +15 -0
- package/dist/esm/internal/deviceCache.d.ts +11 -0
- package/dist/esm/internal/deviceCache.js +24 -0
- package/dist/esm/internal/env.js +3 -2
- package/dist/esm/internal/platformFetch.d.ts +2 -0
- package/dist/esm/internal/platformFetch.js +9 -0
- package/dist/esm/internal/reservedIds.d.ts +8 -0
- package/dist/esm/internal/reservedIds.js +10 -0
- package/dist/esm/internal/serviceUrls.d.ts +5 -0
- package/dist/esm/internal/serviceUrls.js +10 -0
- package/dist/esm/pdf/index.js +2 -1
- package/dist/esm/query/deviceCache.d.ts +14 -0
- package/dist/esm/query/deviceCache.js +301 -0
- package/dist/esm/query/index.d.ts +19 -0
- package/dist/esm/query/index.js +366 -0
- package/dist/esm/runtime/filterConditionTypes.test-d.js +12 -12
- package/dist/esm/runtime/index.d.ts +126 -39
- package/dist/esm/runtime/index.js +35 -29
- package/dist/esm/runtime/index.test.js +36 -36
- package/dist/esm/runtime/sendEmailParamsTypes.test-d.d.ts +1 -0
- package/dist/esm/runtime/sendEmailParamsTypes.test-d.js +48 -0
- package/dist/esm/runtime/writeResultTypes.test-d.js +9 -9
- package/dist/esm/signin/conformance.d.ts +100 -0
- package/dist/esm/signin/conformance.js +616 -0
- package/dist/esm/signin/cookies.d.ts +28 -0
- package/dist/esm/signin/cookies.js +67 -0
- package/dist/esm/signin/encoding.d.ts +1 -0
- package/dist/esm/signin/encoding.js +12 -0
- package/dist/esm/signin/endpoints.d.ts +12 -0
- package/dist/esm/signin/endpoints.js +32 -0
- package/dist/esm/signin/http.d.ts +25 -0
- package/dist/esm/signin/http.js +106 -0
- package/dist/esm/signin/index.d.ts +8 -0
- package/dist/esm/signin/index.js +9 -0
- package/dist/esm/signin/keys.d.ts +35 -0
- package/dist/esm/signin/keys.js +230 -0
- package/dist/esm/signin/paths.d.ts +2 -0
- package/dist/esm/signin/paths.js +5 -0
- package/dist/esm/signin/seal.d.ts +19 -0
- package/dist/esm/signin/seal.js +47 -0
- package/dist/esm/signin/signin.d.ts +60 -0
- package/dist/esm/signin/signin.js +447 -0
- package/dist/esm/signin/transport.d.ts +112 -0
- package/dist/esm/signin/transport.js +1 -0
- package/dist/esm/signin/verifier.d.ts +2 -0
- package/dist/esm/signin/verifier.js +4 -0
- package/dist/esm/signin/verify.d.ts +83 -0
- package/dist/esm/signin/verify.js +142 -0
- package/dist/esm/sourceRoots.js +17 -17
- package/dist/esm/sourceRoots.test.js +34 -32
- package/dist/esm/start/access.d.ts +19 -0
- package/dist/esm/start/access.js +43 -0
- package/dist/esm/start/auth.d.ts +28 -0
- package/dist/esm/start/auth.js +33 -0
- package/dist/esm/start/automations/quiet.d.ts +2 -0
- package/dist/esm/start/automations/quiet.js +36 -0
- package/dist/esm/start/{registration.d.ts → automations/registration.d.ts} +1 -1
- package/dist/esm/start/{registration.js → automations/registration.js} +11 -7
- package/dist/esm/start/automations/steps.d.ts +29 -0
- package/dist/esm/start/automations/steps.js +95 -0
- package/dist/esm/start/automations/workflow.d.ts +83 -0
- package/dist/esm/start/automations/workflow.js +36 -0
- package/dist/esm/start/automations/workflow.test-d.d.ts +1 -0
- package/dist/esm/start/automations/workflow.test-d.js +130 -0
- package/dist/esm/start/automations/workflowRun.d.ts +130 -0
- package/dist/esm/start/automations/workflowRun.js +185 -0
- package/dist/esm/start/barrel.test-d.d.ts +10 -0
- package/dist/esm/start/barrel.test-d.js +6 -0
- package/dist/esm/start/{entries.d.ts → build/entries.d.ts} +9 -4
- package/dist/esm/start/{entries.js → build/entries.js} +38 -22
- package/dist/esm/start/build/placeholders/devApp.d.ts +1 -0
- package/dist/esm/start/build/placeholders/devApp.js +3 -0
- package/dist/esm/start/build/placeholders/devSignIn.d.ts +1 -0
- package/dist/esm/start/build/placeholders/devSignIn.js +3 -0
- package/dist/esm/start/build/placeholders/siteHead.d.ts +2 -0
- package/dist/esm/start/build/placeholders/siteHead.js +3 -0
- package/dist/esm/start/{workflowModules.js → build/placeholders/workflowModules.js} +1 -1
- package/dist/esm/start/build/placeholders/workspaceSchema.d.ts +2 -0
- package/dist/esm/start/build/placeholders/workspaceSchema.js +3 -0
- package/dist/esm/start/build/registrationHash.d.ts +11 -0
- package/dist/esm/start/build/registrationHash.js +88 -0
- package/dist/esm/start/build/sdk/axios.d.ts +76 -0
- package/dist/esm/start/build/sdk/axios.js +253 -0
- package/dist/esm/start/build/sdk/nodeFetch.d.ts +41 -0
- package/dist/esm/start/build/sdk/nodeFetch.js +35 -0
- package/dist/esm/start/build/sdk/undici.d.ts +34 -0
- package/dist/esm/start/build/sdk/undici.js +18 -0
- package/dist/esm/start/build/sdkPatches.d.ts +22 -0
- package/dist/esm/start/build/sdkPatches.js +430 -0
- package/dist/esm/start/build/siteHead.d.ts +26 -0
- package/dist/esm/start/build/siteHead.js +88 -0
- package/dist/esm/start/build/vite.d.ts +50 -0
- package/dist/esm/start/build/vite.js +491 -0
- package/dist/esm/start/classicOnly.d.ts +1 -0
- package/dist/esm/start/classicOnly.js +4 -0
- package/dist/esm/start/{describe.d.ts → describe/describe.d.ts} +44 -9
- package/dist/esm/start/describe/describe.js +372 -0
- package/dist/esm/start/{describeBuilt.d.ts → describe/describeBuilt.d.ts} +2 -0
- package/dist/esm/start/describe/describeBuilt.js +102 -0
- package/dist/esm/start/{descriptions.js → describe/descriptions.js} +17 -10
- package/dist/esm/start/errors.d.ts +15 -4
- package/dist/esm/start/errors.js +87 -28
- package/dist/esm/start/errors.test.js +47 -16
- package/dist/esm/start/factories.d.ts +14 -0
- package/dist/esm/start/factories.js +23 -0
- package/dist/esm/start/factories.test-d.d.ts +2 -1
- package/dist/esm/start/factories.test-d.js +52 -12
- package/dist/esm/start/failures.d.ts +7 -0
- package/dist/esm/start/failures.js +62 -0
- package/dist/esm/start/fnFactory.d.ts +16 -0
- package/dist/esm/start/fnFactory.js +1 -0
- package/dist/esm/start/host.d.ts +2 -2
- package/dist/esm/start/host.js +3 -3
- package/dist/esm/start/index.d.ts +10 -66
- package/dist/esm/start/index.js +7 -146
- package/dist/esm/start/login.d.ts +5 -0
- package/dist/esm/start/login.js +29 -0
- package/dist/esm/start/middlewareKind.d.ts +13 -0
- package/dist/esm/start/middlewareKind.js +9 -0
- package/dist/esm/start/platform/aiUsage.d.ts +29 -0
- package/dist/esm/start/platform/aiUsage.js +210 -0
- package/dist/esm/start/platform/airtable/built.d.ts +2 -0
- package/dist/esm/start/platform/airtable/built.js +3 -0
- package/dist/esm/start/platform/airtable/cache.d.ts +17 -0
- package/dist/esm/start/platform/airtable/cache.js +89 -0
- package/dist/esm/start/{airtable → platform/airtable}/dispatch.d.ts +5 -2
- package/dist/esm/start/{airtable → platform/airtable}/dispatch.js +195 -119
- package/dist/esm/start/{airtable → platform/airtable}/formulas.d.ts +2 -1
- package/dist/esm/start/{airtable → platform/airtable}/formulas.js +51 -25
- package/dist/esm/start/platform/airtable/index.d.ts +6 -0
- package/dist/esm/start/platform/airtable/index.js +51 -0
- package/dist/esm/start/platform/airtable/settings.d.ts +37 -0
- package/dist/esm/start/platform/airtable/settings.js +138 -0
- package/dist/esm/start/platform/analytics.d.ts +3 -0
- package/dist/esm/start/platform/analytics.js +59 -0
- package/dist/esm/start/platform/calls.d.ts +5 -0
- package/dist/esm/start/platform/calls.js +104 -0
- package/dist/esm/start/platform/caps.d.ts +9 -0
- package/dist/esm/start/platform/caps.js +35 -0
- package/dist/esm/start/platform/connections.d.ts +25 -0
- package/dist/esm/start/platform/connections.js +198 -0
- package/dist/esm/start/{data → platform/data}/baseRunner.d.ts +11 -6
- package/dist/esm/start/platform/data/baseRunner.js +117 -0
- package/dist/esm/start/{data → platform/data}/dispatch.d.ts +3 -2
- package/dist/esm/start/{data → platform/data}/dispatch.js +69 -51
- package/dist/esm/start/platform/data/fetch.d.ts +7 -0
- package/dist/esm/start/platform/data/fetch.js +9 -0
- package/dist/esm/start/platform/data/index.d.ts +27 -0
- package/dist/esm/start/platform/data/index.js +75 -0
- package/dist/esm/start/platform/data/names.d.ts +7 -0
- package/dist/esm/start/platform/data/names.js +18 -0
- package/dist/esm/start/{data → platform/data}/transformations.d.ts +0 -31
- package/dist/esm/start/{data → platform/data}/transformations.js +0 -56
- package/dist/esm/start/{data → platform/data}/types.d.ts +4 -1
- package/dist/esm/start/{data → platform/data}/types.js +2 -2
- package/dist/esm/start/platform/local.d.ts +6 -0
- package/dist/esm/start/platform/local.js +18 -0
- package/dist/esm/start/platform/meta.d.ts +3 -0
- package/dist/esm/start/platform/meta.js +33 -0
- package/dist/esm/start/platform/outbound.d.ts +17 -0
- package/dist/esm/start/platform/outbound.js +510 -0
- package/dist/esm/start/platform/redactSecrets.d.ts +13 -0
- package/dist/esm/start/{redactSecrets.js → platform/redactSecrets.js} +32 -7
- package/dist/esm/start/platform/redactSecrets.test.d.ts +1 -0
- package/dist/esm/start/platform/requestSecrets.d.ts +15 -0
- package/dist/esm/start/platform/requestSecrets.js +41 -0
- package/dist/esm/start/platform/runLog.d.ts +40 -0
- package/dist/esm/start/platform/runLog.js +149 -0
- package/dist/esm/start/platform/services.d.ts +7 -0
- package/dist/esm/start/platform/services.js +46 -0
- package/dist/esm/start/platform/steps.d.ts +9 -0
- package/dist/esm/start/platform/steps.js +60 -0
- package/dist/esm/start/platform/telemetry.d.ts +13 -0
- package/dist/esm/start/platform/telemetry.js +71 -0
- package/dist/esm/start/platform/transport.d.ts +28 -0
- package/dist/esm/start/platform/transport.js +59 -0
- package/dist/esm/start/platformHead.d.ts +23 -0
- package/dist/esm/start/platformHead.js +133 -0
- package/dist/esm/start/previewClaim.d.ts +3 -7
- package/dist/esm/start/previewClaim.js +9 -17
- package/dist/esm/start/protocol.d.ts +19 -0
- package/dist/esm/start/protocol.js +27 -0
- package/dist/esm/start/roles.d.ts +12 -0
- package/dist/esm/start/roles.js +27 -0
- package/dist/esm/start/router.d.ts +27 -4
- package/dist/esm/start/router.js +221 -22
- package/dist/esm/start/serve/authHooks.js +18 -0
- package/dist/esm/start/serve/demo.d.ts +9 -0
- package/dist/esm/start/serve/demo.js +24 -0
- package/dist/esm/start/serve/fetch.d.ts +1 -0
- package/dist/esm/start/serve/fetch.js +6 -0
- package/dist/esm/start/{instance.d.ts → serve/instance.d.ts} +6 -5
- package/dist/esm/start/serve/instance.js +134 -0
- package/dist/esm/start/serve/invoke.d.ts +13 -0
- package/dist/esm/start/serve/invoke.js +126 -0
- package/dist/esm/start/serve/local/load.d.ts +8 -0
- package/dist/esm/start/serve/local/load.js +44 -0
- package/dist/esm/start/serve/local/provider.d.ts +25 -0
- package/dist/esm/start/serve/local/provider.js +188 -0
- package/dist/esm/start/serve/local/signIn.d.ts +28 -0
- package/dist/esm/start/serve/local/signIn.js +123 -0
- package/dist/esm/start/serve/pageHead.d.ts +20 -0
- package/dist/esm/start/serve/pageHead.js +34 -0
- package/dist/esm/start/serve/provider.d.ts +19 -0
- package/dist/esm/start/serve/provider.js +78 -0
- package/dist/esm/start/serve/requestEnv.d.ts +2 -0
- package/dist/esm/start/serve/requestEnv.js +84 -0
- package/dist/esm/start/serve/scope.d.ts +18 -0
- package/dist/esm/start/serve/scope.js +67 -0
- package/dist/esm/start/serve/server.d.ts +56 -0
- package/dist/esm/start/serve/server.js +297 -0
- package/dist/esm/start/serve/uploads.d.ts +2 -0
- package/dist/esm/start/serve/uploads.js +49 -0
- package/dist/esm/start/serve/worker.d.ts +6 -0
- package/dist/esm/start/serve/worker.js +12 -0
- package/dist/esm/start/types.d.ts +270 -56
- package/dist/esm/start/version.d.ts +1 -1
- package/dist/esm/start/version.js +1 -1
- package/dist/esm/steps/index.d.ts +78 -0
- package/dist/esm/steps/index.js +502 -0
- package/dist/esm/steps/index.test.d.ts +1 -0
- package/dist/esm/steps/index.test.js +633 -0
- package/dist/esm/sync/index.d.ts +1 -1
- package/dist/esm/sync/index.js +32 -31
- package/dist/esm/sync/lib.d.ts +15 -8
- package/dist/esm/sync/lib.js +659 -659
- package/dist/esm/sync/lib.test.js +177 -46
- package/dist/esm/sync/sdkNames.d.ts +67 -9
- package/dist/esm/sync/sdkNames.js +94 -30
- package/dist/esm/sync/sdkNames.test.js +192 -116
- package/dist/esm/types/fields.d.ts +9 -2
- package/dist/esm/types/fields.js +110 -96
- package/dist/esm/types/index.d.ts +2 -2
- package/dist/esm/types/index.js +2 -2
- package/dist/esm/types/tables.d.ts +17 -1
- package/dist/esm/types/tables.js +2 -2
- package/dist/esm/upload/index.js +89 -24
- package/dist/esm/upload/index.test.js +104 -1
- package/dist/esm/vite/domTagNames.js +252 -252
- package/dist/esm/vite/index.d.ts +1 -1
- package/dist/esm/vite/index.js +92 -47
- package/dist/esm/vite/index.test.js +36 -0
- package/package.json +106 -38
- package/dist/cjs/auth-server/index.d.ts +0 -369
- package/dist/cjs/auth-server/index.js +0 -119
- package/dist/cjs/check/start/describeRules.d.ts +0 -35
- package/dist/cjs/check/start/describeRules.js +0 -89
- package/dist/cjs/check/start/problem.d.ts +0 -11
- package/dist/cjs/check/start/problem.js +0 -5
- package/dist/cjs/check/start/sourceRules.d.ts +0 -3
- package/dist/cjs/check/start/sourceRules.js +0 -441
- package/dist/cjs/start/problems.d.ts +0 -19
- package/dist/cjs/start/problems.js +0 -11
- package/dist/esm/auth-server/index.d.ts +0 -369
- package/dist/esm/auth-server/index.js +0 -116
- package/dist/esm/check/start/describeRules.d.ts +0 -35
- package/dist/esm/check/start/describeRules.js +0 -86
- package/dist/esm/check/start/problem.d.ts +0 -11
- package/dist/esm/check/start/problem.js +0 -1
- package/dist/esm/check/start/sourceRules.d.ts +0 -3
- package/dist/esm/check/start/sourceRules.js +0 -438
- package/dist/esm/start/airtable/index.d.ts +0 -11
- package/dist/esm/start/airtable/index.js +0 -70
- package/dist/esm/start/authHooks.js +0 -10
- package/dist/esm/start/data/baseRunner.js +0 -83
- package/dist/esm/start/data/index.d.ts +0 -18
- package/dist/esm/start/data/index.js +0 -76
- package/dist/esm/start/describe.js +0 -204
- package/dist/esm/start/describeBuilt.js +0 -66
- package/dist/esm/start/instance.js +0 -80
- package/dist/esm/start/problems.d.ts +0 -19
- package/dist/esm/start/problems.js +0 -8
- package/dist/esm/start/redactSecrets.d.ts +0 -7
- package/dist/esm/start/runLog.d.ts +0 -8
- package/dist/esm/start/runLog.js +0 -76
- package/dist/esm/start/scope.d.ts +0 -15
- package/dist/esm/start/scope.js +0 -58
- package/dist/esm/start/server.d.ts +0 -55
- package/dist/esm/start/server.js +0 -317
- package/dist/esm/start/vite.d.ts +0 -9
- package/dist/esm/start/vite.js +0 -173
- package/dist/esm/start/worker.d.ts +0 -11
- package/dist/esm/start/worker.js +0 -20
- package/dist/esm/start/workflow.d.ts +0 -53
- package/dist/esm/start/workflow.js +0 -13
- package/dist/esm/start/workflow.test-d.js +0 -44
- package/dist/esm/start/workflowRun.d.ts +0 -80
- package/dist/esm/start/workflowRun.js +0 -108
- /package/dist/{esm/start/redactSecrets.test.d.ts → cjs/runtime/sendEmailParamsTypes.test-d.d.ts} +0 -0
- /package/dist/{esm/start/workflow.test-d.d.ts → cjs/steps/index.test.d.ts} +0 -0
- /package/dist/esm/start/{authHooksModule.d.ts → build/placeholders/authHooksModule.d.ts} +0 -0
- /package/dist/esm/start/{authHooksModule.js → build/placeholders/authHooksModule.js} +0 -0
- /package/dist/esm/start/{workflowModules.d.ts → build/placeholders/workflowModules.d.ts} +0 -0
- /package/dist/esm/start/{descriptions.d.ts → describe/descriptions.d.ts} +0 -0
- /package/dist/esm/start/{airtable → platform/airtable}/arrayFields.d.ts +0 -0
- /package/dist/esm/start/{airtable → platform/airtable}/arrayFields.js +0 -0
- /package/dist/esm/start/{data → platform/data}/sqlNameMappings.d.ts +0 -0
- /package/dist/esm/start/{data → platform/data}/sqlNameMappings.js +0 -0
- /package/dist/esm/start/{redactSecrets.test.js → platform/redactSecrets.test.js} +0 -0
- /package/dist/esm/start/{authHooks.d.ts → serve/authHooks.d.ts} +0 -0
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import type { StepEventStatus, StepSuspension } from '../steps/index.js';
|
|
2
|
+
import type { AiUsageRecord } from './platform/aiUsage.js';
|
|
3
|
+
import type { AirtableCache } from './platform/airtable/cache.js';
|
|
4
|
+
import type { InvokeKind } from './protocol.js';
|
|
1
5
|
export type Role = {
|
|
2
6
|
id: string;
|
|
3
7
|
name: string;
|
|
@@ -29,8 +33,41 @@ export type RunRecord = {
|
|
|
29
33
|
message: string;
|
|
30
34
|
stack?: string;
|
|
31
35
|
};
|
|
36
|
+
/** A workflow's steps, as they ran, replayed or failed. */
|
|
37
|
+
steps?: StepRecord[];
|
|
38
|
+
/** The step a failed workflow stopped in, where a resume picks up. */
|
|
39
|
+
failedStep?: string;
|
|
40
|
+
/** A durable call that stopped short of the end, which the run's next call carries on from. */
|
|
41
|
+
suspended?: StepSuspension;
|
|
42
|
+
};
|
|
43
|
+
/** One step of a workflow call, as zitejs/steps reports it. `failed` marks a replayed final failure. */
|
|
44
|
+
export type StepRecord = {
|
|
45
|
+
name: string;
|
|
46
|
+
status: StepEventStatus;
|
|
47
|
+
durationMs?: number;
|
|
48
|
+
at: number;
|
|
49
|
+
failed?: true;
|
|
50
|
+
wakeAt?: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* A workflow call the host's run loop calls again, as classic's durable automation calls are: a step that throws with
|
|
54
|
+
* tries left stops the call for a later one instead of reaching the code, and past its budget the call starts no new
|
|
55
|
+
* step. The host sends it on a call it will carry on; without it a run is one call.
|
|
56
|
+
*/
|
|
57
|
+
export type DurableCall = {
|
|
58
|
+
/** 1, the default, for the run's first call. A later call throws a step's saved final failure again rather than run it. */
|
|
59
|
+
invocation?: number;
|
|
60
|
+
/** Which try each step that failed in an earlier call is on, from that call's `retry.attempts`; others are on their first. */
|
|
61
|
+
attempts?: Record<string, number>;
|
|
62
|
+
/** How long the call starts new steps for; 60 seconds by default. */
|
|
63
|
+
budgetMs?: number;
|
|
64
|
+
};
|
|
65
|
+
export type AccessKind = 'signedIn' | 'anyone' | 'webhook' | 'workflow';
|
|
66
|
+
/** The access decision a call runs under, and who it was made for. */
|
|
67
|
+
export type AccessScope = {
|
|
68
|
+
kind: AccessKind;
|
|
69
|
+
user: User | null;
|
|
32
70
|
};
|
|
33
|
-
export type AccessKind = "signedIn" | "anyone" | "webhook" | "workflow";
|
|
34
71
|
/** One data, integration or email call. Who is calling is the platform's to know, never the app's to say. */
|
|
35
72
|
export type PlatformCallInput = {
|
|
36
73
|
integrationId: string;
|
|
@@ -40,10 +77,7 @@ export type PlatformCallInput = {
|
|
|
40
77
|
/** The access decision the call ran under; the platform may narrow on it but never widens. */
|
|
41
78
|
access: AccessKind;
|
|
42
79
|
};
|
|
43
|
-
/**
|
|
44
|
-
* A call's answer. Errors come back as values: Workers RPC keeps a thrown
|
|
45
|
-
* error's message but drops its code.
|
|
46
|
-
*/
|
|
80
|
+
/** A call's answer. Errors come back as values, so the one the app sees keeps its code. */
|
|
47
81
|
export type PlatformCallResult = {
|
|
48
82
|
value: unknown;
|
|
49
83
|
} | {
|
|
@@ -67,71 +101,217 @@ export type CallRecord = {
|
|
|
67
101
|
message: string;
|
|
68
102
|
};
|
|
69
103
|
};
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
104
|
+
/** An outbound fetch, by host and path (never its query), with the connection whose token it carried. */
|
|
105
|
+
export type FetchRecord = {
|
|
106
|
+
at: number;
|
|
107
|
+
method: string;
|
|
108
|
+
/** Whole, with every secret the request knows redacted. */
|
|
109
|
+
url: string;
|
|
110
|
+
/** As classic's run log shows it: cut short, secrets redacted. */
|
|
111
|
+
requestBody?: string;
|
|
112
|
+
status?: number;
|
|
113
|
+
durationMs: number;
|
|
114
|
+
error?: string;
|
|
115
|
+
connection?: string;
|
|
116
|
+
/** Sent again with a refreshed token after a 401. */
|
|
117
|
+
retried?: true;
|
|
118
|
+
/** On Zite's own AI key, which the platform meters itself. */
|
|
119
|
+
ziteAi?: true;
|
|
120
|
+
/** What a call on the org's own AI key used, for analytics. */
|
|
121
|
+
ai?: AiUsageRecord;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Where the platform's services answer this app: `gateway` takes calls on a key Zite pays for, `runs` a live page's
|
|
125
|
+
* analytics and each request's run detail. `email`, `pdf`, `uploads` (the upload session), `steps` (a workflow run's
|
|
126
|
+
* saved steps) and `schedules` are each that service's own endpoint, which the platform picks per workspace and the
|
|
127
|
+
* host names on every dispatch: a call to one it doesn't name fails.
|
|
128
|
+
*/
|
|
129
|
+
export type PlatformUrls = {
|
|
130
|
+
baseRunner: string;
|
|
131
|
+
backend: string;
|
|
132
|
+
gateway?: string;
|
|
133
|
+
runs?: string;
|
|
134
|
+
email?: string;
|
|
135
|
+
pdf?: string;
|
|
136
|
+
uploads?: string;
|
|
137
|
+
steps?: string;
|
|
138
|
+
schedules?: string;
|
|
94
139
|
};
|
|
95
140
|
/**
|
|
96
|
-
*
|
|
97
|
-
*
|
|
141
|
+
* Where the platform is for one request, and what reaches it: Zite's dispatcher through props, or a developer's
|
|
142
|
+
* machine through env. The only zitejs code that knows which.
|
|
98
143
|
*/
|
|
99
|
-
export type
|
|
100
|
-
|
|
144
|
+
export type PlatformProvider = {
|
|
145
|
+
kind: 'zite' | 'local';
|
|
146
|
+
/** The request's app token, renewed when it's about to expire; undefined when the host sent none. */
|
|
147
|
+
token(): Promise<string | undefined>;
|
|
148
|
+
/** What the platform says of the request's app and build: the host's props, or `local`'s backend on the dev token. */
|
|
149
|
+
context(): Promise<AppContext>;
|
|
150
|
+
user(): User | null;
|
|
151
|
+
urls: PlatformUrls | undefined;
|
|
152
|
+
};
|
|
153
|
+
/** An app token with its expiry, which travels beside it: zitejs never reads the token itself. */
|
|
154
|
+
export type ExpiringToken = {
|
|
155
|
+
token: string;
|
|
156
|
+
/** Milliseconds since the epoch. */
|
|
157
|
+
expiresAt: number;
|
|
101
158
|
};
|
|
102
|
-
/**
|
|
159
|
+
/**
|
|
160
|
+
* What the host hands each request beside its app token: the token's renewal, for an answer that outlives the one it
|
|
161
|
+
* was dispatched with. Its presence in props is what marks a request the host dispatched.
|
|
162
|
+
*/
|
|
103
163
|
export type PlatformBinding = {
|
|
104
|
-
/**
|
|
105
|
-
|
|
106
|
-
/** One batch per request, after its response has ended. */
|
|
107
|
-
runs(batch: {
|
|
108
|
-
runs: RunRecord[];
|
|
109
|
-
}): Promise<void>;
|
|
164
|
+
/** The request's app token, signed again when it's about to expire; null once it can't be. */
|
|
165
|
+
appToken(): Promise<ExpiringToken | null>;
|
|
110
166
|
};
|
|
111
167
|
/** A demo is the published build serving a read-only visitor: as live, but every write is refused. */
|
|
112
|
-
export type HostMode =
|
|
168
|
+
export type HostMode = 'live' | 'preview' | 'demo' | 'validate';
|
|
169
|
+
/**
|
|
170
|
+
* What the platform's records say of the request's app and build. The platform signs the same into the app token,
|
|
171
|
+
* which zitejs only sends: it learns these from the host's props, or under `vite dev` from the backend.
|
|
172
|
+
*/
|
|
173
|
+
export type AppContext = {
|
|
174
|
+
/** The app's public identifier. */
|
|
175
|
+
appId: string;
|
|
176
|
+
/** The build's snapshot id; a dev token's is the app's newest. */
|
|
177
|
+
buildId: number;
|
|
178
|
+
/** The app's database: `process.env.ZITE_BASE_ID`. Null when the app has none. */
|
|
179
|
+
baseId: string | null;
|
|
180
|
+
/** Never `validate`, which no platform serves in. */
|
|
181
|
+
mode: Exclude<HostMode, 'validate'>;
|
|
182
|
+
/** The org settings version the request was served under; null when it couldn't be read. */
|
|
183
|
+
orgSettingsVersion: number | null;
|
|
184
|
+
/** Whether the org's plan shows Zite's badge. */
|
|
185
|
+
showZiteBadge: boolean;
|
|
186
|
+
/** The app's URL, a demo's its own as on classic: `process.env.ZITE_APP_URL`. Null when the platform has none to give. */
|
|
187
|
+
appUrl: string | null;
|
|
188
|
+
};
|
|
189
|
+
/** A web app manifest, as `/manifest.webmanifest` serves an installable app's. */
|
|
190
|
+
export type WebManifest = {
|
|
191
|
+
name: string;
|
|
192
|
+
short_name: string;
|
|
193
|
+
start_url: string;
|
|
194
|
+
scope?: string;
|
|
195
|
+
display: 'standalone';
|
|
196
|
+
background_color: string;
|
|
197
|
+
theme_color: string;
|
|
198
|
+
icons: Array<{
|
|
199
|
+
src: string;
|
|
200
|
+
sizes: string;
|
|
201
|
+
type: 'image/png';
|
|
202
|
+
purpose?: 'any';
|
|
203
|
+
}>;
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* What the app's Settings put in its pages' heads. On Zite the host sends them with each request, with the platform's
|
|
207
|
+
* fallbacks (the app's name, its screenshot, the brand kit's icon), so a Branding save needs no rebuild; off Zite
|
|
208
|
+
* `zite()` bakes them from zite.config.json.
|
|
209
|
+
*/
|
|
210
|
+
export type SiteHead = {
|
|
211
|
+
title?: string;
|
|
212
|
+
description?: string;
|
|
213
|
+
/** The share image. */
|
|
214
|
+
image?: string;
|
|
215
|
+
/** The favicon, which stands for the app over any a page sets. */
|
|
216
|
+
icon?: string;
|
|
217
|
+
/** An installable app's; the favicon stands in otherwise. */
|
|
218
|
+
appleTouchIcon?: string;
|
|
219
|
+
/** An installable app's, served at `/manifest.webmanifest`. */
|
|
220
|
+
manifest?: WebManifest;
|
|
221
|
+
};
|
|
222
|
+
/** `ZiteMeta.getWorkspace()`'s answer: where the app and its workspace are in Zite. */
|
|
223
|
+
export type ZiteWorkspace = {
|
|
224
|
+
workspaceHomeUrl: string;
|
|
225
|
+
editorUrl: string;
|
|
226
|
+
appPublicIdentifier: string;
|
|
227
|
+
projectPublicIdentifier: string;
|
|
228
|
+
};
|
|
229
|
+
/** A marketplace demo's listing, which the platform's runtime shows the visitor. */
|
|
230
|
+
export type DemoListing = {
|
|
231
|
+
listingSlug: string;
|
|
232
|
+
listingUrl: string;
|
|
233
|
+
};
|
|
234
|
+
/** What the host sends with each request for its pages: the app's Settings, and the platform's runtime and demo listing. */
|
|
235
|
+
export type HostPage = SiteHead & {
|
|
236
|
+
/** The platform's runtime script, which the editor's preview and the badge run on. */
|
|
237
|
+
runtimeUrl?: string;
|
|
238
|
+
demo?: DemoListing;
|
|
239
|
+
};
|
|
240
|
+
/** A request's head, as its pages render it and carry it to the browser: the Settings, and the platform's part where it serves the app. */
|
|
241
|
+
export type PlatformHead = {
|
|
242
|
+
site: SiteHead;
|
|
243
|
+
platform?: {
|
|
244
|
+
runtimeUrl?: string;
|
|
245
|
+
demo?: DemoListing;
|
|
246
|
+
/** Zite's badge, as the org's plan says. */
|
|
247
|
+
branding: boolean;
|
|
248
|
+
analytics: {
|
|
249
|
+
appId: string;
|
|
250
|
+
enabled: boolean;
|
|
251
|
+
endpointUrl: string;
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
};
|
|
113
255
|
export type HostInvoke = {
|
|
114
|
-
kind:
|
|
256
|
+
kind: InvokeKind;
|
|
115
257
|
name: string;
|
|
116
258
|
};
|
|
259
|
+
/** One of `integrations.get`'s answers, as the platform resolved the connection for the request. */
|
|
260
|
+
export type HostConnection = {
|
|
261
|
+
status: 'connected';
|
|
262
|
+
accessToken: string;
|
|
263
|
+
[extra: string]: string | undefined;
|
|
264
|
+
} | {
|
|
265
|
+
status: 'missing' | 'expired';
|
|
266
|
+
connectUrl: string;
|
|
267
|
+
} | {
|
|
268
|
+
status: 'unavailable';
|
|
269
|
+
message: string;
|
|
270
|
+
userFacingMessage?: string;
|
|
271
|
+
connectUrl?: string;
|
|
272
|
+
serviceId?: number;
|
|
273
|
+
};
|
|
117
274
|
/** The per-request props the host dispatches with. Only the host can set them. */
|
|
118
|
-
export type HostProps = {
|
|
275
|
+
export type HostProps = AppContext & {
|
|
119
276
|
platform: PlatformBinding;
|
|
120
277
|
requestId: string;
|
|
121
278
|
user: User | null;
|
|
122
|
-
|
|
123
|
-
invoke:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
baseId?: string;
|
|
279
|
+
/** A warm-up or a describe goes without props. */
|
|
280
|
+
invoke: {
|
|
281
|
+
kind: Exclude<HostInvoke['kind'], 'warm' | 'describe'>;
|
|
282
|
+
name: string;
|
|
283
|
+
} | null;
|
|
128
284
|
/** An editor preview's access, which zitejs keeps on the app's links and calls. */
|
|
129
285
|
previewClaim?: string;
|
|
130
|
-
/** `process.env` as classic sets it: connections' vars,
|
|
286
|
+
/** `process.env` as classic sets it: connections' vars, then the user's own secrets. */
|
|
131
287
|
env?: Record<string, string>;
|
|
288
|
+
/** Which connection each token var in `env` holds. */
|
|
289
|
+
envConnections?: Record<string, string>;
|
|
290
|
+
/** Each connection's service, which the calls made with its token are counted under. */
|
|
291
|
+
connectionServices?: Record<string, string>;
|
|
292
|
+
/** A resumed run's first attempt, whose saved steps it replays. */
|
|
293
|
+
runRoot?: string;
|
|
294
|
+
/** A workflow call the host's run loop carries on; absent, the run is this one call. */
|
|
295
|
+
durable?: DurableCall;
|
|
296
|
+
/** This request's app token, sent only to `urls`. */
|
|
297
|
+
appToken?: string;
|
|
298
|
+
/** When `appToken` expires, in milliseconds since the epoch; absent without one. */
|
|
299
|
+
appTokenExpiresAt?: number;
|
|
300
|
+
urls?: PlatformUrls;
|
|
301
|
+
/** The head's values and the app's manifest, sent with every request that can open a page or ask for the manifest. */
|
|
302
|
+
page?: HostPage;
|
|
303
|
+
/** The app's access mode, from the platform's records: an internal app serves no page or call to nobody. */
|
|
304
|
+
accessMode: 'internal' | 'external';
|
|
305
|
+
/** `ZiteMeta.getWorkspace()`'s answer, from the build's config. */
|
|
306
|
+
workspace?: ZiteWorkspace;
|
|
307
|
+
/**
|
|
308
|
+
* `integrations.get`'s answers, by connection name, real as classic's, when the host already loaded them for the
|
|
309
|
+
* request: a registration's one connection, and none for a demo. Without them the app asks the backend on its token.
|
|
310
|
+
*/
|
|
311
|
+
connections?: Record<string, HostConnection>;
|
|
132
312
|
};
|
|
133
313
|
/** What the host resolved for this request. Set by the generated server entry, never by the browser. */
|
|
134
|
-
export type
|
|
314
|
+
export type HostRequestState = {
|
|
135
315
|
requestId: string;
|
|
136
316
|
url: string;
|
|
137
317
|
user: User | null;
|
|
@@ -140,20 +320,54 @@ export type ZiteRequestContext = {
|
|
|
140
320
|
appUrl?: string;
|
|
141
321
|
baseId?: string;
|
|
142
322
|
previewClaim?: string;
|
|
143
|
-
/** Classic's connection env vars the host sent,
|
|
323
|
+
/** Classic's connection env vars the host sent, which the request's `process.env` holds. */
|
|
144
324
|
env?: Record<string, string>;
|
|
325
|
+
/** What the request's `process.env` holds over the isolate's: the vars the host sent, then what its code set or deleted. */
|
|
326
|
+
processEnv?: Map<string, string | undefined>;
|
|
327
|
+
/** A platform call this demo made was refused. */
|
|
328
|
+
demoRefused?: boolean;
|
|
329
|
+
envConnections?: Record<string, string>;
|
|
330
|
+
connectionServices?: Record<string, string>;
|
|
331
|
+
/** A resumed run's first attempt, whose saved steps it replays. */
|
|
332
|
+
runRoot?: string;
|
|
333
|
+
durable?: DurableCall;
|
|
334
|
+
/** The connection each token this request was handed belongs to. */
|
|
335
|
+
connectionTokens?: Map<string, string>;
|
|
336
|
+
/** `integrations.get`'s answers this request, by name. */
|
|
337
|
+
connectionAnswers?: Map<string, unknown>;
|
|
338
|
+
/** One refresh per connection per request, however many calls got a 401. */
|
|
339
|
+
refreshing?: Map<string, Promise<string | undefined>>;
|
|
340
|
+
/** The outbound fetches, flushed with its runs. */
|
|
341
|
+
fetches?: FetchRecord[];
|
|
342
|
+
/** The secrets its fetch log redacts, longest first; cleared when a connection is learned. */
|
|
343
|
+
secretValues?: string[];
|
|
344
|
+
/** The isolate's refresh count `secretValues` was read at. */
|
|
345
|
+
secretsAt?: number;
|
|
346
|
+
/** How much of its fetch log is bodies so far. */
|
|
347
|
+
fetchLogChars?: number;
|
|
145
348
|
/** Filled by run capture, flushed to the platform once the response ends. */
|
|
146
349
|
runs: RunRecord[];
|
|
147
350
|
/** The data calls this request made, flushed with its runs. */
|
|
148
351
|
calls?: CallRecord[];
|
|
149
352
|
/** This request's Airtable reads, so the same one twice goes out once. */
|
|
150
353
|
airtableReads?: Map<string, Promise<unknown>>;
|
|
354
|
+
/** This request's view of the Airtable read cache, by connection token. */
|
|
355
|
+
airtableCaches?: Map<string, Promise<AirtableCache | undefined>>;
|
|
151
356
|
/** Records still reading a copy of a body; the flush waits for them. */
|
|
152
357
|
pending?: Promise<void>[];
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
358
|
+
provider?: PlatformProvider;
|
|
359
|
+
/** The request context's, which keeps a send going after the response. */
|
|
360
|
+
waitUntil?: (promise: Promise<unknown>) => void;
|
|
361
|
+
/** A test run of a server function, which the router answers at the invoke path inside TanStack's own request. */
|
|
362
|
+
functionRun?: () => Promise<Response>;
|
|
157
363
|
/** This request's router, so a page's status can follow the error it rendered. */
|
|
158
364
|
router?: unknown;
|
|
365
|
+
/** Its pages' head: the Settings, from the host or the build, and the platform's part where it serves the app. */
|
|
366
|
+
head?: PlatformHead;
|
|
367
|
+
workspace?: ZiteWorkspace;
|
|
368
|
+
connections?: Record<string, Record<string, unknown>>;
|
|
369
|
+
/** The backend's connections, asked once this request when the host didn't hand them over. */
|
|
370
|
+
connectionsLoad?: Promise<{
|
|
371
|
+
connections: Record<string, Record<string, unknown>>;
|
|
372
|
+
}>;
|
|
159
373
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ZITEJS_VERSION = "0.10.
|
|
1
|
+
export declare const ZITEJS_VERSION = "0.10.1-device.0";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Written by scripts/write-version.mjs from package.json.
|
|
2
|
-
export const ZITEJS_VERSION =
|
|
2
|
+
export const ZITEJS_VERSION = '0.10.1-device.0';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { ZiteStep } from '../backend/index.js';
|
|
2
|
+
export declare const STEP_FAILURE_MEMO_KEY = "__ziteStepError";
|
|
3
|
+
export declare const STEP_FAILED_STEP_KEY = "__ziteFailedStep";
|
|
4
|
+
export declare const STEP_RESULT_MAX_BYTES: number;
|
|
5
|
+
export declare const STEP_SLEEP_MAX_MS: number;
|
|
6
|
+
export declare const STEP_DEFAULT_RETRIES = 3;
|
|
7
|
+
export declare const STEP_MAX_RETRIES = 10;
|
|
8
|
+
/** Why a durable call stops short. A retry outranks the other two. */
|
|
9
|
+
export type StepStop = {
|
|
10
|
+
kind: 'retry';
|
|
11
|
+
name: string;
|
|
12
|
+
attempt: number;
|
|
13
|
+
error: unknown;
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'sleep';
|
|
16
|
+
name: string;
|
|
17
|
+
wakeAt: string;
|
|
18
|
+
} | {
|
|
19
|
+
kind: 'step';
|
|
20
|
+
name: string;
|
|
21
|
+
};
|
|
22
|
+
/** A stop that isn't a failure: the run goes on at a wake time, or at once. */
|
|
23
|
+
export type StepSuspension = {
|
|
24
|
+
kind: 'sleep';
|
|
25
|
+
name: string;
|
|
26
|
+
wakeAt: string;
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'step';
|
|
29
|
+
name: string;
|
|
30
|
+
};
|
|
31
|
+
/** A stop to try a step again: each failed step's next try, in the next call. */
|
|
32
|
+
export type StepRetry = {
|
|
33
|
+
step: string;
|
|
34
|
+
attempt: number;
|
|
35
|
+
attempts: Record<string, number>;
|
|
36
|
+
};
|
|
37
|
+
export type StepEventStatus = 'ran' | 'memoized' | 'failed' | 'sleeping' | 'skipped';
|
|
38
|
+
export type StepRuntimeOptions = {
|
|
39
|
+
/** The run's saved steps by name, from earlier calls; filled in as steps save. */
|
|
40
|
+
memos: Record<string, unknown>;
|
|
41
|
+
/** A durable call may stop at a step for its orchestrator to call it again. */
|
|
42
|
+
durable: boolean;
|
|
43
|
+
/** Outside a durable call, what a sleep does: an editor test skips it, an app's request refuses it. */
|
|
44
|
+
sleeps?: 'skip' | 'refuse';
|
|
45
|
+
/** In a durable call, how long it starts new steps for. */
|
|
46
|
+
budgetMs?: number;
|
|
47
|
+
/**
|
|
48
|
+
* How long after the call starts `settle` waits for steps still working.
|
|
49
|
+
* A step past it runs again in the next call. Four minutes by default, so
|
|
50
|
+
* the call answers inside a five-minute request timeout.
|
|
51
|
+
*/
|
|
52
|
+
deadlineMs?: number;
|
|
53
|
+
/** Which try each step that failed in an earlier call is on; others are on their first. */
|
|
54
|
+
attempts?: Record<string, number>;
|
|
55
|
+
/** Saves a step's result, or its final failure. Throws when it can't. */
|
|
56
|
+
save: (name: string, value: unknown, durationMs: number) => Promise<unknown>;
|
|
57
|
+
onEvent?: (name: string, status: StepEventStatus, durationMs?: number, extra?: Record<string, unknown>) => void;
|
|
58
|
+
/** Marks a failed save as the platform's failure rather than the app's. */
|
|
59
|
+
onPlatformFault?: (error: Error) => void;
|
|
60
|
+
now?: () => number;
|
|
61
|
+
};
|
|
62
|
+
export type StepRuntime = {
|
|
63
|
+
step: ZiteStep;
|
|
64
|
+
/** Resolves at the call's first stop. */
|
|
65
|
+
stopped: Promise<void>;
|
|
66
|
+
stop(): StepStop | undefined;
|
|
67
|
+
suspension(): StepSuspension | undefined;
|
|
68
|
+
retry(): StepRetry | undefined;
|
|
69
|
+
/** How many steps this call saved, sleeps included. */
|
|
70
|
+
saved(): number;
|
|
71
|
+
/**
|
|
72
|
+
* Waits for steps still doing work to save, including ones they start, but
|
|
73
|
+
* not for one stuck behind a stop, nor past the deadline.
|
|
74
|
+
*/
|
|
75
|
+
settle(): Promise<void>;
|
|
76
|
+
};
|
|
77
|
+
export declare const isStepFailureMemo: (memo: unknown) => boolean;
|
|
78
|
+
export declare function createStepRuntime(options: StepRuntimeOptions): StepRuntime;
|