@antelopejs/dms 0.21.3 → 0.21.4-next.1001.gdf7ba11
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/E2E.md +101 -10
- package/README.md +3 -3
- package/data/mockup-spec.schema.json +181 -0
- package/dist/config/internal/state.d.ts +4 -1
- package/dist/config/internal/state.js +5 -0
- package/dist/config/internal/state.js.map +1 -1
- package/dist/db/setup-token.d.ts +1 -1
- package/dist/db/setup-token.js +2 -2
- package/dist/db/setup-token.js.map +1 -1
- package/dist/{bin/control → e2e}/backend.d.mts +4 -4
- package/dist/{bin/control → e2e}/base.d.mts +5 -5
- package/dist/{bin/control → e2e}/browser.d.mts +2 -28
- package/dist/e2e/fixtures.d.mts +45 -0
- package/dist/{bin/control → e2e}/frontend-workspace.d.mts +9 -1
- package/dist/e2e/global-setup.d.mts +27 -0
- package/dist/{bin/control → e2e}/identity.d.mts +3 -4
- package/dist/e2e/index.d.mts +57 -0
- package/dist/{bin/control → e2e}/journey-judge.d.mts +8 -8
- package/dist/{bin/control → e2e}/journey-load.d.mts +0 -6
- package/dist/e2e/journey-run.d.mts +61 -0
- package/dist/{bin/control → e2e}/journey.d.mts +37 -38
- package/dist/e2e/journeys-config.d.mts +56 -0
- package/dist/{bin/control → e2e}/json.d.mts +7 -14
- package/dist/{bin/control → e2e}/launch.d.mts +3 -3
- package/dist/{bin/control → e2e}/module-root.d.mts +3 -3
- package/dist/{bin/control → e2e}/mongo.d.mts +3 -3
- package/dist/{bin/control → e2e}/renderer.d.mts +1 -1
- package/dist/{bin/control → e2e}/run-state.d.mts +8 -7
- package/dist/e2e/run.d.mts +53 -0
- package/dist/{bin/control → e2e}/stack.d.mts +0 -1
- package/dist/e2e/start.d.mts +50 -0
- package/dist/{bin/control/e2e-suite.d.mts → e2e/suite.d.mts} +13 -16
- package/dist/e2e/test-journey.d.mts +30 -0
- package/dist/{bin/control → e2e}/timing.d.mts +0 -29
- package/dist/e2e/types.d.mts +58 -0
- package/dist/implementations/dms-auth/database-deadline.d.ts +7 -0
- package/dist/implementations/dms-auth/database-deadline.js +45 -0
- package/dist/implementations/dms-auth/database-deadline.js.map +1 -0
- package/dist/implementations/dms-auth/index.js +14 -6
- package/dist/implementations/dms-auth/index.js.map +1 -1
- package/dist/implementations/dms-builder/engine/analysis.js +1 -0
- package/dist/implementations/dms-builder/engine/analysis.js.map +1 -1
- package/dist/implementations/dms-builder/engine/cell-displays.js +1 -0
- package/dist/implementations/dms-builder/engine/cell-displays.js.map +1 -1
- package/dist/implementations/dms-builder/engine/compose-page.js +2 -5
- package/dist/implementations/dms-builder/engine/compose-page.js.map +1 -1
- package/dist/implementations/dms-builder/engine/index.d.ts +3 -0
- package/dist/implementations/dms-builder/engine/index.js +5 -1
- package/dist/implementations/dms-builder/engine/index.js.map +1 -1
- package/dist/implementations/dms-builder/engine/indexed-project.d.ts +3 -0
- package/dist/implementations/dms-builder/engine/indexed-project.js +18 -3
- package/dist/implementations/dms-builder/engine/indexed-project.js.map +1 -1
- package/dist/implementations/dms-builder/engine/interface-capabilities.d.ts +1 -0
- package/dist/implementations/dms-builder/engine/interface-capabilities.js +14 -5
- package/dist/implementations/dms-builder/engine/interface-capabilities.js.map +1 -1
- package/dist/implementations/dms-builder/engine/map-resources.js +2 -3
- package/dist/implementations/dms-builder/engine/map-resources.js.map +1 -1
- package/dist/implementations/dms-builder/engine/mapped-choices.js +9 -1
- package/dist/implementations/dms-builder/engine/mapped-choices.js.map +1 -1
- package/dist/implementations/dms-builder/engine/modules.d.ts +1 -0
- package/dist/implementations/dms-builder/engine/modules.js +3 -2
- package/dist/implementations/dms-builder/engine/modules.js.map +1 -1
- package/dist/implementations/dms-builder/engine/ops-blocks.js +1 -2
- package/dist/implementations/dms-builder/engine/ops-blocks.js.map +1 -1
- package/dist/implementations/dms-builder/engine/ops-categories.js +2 -4
- package/dist/implementations/dms-builder/engine/ops-categories.js.map +1 -1
- package/dist/implementations/dms-builder/engine/ops.js +3 -4
- package/dist/implementations/dms-builder/engine/ops.js.map +1 -1
- package/dist/implementations/dms-builder/engine/page-access.js +3 -1
- package/dist/implementations/dms-builder/engine/page-access.js.map +1 -1
- package/dist/implementations/dms-builder/engine/page-category-move.js +3 -3
- package/dist/implementations/dms-builder/engine/page-category-move.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-chain.d.ts +3 -1
- package/dist/implementations/dms-builder/engine/query-chain.js +10 -4
- package/dist/implementations/dms-builder/engine/query-chain.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-emit.d.ts +17 -2
- package/dist/implementations/dms-builder/engine/query-emit.js +72 -15
- package/dist/implementations/dms-builder/engine/query-emit.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-ops-emit.js +6 -0
- package/dist/implementations/dms-builder/engine/query-ops-emit.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-ops.js +29 -1
- package/dist/implementations/dms-builder/engine/query-ops.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-plan-execute.d.ts +1 -1
- package/dist/implementations/dms-builder/engine/query-plan-execute.js +11 -4
- package/dist/implementations/dms-builder/engine/query-plan-execute.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-plan.d.ts +14 -1
- package/dist/implementations/dms-builder/engine/query-plan.js +68 -28
- package/dist/implementations/dms-builder/engine/query-plan.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-preview.js +25 -15
- package/dist/implementations/dms-builder/engine/query-preview.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-route-response.js +3 -4
- package/dist/implementations/dms-builder/engine/query-route-response.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-structure.js +66 -15
- package/dist/implementations/dms-builder/engine/query-structure.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-template-emit.js +2 -0
- package/dist/implementations/dms-builder/engine/query-template-emit.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-template-ratio.d.ts +2 -0
- package/dist/implementations/dms-builder/engine/query-template-ratio.js +140 -0
- package/dist/implementations/dms-builder/engine/query-template-ratio.js.map +1 -0
- package/dist/implementations/dms-builder/engine/query-template.d.ts +8 -1
- package/dist/implementations/dms-builder/engine/query-template.js +2 -3
- package/dist/implementations/dms-builder/engine/query-template.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-where.d.ts +2 -1
- package/dist/implementations/dms-builder/engine/query-where.js +4 -2
- package/dist/implementations/dms-builder/engine/query-where.js.map +1 -1
- package/dist/implementations/dms-builder/engine/resolution-inputs.d.ts +8 -0
- package/dist/implementations/dms-builder/engine/resolution-inputs.js +85 -0
- package/dist/implementations/dms-builder/engine/resolution-inputs.js.map +1 -0
- package/dist/implementations/dms-builder/engine/resource-index.js +1 -1
- package/dist/implementations/dms-builder/engine/resource-index.js.map +1 -1
- package/dist/implementations/dms-builder/engine/resource-ops.js +2 -4
- package/dist/implementations/dms-builder/engine/resource-ops.js.map +1 -1
- package/dist/implementations/dms-builder/engine/save-check.d.ts +3 -0
- package/dist/implementations/dms-builder/engine/save-check.js +104 -0
- package/dist/implementations/dms-builder/engine/save-check.js.map +1 -0
- package/dist/implementations/dms-builder/engine/theme-scaffold.js +1 -2
- package/dist/implementations/dms-builder/engine/theme-scaffold.js.map +1 -1
- package/dist/implementations/dms-builder/engine/writable.d.ts +1 -0
- package/dist/implementations/dms-builder/engine/writable.js +46 -42
- package/dist/implementations/dms-builder/engine/writable.js.map +1 -1
- package/dist/implementations/dms-html-render/index.js +1 -0
- package/dist/implementations/dms-html-render/index.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/analysis-summary.d.ts +3 -0
- package/dist/mcp/analysis-summary.js +23 -1
- package/dist/mcp/analysis-summary.js.map +1 -1
- package/dist/mcp/page-verify/mockup.js +2 -2
- package/dist/mcp/page-verify/mockup.js.map +1 -1
- package/dist/mcp/relation-groups.d.ts +7 -0
- package/dist/mcp/relation-groups.js +88 -0
- package/dist/mcp/relation-groups.js.map +1 -0
- package/dist/mcp/tools/builder-analysis.js +1 -1
- package/dist/mcp/tools/builder-analysis.js.map +1 -1
- package/dist/mcp/tools/builder-queries.js +3 -3
- package/dist/mcp/tools/builder-queries.js.map +1 -1
- package/dist/mcp/tools/builder-resources.js +1 -1
- package/dist/mcp/tools/builder-resources.js.map +1 -1
- package/dist/mcp/tools/index.d.ts +1 -0
- package/dist/mcp/tools/index.js +3 -3
- package/dist/mcp/tools/index.js.map +1 -1
- package/dist/mcp/tools/mockup-from-page.d.ts +2 -0
- package/dist/mcp/tools/mockup-from-page.js +28 -24
- package/dist/mcp/tools/mockup-from-page.js.map +1 -1
- package/dist/mcp/tools/mockup-patch-spec.js +4 -1
- package/dist/mcp/tools/mockup-patch-spec.js.map +1 -1
- package/dist/mcp/tools/mockup-read-spec.js +14 -2
- package/dist/mcp/tools/mockup-read-spec.js.map +1 -1
- package/dist/mcp/tools/mockup-support.d.ts +2 -0
- package/dist/mcp/tools/mockup-support.js +13 -2
- package/dist/mcp/tools/mockup-support.js.map +1 -1
- package/dist/mcp/tools/mockup-write-spec.js +1 -1
- package/dist/mcp/tools/mockup-write-spec.js.map +1 -1
- package/dist/mockup/anchor.d.ts +1 -0
- package/dist/mockup/anchor.js +7 -0
- package/dist/mockup/anchor.js.map +1 -1
- package/dist/mockup/compile.d.ts +2 -1
- package/dist/mockup/compile.js +3 -0
- package/dist/mockup/compile.js.map +1 -1
- package/dist/mockup/from-page-routes.d.ts +4 -2
- package/dist/mockup/from-page-routes.js +3 -2
- package/dist/mockup/from-page-routes.js.map +1 -1
- package/dist/mockup/history-routes.d.ts +3 -1
- package/dist/mockup/history-routes.js +25 -11
- package/dist/mockup/history-routes.js.map +1 -1
- package/dist/mockup/index.d.ts +5 -0
- package/dist/mockup/index.js +11 -4
- package/dist/mockup/index.js.map +1 -1
- package/dist/mockup/json-schema.js +8 -0
- package/dist/mockup/json-schema.js.map +1 -1
- package/dist/mockup/live-page.d.ts +2 -1
- package/dist/mockup/live-page.js +19 -10
- package/dist/mockup/live-page.js.map +1 -1
- package/dist/mockup/manage-routes.d.ts +1 -0
- package/dist/mockup/model.d.ts +8 -0
- package/dist/mockup/model.js +6 -0
- package/dist/mockup/model.js.map +1 -1
- package/dist/mockup/modules.d.ts +11 -0
- package/dist/mockup/modules.js +38 -0
- package/dist/mockup/modules.js.map +1 -0
- package/dist/mockup/owner-controller.d.ts +2 -0
- package/dist/mockup/owner-controller.js +8 -0
- package/dist/mockup/owner-controller.js.map +1 -1
- package/dist/mockup/presence-board.d.ts +45 -0
- package/dist/mockup/presence-board.js +181 -0
- package/dist/mockup/presence-board.js.map +1 -0
- package/dist/mockup/presence-routes.d.ts +23 -0
- package/dist/mockup/presence-routes.js +169 -0
- package/dist/mockup/presence-routes.js.map +1 -0
- package/dist/mockup/presence.d.ts +83 -0
- package/dist/mockup/presence.js +168 -0
- package/dist/mockup/presence.js.map +1 -0
- package/dist/mockup/routes.d.ts +6 -0
- package/dist/mockup/routes.js +20 -4
- package/dist/mockup/routes.js.map +1 -1
- package/dist/mockup/source-routes.d.ts +6 -1
- package/dist/mockup/source-routes.js +36 -13
- package/dist/mockup/source-routes.js.map +1 -1
- package/dist/mockup/source.d.ts +1 -0
- package/dist/mockup/source.js +1 -0
- package/dist/mockup/source.js.map +1 -1
- package/dist/mockup/store.d.ts +4 -0
- package/dist/mockup/store.js +3 -0
- package/dist/mockup/store.js.map +1 -1
- package/dist/pages/settings/users/role-preview.d.ts +1 -1
- package/dist/pages/settings/users/role-preview.js +2 -2
- package/dist/pages/settings/users/role-preview.js.map +1 -1
- package/dist/pages/settings/users/roles.js +1 -1
- package/dist/pages/settings/users/roles.js.map +1 -1
- package/dist/routes/auth/refresh.d.ts +1 -1
- package/dist/routes/auth/refresh.js +3 -25
- package/dist/routes/auth/refresh.js.map +1 -1
- package/dist/store/catalog.d.ts +1 -0
- package/dist/store/catalog.js +1 -0
- package/dist/store/catalog.js.map +1 -1
- package/dist/store/internal/frontend/dev-reload.d.ts +7 -4
- package/dist/store/internal/frontend/dev-reload.js +16 -17
- package/dist/store/internal/frontend/dev-reload.js.map +1 -1
- package/dist/utils/auth-constants.d.ts +0 -1
- package/dist/utils/auth-constants.js +1 -2
- package/dist/utils/auth-constants.js.map +1 -1
- package/dist/utils/user-activity.js +1 -7
- package/dist/utils/user-activity.js.map +1 -1
- package/{bin/control → e2e}/backend.mjs +5 -5
- package/{bin/control → e2e}/base.mjs +11 -11
- package/{bin/control → e2e}/browser.mjs +1 -113
- package/{bin/control → e2e}/build-cache.mjs +3 -3
- package/{bin/control → e2e}/build-key.mjs +27 -3
- package/{bin/control → e2e}/dashboard.mjs +33 -6
- package/e2e/fixtures.mjs +154 -0
- package/{bin/control → e2e}/frontend-workspace.mjs +39 -5
- package/e2e/global-setup.mjs +74 -0
- package/{bin/control → e2e}/identity.mjs +4 -5
- package/e2e/index.mjs +110 -0
- package/{bin/control → e2e}/journey-judge.mjs +4 -4
- package/{bin/control → e2e}/journey-load.mjs +0 -13
- package/e2e/journey-run.mjs +190 -0
- package/{bin/control → e2e}/journey.mjs +57 -216
- package/e2e/journeys-config.mjs +126 -0
- package/{bin/control → e2e}/json.mjs +11 -32
- package/{bin/control → e2e}/launch.mjs +6 -6
- package/{bin/control → e2e}/mail.mjs +2 -3
- package/{bin/control → e2e}/module-root.mjs +3 -3
- package/{bin/control → e2e}/mongo.mjs +8 -8
- package/{bin/control → e2e}/prepared-workspace.mjs +1 -1
- package/{bin/control → e2e}/renderer.mjs +6 -4
- package/{bin/control → e2e}/run-state.mjs +15 -14
- package/e2e/run.mjs +96 -0
- package/e2e/service.mjs +11 -0
- package/e2e/services.mjs +64 -0
- package/{bin/control → e2e}/session.mjs +1 -3
- package/{bin/control → e2e}/stack.mjs +4 -5
- package/e2e/start.mjs +79 -0
- package/{bin/control/e2e-suite.mjs → e2e/suite.mjs} +25 -33
- package/e2e/test-journey.mjs +55 -0
- package/{bin/control → e2e}/timing.mjs +0 -112
- package/{bin/control/verify → e2e}/types.mjs +3 -7
- package/frontend-vue/eslint-globals.generated.mjs +20 -20
- package/frontend-vue/layers/dms-auth/server/session.ts +9 -2
- package/frontend-vue/layers/dms-core/app/build/utils/previewFrame.ts +12 -0
- package/frontend-vue/layers/dms-core/app/composables/page/useSiteLayout.ts +20 -14
- package/frontend-vue/layers/dms-core/app/composables/realtime/useUserRealtime.ts +2 -1
- package/frontend-vue/layers/dms-core/app/entries/utils/previewFrame.ts +1 -0
- package/frontend-vue/layers/dms-core/app/types/live.ts +1 -1
- package/frontend-vue/layers/dms-core/app/types/page.ts +1 -0
- package/frontend-vue/layers/dms-core/app/types/row-action.ts +2 -0
- package/frontend-vue/layers/dms-core/app/utils/http-status.ts +1 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +5 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +5 -0
- package/frontend-vue/layers/dms-layout/app/app.config.ts +1 -1
- package/frontend-vue/layers/dms-layout/app/assets/css/foundation.css +1 -1
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +30 -29
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PageHeaderActionBar.vue +4 -8
- package/frontend-vue/layers/dms-layout/app/build/mockups/created-toast.ts +4 -7
- package/frontend-vue/layers/dms-layout/app/error.vue +7 -0
- package/frontend-vue/layers/dms-layout/app/plugins/dms-dev-reload.client.ts +2 -1
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-en-GB.json +1 -1
- package/frontend-vue/layers/dms-layout/public/images/antelope-logo/dark.svg +1 -1
- package/frontend-vue/layers/dms-layout/public/images/antelope-logo/light.svg +1 -1
- package/frontend-vue/layers/dms-onboarding/i18n/locales/onboarding-en-GB.json +2 -2
- package/frontend-vue/layers/dms-onboarding/i18n/locales/onboarding-fr-FR.json +2 -2
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupInspector.vue +29 -8
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupLayers.vue +10 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModules.vue +46 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverview.vue +26 -5
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkbench.vue +47 -3
- package/frontend-vue/layers/dms-ui/app/build/components/button/DisabledReason.vue +27 -0
- package/frontend-vue/layers/dms-ui/app/build/components/period/PeriodRangeCalendar.vue +1 -0
- package/frontend-vue/layers/dms-ui/app/build/components/stat/StatCell.vue +2 -11
- package/frontend-vue/layers/dms-ui/app/build/components/table/TableActions.vue +17 -17
- package/frontend-vue/layers/dms-ui/app/build/components/table/TablePagination.vue +1 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table-view/CardAvatar.vue +2 -10
- package/frontend-vue/layers/dms-ui/app/build/components/table-view/IdentityCell.vue +15 -11
- package/frontend-vue/layers/dms-ui/app/build/composables/actions/actionTargetContainers.ts +3 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/actions/actionTargetHandlers.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/actions/actionTargetRequests.ts +14 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/actions/actionTargetUrl.ts +25 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/actions/useActionTargets.ts +5 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockInspector.ts +5 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupDocument.ts +12 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupEditing.ts +34 -8
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupLocks.ts +268 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupOverview.ts +39 -23
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageFrame.ts +10 -7
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSession.ts +21 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSpec.ts +92 -29
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerPages.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerShortcuts.ts +11 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/chart/apexAxes.ts +11 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/chart/apexCategoryFormat.ts +32 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/chart/apexTheme.ts +8 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultIdentityCells.ts +3 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultPrimitiveTypes.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/metricCells.ts +45 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/relationFilter.ts +17 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/page/pageUrlValues.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/period/periodDisplay.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnActionDescriptors.ts +47 -31
- package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnActionRendering.ts +19 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnActionSizing.ts +2 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnTypes.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableRowActionTypes.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewActions.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewLive.ts +10 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableLiveHold.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableViewRowActions.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/tableQuery.ts +4 -2
- package/frontend-vue/layers/dms-ui/app/build/types/tree.ts +8 -3
- package/frontend-vue/layers/dms-ui/app/build/utils/fetchStatus.ts +12 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/initials.ts +36 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockup.ts +24 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupEdit.ts +18 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOutline.ts +7 -2
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverview.ts +15 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupPresence.ts +117 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupRebase.ts +139 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupShortcuts.ts +16 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSpec.ts +23 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupStream.ts +13 -1
- package/frontend-vue/layers/dms-ui/app/components/form/FormBlock.vue +5 -3
- package/frontend-vue/layers/dms-ui/app/components/form/components/DatePicker.vue +1 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputCalendar.vue +1 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputRelation.vue +14 -1
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputRepeater.vue +23 -10
- package/frontend-vue/layers/dms-ui/app/components/kpi/KpiCard.vue +1 -6
- package/frontend-vue/layers/dms-ui/app/components/period/PeriodSelector.vue +9 -8
- package/frontend-vue/layers/dms-ui/app/components/period/usePeriodSelectorInteraction.ts +62 -16
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/action-target.ts +5 -0
- package/frontend-vue/layers/dms-ui/app/entries/components/button/DisabledReason.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/components/stat/StatCell.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupLocks.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/initials.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupPresence.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupRebase.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/types/row-action.ts +2 -0
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +4 -1
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +4 -1
- package/frontend-vue/package.json +1 -1
- package/package.json +20 -18
- package/skills/dms/REFERENCE.md +1 -1
- package/skills/dms-module/SKILL.md +1 -1
- package/bin/control/backend-mode.test.mjs +0 -112
- package/bin/control/backend-records.test.mjs +0 -330
- package/bin/control/backend.test.mjs +0 -346
- package/bin/control/base.test.mjs +0 -88
- package/bin/control/browser-client.mjs +0 -65
- package/bin/control/browser-wire.mjs +0 -41
- package/bin/control/browser-wire.test.mjs +0 -96
- package/bin/control/build-cache.test.mjs +0 -270
- package/bin/control/build-key-refusals.test.mjs +0 -138
- package/bin/control/build-key.test.mjs +0 -417
- package/bin/control/build-layout.test.mjs +0 -357
- package/bin/control/commands-stack.mjs +0 -297
- package/bin/control/commands-verify.mjs +0 -157
- package/bin/control/consumer-install.test.mjs +0 -86
- package/bin/control/dashboard.test.mjs +0 -102
- package/bin/control/doctor.mjs +0 -346
- package/bin/control/e2e-run.mjs +0 -61
- package/bin/control/e2e-suite.test.mjs +0 -174
- package/bin/control/e2e.mjs +0 -178
- package/bin/control/forwarder.test.mjs +0 -267
- package/bin/control/frontend-check.mjs +0 -55
- package/bin/control/frontend-mode.test.mjs +0 -24
- package/bin/control/frontend-workspace.test.mjs +0 -133
- package/bin/control/helpers/env.mjs +0 -21
- package/bin/control/helpers/ephemeral-range.mjs +0 -18
- package/bin/control/helpers/evidence.mjs +0 -13
- package/bin/control/helpers/fake-run.mjs +0 -368
- package/bin/control/helpers/key-fixture.mjs +0 -85
- package/bin/control/helpers/narrow-range.mjs +0 -35
- package/bin/control/helpers/pids.mjs +0 -37
- package/bin/control/helpers/repo.mjs +0 -13
- package/bin/control/helpers/tree.mjs +0 -40
- package/bin/control/identity.test.mjs +0 -166
- package/bin/control/journey-judge.test.mjs +0 -106
- package/bin/control/journey.test.mjs +0 -392
- package/bin/control/json.test.mjs +0 -130
- package/bin/control/mail.test.mjs +0 -55
- package/bin/control/module-root.test.mjs +0 -69
- package/bin/control/mongo-server.test.mjs +0 -136
- package/bin/control/mongo.test.mjs +0 -298
- package/bin/control/namespaces.test.mjs +0 -263
- package/bin/control/options.mjs +0 -36
- package/bin/control/pid-guard.test.mjs +0 -202
- package/bin/control/pid-reuse.test.mjs +0 -278
- package/bin/control/processes.test.mjs +0 -289
- package/bin/control/renderer.test.mjs +0 -268
- package/bin/control/run-ports.test.mjs +0 -141
- package/bin/control/run-state.test.mjs +0 -171
- package/bin/control/tab.test.mjs +0 -444
- package/bin/control/timing.test.mjs +0 -186
- package/bin/control/verify/decode.mjs +0 -78
- package/bin/control/verify/decode.test.mjs +0 -123
- package/bin/control/verify/doors.mjs +0 -44
- package/bin/control/verify/doors.test.mjs +0 -87
- package/bin/control/verify/formal.mjs +0 -77
- package/bin/control/verify/formal.test.mjs +0 -94
- package/bin/control/verify/map.mjs +0 -236
- package/bin/control/verify/map.test.mjs +0 -212
- package/bin/control/verify/skill.mjs +0 -160
- package/bin/dms-control.mjs +0 -77
- package/dist/bin/control/browser-client.d.mts +0 -26
- package/dist/bin/control/browser-wire.d.mts +0 -4
- package/dist/bin/control/commands-stack.d.mts +0 -40
- package/dist/bin/control/doctor.d.mts +0 -18
- package/dist/bin/control/e2e-run.d.mts +0 -22
- package/dist/bin/control/e2e.d.mts +0 -47
- package/dist/bin/control/frontend-check.d.mts +0 -11
- package/dist/bin/control/options.d.mts +0 -95
- package/dist/bin/control/verify/decode.d.mts +0 -41
- package/dist/bin/control/verify/skill.d.mts +0 -69
- package/dist/bin/control/verify/types.d.mts +0 -106
- package/dist/mcp/tools/preview-blocks.d.ts +0 -1
- package/dist/mcp/tools/preview-blocks.js +0 -249
- package/dist/mcp/tools/preview-blocks.js.map +0 -1
- /package/dist/{bin/control → e2e}/build-cache.d.mts +0 -0
- /package/dist/{bin/control → e2e}/build-inputs.d.mts +0 -0
- /package/dist/{bin/control → e2e}/build-key.d.mts +0 -0
- /package/dist/{bin/control → e2e}/dashboard.d.mts +0 -0
- /package/dist/{bin/control → e2e}/database.d.mts +0 -0
- /package/dist/{bin/control → e2e}/failure.d.mts +0 -0
- /package/dist/{bin/control → e2e}/forwarder.d.mts +0 -0
- /package/dist/{bin/control → e2e}/git.d.mts +0 -0
- /package/dist/{bin/control → e2e}/mail.d.mts +0 -0
- /package/dist/{bin/control → e2e}/processes.d.mts +0 -0
- /package/dist/{bin/control → e2e}/run-copy.d.mts +0 -0
- /package/dist/{bin/control → e2e}/session.d.mts +0 -0
- /package/dist/{bin/control → e2e}/tab.d.mts +0 -0
- /package/{bin/control → e2e}/build-inputs.mjs +0 -0
- /package/{bin/control → e2e}/database.mjs +0 -0
- /package/{bin/control → e2e}/failure.mjs +0 -0
- /package/{bin/control → e2e}/forwarder.mjs +0 -0
- /package/{bin/control → e2e}/git.mjs +0 -0
- /package/{bin/control → e2e}/processes.mjs +0 -0
- /package/{bin/control → e2e}/run-copy.mjs +0 -0
- /package/{bin/control → e2e}/tab.mjs +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Playwright's `test` with the fixtures of a DMS run. `run` is the run the
|
|
3
|
+
* global setup started, which `baseURL` serves, so `page.goto("/settings")`
|
|
4
|
+
* opens the dashboard. `dms` prepares the run for one test as a journey's
|
|
5
|
+
* run does (by default a fresh database with a backend of its own and an
|
|
6
|
+
* onboarded administrator; `test.use({ dmsOptions })` changes it), records
|
|
7
|
+
* its evidence under `<run>/evidence/<feature>/<test>/`, and after the test
|
|
8
|
+
* closes its tabs, judges its `verify` steps, and replays them into the
|
|
9
|
+
* report with their failing evidence. `adminPage` is a tab of `dms` the
|
|
10
|
+
* administrator signed in on. A test whose preparation fails does not run.
|
|
11
|
+
*
|
|
12
|
+
* @type {import("@playwright/test").TestType<PlaywrightTestFixtures & DmsTestFixtures, PlaywrightWorkerFixtures & DmsWorkerFixtures>}
|
|
13
|
+
*/
|
|
14
|
+
export const test: import("@playwright/test").TestType<PlaywrightTestFixtures & DmsTestFixtures, PlaywrightWorkerFixtures & DmsWorkerFixtures>;
|
|
15
|
+
export { expect };
|
|
16
|
+
export type Suite = import("./suite.mjs").Suite;
|
|
17
|
+
/**
|
|
18
|
+
* How the `dms` fixture prepares a test
|
|
19
|
+
*/
|
|
20
|
+
export type DmsOptions = import("./test-journey.mjs").DmsOptions;
|
|
21
|
+
/**
|
|
22
|
+
* What a worker shares: the suite its config declared, the run its global setup started, and the journeys config of the suite
|
|
23
|
+
*/
|
|
24
|
+
export type DmsWorkerFixtures = {
|
|
25
|
+
dmsSuite: Suite;
|
|
26
|
+
run: import("./run-state.mjs").RunState;
|
|
27
|
+
journeysConfig: import("./journeys-config.mjs").SuiteConfig;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* What one test gets: its options, the journey context it drives the run through, and a page the administrator signed in on
|
|
31
|
+
*/
|
|
32
|
+
export type DmsTestFixtures = {
|
|
33
|
+
dmsOptions: DmsOptions;
|
|
34
|
+
dms: import("./journey.mjs").JourneyContext;
|
|
35
|
+
adminPage: import("@playwright/test").Page;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* The fixtures Playwright gives a test
|
|
39
|
+
*/
|
|
40
|
+
export type PlaywrightTestFixtures = import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions;
|
|
41
|
+
/**
|
|
42
|
+
* The fixtures Playwright gives a worker
|
|
43
|
+
*/
|
|
44
|
+
export type PlaywrightWorkerFixtures = import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions;
|
|
45
|
+
import { expect } from "@playwright/test";
|
|
@@ -23,16 +23,24 @@ export function buildInPreparedWorkspace(frontendPackage: string): void;
|
|
|
23
23
|
* @param {string} workspace The workspace folder
|
|
24
24
|
* @param {string} environment The AntelopeJS environment
|
|
25
25
|
* @param {boolean} install Whether to install the workspace's dependencies
|
|
26
|
+
* @param {readonly number[]} [retryDelaysMs] How long to wait before each new setup after its install got a 404 on a tarball (see {@link REGISTRY_404_RETRY_DELAYS_MS})
|
|
26
27
|
* @returns {Promise<void>} Resolves once it is set up
|
|
27
28
|
* @throws When this dms-frontend cannot set a workspace up, or build in one set up beforehand
|
|
28
29
|
*/
|
|
29
|
-
export function setUpFrontendWorkspace(frontendPackage: string, workspace: string, environment: string, install: boolean): Promise<void>;
|
|
30
|
+
export function setUpFrontendWorkspace(frontendPackage: string, workspace: string, environment: string, install: boolean, retryDelaysMs?: readonly number[]): Promise<void>;
|
|
30
31
|
/**
|
|
31
32
|
* The exit code of an `ajs dms build` that cannot build in its prepared
|
|
32
33
|
* workspace, before it built anything: its workspace step could not be
|
|
33
34
|
* replaced, or the workspace was not prepared.
|
|
34
35
|
*/
|
|
35
36
|
export const PREPARED_WORKSPACE_REFUSED: 75;
|
|
37
|
+
/**
|
|
38
|
+
* How long the setup waits before each new attempt once its install got a
|
|
39
|
+
* 404 on a tarball. The npm registry lists a version before every mirror
|
|
40
|
+
* serves its tarball: prosemirror-inputrules 1.7.0, published at 12:47:14Z
|
|
41
|
+
* on 2026-11-19, still answered 404 at 12:49:30Z.
|
|
42
|
+
*/
|
|
43
|
+
export const REGISTRY_404_RETRY_DELAYS_MS: readonly number[];
|
|
36
44
|
/**
|
|
37
45
|
* The options `ajs dms build` passes the dms-frontend's `setupWorkspace`, with the hook it calls before it installs
|
|
38
46
|
*/
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Playwright's global setup of a journeys suite, once per `playwright test`.
|
|
3
|
+
* With `DMS_E2E_RUN` set, the tests drive that run and it stops nothing; a
|
|
4
|
+
* run whose dashboard is not served the way the suite asks is refused.
|
|
5
|
+
* Otherwise it starts a run on the journeys config through `startRun`: its
|
|
6
|
+
* prepare commands (none with `DMS_E2E_PREBUILT=1`), then the
|
|
7
|
+
* stack, whose dashboard is the development one for a `frontend: "dev"`
|
|
8
|
+
* suite. It publishes the run's folder in `DMS_E2E_RUN` for the workers,
|
|
9
|
+
* and returns the teardown that stops it.
|
|
10
|
+
* The run outlives the worker Playwright replaces after a failed test.
|
|
11
|
+
*
|
|
12
|
+
* @returns {Promise<(() => Promise<void>) | undefined>} The teardown of the run it started
|
|
13
|
+
* @throws When the adopted run serves its dashboard another way than the suite asks
|
|
14
|
+
*/
|
|
15
|
+
export default function globalSetup(): Promise<(() => Promise<void>) | undefined>;
|
|
16
|
+
/**
|
|
17
|
+
* The run this `playwright test` drives, which its global setup published.
|
|
18
|
+
* A worker reads it once: tests run one at a time, each saves the run when
|
|
19
|
+
* it ends, and the worker Playwright starts after a failed test reads it
|
|
20
|
+
* again.
|
|
21
|
+
*
|
|
22
|
+
* @param {Suite} suite The suite that drives it
|
|
23
|
+
* @returns {import("./run-state.mjs").RunState} The run
|
|
24
|
+
* @throws When no global setup published a run, an older e2e kit started it, or it serves its dashboard another way than the suite asks
|
|
25
|
+
*/
|
|
26
|
+
export function currentRun(suite: Suite): import("./run-state.mjs").RunState;
|
|
27
|
+
export type Suite = import("./suite.mjs").Suite;
|
|
@@ -56,8 +56,7 @@ export function statOf(pid: number): {
|
|
|
56
56
|
export function startTimeOf(pid: number): number | null;
|
|
57
57
|
/**
|
|
58
58
|
* Whether this system has a /proc at all. Without one, as on macOS, nothing
|
|
59
|
-
* records start times and a process is told apart by its pid alone
|
|
60
|
-
* dms-control always did there.
|
|
59
|
+
* records start times and a process is told apart by its pid alone.
|
|
61
60
|
*
|
|
62
61
|
* @returns {boolean} True when `/proc/self` exists
|
|
63
62
|
*/
|
|
@@ -85,7 +84,7 @@ export function currentNamespaces(): Namespaces;
|
|
|
85
84
|
* started. Each pid and start time the run recorded names a process only in
|
|
86
85
|
* those namespaces: elsewhere every record would look gone, and a command
|
|
87
86
|
* would forget processes that still run. A run that recorded none, as an
|
|
88
|
-
*
|
|
87
|
+
* older e2e kit or a system with no /proc wrote it, passes.
|
|
89
88
|
*
|
|
90
89
|
* @param {Namespaces | undefined} recorded The namespaces the run was started in
|
|
91
90
|
* @throws When one of them is not this process's
|
|
@@ -94,7 +93,7 @@ export function assertSameNamespaces(recorded: Namespaces | undefined): void;
|
|
|
94
93
|
/**
|
|
95
94
|
* Whether a process the kernel started `ticks` after boot is the one
|
|
96
95
|
* `record` names: the start time recorded with it, or, for a record with no
|
|
97
|
-
* start time, as an
|
|
96
|
+
* start time, as an older e2e kit wrote, a start within a few seconds
|
|
98
97
|
* of the record's `startedAt`.
|
|
99
98
|
*
|
|
100
99
|
* @param {{ startTime?: number | null, startedAt?: string }} record A process the run recorded
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Playwright config of a suite: one worker against the run its global
|
|
3
|
+
* setup starts (parallelism comes from `--shard`), no retries, a test
|
|
4
|
+
* timeout above the kit's own waits, and the CI reporters. It is plain
|
|
5
|
+
* Playwright config, so `defineConfig(e2eConfig(), overrides)` adjusts it.
|
|
6
|
+
* The suite's journeys come from `e2e/journeys.config.ts` and
|
|
7
|
+
* `e2e/journeys/`, or the journeys config `config` names and the
|
|
8
|
+
* `journeys/` folder beside it.
|
|
9
|
+
* `frontend: "dev"` serves the run's dashboard with `ajs dms dev` and
|
|
10
|
+
* registers only the journeys that set `frontend: "dev"`, which every other
|
|
11
|
+
* suite leaves out; its test output and report folders end in `-dev`. The
|
|
12
|
+
* config hands the suite to the fixtures as the worker option `dmsSuite`.
|
|
13
|
+
*
|
|
14
|
+
* @param {SuiteOptions} [options] The suite
|
|
15
|
+
* @returns {import("@playwright/test").PlaywrightTestConfig} The config
|
|
16
|
+
*/
|
|
17
|
+
export function e2eConfig(options?: SuiteOptions): import("@playwright/test").PlaywrightTestConfig;
|
|
18
|
+
/**
|
|
19
|
+
* Registers the journeys of the suite its config declared: those of the
|
|
20
|
+
* journeys config that its `frontend` serves, the config's `smoke`
|
|
21
|
+
* feature first, then the other features in order, and those marked
|
|
22
|
+
* `last` after all others. One test per journey, named by its id under its
|
|
23
|
+
* feature's name, with the
|
|
24
|
+
* journey's `tag` and its title and entry point as annotations. Each test
|
|
25
|
+
* drives its journey through the `dms` fixture, prepared with the
|
|
26
|
+
* journey's `database`, `onboard`, `backend` and `standby` and judged
|
|
27
|
+
* against its `knownFailures`.
|
|
28
|
+
*
|
|
29
|
+
* @returns {Promise<void>}
|
|
30
|
+
* @throws When a feature has no journeys module, or two journeys share an id
|
|
31
|
+
*/
|
|
32
|
+
export function registerJourneys(): Promise<void>;
|
|
33
|
+
export * from "./fixtures.mjs";
|
|
34
|
+
/**
|
|
35
|
+
* What a journey drives the run through
|
|
36
|
+
*/
|
|
37
|
+
export type Ctx = import("./journey.mjs").JourneyContext;
|
|
38
|
+
/**
|
|
39
|
+
* A browser tab of a journey
|
|
40
|
+
*/
|
|
41
|
+
export type Tab = import("./tab.mjs").Tab;
|
|
42
|
+
/**
|
|
43
|
+
* A check a journey records
|
|
44
|
+
*/
|
|
45
|
+
export type Check = import("./journey.mjs").Check;
|
|
46
|
+
/**
|
|
47
|
+
* A journey a feature's module exports
|
|
48
|
+
*/
|
|
49
|
+
export type Journey = import("./journey-load.mjs").Journey;
|
|
50
|
+
/**
|
|
51
|
+
* What a journeys suite runs
|
|
52
|
+
*/
|
|
53
|
+
export type SuiteOptions = import("./suite.mjs").SuiteOptions;
|
|
54
|
+
/**
|
|
55
|
+
* The default export of `e2e/journeys.config.ts`
|
|
56
|
+
*/
|
|
57
|
+
export type JourneysConfig = import("./journeys-config.mjs").JourneysConfig;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @typedef {import("./
|
|
3
|
-
* @typedef {import("./
|
|
4
|
-
* @typedef {import("./
|
|
5
|
-
* @typedef {import("./
|
|
2
|
+
* @typedef {import("./types.mjs").JourneyCheck} Check
|
|
3
|
+
* @typedef {import("./types.mjs").JourneyStep} Step
|
|
4
|
+
* @typedef {import("./types.mjs").JudgedCheck} JudgedCheck
|
|
5
|
+
* @typedef {import("./types.mjs").JudgedStep} JudgedStep
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
8
|
* @param {string} step The critical step that failed
|
|
@@ -30,7 +30,7 @@ export function judge(steps: Step[], end: {
|
|
|
30
30
|
steps: JudgedStep[];
|
|
31
31
|
error: string | null;
|
|
32
32
|
};
|
|
33
|
-
export type Check = import("./
|
|
34
|
-
export type Step = import("./
|
|
35
|
-
export type JudgedCheck = import("./
|
|
36
|
-
export type JudgedStep = import("./
|
|
33
|
+
export type Check = import("./types.mjs").JourneyCheck;
|
|
34
|
+
export type Step = import("./types.mjs").JourneyStep;
|
|
35
|
+
export type JudgedCheck = import("./types.mjs").JudgedCheck;
|
|
36
|
+
export type JudgedStep = import("./types.mjs").JudgedStep;
|
|
@@ -5,12 +5,6 @@
|
|
|
5
5
|
* @returns {Promise<Journey[]>} The journeys
|
|
6
6
|
*/
|
|
7
7
|
export function loadJourneys(file: string): Promise<Journey[]>;
|
|
8
|
-
/**
|
|
9
|
-
* @param {Journey[]} journeys The journeys a command would run
|
|
10
|
-
* @param {import("./run-state.mjs").FrontendMode | undefined} mode How the run serves its dashboard
|
|
11
|
-
* @returns {string | null} Why the run cannot serve some of them, or `null` when it serves them all
|
|
12
|
-
*/
|
|
13
|
-
export function frontendRefusal(journeys: Journey[], mode: import("./run-state.mjs").FrontendMode | undefined): string | null;
|
|
14
8
|
/**
|
|
15
9
|
* `backend` pins how the backend of its fresh database runs, whatever mode `up` gave the run; `standby: false` serves its fresh database with a backend started for it, not a standby, and starts no standby while it runs; `tag` is its Playwright tags, such as `@smoke`; `knownFailures` maps the name of each check that fails today to the finding that makes it fail; `last: true` runs it after every other journey of the suite, for a journey that leaves the run's playground changed for every later backend; `frontend: "dev"` needs a run whose dashboard `ajs dms dev` serves (`up --dev-frontend`), for what only development renders
|
|
16
10
|
*/
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runs one journey: by default on a fresh database with an onboarded
|
|
3
|
+
* administrator (`database: "shared"` keeps the current one, `onboard:
|
|
4
|
+
* false` skips the administrator), with fresh browser contexts, and writes
|
|
5
|
+
* its result.json. The contexts open in `browser`, which it leaves open, or
|
|
6
|
+
* else in a browser it launches and closes.
|
|
7
|
+
*
|
|
8
|
+
* @param {import("./run-state.mjs").RunState} state The run
|
|
9
|
+
* @param {string} feature The feature it belongs to
|
|
10
|
+
* @param {Journey} journey The journey
|
|
11
|
+
* @param {import("./journeys-config.mjs").SuiteConfig | undefined} config The journeys config the journey belongs to, none for a browserless run
|
|
12
|
+
* @param {Pick<import("playwright-core").Browser, "newContext" | "close">} [browser] The browser to open its contexts in, such as Playwright Test's
|
|
13
|
+
* @returns {Promise<FeatureResult>} The result
|
|
14
|
+
*/
|
|
15
|
+
export function runJourney(state: import("./run-state.mjs").RunState, feature: string, journey: Journey, config: import("./journeys-config.mjs").SuiteConfig | undefined, browser?: Pick<import("playwright-core").Browser, "newContext" | "close">): Promise<FeatureResult>;
|
|
16
|
+
/**
|
|
17
|
+
* Opens a journey's context in `browser` and prepares the run as the
|
|
18
|
+
* journey asks: by default a fresh database with a backend of its own and
|
|
19
|
+
* an onboarded administrator (`database: "shared"` keeps the current one,
|
|
20
|
+
* `onboard: false` skips the administrator). A preparation that fails ends
|
|
21
|
+
* the journey before its body.
|
|
22
|
+
*
|
|
23
|
+
* @param {import("./run-state.mjs").RunState} state The run
|
|
24
|
+
* @param {string} feature The feature it belongs to
|
|
25
|
+
* @param {JourneyPreparation} journey What it asks of the run
|
|
26
|
+
* @param {import("./journeys-config.mjs").SuiteConfig | undefined} config The journeys config it belongs to, none for a browserless run
|
|
27
|
+
* @param {Pick<import("playwright-core").Browser, "newContext">} browser The browser to open its contexts in
|
|
28
|
+
* @returns {Promise<JourneyContext>} Its context, ended when the preparation failed
|
|
29
|
+
*/
|
|
30
|
+
export function openJourney(state: import("./run-state.mjs").RunState, feature: string, journey: JourneyPreparation, config: import("./journeys-config.mjs").SuiteConfig | undefined, browser: Pick<import("playwright-core").Browser, "newContext">): Promise<JourneyContext>;
|
|
31
|
+
/**
|
|
32
|
+
* Closes a journey's browser contexts, starting the run's mongod again when
|
|
33
|
+
* the journey left it stopped, then judges the steps it recorded and how it
|
|
34
|
+
* ended against its known failures.
|
|
35
|
+
*
|
|
36
|
+
* @param {JourneyContext} context The journey's context
|
|
37
|
+
* @param {Pick<Journey, "id" | "title" | "entryPoint" | "knownFailures">} journey The journey
|
|
38
|
+
* @returns {Promise<Omit<FeatureResult, "ms">>} The result, without its duration
|
|
39
|
+
*/
|
|
40
|
+
export function judgeJourney(context: JourneyContext, journey: Pick<Journey, "id" | "title" | "entryPoint" | "knownFailures">): Promise<Omit<FeatureResult, "ms">>;
|
|
41
|
+
/**
|
|
42
|
+
* Times a journey as `journey`, from the start of `drive` to its judged
|
|
43
|
+
* result, and writes the result with its duration to the journey's
|
|
44
|
+
* result.json.
|
|
45
|
+
*
|
|
46
|
+
* @param {import("./run-state.mjs").RunState} state The run
|
|
47
|
+
* @param {{ feature: string, journey: string }} detail The feature and the journey id
|
|
48
|
+
* @param {() => Promise<Omit<FeatureResult, "ms">>} drive Opens, drives and judges the journey
|
|
49
|
+
* @returns {Promise<FeatureResult>} The result
|
|
50
|
+
*/
|
|
51
|
+
export function timedJourney(state: import("./run-state.mjs").RunState, detail: {
|
|
52
|
+
feature: string;
|
|
53
|
+
journey: string;
|
|
54
|
+
}, drive: () => Promise<Omit<FeatureResult, "ms">>): Promise<FeatureResult>;
|
|
55
|
+
export type FeatureResult = import("./types.mjs").FeatureResult;
|
|
56
|
+
export type Journey = import("./journey-load.mjs").Journey;
|
|
57
|
+
/**
|
|
58
|
+
* What a journey asks of the run before it starts
|
|
59
|
+
*/
|
|
60
|
+
export type JourneyPreparation = Pick<Journey, "id" | "database" | "onboard" | "backend" | "standby">;
|
|
61
|
+
import { JourneyContext } from "./journey.mjs";
|
|
@@ -1,32 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Runs one journey: by default on a fresh database with an onboarded
|
|
3
|
-
* administrator (`database: "shared"` keeps the current one, `onboard:
|
|
4
|
-
* false` skips the administrator), with fresh browser contexts, and writes
|
|
5
|
-
* its result.json. The contexts open in `browser`, which it leaves open, or
|
|
6
|
-
* else in a browser it launches and closes.
|
|
7
|
-
*
|
|
8
|
-
* @param {import("./run-state.mjs").RunState} state The run
|
|
9
|
-
* @param {string} feature The feature it belongs to
|
|
10
|
-
* @param {Journey} journey The journey
|
|
11
|
-
* @param {import("./verify/skill.mjs").Skill} skill The skill the journey belongs to
|
|
12
|
-
* @param {import("playwright-core").Browser} [browser] The browser to open its contexts in, such as Playwright Test's
|
|
13
|
-
* @returns {Promise<FeatureResult>} The result
|
|
14
|
-
*/
|
|
15
|
-
export function runJourney(state: import("./run-state.mjs").RunState, feature: string, journey: Journey, skill: import("./verify/skill.mjs").Skill, browser?: import("playwright-core").Browser): Promise<FeatureResult>;
|
|
16
|
-
/**
|
|
17
|
-
* Runs a feature's journeys, all or those named, and merges their results
|
|
18
|
-
* into `<feature>/feature.json` so a partial run never drops earlier ones.
|
|
19
|
-
*
|
|
20
|
-
* @param {import("./run-state.mjs").RunState} state The run
|
|
21
|
-
* @param {{ file: string, feature: string, ids: string[], skill: import("./verify/skill.mjs").Skill }} request Which journeys, and the skill they belong to
|
|
22
|
-
* @returns {Promise<FeatureResult[]>} The results of this run
|
|
23
|
-
*/
|
|
24
|
-
export function runJourneyFile(state: import("./run-state.mjs").RunState, request: {
|
|
25
|
-
file: string;
|
|
26
|
-
feature: string;
|
|
27
|
-
ids: string[];
|
|
28
|
-
skill: import("./verify/skill.mjs").Skill;
|
|
29
|
-
}): Promise<FeatureResult[]>;
|
|
30
1
|
/**
|
|
31
2
|
* What a journey drives the run through: tabs per account, the API as an
|
|
32
3
|
* account, the captured mail, and checks recorded into numbered step
|
|
@@ -37,15 +8,15 @@ export class JourneyContext {
|
|
|
37
8
|
* @param {import("./run-state.mjs").RunState} state The run
|
|
38
9
|
* @param {string} feature The feature the journey belongs to
|
|
39
10
|
* @param {string} journey The journey id
|
|
40
|
-
* @param {import("playwright-core").Browser} browser The Playwright browser
|
|
41
|
-
* @param {import("./
|
|
11
|
+
* @param {Pick<import("playwright-core").Browser, "newContext">} browser The Playwright browser
|
|
12
|
+
* @param {import("./journeys-config.mjs").SuiteConfig | undefined} config The journeys config the journey belongs to, none for a browserless run
|
|
42
13
|
*/
|
|
43
|
-
constructor(state: import("./run-state.mjs").RunState, feature: string, journey: string, browser: import("playwright-core").Browser,
|
|
14
|
+
constructor(state: import("./run-state.mjs").RunState, feature: string, journey: string, browser: Pick<import("playwright-core").Browser, "newContext">, config: import("./journeys-config.mjs").SuiteConfig | undefined);
|
|
44
15
|
state: import("./run-state.mjs").RunState;
|
|
45
|
-
|
|
16
|
+
config: import("./journeys-config.mjs").SuiteConfig | undefined;
|
|
46
17
|
feature: string;
|
|
47
18
|
journey: string;
|
|
48
|
-
browser: import("playwright-core").Browser
|
|
19
|
+
browser: Pick<import("playwright-core").Browser, "newContext">;
|
|
49
20
|
folder: string;
|
|
50
21
|
/** @type {Step[]} */
|
|
51
22
|
steps: Step[];
|
|
@@ -55,6 +26,8 @@ export class JourneyContext {
|
|
|
55
26
|
/** @type {Tab | undefined} */
|
|
56
27
|
lastTab: Tab | undefined;
|
|
57
28
|
databaseStopped: boolean;
|
|
29
|
+
/** @type {JourneyEnd} */
|
|
30
|
+
end: JourneyEnd;
|
|
58
31
|
startedAt: string;
|
|
59
32
|
equal: typeof equal;
|
|
60
33
|
status: typeof status;
|
|
@@ -212,13 +185,39 @@ export class JourneyContext {
|
|
|
212
185
|
messages: CapturedMail[];
|
|
213
186
|
match: CapturedMail | undefined;
|
|
214
187
|
}>;
|
|
188
|
+
/** Whether a critical step or an error ended the journey early. */
|
|
189
|
+
get ended(): boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Runs a part of the journey unless the journey already ended. A critical
|
|
192
|
+
* step that fails in it, or an error it throws, ends the journey, and
|
|
193
|
+
* `judgeJourney` reads how.
|
|
194
|
+
*
|
|
195
|
+
* @param {() => Promise<unknown>} part The part
|
|
196
|
+
* @returns {Promise<void>} Resolves once it ran, whatever its outcome
|
|
197
|
+
*/
|
|
198
|
+
attempt(part: () => Promise<unknown>): Promise<void>;
|
|
199
|
+
/**
|
|
200
|
+
* Drives a journey's body in this context, timed as `journey-run`, as
|
|
201
|
+
* {@link JourneyContext.attempt} runs a part: what ends it early is the
|
|
202
|
+
* judge's to read, so a critical step that fails at a known failure ends
|
|
203
|
+
* it without failing it.
|
|
204
|
+
*
|
|
205
|
+
* @param {(context: JourneyContext) => Promise<void>} run The body
|
|
206
|
+
* @returns {Promise<void>} Resolves once it ran, whatever its outcome
|
|
207
|
+
*/
|
|
208
|
+
drive(run: (context: JourneyContext) => Promise<void>): Promise<void>;
|
|
215
209
|
close(): Promise<void>;
|
|
216
210
|
}
|
|
217
|
-
export type Check = import("./
|
|
211
|
+
export type Check = import("./types.mjs").JourneyCheck;
|
|
218
212
|
export type CapturedMail = ReturnType<typeof capturedMail>[number];
|
|
219
|
-
export type
|
|
220
|
-
|
|
221
|
-
|
|
213
|
+
export type Step = import("./types.mjs").JourneyStep;
|
|
214
|
+
/**
|
|
215
|
+
* How a journey ended early: `abortedAt` names the critical step whose failure ended it, `error` what it threw
|
|
216
|
+
*/
|
|
217
|
+
export type JourneyEnd = {
|
|
218
|
+
error: string | null;
|
|
219
|
+
abortedAt: string | null;
|
|
220
|
+
};
|
|
222
221
|
import { Tab } from "./tab.mjs";
|
|
223
222
|
/**
|
|
224
223
|
* An equality check over JSON-serialisable values.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The journeys suite of the checkout holding `cwd`: the journeys config
|
|
3
|
+
* `config` names, else `e2e/journeys.config.ts`.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} cwd Where the suite runs
|
|
6
|
+
* @param {string} [config] A journeys config file, relative to the repository root, whose journeys are in `journeys/` beside it; `e2e/journeys.config.ts` by default
|
|
7
|
+
* @returns {Promise<SuiteConfig>} The suite
|
|
8
|
+
* @throws When the config does not exist or does not load
|
|
9
|
+
*/
|
|
10
|
+
export function loadSuiteConfig(cwd: string, config?: string): Promise<SuiteConfig>;
|
|
11
|
+
/**
|
|
12
|
+
* The journeys module of a feature.
|
|
13
|
+
*
|
|
14
|
+
* @param {SuiteConfig} config The suite
|
|
15
|
+
* @param {string} feature The feature name
|
|
16
|
+
* @returns {string} Its path
|
|
17
|
+
*/
|
|
18
|
+
export function journeysFile(config: SuiteConfig, feature: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Runs the suite's `prepare` commands (install and build) in a checkout of
|
|
21
|
+
* the repository, so a run starts from a fresh build.
|
|
22
|
+
*
|
|
23
|
+
* @param {Pick<SuiteConfig, "prepare">} config The suite
|
|
24
|
+
* @param {string} cwd The checkout
|
|
25
|
+
* @returns {import("./timing.mjs").TimingEntry[]} One timing entry per command, for the run folder that does not exist yet
|
|
26
|
+
* @throws When a command fails, with its output
|
|
27
|
+
*/
|
|
28
|
+
export function runPrepare(config: Pick<SuiteConfig, "prepare">, cwd: string): import("./timing.mjs").TimingEntry[];
|
|
29
|
+
/**
|
|
30
|
+
* @typedef {{ playground: string, renderer?: string, prepare: string[][], smoke: string }} JourneysConfig The default export of a repository's `e2e/journeys.config.ts`: the playground folder and the built renderer checkout the run serves, relative to the repository root; the install and build commands that prepare a run; and the feature whose journeys run first. Each `*.mjs` file of `e2e/journeys/` is a feature, named after the file
|
|
31
|
+
* @typedef {{ source: string, repo: string, playground: string, renderer: string | undefined, prepare: string[][], smoke: string, journeysDir: string, features: string[] }} SuiteConfig A loaded journeys config, its paths absolute, read from `source`
|
|
32
|
+
*/
|
|
33
|
+
/** Where a repository declares its journeys suite, relative to its root. */
|
|
34
|
+
export const JOURNEYS_CONFIG: "e2e/journeys.config.ts";
|
|
35
|
+
/**
|
|
36
|
+
* The default export of a repository's `e2e/journeys.config.ts`: the playground folder and the built renderer checkout the run serves, relative to the repository root; the install and build commands that prepare a run; and the feature whose journeys run first. Each `*.mjs` file of `e2e/journeys/` is a feature, named after the file
|
|
37
|
+
*/
|
|
38
|
+
export type JourneysConfig = {
|
|
39
|
+
playground: string;
|
|
40
|
+
renderer?: string;
|
|
41
|
+
prepare: string[][];
|
|
42
|
+
smoke: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* A loaded journeys config, its paths absolute, read from `source`
|
|
46
|
+
*/
|
|
47
|
+
export type SuiteConfig = {
|
|
48
|
+
source: string;
|
|
49
|
+
repo: string;
|
|
50
|
+
playground: string;
|
|
51
|
+
renderer: string | undefined;
|
|
52
|
+
prepare: string[][];
|
|
53
|
+
smoke: string;
|
|
54
|
+
journeysDir: string;
|
|
55
|
+
features: string[];
|
|
56
|
+
};
|
|
@@ -28,14 +28,6 @@ export function stringField(body: unknown, key: string): string | undefined;
|
|
|
28
28
|
* @returns {string | undefined} The first string, or undefined when `body` is no array or starts with anything else
|
|
29
29
|
*/
|
|
30
30
|
export function firstString(body: unknown): string | undefined;
|
|
31
|
-
/**
|
|
32
|
-
* The objects a JSON file lists, kept as written.
|
|
33
|
-
*
|
|
34
|
-
* @param {string} file The JSON file
|
|
35
|
-
* @returns {Record<string, unknown>[]} The listed objects
|
|
36
|
-
* @throws When the file holds anything but a list of objects
|
|
37
|
-
*/
|
|
38
|
-
export function readRecordList(file: string): Record<string, unknown>[];
|
|
39
31
|
/**
|
|
40
32
|
* @template T
|
|
41
33
|
* @typedef {(value: unknown) => value is T} Guard A check that narrows a parsed JSON value to `T`
|
|
@@ -82,12 +74,6 @@ export function either<A, B>(first: Guard<A>, second: Guard<B>): Guard<A | B>;
|
|
|
82
74
|
* @returns {Guard<Name>} A guard for one of the names
|
|
83
75
|
*/
|
|
84
76
|
export function oneOf<Name extends string>(names: Name[]): Guard<Name>;
|
|
85
|
-
/**
|
|
86
|
-
* @template T
|
|
87
|
-
* @param {new (...args: never[]) => T} constructor The class
|
|
88
|
-
* @returns {Guard<T>} A guard for its instances
|
|
89
|
-
*/
|
|
90
|
-
export function instanceOf<T>(constructor: new (...args: never[]) => T): Guard<T>;
|
|
91
77
|
/**
|
|
92
78
|
* @template {Record<string, Guard<unknown>>} Required
|
|
93
79
|
* @template {Record<string, Guard<unknown>>} Optional
|
|
@@ -115,6 +101,13 @@ export function objectOf<Required extends Record<string, Guard<unknown>>, Option
|
|
|
115
101
|
* @throws When the value does not pass the guard
|
|
116
102
|
*/
|
|
117
103
|
export function decode<T>(guard: Guard<T>, value: unknown, source: string, expected: string): T;
|
|
104
|
+
/**
|
|
105
|
+
* Writes `value` to `file` as indented JSON with a final newline.
|
|
106
|
+
*
|
|
107
|
+
* @param {string} file The file
|
|
108
|
+
* @param {unknown} value The value
|
|
109
|
+
*/
|
|
110
|
+
export function writeJson(file: string, value: unknown): void;
|
|
118
111
|
/**
|
|
119
112
|
* A check that narrows a parsed JSON value to `T`
|
|
120
113
|
*/
|
|
@@ -58,9 +58,9 @@ export function spec(state: import("./run-state.mjs").RunState, name: string, sc
|
|
|
58
58
|
env: NodeJS.ProcessEnv;
|
|
59
59
|
logs: string;
|
|
60
60
|
};
|
|
61
|
-
/** This package's root, which resolves
|
|
61
|
+
/** This package's root, which resolves the kit's own dependencies. */
|
|
62
62
|
export const PACKAGE_ROOT: string;
|
|
63
|
-
/** The
|
|
64
|
-
export const
|
|
63
|
+
/** The kit's service entry, which runs a service of a run (see `runService`). */
|
|
64
|
+
export const SERVICE_BIN: string;
|
|
65
65
|
/** The AntelopeJS environment every run builds and starts. */
|
|
66
66
|
export const ENVIRONMENT: "docs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The module a playground verifies: the nearest folder above it whose
|
|
3
|
-
* `package.json` declares `antelopeJs`, so a playground in a
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* `package.json` declares `antelopeJs`, so a playground in a subfolder of
|
|
4
|
+
* the repository (`e2e/playground`) verifies the repository's module, not
|
|
5
|
+
* that folder. The search stops at the playground's
|
|
6
6
|
* checkout, so a module above the checkout is never its module. Its parent
|
|
7
7
|
* when no folder in that range declares one.
|
|
8
8
|
*
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
*/
|
|
11
11
|
export function importFrom(name: string, from: string[]): Promise<any>;
|
|
12
12
|
/**
|
|
13
|
-
* The mongod binary: `
|
|
13
|
+
* The mongod binary: `DMS_E2E_MONGOD`, else `mongod` on PATH, else the
|
|
14
14
|
* one mongodb-memory-server-core caches (and downloads once). A
|
|
15
|
-
* `
|
|
15
|
+
* `DMS_E2E_MONGOD` that names a JavaScript file, such as a stand-in,
|
|
16
16
|
* runs on this Node (see {@link startMongod}).
|
|
17
17
|
*
|
|
18
18
|
* @param {string[]} from Folders to resolve mongodb-memory-server-core from
|
|
@@ -24,7 +24,7 @@ export function mongodBinary(from: string[]): Promise<string>;
|
|
|
24
24
|
* under the run folder, as the only member of a replica set, so change
|
|
25
25
|
* streams work. A mongod that does not become primary is stopped before the
|
|
26
26
|
* error is thrown. A binary that is a JavaScript file runs on this Node, as
|
|
27
|
-
* every other process
|
|
27
|
+
* every other process the kit starts does, since Windows runs no script
|
|
28
28
|
* by its path alone.
|
|
29
29
|
*
|
|
30
30
|
* @param {{ mongo: string, logs: string }} paths The run's folders
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The renderer checkout a run serves: an absolute folder holding the
|
|
3
3
|
* `@antelopejs/dms-frontend` package with its build.
|
|
4
4
|
*
|
|
5
|
-
* @param {string} folder The
|
|
5
|
+
* @param {string} folder The journeys config's `renderer` folder
|
|
6
6
|
* @returns {string} Its absolute path
|
|
7
7
|
* @throws When the folder is not that package, or is not built
|
|
8
8
|
*/
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @typedef {{ name: string, pid: number, startTime?: number | null, command: string, cwd: string, log: string, startedAt: string, port?: number, mode?: BackendMode }} ProcessRecord A process the run started. `startTime` is when the kernel started it, in clock ticks since boot: `null` where /proc could not tell, absent in a record an
|
|
2
|
+
* @typedef {{ name: string, pid: number, startTime?: number | null, command: string, cwd: string, log: string, startedAt: string, port?: number, mode?: BackendMode }} ProcessRecord A process the run started. `startTime` is when the kernel started it, in clock ticks since boot: `null` where /proc could not tell, absent in a record an older e2e kit wrote. Without it, `startedAt` tells the process apart. `mode` is a backend's, absent for production.
|
|
3
3
|
* @typedef {ProcessRecord & { port: number }} ServerRecord
|
|
4
4
|
* @typedef {ServerRecord & { database: string }} BackendRecord A backend the run started, with the database it serves
|
|
5
5
|
* @typedef {"production" | "dev" | "watch"} BackendMode How a backend runs: `production` runs `ajs project start` on the build, `dev` runs `ajs project dev`, the runtime's development mode, which serves what only development serves, and `watch` runs `ajs project dev -w`, which also reloads a local module when its source changes. A run or a record without one runs production.
|
|
6
6
|
* @typedef {{ email: string, password: string, userId?: string | null }} Account
|
|
7
|
-
* @typedef {{ dir: string, root: string, home: string, logs: string, mongo: string, browser?: ServerRecord, evidence: string, cache: string, id: string, createdAt: string, environment: string, playground: string, moduleRoot: string, repo: string | null, headSha: string | null, renderer?: string, baseRef: string,
|
|
7
|
+
* @typedef {{ dir: string, root: string, home: string, logs: string, mongo: string, browser?: ServerRecord, evidence: string, cache: string, id: string, createdAt: string, environment: string, playground: string, moduleRoot: string, repo: string | null, headSha: string | null, renderer?: string, baseRef: string, apiPort: number, webPort: number, smtpPort: number, mail: string, apiUrl: string, webUrl: string, databasePrefix: string, database: string, mongoUrl: string, ownsMongo: boolean, secrets: Record<string, string>, adminPassword: string, extraEnv: Record<string, string>, processes: ProcessRecord[], namespaces?: import("./identity.mjs").Namespaces, noStandby?: boolean, frontendMode?: FrontendMode, backendMode?: BackendMode, buildRoots?: string[], accounts: Record<string, Account>, tokens: Record<string, string>, ready: boolean, error?: string, runPlayground?: string, baseRoot?: string, resetCount?: number, journeyCount?: number, frontendBuild?: FrontendBuild, bakedEnv?: Record<string, string> }} RunState
|
|
8
8
|
* @typedef {"build" | "dev"} FrontendMode How the run serves its dashboard: `build` runs `ajs dms build` then `ajs dms start`, `dev` runs `ajs dms dev` on the sources. A run without one serves a build.
|
|
9
9
|
* @typedef {{ key: string | null, cached: boolean, reason?: string }} FrontendBuild The key of the inputs of the run's frontend build (null when it was not keyed), whether the build came from the build cache, and why the cache was not used or not filled when it should have been
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
|
-
* Where runs are created: `--runs`, else `
|
|
13
|
-
* `<tmpdir>/dms-
|
|
12
|
+
* Where runs are created: `--runs`, else `DMS_E2E_RUNS`, else
|
|
13
|
+
* `<tmpdir>/dms-e2e`. A run holds a playground copy and its frontend
|
|
14
14
|
* build, a few hundred megabytes, so prefer a folder on disk over a tmpfs.
|
|
15
15
|
*
|
|
16
16
|
* @param {string | undefined} option The `--runs` value
|
|
@@ -82,7 +82,9 @@ export function readRun(dir: string): RunState;
|
|
|
82
82
|
export function loadRun(dir: string): RunState;
|
|
83
83
|
/**
|
|
84
84
|
* Writes the run state, readable by its owner only since it holds the run's
|
|
85
|
-
* secrets and the admin password.
|
|
85
|
+
* secrets and the admin password. It replaces run.json in one rename, so a
|
|
86
|
+
* service that loads the run while it is saved reads the old state or the new
|
|
87
|
+
* one, never a truncated file.
|
|
86
88
|
*
|
|
87
89
|
* @param {StoredRunState} state The run state
|
|
88
90
|
*/
|
|
@@ -124,7 +126,7 @@ export function forgetBackend(dir: string, pid: number): void;
|
|
|
124
126
|
/** Whether a value names a backend mode. */
|
|
125
127
|
export const isBackendMode: import("./json.mjs").Guard<"production" | "dev" | "watch">;
|
|
126
128
|
/**
|
|
127
|
-
* A process the run started. `startTime` is when the kernel started it, in clock ticks since boot: `null` where /proc could not tell, absent in a record an
|
|
129
|
+
* A process the run started. `startTime` is when the kernel started it, in clock ticks since boot: `null` where /proc could not tell, absent in a record an older e2e kit wrote. Without it, `startedAt` tells the process apart. `mode` is a backend's, absent for production.
|
|
128
130
|
*/
|
|
129
131
|
export type ProcessRecord = {
|
|
130
132
|
name: string;
|
|
@@ -173,7 +175,6 @@ export type RunState = {
|
|
|
173
175
|
headSha: string | null;
|
|
174
176
|
renderer?: string;
|
|
175
177
|
baseRef: string;
|
|
176
|
-
skill: string | null;
|
|
177
178
|
apiPort: number;
|
|
178
179
|
webPort: number;
|
|
179
180
|
smtpPort: number;
|