@antelopejs/dms 0.15.1 → 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 +19 -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 +158 -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 +30 -14
- package/bin/control/stack.mjs +95 -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/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/models/attachments.model.d.ts +7 -5
- package/dist/db/models/setupToken.model.d.ts +7 -5
- 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/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/preview-pages.js +6 -3
- package/dist/implementations/dms/page/preview-pages.js.map +1 -1
- 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.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/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 +1 -1
- package/dist/routes/auth/login.js +1 -2
- 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/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/files.d.ts +1 -2
- package/dist/routes/files.js.map +1 -1
- package/dist/routes/onboarding.d.ts +1 -2
- 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/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/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-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
|
@@ -21,7 +21,6 @@ export interface WatchAction {
|
|
|
21
21
|
component: string;
|
|
22
22
|
event: string;
|
|
23
23
|
functionId: string;
|
|
24
|
-
|
|
25
|
-
params?: Record<string, unknown>;
|
|
24
|
+
params?: object;
|
|
26
25
|
onParam?: WatchActionCondition | WatchActionCondition[];
|
|
27
26
|
}
|
|
@@ -1,11 +1,64 @@
|
|
|
1
1
|
import type { WatchAction } from "#dms-core/app/types/watch";
|
|
2
|
-
import { isString, isNumber, isBoolean } from "#dms-core/app/utils/type-check";
|
|
2
|
+
import { isString, isNumber, isBoolean, isObject } from "#dms-core/app/utils/type-check";
|
|
3
3
|
|
|
4
4
|
/** What a `SetFieldValue` watch writes, and where. */
|
|
5
5
|
export interface SetFieldValueParams {
|
|
6
6
|
targetField: string;
|
|
7
7
|
value?: unknown;
|
|
8
|
-
valueMap?:
|
|
8
|
+
valueMap?: object;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** The own member `key` of `source`, wrapped so that an absent one stays apart from an `undefined` one. */
|
|
12
|
+
function ownMember(
|
|
13
|
+
source: object,
|
|
14
|
+
key: string,
|
|
15
|
+
): { value: unknown } | undefined {
|
|
16
|
+
return isObject(source) && Object.hasOwn(source, key)
|
|
17
|
+
? { value: source[key] }
|
|
18
|
+
: undefined;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** What a field-state watch (`SetFieldDisabled`, `SetFieldHidden`, `SetFieldRequired`) sets, and on which field. */
|
|
22
|
+
export interface FieldFlagParams {
|
|
23
|
+
targetField: string;
|
|
24
|
+
flag: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The params a field-state watch carries, read by the name of its flag
|
|
29
|
+
* (`setDisabled`, `setHidden`, `setRequired`). Nothing when the watch names no
|
|
30
|
+
* string `targetField`.
|
|
31
|
+
*/
|
|
32
|
+
export function readFieldFlagParams(
|
|
33
|
+
params: WatchAction["params"],
|
|
34
|
+
flagKey: string,
|
|
35
|
+
): FieldFlagParams | undefined {
|
|
36
|
+
if (!params || !("targetField" in params)) return undefined;
|
|
37
|
+
const { targetField } = params;
|
|
38
|
+
if (!isString(targetField)) return undefined;
|
|
39
|
+
return { targetField, flag: !!ownMember(params, flagKey)?.value };
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The params a `SetFieldValue` watch carries. Nothing when the watch names no
|
|
44
|
+
* string `targetField`, or a `valueMap` that is not an object.
|
|
45
|
+
*/
|
|
46
|
+
export function readSetFieldValueParams(
|
|
47
|
+
params: WatchAction["params"],
|
|
48
|
+
): SetFieldValueParams | undefined {
|
|
49
|
+
if (!params || !("targetField" in params)) return undefined;
|
|
50
|
+
const { targetField } = params;
|
|
51
|
+
if (!isString(targetField)) return undefined;
|
|
52
|
+
const decoded: SetFieldValueParams = { targetField };
|
|
53
|
+
if ("value" in params && Object.hasOwn(params, "value")) {
|
|
54
|
+
decoded.value = params.value;
|
|
55
|
+
}
|
|
56
|
+
if ("valueMap" in params && params.valueMap) {
|
|
57
|
+
const { valueMap } = params;
|
|
58
|
+
if (!isObject(valueMap)) return undefined;
|
|
59
|
+
decoded.valueMap = valueMap;
|
|
60
|
+
}
|
|
61
|
+
return decoded;
|
|
9
62
|
}
|
|
10
63
|
|
|
11
64
|
/** The payload of a form's `FieldChange` event. */
|
|
@@ -38,10 +91,8 @@ export function resolveFieldValueWrite(
|
|
|
38
91
|
if (payload?.initial) return undefined;
|
|
39
92
|
if (params.valueMap) {
|
|
40
93
|
const key = payload?.value;
|
|
41
|
-
if (!isMapKey(key)
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
return { value: params.valueMap[String(key)] };
|
|
94
|
+
if (!isMapKey(key)) return undefined;
|
|
95
|
+
return ownMember(params.valueMap, String(key));
|
|
45
96
|
}
|
|
46
97
|
if (!Object.hasOwn(params, "value")) return undefined;
|
|
47
98
|
return { value: params.value };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
type FieldChangePayload,
|
|
3
|
-
|
|
3
|
+
readFieldFlagParams,
|
|
4
|
+
readSetFieldValueParams,
|
|
4
5
|
resolveFieldValueWrite,
|
|
5
6
|
} from "./fieldValueRule";
|
|
6
7
|
import type { WatchActionFunction } from "#dms-core/app/types/watch";
|
|
@@ -13,16 +14,14 @@ function createFieldSetMutator(stateKey: FieldSetStateKey, flagKey: string) {
|
|
|
13
14
|
_eventData: ComponentEventData,
|
|
14
15
|
componentState: Parameters<WatchActionFunction>[2],
|
|
15
16
|
) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
targetField: string;
|
|
19
|
-
};
|
|
17
|
+
const params = readFieldFlagParams(action.params, flagKey);
|
|
18
|
+
if (!params) return;
|
|
20
19
|
const current =
|
|
21
20
|
// oxlint-disable-next-line anti-slop/require-safety-comment-for-type-assertion -- Watch actions can replace these open state entries; preserve the existing unchecked iterable conversion and falsy fallback.
|
|
22
21
|
(componentState.value[stateKey] as Set<string>) || new Set();
|
|
23
22
|
const nextSet = new Set(current);
|
|
24
23
|
|
|
25
|
-
if (params
|
|
24
|
+
if (params.flag) {
|
|
26
25
|
nextSet.add(params.targetField);
|
|
27
26
|
} else {
|
|
28
27
|
nextSet.delete(params.targetField);
|
|
@@ -37,9 +36,8 @@ function setFieldValue(
|
|
|
37
36
|
eventData: ComponentEventData,
|
|
38
37
|
componentState: Parameters<WatchActionFunction>[2],
|
|
39
38
|
) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
SetFieldValueParams;
|
|
39
|
+
const params = readSetFieldValueParams(action.params);
|
|
40
|
+
if (!params) return;
|
|
43
41
|
const write = resolveFieldValueWrite(
|
|
44
42
|
params,
|
|
45
43
|
// oxlint-disable-next-line anti-slop/require-safety-comment-for-type-assertion -- Watch actions also receive arbitrary component events; FieldChangePayload's owner does not validate eventData.data, and filtering events would change behavior.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../build/composables/form/registerFormFunctions";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DmsAppContext } from "#dms/frontend-module";
|
|
2
|
+
|
|
3
|
+
type AppContextRunner = Pick<DmsAppContext, "runWithContext">;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A plugin whose file loads on demand. The renderer runs a plugin's setup inside
|
|
7
|
+
* the app's context, which ends at the first `await`, so the loaded plugin runs
|
|
8
|
+
* inside it again: a composable that injects (`useToast`, `useDmsState`) would
|
|
9
|
+
* otherwise warn that `inject()` was called outside `setup()` and get no value.
|
|
10
|
+
*/
|
|
11
|
+
export function lazyPlugin<Context extends AppContextRunner>(
|
|
12
|
+
load: () => Promise<{ default: (context: Context) => unknown }>,
|
|
13
|
+
): (context: Context) => Promise<void> {
|
|
14
|
+
return async (context) => {
|
|
15
|
+
const plugin = await load();
|
|
16
|
+
await context.runWithContext(() => plugin.default(context));
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"packageManager": "pnpm@10.6.5",
|
|
13
13
|
"engines": {
|
|
14
|
-
"@antelopejs/dms-frontend": ">=0.
|
|
14
|
+
"@antelopejs/dms-frontend": ">=0.10.0 <0.11.0"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"typecheck": "ajs dms verify-source --layer \"$PWD\" --local-package @antelopejs/dms=.. --local-package @antelopejs/interface-dms=../../interface-dms",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@antelopejs/core": ">=1.16.0 <2",
|
|
80
|
-
"@antelopejs/dms-frontend": ">=0.
|
|
80
|
+
"@antelopejs/dms-frontend": ">=0.10.0 <0.11.0",
|
|
81
81
|
"@eslint/js": "^8.57.0",
|
|
82
82
|
"@inertiajs/vue3": "^3.7.0",
|
|
83
83
|
"@nuxt/ui": "4.10.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/dms",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "AntelopeJS DMS. Plug in your PostgreSQL, MongoDB or RethinkDB database and your coding agent builds a back office and analytics dashboard as typed TypeScript. Real-time updates on the data the DMS manages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antelopejs",
|
|
@@ -38,9 +38,11 @@
|
|
|
38
38
|
"dmsFrontend": "dist/frontend-module.js",
|
|
39
39
|
"files": [
|
|
40
40
|
"bin",
|
|
41
|
+
"!bin/tsconfig.json",
|
|
41
42
|
"dist",
|
|
42
43
|
"!dist/.tsbuildinfo",
|
|
43
44
|
"!dist/test",
|
|
45
|
+
"checks",
|
|
44
46
|
"frontend-vue",
|
|
45
47
|
"!frontend-vue/tests",
|
|
46
48
|
"!frontend-vue/vitest.config.ts",
|
|
@@ -69,13 +71,13 @@
|
|
|
69
71
|
},
|
|
70
72
|
"dependencies": {
|
|
71
73
|
"2fa": "^0.1.2",
|
|
72
|
-
"@antelopejs/interface-api": ">=0.0
|
|
73
|
-
"@antelopejs/interface-api-util": ">=0.
|
|
74
|
-
"@antelopejs/interface-core": ">=0.
|
|
75
|
-
"@antelopejs/interface-data-api": ">=0.
|
|
76
|
-
"@antelopejs/interface-database": ">=0.
|
|
77
|
-
"@antelopejs/interface-database-decorators": ">=0.
|
|
78
|
-
"@antelopejs/interface-dms": ">=0.
|
|
74
|
+
"@antelopejs/interface-api": ">=0.2.0 <1.0.0",
|
|
75
|
+
"@antelopejs/interface-api-util": ">=0.3.0 <1.0.0",
|
|
76
|
+
"@antelopejs/interface-core": ">=0.4.0 <1.0.0",
|
|
77
|
+
"@antelopejs/interface-data-api": ">=0.6.0 <1.0.0",
|
|
78
|
+
"@antelopejs/interface-database": ">=0.3.0 <1.0.0",
|
|
79
|
+
"@antelopejs/interface-database-decorators": ">=0.2.0 <1.0.0",
|
|
80
|
+
"@antelopejs/interface-dms": ">=0.12.0 <0.13.0",
|
|
79
81
|
"@antelopejs/interface-email": ">=0.0.6 <1.0.0",
|
|
80
82
|
"@antelopejs/interface-file-storage": ">=0.1.4 <1.0.0",
|
|
81
83
|
"archiver": "^7.0.1",
|
|
@@ -92,7 +94,7 @@
|
|
|
92
94
|
},
|
|
93
95
|
"devDependencies": {
|
|
94
96
|
"@antelopejs/core": ">=1.17.0 <2",
|
|
95
|
-
"@antelopejs/tooling-configs": "0.2.
|
|
97
|
+
"@antelopejs/tooling-configs": "0.2.18",
|
|
96
98
|
"@types/archiver": "^6.0.4",
|
|
97
99
|
"@types/chai": "^4.3.20",
|
|
98
100
|
"@types/jsonwebtoken": "^9.0.10",
|
|
@@ -115,7 +117,8 @@
|
|
|
115
117
|
"rimraf": "^6.1.3",
|
|
116
118
|
"tsc-alias": "^1.9.1",
|
|
117
119
|
"typescript": "^6.0.3",
|
|
118
|
-
"vue": "^3.5.18"
|
|
120
|
+
"vue": "^3.5.18",
|
|
121
|
+
"@antelopejs/api": "file:../../.campaign/tgz/antelopejs-api-6afe3e2.tgz"
|
|
119
122
|
},
|
|
120
123
|
"exports": {
|
|
121
124
|
".": {
|
|
@@ -123,7 +126,10 @@
|
|
|
123
126
|
"default": "./dist/index.js"
|
|
124
127
|
},
|
|
125
128
|
"./package.json": "./package.json",
|
|
126
|
-
"./checks/api-error-presentation":
|
|
129
|
+
"./checks/api-error-presentation": {
|
|
130
|
+
"types": "./checks/api-error-presentation.d.mts",
|
|
131
|
+
"default": "./frontend-vue/scripts/check-api-error-presentation.mjs"
|
|
132
|
+
},
|
|
127
133
|
"./interfaces/*": null
|
|
128
134
|
},
|
|
129
135
|
"publishConfig": {
|
|
@@ -132,7 +138,7 @@
|
|
|
132
138
|
"registry": "https://registry.npmjs.org/"
|
|
133
139
|
},
|
|
134
140
|
"optionalDependencies": {
|
|
135
|
-
"@antelopejs/interface-dms-automation": "
|
|
141
|
+
"@antelopejs/interface-dms-automation": "file:../../.campaign/tgz/antelopejs-interface-dms-automation-b4bc5d2.tgz",
|
|
136
142
|
"@antelopejs/interface-redis": ">=0.0.9 <1.0.0"
|
|
137
143
|
},
|
|
138
144
|
"peerDependencies": {
|
|
@@ -151,7 +157,7 @@
|
|
|
151
157
|
"frontend:start": "pnpm --dir playground frontend:start",
|
|
152
158
|
"typecheck": "node scripts/unless-prebuilt.mjs pnpm --filter @antelopejs/interface-dms build && tsc --noEmit",
|
|
153
159
|
"test": "node scripts/unless-prebuilt.mjs pnpm run build && NODE_OPTIONS=\"${NODE_OPTIONS:+$NODE_OPTIONS }--require=\\\"$PWD/scripts/backend-runtime-boundaries.cjs\\\"\" ajs module test .",
|
|
154
|
-
"test:unit": "node scripts/unless-prebuilt.mjs pnpm run build && node scripts/backend-checks.cjs && DMS_TEST_DIR=dist/test/unit NODE_OPTIONS=\"${NODE_OPTIONS:+$NODE_OPTIONS }--require=\\\"$PWD/scripts/backend-runtime-boundaries.cjs\\\"\" ajs module test .",
|
|
160
|
+
"test:unit": "node scripts/unless-prebuilt.mjs pnpm run build && node scripts/backend-checks.cjs && node scripts/backend-checks.test.mjs && node scripts/docs-scripts.test.mjs && node scripts/json-record.test.mjs && DMS_TEST_DIR=dist/test/unit NODE_OPTIONS=\"${NODE_OPTIONS:+$NODE_OPTIONS }--require=\\\"$PWD/scripts/backend-runtime-boundaries.cjs\\\"\" ajs module test .",
|
|
155
161
|
"test:integration": "node scripts/unless-prebuilt.mjs pnpm run build && DMS_TEST_DIR=dist/test/integration NODE_OPTIONS=\"${NODE_OPTIONS:+$NODE_OPTIONS }--require=\\\"$PWD/scripts/backend-runtime-boundaries.cjs\\\"\" ajs module test .",
|
|
156
162
|
"test:watch": "tsc -w & tsc-alias -w",
|
|
157
163
|
"release": "pnpm --filter @antelopejs/interface-dms build && pnpm --dir frontend-vue install --frozen-lockfile && release-it",
|
|
@@ -18,10 +18,11 @@ the **ajs-cli** skill; full walkthrough: `docs/02.building/01.project-setup.md`.
|
|
|
18
18
|
## Starting a new application
|
|
19
19
|
|
|
20
20
|
Use [template-dms-demo](https://github.com/AntelopeJS/template-dms-demo) for the default
|
|
21
|
-
CLI-owned backend and Nuxt dashboard
|
|
22
|
-
through first-admin setup
|
|
21
|
+
CLI-owned backend and Nuxt dashboard: `npx @antelopejs/core project init <dir> --template dms-demo` (needs Git on `PATH`).
|
|
22
|
+
Follow `docs/01.getting-started/03.quickstart.md` through first-admin setup (the onboarding
|
|
23
|
+
address with the setup token that the backend prints) before adding pages. Use
|
|
23
24
|
[template-dms-adonis](https://github.com/AntelopeJS/template-dms-adonis) only when
|
|
24
|
-
AdonisJS must own the process (**embedded** mode, below; walkthrough:
|
|
25
|
+
AdonisJS must own the process (`--template dms-adonis`; **embedded** mode, below; walkthrough:
|
|
25
26
|
`docs/01.getting-started/07.adonisjs.md`). Evaluate these existing templates before proposing another.
|
|
26
27
|
|
|
27
28
|
Preserve the package names declared by the template. Both templates ship `.claude/settings.json`, which makes Claude Code offer the
|