@antelopejs/dms 0.15.0 → 0.16.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/CHANGELOG.md +47 -0
- package/README.md +36 -26
- package/bin/control/base.mjs +9 -4
- package/bin/control/browser-client.mjs +24 -5
- package/bin/control/browser-wire.mjs +41 -0
- package/bin/control/browser-wire.test.mjs +96 -0
- package/bin/control/browser.mjs +78 -27
- package/bin/control/commands-stack.mjs +58 -8
- package/bin/control/commands-verify.mjs +47 -1
- package/bin/control/doctor.mjs +49 -4
- package/bin/control/failure.mjs +9 -0
- package/bin/control/journey.mjs +163 -30
- package/bin/control/journey.test.mjs +61 -0
- package/bin/control/json.mjs +229 -0
- package/bin/control/json.test.mjs +130 -0
- package/bin/control/mail.mjs +57 -7
- package/bin/control/mail.test.mjs +55 -0
- package/bin/control/mongo.mjs +205 -27
- package/bin/control/mongo.test.mjs +298 -0
- package/bin/control/options.mjs +33 -0
- package/bin/control/processes.mjs +24 -2
- package/bin/control/renderer.mjs +39 -0
- package/bin/control/renderer.test.mjs +324 -0
- package/bin/control/run-state.mjs +119 -6
- package/bin/control/run-state.test.mjs +171 -0
- package/bin/control/session.mjs +31 -14
- package/bin/control/stack.mjs +96 -24
- package/bin/control/tab.mjs +117 -18
- package/bin/control/verify/behaviour.mjs +44 -6
- package/bin/control/verify/behaviour.test.mjs +130 -22
- package/bin/control/verify/decode.mjs +220 -0
- package/bin/control/verify/decode.test.mjs +245 -0
- package/bin/control/verify/doors.mjs +1 -1
- package/bin/control/verify/doors.test.mjs +40 -0
- package/bin/control/verify/emit.mjs +135 -9
- package/bin/control/verify/formal.mjs +61 -10
- package/bin/control/verify/formal.test.mjs +19 -3
- package/bin/control/verify/judgement.mjs +22 -3
- package/bin/control/verify/map.mjs +25 -5
- package/bin/control/verify/publish.mjs +20 -14
- package/bin/control/verify/seeded.mjs +65 -16
- package/bin/control/verify/skill.mjs +27 -6
- package/bin/control/verify/types.mjs +29 -0
- package/bin/control/verify/verdict.mjs +72 -7
- package/bin/dms-control.mjs +8 -28
- package/checks/api-error-presentation.d.mts +61 -0
- package/dist/attachments/access.js +1 -1
- package/dist/attachments/access.js.map +1 -1
- package/dist/attachments/fields.d.ts +2 -2
- package/dist/attachments/fields.js +26 -13
- package/dist/attachments/fields.js.map +1 -1
- package/dist/attachments/index.d.ts +1 -0
- package/dist/attachments/index.js +1 -0
- package/dist/attachments/index.js.map +1 -1
- package/dist/attachments/read.js.map +1 -1
- package/dist/attachments/save.d.ts +1 -1
- package/dist/attachments/save.js +49 -17
- package/dist/attachments/save.js.map +1 -1
- package/dist/attachments/table-view.d.ts +1 -2
- package/dist/attachments/table-view.js +23 -13
- package/dist/attachments/table-view.js.map +1 -1
- package/dist/automation/events.d.ts +10 -10
- package/dist/automation/index.js +3 -4
- package/dist/automation/index.js.map +1 -1
- package/dist/automation/send-notification.d.ts +2 -2
- package/dist/automation/send-notification.js +4 -6
- package/dist/automation/send-notification.js.map +1 -1
- package/dist/config/internal/state.d.ts +7 -0
- package/dist/config/internal/state.js +9 -0
- package/dist/config/internal/state.js.map +1 -1
- package/dist/config/startup-config.d.ts +1 -0
- package/dist/config/startup-config.js +11 -0
- package/dist/config/startup-config.js.map +1 -1
- package/dist/crons/cleanup-user-invites.js.map +1 -1
- package/dist/crons/sweep-expired-sessions.js.map +1 -1
- package/dist/crons/sweep-stale-exports.js.map +1 -1
- package/dist/db/guard-row.d.ts +2 -3
- package/dist/db/guard-row.js +1 -2
- package/dist/db/guard-row.js.map +1 -1
- package/dist/db/index.d.ts +1 -0
- package/dist/db/index.js +1 -0
- package/dist/db/index.js.map +1 -1
- package/dist/db/models/attachments.model.d.ts +7 -5
- package/dist/db/models/index.d.ts +1 -0
- package/dist/db/models/index.js +1 -0
- package/dist/db/models/index.js.map +1 -1
- package/dist/db/models/setupToken.model.d.ts +31 -0
- package/dist/db/models/setupToken.model.js +62 -0
- package/dist/db/models/setupToken.model.js.map +1 -0
- package/dist/db/models/signInAttempts.model.d.ts +7 -5
- package/dist/db/models/systemState.model.d.ts +7 -5
- package/dist/db/models/userEmailChanges.model.d.ts +7 -5
- package/dist/db/models/userKnownDevices.model.d.ts +7 -5
- package/dist/db/models/userNotificationPreferences.model.d.ts +7 -5
- package/dist/db/models/userNotifications.model.d.ts +9 -6
- package/dist/db/models/userNotifications.model.js.map +1 -1
- package/dist/db/setup-token.d.ts +2 -0
- package/dist/db/setup-token.js +28 -0
- package/dist/db/setup-token.js.map +1 -0
- package/dist/db/tables/index.d.ts +1 -0
- package/dist/db/tables/index.js +1 -0
- package/dist/db/tables/index.js.map +1 -1
- package/dist/db/tables/setupToken.table.d.ts +7 -0
- package/dist/db/tables/setupToken.table.js +34 -0
- package/dist/db/tables/setupToken.table.js.map +1 -0
- package/dist/dev/module-update-notifications.js.map +1 -1
- package/dist/hooks/internal/sign-in-monitor.js +6 -6
- package/dist/hooks/internal/sign-in-monitor.js.map +1 -1
- package/dist/implementations/dms/page/controller.d.ts +2 -2
- package/dist/implementations/dms/page/controller.js +3 -1
- package/dist/implementations/dms/page/controller.js.map +1 -1
- package/dist/implementations/dms/page/dynamic-menu.js +3 -2
- package/dist/implementations/dms/page/dynamic-menu.js.map +1 -1
- package/dist/implementations/dms/page/notifications.d.ts +6 -2
- package/dist/implementations/dms/page/notifications.js +1 -0
- package/dist/implementations/dms/page/notifications.js.map +1 -1
- package/dist/implementations/dms/page/payloads.js +6 -10
- package/dist/implementations/dms/page/payloads.js.map +1 -1
- package/dist/implementations/dms/page/preview-pages.js +6 -3
- package/dist/implementations/dms/page/preview-pages.js.map +1 -1
- package/dist/implementations/dms/page/public-layout.d.ts +2 -0
- package/dist/implementations/dms/page/public-layout.js +45 -0
- package/dist/implementations/dms/page/public-layout.js.map +1 -0
- package/dist/implementations/dms/page/registry.js +10 -4
- package/dist/implementations/dms/page/registry.js.map +1 -1
- package/dist/implementations/dms/permissions.js +12 -12
- package/dist/implementations/dms/permissions.js.map +1 -1
- package/dist/implementations/dms-base/bulk-selection.d.ts +3 -4
- package/dist/implementations/dms-base/bulk-selection.js +18 -6
- package/dist/implementations/dms-base/bulk-selection.js.map +1 -1
- package/dist/implementations/dms-base/filter-tokens.js.map +1 -1
- package/dist/implementations/dms-base/footer-summary.js +44 -27
- package/dist/implementations/dms-base/footer-summary.js.map +1 -1
- package/dist/implementations/dms-base/row-rule-operand.d.ts +6 -0
- package/dist/implementations/dms-base/row-rule-operand.js +41 -0
- package/dist/implementations/dms-base/row-rule-operand.js.map +1 -0
- package/dist/implementations/dms-base/search-route.d.ts +9 -13
- package/dist/implementations/dms-base/search-route.js +7 -6
- package/dist/implementations/dms-base/search-route.js.map +1 -1
- package/dist/implementations/dms-base/services.d.ts +1 -0
- package/dist/implementations/dms-base/services.js +1 -0
- package/dist/implementations/dms-base/services.js.map +1 -1
- package/dist/implementations/dms-base/table-view.d.ts +5 -6
- package/dist/implementations/dms-base/table-view.js +17 -6
- package/dist/implementations/dms-base/table-view.js.map +1 -1
- package/dist/implementations/dms-html-render/index.js +16 -6
- package/dist/implementations/dms-html-render/index.js.map +1 -1
- package/dist/implementations/dms-notifications/delivery-guard.d.ts +3 -2
- package/dist/implementations/dms-notifications/delivery-guard.js.map +1 -1
- package/dist/implementations/dms-notifications/index.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/pages/public/preview/block-types.d.ts +1 -2
- package/dist/pages/public/preview/block-types.js.map +1 -1
- package/dist/pages/settings/overview/account-summary.js +4 -1
- package/dist/pages/settings/overview/account-summary.js.map +1 -1
- package/dist/pages/settings/users/account-activity-feed.js +3 -2
- package/dist/pages/settings/users/account-activity-feed.js.map +1 -1
- package/dist/pages/settings/users/account-credentials.d.ts +1 -1
- package/dist/pages/settings/users/account-credentials.js +1 -2
- package/dist/pages/settings/users/account-credentials.js.map +1 -1
- package/dist/pages/settings/users/account-data-store.d.ts +1 -1
- package/dist/pages/settings/users/account-data-store.js +1 -3
- package/dist/pages/settings/users/account-data-store.js.map +1 -1
- package/dist/pages/settings/users/current-password.js +1 -1
- package/dist/pages/settings/users/current-password.js.map +1 -1
- package/dist/pages/settings/users/email-change.d.ts +2 -2
- package/dist/pages/settings/users/email-change.js +2 -3
- package/dist/pages/settings/users/email-change.js.map +1 -1
- package/dist/pages/settings/users/invite-extension-routes.d.ts +2 -2
- package/dist/pages/settings/users/invite-extension-routes.js +11 -4
- package/dist/pages/settings/users/invite-extension-routes.js.map +1 -1
- package/dist/pages/settings/users/invites.d.ts +2 -2
- package/dist/pages/settings/users/member-invite-batch.d.ts +2 -2
- package/dist/pages/settings/users/member-invite-batch.js +7 -3
- package/dist/pages/settings/users/member-invite-batch.js.map +1 -1
- package/dist/pages/settings/users/member-roles-field.js +1 -4
- package/dist/pages/settings/users/member-roles-field.js.map +1 -1
- package/dist/pages/settings/users/members.d.ts +2 -3
- package/dist/pages/settings/users/members.js.map +1 -1
- package/dist/pages/settings/users/notifications.d.ts +2 -3
- package/dist/pages/settings/users/notifications.js +2 -1
- package/dist/pages/settings/users/notifications.js.map +1 -1
- package/dist/pages/settings/users/profile-helpers.d.ts +0 -1
- package/dist/pages/settings/users/profile-helpers.js +0 -17
- package/dist/pages/settings/users/profile-helpers.js.map +1 -1
- package/dist/pages/settings/users/profile.d.ts +3 -4
- package/dist/pages/settings/users/profile.js +12 -12
- package/dist/pages/settings/users/profile.js.map +1 -1
- package/dist/pages/settings/users/region.d.ts +3 -4
- package/dist/pages/settings/users/region.js.map +1 -1
- package/dist/pages/settings/users/regional-preferences.d.ts +8 -1
- package/dist/pages/settings/users/regional-preferences.js +10 -6
- package/dist/pages/settings/users/regional-preferences.js.map +1 -1
- package/dist/pages/settings/users/role-preview.js +3 -2
- package/dist/pages/settings/users/role-preview.js.map +1 -1
- package/dist/pages/settings/users/roles.d.ts +4 -5
- package/dist/pages/settings/users/roles.js.map +1 -1
- package/dist/pages/settings/users/security.d.ts +9 -12
- package/dist/pages/settings/users/security.js +11 -9
- package/dist/pages/settings/users/security.js.map +1 -1
- package/dist/pages/settings/users/two-factor-operations.d.ts +7 -7
- package/dist/pages/settings/users/two-factor-operations.js +5 -7
- package/dist/pages/settings/users/two-factor-operations.js.map +1 -1
- package/dist/realtime/broker.js.map +1 -1
- package/dist/realtime/heartbeat.js.map +1 -1
- package/dist/realtime/redis-broker.js.map +1 -1
- package/dist/realtime/sessions.js.map +1 -1
- package/dist/realtime/sse.js +1 -2
- package/dist/realtime/sse.js.map +1 -1
- package/dist/routes/auth/forgot-password.d.ts +1 -1
- package/dist/routes/auth/forgot-password.js +1 -3
- package/dist/routes/auth/forgot-password.js.map +1 -1
- package/dist/routes/auth/login.d.ts +2 -2
- package/dist/routes/auth/login.js +8 -4
- package/dist/routes/auth/login.js.map +1 -1
- package/dist/routes/auth/logout.d.ts +1 -1
- package/dist/routes/auth/logout.js +1 -2
- package/dist/routes/auth/logout.js.map +1 -1
- package/dist/routes/auth/oauth/providers.js +30 -6
- package/dist/routes/auth/oauth/providers.js.map +1 -1
- package/dist/routes/auth/oauth/state.js +8 -5
- package/dist/routes/auth/oauth/state.js.map +1 -1
- package/dist/routes/auth/oauth/token-exchange.js +8 -1
- package/dist/routes/auth/oauth/token-exchange.js.map +1 -1
- package/dist/routes/auth/password-hash-upgrade.d.ts +2 -0
- package/dist/routes/auth/password-hash-upgrade.js +22 -0
- package/dist/routes/auth/password-hash-upgrade.js.map +1 -0
- package/dist/routes/auth/refresh.d.ts +1 -1
- package/dist/routes/auth/refresh.js +1 -2
- package/dist/routes/auth/refresh.js.map +1 -1
- package/dist/routes/auth/request-2fa-email.d.ts +1 -1
- package/dist/routes/auth/request-2fa-email.js +1 -2
- package/dist/routes/auth/request-2fa-email.js.map +1 -1
- package/dist/routes/auth/reset-password.d.ts +1 -1
- package/dist/routes/auth/reset-password.js +1 -3
- package/dist/routes/auth/reset-password.js.map +1 -1
- package/dist/routes/auth/session-handoff.d.ts +1 -1
- package/dist/routes/auth/session-handoff.js +1 -2
- package/dist/routes/auth/session-handoff.js.map +1 -1
- package/dist/routes/auth/signup.d.ts +1 -1
- package/dist/routes/auth/signup.js +1 -2
- package/dist/routes/auth/signup.js.map +1 -1
- package/dist/routes/auth/switch-tenant.d.ts +2 -3
- package/dist/routes/auth/switch-tenant.js +3 -2
- package/dist/routes/auth/switch-tenant.js.map +1 -1
- package/dist/routes/auth/validate-forgot-password-token.d.ts +1 -1
- package/dist/routes/auth/validate-forgot-password-token.js +1 -3
- package/dist/routes/auth/validate-forgot-password-token.js.map +1 -1
- package/dist/routes/auth/validate-invite-token.d.ts +1 -1
- package/dist/routes/auth/validate-invite-token.js +1 -3
- package/dist/routes/auth/validate-invite-token.js.map +1 -1
- package/dist/routes/auth/verify-2fa.d.ts +1 -1
- package/dist/routes/auth/verify-2fa.js +1 -2
- package/dist/routes/auth/verify-2fa.js.map +1 -1
- package/dist/routes/auth/verify-email.d.ts +1 -1
- package/dist/routes/auth/verify-email.js +1 -2
- package/dist/routes/auth/verify-email.js.map +1 -1
- package/dist/routes/auth.d.ts +14 -15
- package/dist/routes/auth.js +15 -13
- package/dist/routes/auth.js.map +1 -1
- package/dist/routes/authentication.d.ts +2 -0
- package/dist/routes/authentication.js +2 -0
- package/dist/routes/authentication.js.map +1 -1
- package/dist/routes/files.d.ts +1 -2
- package/dist/routes/files.js.map +1 -1
- package/dist/routes/onboarding.d.ts +4 -3
- package/dist/routes/onboarding.js +20 -3
- package/dist/routes/onboarding.js.map +1 -1
- package/dist/routes/realtime.js +5 -6
- package/dist/routes/realtime.js.map +1 -1
- package/dist/routes/store.d.ts +6 -7
- package/dist/routes/store.js +19 -13
- package/dist/routes/store.js.map +1 -1
- package/dist/store/catalog.d.ts +13 -5
- package/dist/store/catalog.js +19 -9
- package/dist/store/catalog.js.map +1 -1
- package/dist/store/compatibility.d.ts +1 -0
- package/dist/store/compatibility.js +24 -8
- package/dist/store/compatibility.js.map +1 -1
- package/dist/store/frontend-compatibility.js +15 -3
- package/dist/store/frontend-compatibility.js.map +1 -1
- package/dist/store/interfaces.js +35 -13
- package/dist/store/interfaces.js.map +1 -1
- package/dist/store/internal/frontend/frontend-modules.js +7 -3
- package/dist/store/internal/frontend/frontend-modules.js.map +1 -1
- package/dist/store/internal/frontend/frontend-ready.d.ts +2 -1
- package/dist/store/internal/frontend/frontend-ready.js +6 -4
- package/dist/store/internal/frontend/frontend-ready.js.map +1 -1
- package/dist/store/internal/frontend/manifest.js +6 -7
- package/dist/store/internal/frontend/manifest.js.map +1 -1
- package/dist/store/operations.js.map +1 -1
- package/dist/store/registry.js.map +1 -1
- package/dist/store/runtime.d.ts +13 -0
- package/dist/store/runtime.js +9 -1
- package/dist/store/runtime.js.map +1 -1
- package/dist/utils/admin-invite-email.js +3 -1
- package/dist/utils/admin-invite-email.js.map +1 -1
- package/dist/utils/email-subjects.js +3 -1
- package/dist/utils/email-subjects.js.map +1 -1
- package/dist/utils/ensure-default-tenant.d.ts +2 -1
- package/dist/utils/ensure-default-tenant.js +126 -8
- package/dist/utils/ensure-default-tenant.js.map +1 -1
- package/dist/utils/export-jobs-run.js.map +1 -1
- package/dist/utils/export-jobs.js +3 -9
- package/dist/utils/export-jobs.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/own-value.d.ts +1 -0
- package/dist/utils/own-value.js +7 -0
- package/dist/utils/own-value.js.map +1 -0
- package/dist/utils/row-action-rule-evaluator.js +31 -35
- package/dist/utils/row-action-rule-evaluator.js.map +1 -1
- package/dist/utils/sign-in-country.js +4 -2
- package/dist/utils/sign-in-country.js.map +1 -1
- package/dist/utils/tenant-export-archive.js +9 -14
- package/dist/utils/tenant-export-archive.js.map +1 -1
- package/dist/utils/user-agent.js +2 -1
- package/dist/utils/user-agent.js.map +1 -1
- package/dist/validation/auth.schema.d.ts +10 -10
- package/dist/validation/onboarding/register-admin.schema.d.ts +5 -0
- package/dist/validation/onboarding/register-admin.schema.js +3 -0
- package/dist/validation/onboarding/register-admin.schema.js.map +1 -1
- package/dist/validation/regional-preferences.schema.d.ts +2 -2
- package/dist/validation/role-editor.schema.d.ts +1 -1
- package/frontend-vue/build/backend-boundary.ts +49 -18
- package/frontend-vue/dms.frontend.ts +8 -12
- package/frontend-vue/layers/dms-auth/server/accounts.ts +44 -3
- package/frontend-vue/layers/dms-auth/server/actions.ts +17 -4
- package/frontend-vue/layers/dms-auth/server/oauth.ts +42 -4
- package/frontend-vue/layers/dms-core/app/types/watch.ts +1 -2
- package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +1 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +1 -0
- package/frontend-vue/layers/dms-core/shared/types/app-config.ts +5 -0
- package/frontend-vue/layers/dms-layout/app/app.config.ts +1 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +9 -9
- package/frontend-vue/layers/dms-layout/app/components/layout/AppLogo.vue +1 -0
- package/frontend-vue/layers/dms-layout/app/composables/page/useInstalledModules.ts +78 -0
- package/frontend-vue/layers/dms-layout/app/custom-pages/modules.vue +5 -24
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-en-GB.json +2 -1
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-fr-FR.json +2 -1
- package/frontend-vue/layers/dms-onboarding/app/components/onboarding/steps/register.vue +21 -1
- package/frontend-vue/layers/dms-onboarding/app/custom-pages/onboarding.vue +14 -0
- package/frontend-vue/layers/dms-onboarding/i18n/locales/onboarding-en-GB.json +2 -0
- package/frontend-vue/layers/dms-onboarding/i18n/locales/onboarding-fr-FR.json +2 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/form/fieldValueRule.ts +57 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/form/registerFormFunctions.ts +7 -9
- package/frontend-vue/layers/dms-ui/app/entries/composables/form/registerFormFunctions.ts +1 -0
- package/frontend-vue/lazy-plugin.ts +18 -0
- package/frontend-vue/package.json +2 -2
- package/package.json +19 -13
- package/skills/dms-project/SKILL.md +4 -3
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shapes the verification harness passes between its modules: the plan a
|
|
3
|
+
* diff maps to, the verifier's judgement, the recorded result of a formal
|
|
4
|
+
* check and the verdict computed from them. This module holds types only.
|
|
5
|
+
*
|
|
6
|
+
* @typedef {{ kind: "emit" } | { kind: "probe", command: string[] }} BehaviourProbe
|
|
7
|
+
* @typedef {{ name: string, covers: string[], files?: string[], command: string[], baseCommand?: string[], violation: RegExp | null, passing: RegExp | null, behaviour?: BehaviourProbe }} FormalCheck
|
|
8
|
+
* @typedef {{ baseSha: string, headSha: string }} Commits
|
|
9
|
+
* @typedef {{ method: string, changed: boolean, removed: string[], added: string[] }} BehaviourChange
|
|
10
|
+
* @typedef {{ exitCode: number | null, violated: string[], passing: string[] }} Rules
|
|
11
|
+
* @typedef {{ name: string, exitCode: number | null, violated: string[], passing: string[], folder: string, commits?: Commits, behaviour?: BehaviourChange, checkChanged?: boolean, base?: Rules | null, fixed?: string[], missing?: string[] }} FormalResult
|
|
12
|
+
* @typedef {{ feature: string, files: string[] }} TouchedFeature
|
|
13
|
+
* @typedef {{ baseRef: string, baseSha: string, headSha: string, changed: string[], touched: TouchedFeature[], unmapped: string[], docs: string[], containments: string[], run: string[] }} Plan
|
|
14
|
+
* @typedef {{ kind?: string, location?: string, irreversible?: string, containment?: string, containmentJourney?: string }} RawDoorRow
|
|
15
|
+
* @typedef {{ kind?: string, location?: string, reason?: string }} RawFalsePositive
|
|
16
|
+
* @typedef {{ page: string, matches?: boolean, note?: string }} RawDocsJudgement
|
|
17
|
+
* @typedef {{ verifier?: string, notVerified?: string[], attention?: string[], docs?: RawDocsJudgement[], doors?: { none?: string, rows?: RawDoorRow[], falsePositives?: RawFalsePositive[] } }} RawJudgement
|
|
18
|
+
* @typedef {{ kind: string, location: string, irreversible: string, containment: string, containmentJourney: string }} DoorRow
|
|
19
|
+
* @typedef {{ kind: string, location: string, reason: string }} FalsePositive
|
|
20
|
+
* @typedef {{ page: string, matches: boolean, note: string }} DocsJudgement
|
|
21
|
+
* @typedef {{ notVerified: string[], attention: string[], docs: DocsJudgement[], doorsNone: string | null, doors: DoorRow[], falsePositives: FalsePositive[], verifier: string }} Judgement
|
|
22
|
+
* @typedef {{ name: string, pass: boolean, detail: string }} JourneyCheck
|
|
23
|
+
* @typedef {{ feature: string, journey: string, title: string, entryPoint: string, status: "PASS" | "FAIL", database: string, steps: { name: string, checks: JourneyCheck[] }[], error: string | null, folder: string }} FeatureResult
|
|
24
|
+
* @typedef {{ result: string, headSha: string, skillSha: string, pr: number, reasons: string[] }} VerdictCore
|
|
25
|
+
* @typedef {VerdictCore & { markdown: string }} Verdict
|
|
26
|
+
* @typedef {{ feature: string, caught: boolean, run: string, controlRun: string, caughtBy: string[], failingInControl: string[], harnessErrors: string[], output: string }} SeededOutcome
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { existsSync,
|
|
1
|
+
import { existsSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join, relative } from "node:path";
|
|
3
3
|
import { git } from "../git.mjs";
|
|
4
4
|
import { loadJourneys } from "../journey.mjs";
|
|
5
|
+
import { readFeatureResults } from "./decode.mjs";
|
|
5
6
|
import { flaggedDoors } from "./doors.mjs";
|
|
6
7
|
import {
|
|
7
8
|
formalGate,
|
|
@@ -26,22 +27,45 @@ export function originRepository(repo) {
|
|
|
26
27
|
return match[1];
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
/**
|
|
31
|
+
* @param {string} sha A commit
|
|
32
|
+
* @returns {string} Its first seven characters
|
|
33
|
+
*/
|
|
29
34
|
function short(sha) {
|
|
30
35
|
return sha.slice(0, 7);
|
|
31
36
|
}
|
|
32
37
|
|
|
38
|
+
/**
|
|
39
|
+
* @param {string[]} entries The list items
|
|
40
|
+
* @param {string} empty The item that stands for an empty list
|
|
41
|
+
* @returns {string[]} The Markdown bullets
|
|
42
|
+
*/
|
|
33
43
|
function bullets(entries, empty) {
|
|
34
44
|
return (entries.length > 0 ? entries : [empty]).map((entry) => `- ${entry}`);
|
|
35
45
|
}
|
|
36
46
|
|
|
47
|
+
/**
|
|
48
|
+
* @param {import("../run-state.mjs").RunState} state The run
|
|
49
|
+
* @param {string} feature The feature
|
|
50
|
+
* @returns {import("./types.mjs").FeatureResult[]} The journey results the run recorded
|
|
51
|
+
*/
|
|
37
52
|
function readResults(state, feature) {
|
|
38
|
-
|
|
39
|
-
return existsSync(file) ? JSON.parse(readFileSync(file, "utf8")) : [];
|
|
53
|
+
return readFeatureResults(join(state.evidence, feature, "feature.json"));
|
|
40
54
|
}
|
|
41
55
|
|
|
56
|
+
/**
|
|
57
|
+
* @param {import("./skill.mjs").Skill} skill The skill
|
|
58
|
+
* @param {import("../run-state.mjs").RunState} state The run
|
|
59
|
+
* @param {import("./types.mjs").Plan} plan The plan
|
|
60
|
+
* @param {(path: string) => string} link The evidence link of a path
|
|
61
|
+
* @returns {Promise<{ rows: string[], reasons: string[], byJourney: Map<string, import("./types.mjs").FeatureResult> }>} The table rows and why the verdict fails
|
|
62
|
+
*/
|
|
42
63
|
async function journeyRows(skill, state, plan, link) {
|
|
64
|
+
/** @type {string[]} */
|
|
43
65
|
const rows = [];
|
|
66
|
+
/** @type {string[]} */
|
|
44
67
|
const reasons = [];
|
|
68
|
+
/** @type {Map<string, import("./types.mjs").FeatureResult>} */
|
|
45
69
|
const byJourney = new Map();
|
|
46
70
|
for (const feature of plan.run) {
|
|
47
71
|
const results = readResults(state, feature);
|
|
@@ -71,6 +95,12 @@ async function journeyRows(skill, state, plan, link) {
|
|
|
71
95
|
return { rows, reasons, byJourney };
|
|
72
96
|
}
|
|
73
97
|
|
|
98
|
+
/**
|
|
99
|
+
* @param {import("../run-state.mjs").RunState} state The run
|
|
100
|
+
* @param {Map<string, import("./types.mjs").FeatureResult>} byJourney The results of this verdict's journeys
|
|
101
|
+
* @param {string} id The containment journey, as `feature/journey`
|
|
102
|
+
* @returns {import("./types.mjs").FeatureResult | undefined} Its result
|
|
103
|
+
*/
|
|
74
104
|
function containmentResult(state, byJourney, id) {
|
|
75
105
|
const [feature, journey] = id.split("/");
|
|
76
106
|
return (
|
|
@@ -79,7 +109,16 @@ function containmentResult(state, byJourney, id) {
|
|
|
79
109
|
);
|
|
80
110
|
}
|
|
81
111
|
|
|
112
|
+
/**
|
|
113
|
+
* @param {import("./skill.mjs").Skill} skill The skill
|
|
114
|
+
* @param {import("../run-state.mjs").RunState} state The run
|
|
115
|
+
* @param {import("./types.mjs").Judgement} judgement The verifier's judgement
|
|
116
|
+
* @param {Map<string, import("./types.mjs").FeatureResult>} byJourney The results of this verdict's journeys
|
|
117
|
+
* @param {import("./types.mjs").Plan} plan The plan
|
|
118
|
+
* @returns {string[]} Why the doors fail the verdict
|
|
119
|
+
*/
|
|
82
120
|
function doorReasons(skill, state, judgement, byJourney, plan) {
|
|
121
|
+
/** @type {string[]} */
|
|
83
122
|
const reasons = [];
|
|
84
123
|
for (const row of judgement.doors.filter((door) =>
|
|
85
124
|
CONTAINED_KINDS.has(door.kind),
|
|
@@ -114,6 +153,10 @@ function doorReasons(skill, state, judgement, byJourney, plan) {
|
|
|
114
153
|
return reasons;
|
|
115
154
|
}
|
|
116
155
|
|
|
156
|
+
/**
|
|
157
|
+
* @param {import("./types.mjs").Judgement} judgement The verifier's judgement
|
|
158
|
+
* @returns {string[]} The section's lines
|
|
159
|
+
*/
|
|
117
160
|
function doorsSection(judgement) {
|
|
118
161
|
const dismissed = judgement.falsePositives.map(
|
|
119
162
|
(entry) =>
|
|
@@ -134,6 +177,13 @@ function doorsSection(judgement) {
|
|
|
134
177
|
];
|
|
135
178
|
}
|
|
136
179
|
|
|
180
|
+
/**
|
|
181
|
+
* @param {import("./skill.mjs").Skill} skill The skill
|
|
182
|
+
* @param {import("../run-state.mjs").RunState} state The run
|
|
183
|
+
* @param {import("./types.mjs").Plan} plan The plan
|
|
184
|
+
* @param {(path: string) => string} link The evidence link of a path
|
|
185
|
+
* @returns {{ reasons: string[], lines: string[] }} Why the formal checks fail the verdict, and their lines
|
|
186
|
+
*/
|
|
137
187
|
function formalSection(skill, state, plan, link) {
|
|
138
188
|
const reasons = [];
|
|
139
189
|
const lines = [];
|
|
@@ -173,6 +223,11 @@ function formalSection(skill, state, plan, link) {
|
|
|
173
223
|
return { reasons, lines };
|
|
174
224
|
}
|
|
175
225
|
|
|
226
|
+
/**
|
|
227
|
+
* @param {import("./types.mjs").Judgement} judgement The verifier's judgement
|
|
228
|
+
* @param {import("./types.mjs").Plan} plan The plan
|
|
229
|
+
* @returns {string[]} The docs pages that no longer match
|
|
230
|
+
*/
|
|
176
231
|
function docsReasons(judgement, plan) {
|
|
177
232
|
return plan.docs.flatMap((page) => {
|
|
178
233
|
const docs = judgement.docs.find((entry) => entry.page === page);
|
|
@@ -184,6 +239,12 @@ function docsReasons(judgement, plan) {
|
|
|
184
239
|
});
|
|
185
240
|
}
|
|
186
241
|
|
|
242
|
+
/**
|
|
243
|
+
* @param {import("./skill.mjs").Skill} skill The skill
|
|
244
|
+
* @param {import("./types.mjs").VerdictCore} verdict The verdict
|
|
245
|
+
* @param {{ plan: import("./types.mjs").Plan, judgement: import("./types.mjs").Judgement, journeys: Awaited<ReturnType<typeof journeyRows>>, formal: ReturnType<typeof formalSection>, reasons: string[], attention: string[], link: (path: string) => string }} parts What the verdict is rendered from
|
|
246
|
+
* @returns {string} The verdict as Markdown
|
|
247
|
+
*/
|
|
187
248
|
function markdown(skill, verdict, parts) {
|
|
188
249
|
const { plan, judgement, journeys, formal, reasons, attention, link } = parts;
|
|
189
250
|
const touched = plan.touched.map(
|
|
@@ -251,11 +312,11 @@ function markdown(skill, verdict, parts) {
|
|
|
251
312
|
* the formal check results and the verifier's judgement, and writes
|
|
252
313
|
* verdict.md, verdict.json and plan.json into the evidence folder.
|
|
253
314
|
*
|
|
254
|
-
* @param {
|
|
255
|
-
* @param {
|
|
315
|
+
* @param {import("./skill.mjs").Skill} skill The skill
|
|
316
|
+
* @param {import("../run-state.mjs").RunState} state The run
|
|
256
317
|
* @param {number} pr The pull request
|
|
257
|
-
* @param {
|
|
258
|
-
* @returns {Promise<
|
|
318
|
+
* @param {import("./types.mjs").Judgement} judgement The verifier's judgement
|
|
319
|
+
* @returns {Promise<import("./types.mjs").Verdict>} The verdict
|
|
259
320
|
*/
|
|
260
321
|
export async function renderVerdict(skill, state, pr, judgement) {
|
|
261
322
|
const plan = planFor(skill, state.baseRef);
|
|
@@ -265,6 +326,10 @@ export async function renderVerdict(skill, state, pr, judgement) {
|
|
|
265
326
|
skill.repo,
|
|
266
327
|
) || plan.headSha;
|
|
267
328
|
const repository = originRepository(skill.repo);
|
|
329
|
+
/**
|
|
330
|
+
* @param {string} path A path under the run's evidence
|
|
331
|
+
* @returns {string} Its link on the evidence branch
|
|
332
|
+
*/
|
|
268
333
|
const link = (path) =>
|
|
269
334
|
`https://github.com/${repository}/tree/verify-evidence/pr-${pr}/${plan.headSha}/${path}`;
|
|
270
335
|
const reasons = [];
|
package/bin/dms-control.mjs
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { parseArgs } from "node:util";
|
|
3
|
+
import { OPTIONS } from "./control/options.mjs";
|
|
3
4
|
import { print, runStackCommand } from "./control/commands-stack.mjs";
|
|
4
5
|
import { runVerifyCommand } from "./control/commands-verify.mjs";
|
|
5
6
|
|
|
6
7
|
const USAGE = `Usage: dms-control <command>
|
|
7
8
|
|
|
8
9
|
Drive an isolated DMS (run from the repository, or pass --playground):
|
|
9
|
-
up [--prepare] [--playground <dir>] [--runs <dir>] [--mongo-url <url>] [--env KEY=VALUE]... [--base <ref>] [--skill <dir>]
|
|
10
|
+
up [--prepare] [--playground <dir>] [--renderer <dir>] [--runs <dir>] [--mongo-url <url>] [--env KEY=VALUE]... [--base <ref>] [--skill <dir>]
|
|
10
11
|
build and start a playground copy on free ports; print the run folder
|
|
11
|
-
(--prepare first runs the skill's install and build commands
|
|
12
|
+
(--prepare first runs the skill's install and build commands;
|
|
13
|
+
--renderer serves that built @antelopejs/dms-frontend checkout)
|
|
12
14
|
doctor <run> [--verbose] check the run is worth driving; print the failing checks
|
|
13
15
|
onboard <run> [--platform-name <name>]
|
|
14
16
|
create the run's administrator through POST /api/onboarding/register
|
|
@@ -33,32 +35,10 @@ Verify a change (the .agents/skills/verify-* folder of the checkout, or --skill
|
|
|
33
35
|
publish <run> --pr <n> push the evidence, comment the verdict, set the verify status
|
|
34
36
|
`;
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"mongo-url": { type: "string" },
|
|
41
|
-
env: { type: "string", multiple: true },
|
|
42
|
-
base: { type: "string", default: "origin/main" },
|
|
43
|
-
skill: { type: "string" },
|
|
44
|
-
verbose: { type: "boolean" },
|
|
45
|
-
"platform-name": { type: "string" },
|
|
46
|
-
as: { type: "string" },
|
|
47
|
-
tab: { type: "string" },
|
|
48
|
-
role: { type: "string" },
|
|
49
|
-
name: { type: "string" },
|
|
50
|
-
exact: { type: "boolean" },
|
|
51
|
-
nth: { type: "string" },
|
|
52
|
-
"within-role": { type: "string" },
|
|
53
|
-
"within-name": { type: "string" },
|
|
54
|
-
value: { type: "string" },
|
|
55
|
-
key: { type: "string" },
|
|
56
|
-
path: { type: "string" },
|
|
57
|
-
body: { type: "string" },
|
|
58
|
-
pr: { type: "string" },
|
|
59
|
-
all: { type: "boolean" },
|
|
60
|
-
};
|
|
61
|
-
|
|
38
|
+
/**
|
|
39
|
+
* @param {string[]} argv The command line without the node and script paths
|
|
40
|
+
* @returns {Promise<number>} The exit code
|
|
41
|
+
*/
|
|
62
42
|
async function main(argv) {
|
|
63
43
|
const { positionals, values } = parseArgs({
|
|
64
44
|
args: argv,
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type * as ts from "typescript";
|
|
2
|
+
|
|
3
|
+
/** One script block of a source file, with its offset in that file. */
|
|
4
|
+
export interface ApiErrorScript {
|
|
5
|
+
source: string;
|
|
6
|
+
offset: number;
|
|
7
|
+
isSetup?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/** A script block of a parsed Vue single-file component. */
|
|
11
|
+
export interface SfcScriptBlock {
|
|
12
|
+
content: string;
|
|
13
|
+
loc: { start: { offset: number } };
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** The part of `vue/compiler-sfc`'s `parse` the checker calls; that `parse` satisfies it. */
|
|
17
|
+
export interface SfcParser {
|
|
18
|
+
parse(
|
|
19
|
+
source: string,
|
|
20
|
+
options: { filename: string },
|
|
21
|
+
): {
|
|
22
|
+
descriptor: {
|
|
23
|
+
script: SfcScriptBlock | null;
|
|
24
|
+
scriptSetup: SfcScriptBlock | null;
|
|
25
|
+
};
|
|
26
|
+
errors: readonly Error[];
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** A toast call that reports a failure outside the canonical presenter. */
|
|
31
|
+
export interface ApiErrorToastCall {
|
|
32
|
+
node: ts.CallExpression;
|
|
33
|
+
payload: ts.Expression | undefined;
|
|
34
|
+
method: "add" | "update";
|
|
35
|
+
failure: string | null;
|
|
36
|
+
color: string;
|
|
37
|
+
tree: ts.SourceFile;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Runtime sources only. Test fixtures and generated directories are excluded. */
|
|
41
|
+
export declare function apiErrorSources(root: string): string[];
|
|
42
|
+
|
|
43
|
+
/** Parses both Vue script blocks without treating template text as JavaScript. */
|
|
44
|
+
export declare function apiErrorScripts(
|
|
45
|
+
file: string,
|
|
46
|
+
source: string,
|
|
47
|
+
tools: SfcParser,
|
|
48
|
+
): ApiErrorScript[];
|
|
49
|
+
|
|
50
|
+
/** Analyzes local toast bindings and failure regions. Cross-file effects are not inferred. */
|
|
51
|
+
export declare function analyzeApiErrorScript(
|
|
52
|
+
source: string,
|
|
53
|
+
file: string,
|
|
54
|
+
compiler: typeof ts,
|
|
55
|
+
): ApiErrorToastCall[];
|
|
56
|
+
|
|
57
|
+
/** Returns diagnostics for local failure toasts outside the canonical presenter. */
|
|
58
|
+
export declare function checkApiErrorPresentation(roots: string[]): string[];
|
|
59
|
+
|
|
60
|
+
/** Runs the checker with development dependencies resolved from each frontend root. */
|
|
61
|
+
export declare function assertApiErrorPresentation(roots: string[]): void;
|
|
@@ -15,7 +15,7 @@ exports.RegisterNativeUploadField = {
|
|
|
15
15
|
const key = JSON.stringify(registration);
|
|
16
16
|
const current = registrations.get(key);
|
|
17
17
|
registrations.set(key, {
|
|
18
|
-
declaration:
|
|
18
|
+
declaration: structuredClone(registration),
|
|
19
19
|
count: (current?.count || 0) + 1,
|
|
20
20
|
});
|
|
21
21
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access.js","sourceRoot":"","sources":["../../src/attachments/access.ts"],"names":[],"mappings":";;;AA6EA,kEAQC;AAED,wDAiCC;AAvHD,6FAAqE;AACrE,oCAA6C;AAC7C,qDAA4E;AAC5E,uEAG+C;AAE/C,iGAAyG;AAGzG,yCAA4C;AAM5C,MAAM,aAAa,GAAG,IAAI,GAAG,EAA6B,CAAC;AAE9C,QAAA,yBAAyB,GAAG;IACvC,QAAQ,CAAC,YAA2C;QAClD,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QACzC,MAAM,OAAO,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACvC,aAAa,CAAC,GAAG,CAAC,GAAG,EAAE;YACrB,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"access.js","sourceRoot":"","sources":["../../src/attachments/access.ts"],"names":[],"mappings":";;;AA6EA,kEAQC;AAED,wDAiCC;AAvHD,6FAAqE;AACrE,oCAA6C;AAC7C,qDAA4E;AAC5E,uEAG+C;AAE/C,iGAAyG;AAGzG,yCAA4C;AA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AC,YAAY;QAAE,IAAA,yBAAc,GAAE,CAAC;IACpC,IAAI,KAAK,IAAI,YAAY,CAAC,eAAe,KAAK,4BAA4B;QACxE,IAAA,yBAAc,GAAE,CAAC;IACnB,MAAM,SAAS,GAAG,MAAM,IAAA,gDAA4B,EAAC,OAAO,CAAC,CAAC;IAC9D,MAAM,WAAW,GAAG,IAAA,wCAAQ,EAAC,sBAAiB,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IACpE,MAAM,SAAS,GAAG,IAAA,wCAAQ,EAAC,cAAS,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC1D,IACE,CAAC,CAAC,MAAM,IAAA,yBAAiB,EACvB,SAAS,CAAC,IAAI,EACd,YAAY,CAAC,MAAM,EACnB,WAAW,EACX,SAAS,EACT,SAAS,CAAC,QAAQ,CACnB,CAAC;QAEF,IAAA,yBAAc,GAAE,CAAC;IACnB,IACE,CAAC,CAAC,MAAM,kBAAkB,CACxB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,SAAS,EACT,KAAK,CACN,CAAC;QAEF,IAAA,yBAAc,GAAE,CAAC;IACnB,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { AttachmentField
|
|
1
|
+
import type { AttachmentField } from "@antelopejs/interface-dms/attachments";
|
|
2
2
|
export interface AttachmentReference {
|
|
3
3
|
key: string;
|
|
4
4
|
field: AttachmentField;
|
|
5
5
|
}
|
|
6
|
-
export declare function collectAttachments(fields: AttachmentField[], document:
|
|
6
|
+
export declare function collectAttachments(fields: AttachmentField[], document: Record<string, unknown>): AttachmentReference[];
|
|
7
7
|
export declare function containsAttachment(references: AttachmentReference[], reference: AttachmentReference): boolean;
|
|
@@ -2,21 +2,34 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.collectAttachments = collectAttachments;
|
|
4
4
|
exports.containsAttachment = containsAttachment;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (!value || typeof value !== "object")
|
|
9
|
-
return [];
|
|
10
|
-
if (!Array.isArray(value) && kind === "image" && "key" in value) {
|
|
11
|
-
return typeof value.key === "string" && value.key ? [value.key] : [];
|
|
12
|
-
}
|
|
13
|
-
return Object.values(value).flatMap((item) => extractKeys(item, kind));
|
|
5
|
+
const own_value_1 = require("../utils/own-value");
|
|
6
|
+
function isRecord(value) {
|
|
7
|
+
return typeof value === "object" && value !== null;
|
|
14
8
|
}
|
|
15
9
|
function collectAttachments(fields, document) {
|
|
16
|
-
return fields.flatMap((field) =>
|
|
17
|
-
|
|
18
|
-
field
|
|
19
|
-
|
|
10
|
+
return fields.flatMap((field) => {
|
|
11
|
+
const keys = new Set();
|
|
12
|
+
const pending = [(0, own_value_1.ownValue)(document, field.key)];
|
|
13
|
+
while (pending.length > 0) {
|
|
14
|
+
const item = pending.pop();
|
|
15
|
+
if (field.kind === "file" && typeof item === "string") {
|
|
16
|
+
if (item)
|
|
17
|
+
keys.add(item);
|
|
18
|
+
}
|
|
19
|
+
else if (isRecord(item)) {
|
|
20
|
+
if (!Array.isArray(item) && field.kind === "image" && "key" in item) {
|
|
21
|
+
if (typeof item.key === "string" && item.key)
|
|
22
|
+
keys.add(item.key);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
const children = Object.values(item);
|
|
26
|
+
for (let index = children.length - 1; index >= 0; index -= 1)
|
|
27
|
+
pending.push(children[index]);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return [...keys].map((key) => ({ key, field }));
|
|
32
|
+
});
|
|
20
33
|
}
|
|
21
34
|
function containsAttachment(references, reference) {
|
|
22
35
|
return references.some((candidate) => candidate.key === reference.key &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../src/attachments/fields.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","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,KAAK,IAAI,CAAC;wBAC1D,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;gBAClC,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,kBAAkB,CAChC,UAAiC,EACjC,SAA8B;IAE9B,OAAO,UAAU,CAAC,IAAI,CACpB,CAAC,SAAS,EAAE,EAAE,CACZ,SAAS,CAAC,GAAG,KAAK,SAAS,CAAC,GAAG;QAC/B,SAAS,CAAC,KAAK,CAAC,EAAE,KAAK,SAAS,CAAC,KAAK,CAAC,EAAE,CAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./access"), exports);
|
|
18
|
+
__exportStar(require("./fields"), exports);
|
|
18
19
|
__exportStar(require("./read"), exports);
|
|
19
20
|
__exportStar(require("./registry"), exports);
|
|
20
21
|
__exportStar(require("./save"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/attachments/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,yCAAuB;AACvB,6CAA2B;AAC3B,yCAAuB;AACvB,+CAA6B;AAC7B,4CAA0B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/attachments/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,yCAAuB;AACvB,6CAA2B;AAC3B,yCAAuB;AACvB,+CAA6B;AAC7B,4CAA0B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../src/attachments/read.ts"],"names":[],"mappings":";;AAkCA,
|
|
1
|
+
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../src/attachments/read.ts"],"names":[],"mappings":";;AAkCA,wCAsBC;AAxDD,6DAA4E;AAC5E,+EAI4C;AAE5C,qCAAkD;AAClD,yCAIoB;AAEpB,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACjC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAErC,KAAK,UAAU,cAAc,CAAC,GAAW,EAAE,OAAgB;IACzD,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,IAAA,wCAAe,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QACrD,MAAM,IAAI,GAAG,MAAM,IAAA,sCAAa,EAC9B,GAAG,EACH,mCAAwB,GAAG,sBAAsB,EACjD,OAAO,CACR,CAAC;QACF,OAAO,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,EAAE,CAAC;IAClC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,0CAAiB;YACpC,MAAM,IAAI,0BAAU,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;QAC9C,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAGM,KAAK,UAAU,cAAc,CAClC,OAAuB,EACvB,GAAW,EACX,OAAgB;IAEhB,MAAM,UAAU,GAAG,MAAM,IAAA,yBAAc,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAEtD,MAAM,MAAM,GAAsB,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACpE,MAAM,SAAS,GAAG,MAAM,IAAA,+BAAsB,EAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACvE,IAAI,UAAU,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ;QAAE,IAAA,yBAAc,GAAE,CAAC;IACjE,MAAM,QAAQ,GACZ,IAAI,CAAC,GAAG,EAAE,GAAG,mCAAwB,GAAG,uBAAuB,CAAC;IAClE,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAChD,IACE,MAAM,CAAC,UAAU,KAAK,QAAQ;QAC9B,CAAC,IAAI,CAAC,SAAS,KAAK,SAAS;YAC3B,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;YAChC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,EAC5B,CAAC;QACD,IAAA,yBAAc,GAAE,CAAC;IACnB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { AttachmentSaveRequest, AttachmentSaveResult } from "@antelopejs/interface-dms/attachments";
|
|
2
|
-
export declare function SaveComponentFiles<T>(request: AttachmentSaveRequest, save: (document:
|
|
2
|
+
export declare function SaveComponentFiles<T>(request: AttachmentSaveRequest, save: (document: Record<string, unknown>) => Promise<AttachmentSaveResult<T>>): Promise<T>;
|
package/dist/attachments/save.js
CHANGED
|
@@ -10,9 +10,6 @@ const fields_1 = require("./fields");
|
|
|
10
10
|
const registry_1 = require("./registry");
|
|
11
11
|
const BAD_REQUEST = 400;
|
|
12
12
|
const FILE_NOT_FOUND_ERROR_NAME = "FileNotFoundError";
|
|
13
|
-
function isFileNotFoundError(error) {
|
|
14
|
-
return error instanceof Error && error.name === FILE_NOT_FOUND_ERROR_NAME;
|
|
15
|
-
}
|
|
16
13
|
async function storedReference(ref) {
|
|
17
14
|
try {
|
|
18
15
|
const key = (0, interface_file_storage_1.isStagedKey)(ref.key)
|
|
@@ -21,7 +18,7 @@ async function storedReference(ref) {
|
|
|
21
18
|
return { key, metadata: await (0, interface_file_storage_1.GetFileMetadata)(key, ref.field.storage) };
|
|
22
19
|
}
|
|
23
20
|
catch (error) {
|
|
24
|
-
if (
|
|
21
|
+
if (error instanceof Error && error.name === FILE_NOT_FOUND_ERROR_NAME)
|
|
25
22
|
throw new interface_api_1.HTTPResult(BAD_REQUEST, "A submitted file was never stored. Upload it again.");
|
|
26
23
|
throw error;
|
|
27
24
|
}
|
|
@@ -48,17 +45,36 @@ async function prepareReferences(request) {
|
|
|
48
45
|
await validateReference(request, ref);
|
|
49
46
|
return submitted;
|
|
50
47
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
48
|
+
function remapValue(value, map) {
|
|
49
|
+
const result = [value];
|
|
50
|
+
const pending = [
|
|
51
|
+
{ keys: ["0"], values: [value], copy: result },
|
|
52
|
+
];
|
|
53
|
+
for (let node = pending.pop(); node; node = pending.pop()) {
|
|
54
|
+
for (const [index, key] of node.keys.entries()) {
|
|
55
|
+
const item = node.values[index];
|
|
56
|
+
let remapped = item;
|
|
57
|
+
if (typeof item === "string")
|
|
58
|
+
remapped = map.get(item) ?? item;
|
|
59
|
+
else if (item && typeof item === "object") {
|
|
60
|
+
const copy = Array.isArray(item) ? Array.from(item) : {};
|
|
61
|
+
const source = Array.isArray(copy) ? copy : item;
|
|
62
|
+
pending.push({
|
|
63
|
+
keys: Object.keys(source),
|
|
64
|
+
values: Object.values(source),
|
|
65
|
+
copy,
|
|
66
|
+
});
|
|
67
|
+
remapped = copy;
|
|
68
|
+
}
|
|
69
|
+
Object.defineProperty(node.copy, key, {
|
|
70
|
+
value: remapped,
|
|
71
|
+
enumerable: true,
|
|
72
|
+
writable: true,
|
|
73
|
+
configurable: true,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return result[0];
|
|
62
78
|
}
|
|
63
79
|
async function promoteReferences(request, refs) {
|
|
64
80
|
const document = { ...request.submitted };
|
|
@@ -69,8 +85,8 @@ async function promoteReferences(request, refs) {
|
|
|
69
85
|
assertConstraints(metadata, ref);
|
|
70
86
|
mapping.set(ref.key, key);
|
|
71
87
|
}
|
|
72
|
-
if (field.key
|
|
73
|
-
document[field.key] =
|
|
88
|
+
if (Object.hasOwn(document, field.key))
|
|
89
|
+
document[field.key] = remapValue(document[field.key], mapping);
|
|
74
90
|
}
|
|
75
91
|
return document;
|
|
76
92
|
}
|
|
@@ -88,7 +104,23 @@ async function cleanRemoved(request, document) {
|
|
|
88
104
|
}
|
|
89
105
|
}
|
|
90
106
|
}
|
|
107
|
+
const MAX_BODY_DEPTH = 64;
|
|
108
|
+
function assertBodyDepth(request) {
|
|
109
|
+
const pending = request.fields.map((field) => ({
|
|
110
|
+
value: request.submitted[field.key],
|
|
111
|
+
depth: 2,
|
|
112
|
+
}));
|
|
113
|
+
for (let node = pending.pop(); node; node = pending.pop()) {
|
|
114
|
+
if (!(node.value instanceof Object))
|
|
115
|
+
continue;
|
|
116
|
+
if (node.depth > MAX_BODY_DEPTH)
|
|
117
|
+
throw new interface_api_1.HTTPResult(BAD_REQUEST, `The JSON body nests more than ${MAX_BODY_DEPTH} levels deep.`);
|
|
118
|
+
for (const item of Object.values(node.value))
|
|
119
|
+
pending.push({ value: item, depth: node.depth + 1 });
|
|
120
|
+
}
|
|
121
|
+
}
|
|
91
122
|
async function SaveComponentFiles(request, save) {
|
|
123
|
+
assertBodyDepth(request);
|
|
92
124
|
const refs = await prepareReferences(request);
|
|
93
125
|
const saved = await save(await promoteReferences(request, refs));
|
|
94
126
|
await cleanRemoved(request, saved.document);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save.js","sourceRoot":"","sources":["../../src/attachments/save.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"save.js","sourceRoot":"","sources":["../../src/attachments/save.ts"],"names":[],"mappings":";;AA0MA,gDAUC;AApND,6DAAuD;AACvD,gEAA6D;AAC7D,+EAM4C;AAM5C,qCAAkD;AAClD,+CAAwD;AACxD,qCAIkB;AAClB,yCA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AAC;AACtB,CAAC"}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type { internal } from "@antelopejs/interface-dms/attachments";
|
|
2
1
|
import type { TableViewAttachmentSaveRequest } from "@antelopejs/interface-dms/internal/attachments";
|
|
3
|
-
export declare function SaveTableViewAttachments(request: TableViewAttachmentSaveRequest): Promise<
|
|
2
|
+
export declare function SaveTableViewAttachments(request: TableViewAttachmentSaveRequest): Promise<void>;
|