@antelopejs/dms 0.25.5 → 0.25.6-next.1105.g9b73018
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 +1 -1
- package/README.md +1 -1
- package/dist/implementations/dms-builder/engine/dms-database.js.map +1 -1
- package/dist/implementations/dms-builder/engine/driver-probe.d.ts +1 -1
- package/dist/mcp/tool.d.ts +1 -1
- package/frontend-vue/.prettierignore +1 -0
- package/frontend-vue/build/backend-boundary.ts +80 -80
- package/frontend-vue/layers/dms-auth/server/backend-answers.ts +12 -9
- package/frontend-vue/layers/dms-auth/server/oauth.ts +6 -6
- package/frontend-vue/layers/dms-core/app/build/utils/permission-preview.ts +1 -2
- package/frontend-vue/layers/dms-core/app/composables/period/types.ts +1 -4
- package/frontend-vue/layers/dms-core/app/composables/useApiErrorPresenter.ts +1 -3
- package/frontend-vue/layers/dms-core/app/composables/useFormValidation.ts +1 -2
- package/frontend-vue/layers/dms-core/app/types/composed-text.ts +1 -4
- package/frontend-vue/layers/dms-core/app/types/confirm-dialog.ts +1 -2
- package/frontend-vue/layers/dms-core/app/types/data-type.ts +1 -2
- package/frontend-vue/layers/dms-core/app/types/json.ts +1 -3
- package/frontend-vue/layers/dms-core/app/types/module-store.ts +3 -17
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PageHeaderActionBar.vue +3 -2
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PreviewPageHeader.vue +11 -8
- package/frontend-vue/layers/dms-layout/app/build/components/layout/StageCard.vue +1 -5
- package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue +3 -1
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationInboxItem.vue +3 -3
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/role-permissions.ts +1 -1
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/security/useSecurityOverview.ts +1 -3
- package/frontend-vue/layers/dms-layout/app/build/utils/module-store-install.ts +1 -3
- package/frontend-vue/layers/dms-layout/app/composables/notification/useNotifications.ts +1 -5
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSlot.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/build/components/blocks/BlockActions.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRealData.ts +1 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSectionEditing.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSpec.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/blocks/useRefreshTriggers.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formComponentErrors.ts +1 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formComponentRealtime.ts +4 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formComponentValidation.ts +4 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formValidation.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/period/periodQuery.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewDisplayContext.ts +35 -37
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableLiveHold.ts +1 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/recordLink.ts +1 -4
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCard.vue +1 -3
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupFrame.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupShortcuts.ts +1 -5
- package/frontend-vue/layers/dms-ui/app/components/blocks/BannerBlock.vue +3 -4
- package/frontend-vue/layers/dms-ui/app/components/blocks/KeyValueListBlock.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/components/blocks/StatGroupBlock.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/components/code-snippet/CodeSnippet.vue +2 -3
- package/frontend-vue/layers/dms-ui/app/components/form/FormBlock.vue +5 -1
- package/frontend-vue/layers/dms-ui/app/components/form/components/DatePicker.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputCalendar.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputCode.vue +1 -2
- package/frontend-vue/layers/dms-ui/app/components/key-value-list/KeyValueList.vue +1 -6
- package/frontend-vue/layers/dms-ui/app/composables/confirm/types.ts +5 -4
- package/frontend-vue/layers/dms-ui/app/composables/containers/types.ts +5 -8
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/action-target.ts +4 -2
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/config.ts +5 -10
- package/frontend-vue/layers/dms-ui/app/types/modal.ts +1 -9
- package/frontend-vue/layers/dms-ui/app/types/quick-actions.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/utils/mockupAssistant.ts +1 -4
- package/frontend-vue/layers/dms-ui/app/utils/semanticTint.ts +1 -6
- package/frontend-vue/package.json +5 -5
- package/frontend-vue/scripts/check-api-error-presentation.mjs +3 -3
- package/frontend-vue/scripts/check-page-invariants.mjs +6 -9
- package/frontend-vue/scripts/dms-components-script.mjs +7 -7
- package/package.json +7 -8
package/E2E.md
CHANGED
|
@@ -130,7 +130,7 @@ test("the administrator reads the onboarding state", async () => {
|
|
|
130
130
|
4. Give each journey that needs the development dashboard `frontend: "dev"`, and add `e2e/playwright.dev.config.ts` with `e2eConfig({ frontend: "dev" })`. Run it with `playwright test -c e2e/playwright.dev.config.ts`.
|
|
131
131
|
5. A journey that fails today because of a product finding gets `knownFailures`, never a skip. A journey that changes the run's playground for later backends gets `last: true`.
|
|
132
132
|
6. Tag `@smoke` on about 5 fast journeys, the `smoke` journey first, none that needs `backend: "watch"`, `withBaseBackend`, `standby: false` or `frontend: "dev"`.
|
|
133
|
-
7. Copy the `e2e` and `e2e-report` jobs of
|
|
133
|
+
7. Copy AntelopeJS/dms's `e2e.yml` reusable workflow, which holds the `e2e` and `e2e-report` jobs, and the `e2e` job of its `ci.yml` that calls it with the tier, along with the `e2e` line of its `ubuntu` gate. Nothing runs on a draft or the none tier. A pull request runs `--grep @smoke`. The merge queue, a manual run, a pull request labelled `ci:full` and the nightly schedule run the whole suite with `--shard=i/N --add-reporter=blob`, which keeps the config's reporters, with N chosen so that one shard stays under about 30 minutes, and `e2e-report` merges the shards' blob reports. A dev config runs in the same job, after the build config.
|
|
134
134
|
|
|
135
135
|
## Move off verify.config.ts
|
|
136
136
|
|
package/README.md
CHANGED
|
@@ -79,7 +79,7 @@ export class SalesPage extends PageController("sales", {
|
|
|
79
79
|
|
|
80
80
|
| Package | Supported | Tested with |
|
|
81
81
|
| ------------------------------------------- | ---------------- | ----------- |
|
|
82
|
-
| `@antelopejs/core` | `~1.24.5` | `1.24.
|
|
82
|
+
| `@antelopejs/core` | `~1.24.5` | `1.24.12` |
|
|
83
83
|
| `@antelopejs/interface-api` | `>=0.3.5 <0.4.0` | `0.3.5` |
|
|
84
84
|
| `@antelopejs/interface-api-util` | `>=0.3.3 <0.4.0` | `0.3.3` |
|
|
85
85
|
| `@antelopejs/interface-core` | `>=0.5.2 <0.6.0` | `0.5.2` |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dms-database.js","sourceRoot":"","sources":["../../../../src/implementations/dms-builder/engine/dms-database.ts"],"names":[],"mappings":";;;;;;;;AAAA,sDAAyB;AACzB,0DAA6B;AAC7B,uCAA8D;AAC9D,2DAAgF;AAChF,uCAA+C;AAC/C,qDAO0B;AAC1B,qEAIkC;AAClC,mDAA2C;AAC3C,iDAA+C;AAE/C,MAAM,eAAe,GAAG,cAAc,CAAC;AACvC,MAAM,oBAAoB,GAAG,0BAA0B,CAAC;AACxD,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAC;IACrD,eAAe;IACf,oBAAoB;CACrB,CAAC,CAAC;AAEH,SAAS,YAAY,CACnB,KAA8B,EAC9B,IAAY;IAEZ,OAAO,IAAA,yBAAQ,EAAC,IAAA,8BAAa,EAAC,KAAK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AAK,CAAC,CAAC;IACrC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"dms-database.js","sourceRoot":"","sources":["../../../../src/implementations/dms-builder/engine/dms-database.ts"],"names":[],"mappings":";;;;;;;;AAAA,sDAAyB;AACzB,0DAA6B;AAC7B,uCAA8D;AAC9D,2DAAgF;AAChF,uCAA+C;AAC/C,qDAO0B;AAC1B,qEAIkC;AAClC,mDAA2C;AAC3C,iDAA+C;AAE/C,MAAM,eAAe,GAAG,cAAc,CAAC;AACvC,MAAM,oBAAoB,GAAG,0BAA0B,CAAC;AACxD,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAC;IACrD,eAAe;IACf,oBAAoB;CACrB,CAAC,CAAC;AAEH,SAAS,YAAY,CACnB,KAA8B,EAC9B,IAAY;IAEZ,OAAO,IAAA,yBAAQ,EAAC,IAAA,8BAAa,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC;AAChE,CAAC;AAGD,0BAAiC,KAAa;IAC5C,IAAI,CAAC;QACH,MAAM,QAAQ,GAAY,IAAI,CAAC,KAAK,CAClC,iBAAE,CAAC,YAAY,CACb,mBAAI,CAAC,OAAO,CAAC,IAAA,4BAAkB,GAAE,EAAE,KAAK,EAAE,cAAc,CAAC,EACzD,MAAM,CACP,CACF,CAAC;QACF,OAAO,IAAA,4BAAa,EAAC,QAAQ,CAAC,IAAI,IAAA,wBAAQ,EAAC,QAAQ,CAAC,IAAI,CAAC;YACvD,CAAC,CAAC,QAAQ,CAAC,IAAI;YACf,CAAC,CAAC,SAAS,CAAC;IAChB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAS,mBAAmB,CAAC,KAA8B;IACzD,MAAM,MAAM,GAAG,IAAA,8BAAa,EAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;IAChE,IAAI,CAAC,eAAI,CAAC,yBAAyB,CAA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L,CAAC;IACJ,CAAC;IACD,MAAM,OAAO,GAAG,IAAA,yBAAQ,EAAC,KAAK,EAAE,CAAC,wBAAO,CAAC,CAAC,CAAC;IAC3C,IAAI,OAAO,IAAI,IAAA,uCAAmB,EAAC,OAAO,CAAC,EAAE,CAAC;QAC5C,IAAA,uBAAM,EACJ,uPAAuP,CACxP,CAAC;IACJ,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAGD;IACE,MAAM,KAAK,GAAG,IAAA,uCAAc,GAAE,CAAC;IAC/B,OAAO,KAAK,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { z } from "zod";
|
|
|
3
3
|
declare const ProbeExport: z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
|
|
4
4
|
url: z.ZodString;
|
|
5
5
|
timeoutMs: z.ZodNumber;
|
|
6
|
-
signal: z.
|
|
6
|
+
signal: z.ZodInstanceOf<AbortSignal>;
|
|
7
7
|
}, z.core.$strip>], null>, z.ZodPromise<z.ZodUnknown>>;
|
|
8
8
|
export type LoadedProbe = z.infer<typeof ProbeExport>;
|
|
9
9
|
export interface ProbeTarget {
|
package/dist/mcp/tool.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export interface McpToolSpec<Fields extends McpInputFields> {
|
|
|
35
35
|
run(args: z.infer<z.ZodObject<Fields>>, sessionId: string | undefined, client: McpClient | undefined): Promise<McpToolResult>;
|
|
36
36
|
}
|
|
37
37
|
export declare function textResult(text: string, isError?: boolean): McpToolResult;
|
|
38
|
-
export declare const ThrownReasonSchema: z.ZodUnion<readonly [z.ZodPipe<z.
|
|
38
|
+
export declare const ThrownReasonSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodInstanceOf<Error>, z.ZodTransform<string, Error>>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<string, unknown>>]>;
|
|
39
39
|
export declare function thrownResult(toolName: string, reason: string): McpToolResult;
|
|
40
40
|
export declare function jsonResult(value: JsonValue, isError?: boolean): McpToolResult;
|
|
41
41
|
export declare function defineTool<Fields extends McpInputFields>(spec: McpToolSpec<Fields>): McpTool;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tests/fixtures/mockup-starters/
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { existsSync, readFileSync, realpathSync } from
|
|
2
|
-
import { dirname, isAbsolute, join, relative, sep } from
|
|
3
|
-
import type { DmsVitePluginEntry } from
|
|
1
|
+
import { existsSync, readFileSync, realpathSync } from "node:fs";
|
|
2
|
+
import { dirname, isAbsolute, join, relative, sep } from "node:path";
|
|
3
|
+
import type { DmsVitePluginEntry } from "#dms/frontend-build";
|
|
4
4
|
|
|
5
|
-
type VitePlugin = Extract<DmsVitePluginEntry, { name: string }
|
|
5
|
+
type VitePlugin = Extract<DmsVitePluginEntry, { name: string }>;
|
|
6
6
|
|
|
7
|
-
const BACKEND_PACKAGE = "@antelopejs/dms"
|
|
8
|
-
const BACKEND_SOURCE =
|
|
9
|
-
const QUERY_OR_HASH = /[?#]
|
|
7
|
+
const BACKEND_PACKAGE = "@antelopejs/dms";
|
|
8
|
+
const BACKEND_SOURCE = "src";
|
|
9
|
+
const QUERY_OR_HASH = /[?#].*$/;
|
|
10
10
|
|
|
11
|
-
const backendRoots = new Map<string, string | null>()
|
|
11
|
+
const backendRoots = new Map<string, string | null>();
|
|
12
12
|
|
|
13
13
|
/** Whether a parsed manifest names its package. */
|
|
14
14
|
function isNamedManifest(value: unknown): value is { name: string } {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
return (
|
|
16
|
+
typeof value === "object" &&
|
|
17
|
+
value !== null &&
|
|
18
|
+
"name" in value &&
|
|
19
|
+
typeof value.name === "string"
|
|
20
|
+
);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/** The package name a `package.json` declares, or `undefined`. */
|
|
24
24
|
function packageName(manifest: string): string | undefined {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
try {
|
|
26
|
+
const parsed: unknown = JSON.parse(readFileSync(manifest, "utf8"));
|
|
27
|
+
return isNamedManifest(parsed) ? parsed.name : undefined;
|
|
28
|
+
} catch {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/** The directory of the backend package that holds `directory`, or null. */
|
|
34
34
|
function backendRoot(directory: string): string | null {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
35
|
+
const known = backendRoots.get(directory);
|
|
36
|
+
if (known !== undefined) {
|
|
37
|
+
return known;
|
|
38
|
+
}
|
|
39
|
+
const manifest = join(directory, "package.json");
|
|
40
|
+
const parent = dirname(directory);
|
|
41
|
+
let root: string | null = null;
|
|
42
|
+
if (existsSync(manifest)) {
|
|
43
|
+
root = packageName(manifest) === BACKEND_PACKAGE ? directory : null;
|
|
44
|
+
} else if (parent !== directory) {
|
|
45
|
+
root = backendRoot(parent);
|
|
46
|
+
}
|
|
47
|
+
backendRoots.set(directory, root);
|
|
48
|
+
return root;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
/**
|
|
@@ -55,28 +55,28 @@ function backendRoot(directory: string): string | null {
|
|
|
55
55
|
* the build workspace. Virtual ids and ids that are not files are ignored.
|
|
56
56
|
*/
|
|
57
57
|
function backendSourceFile(id: string): string | undefined {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
58
|
+
const path = id.replace(QUERY_OR_HASH, "");
|
|
59
|
+
if (!isAbsolute(path)) {
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
let real: string;
|
|
63
|
+
try {
|
|
64
|
+
real = realpathSync(path);
|
|
65
|
+
} catch {
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
const root = backendRoot(dirname(real));
|
|
69
|
+
if (root === null) {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
return relative(root, real).split(sep)[0] === BACKEND_SOURCE
|
|
73
|
+
? real
|
|
74
|
+
: undefined;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
/** `path` with `/` separators, the form Vite gives an importer, so a boundary error names both paths alike on every OS. */
|
|
78
78
|
function forwardSlashes(path: string): string {
|
|
79
|
-
|
|
79
|
+
return path.split(sep).join("/");
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
/**
|
|
@@ -92,36 +92,36 @@ function forwardSlashes(path: string): string {
|
|
|
92
92
|
* restores it on every run: change the plugin in the pack, not here.
|
|
93
93
|
*/
|
|
94
94
|
export function backendBoundary(): VitePlugin {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
return {
|
|
96
|
+
...boundaryCheck(),
|
|
97
|
+
config: () => ({ worker: { plugins: () => [boundaryCheck()] } }),
|
|
98
|
+
};
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
/** The check alone, as a worker build runs it. */
|
|
102
102
|
function boundaryCheck(): VitePlugin {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
103
|
+
return {
|
|
104
|
+
name: `${BACKEND_PACKAGE}:backend-boundary`,
|
|
105
|
+
enforce: "pre",
|
|
106
|
+
async resolveId(source, importer, options) {
|
|
107
|
+
const resolved = await this.resolve(source, importer, {
|
|
108
|
+
...options,
|
|
109
|
+
skipSelf: true,
|
|
110
|
+
});
|
|
111
|
+
if (resolved === null) {
|
|
112
|
+
return resolved;
|
|
113
|
+
}
|
|
114
|
+
const file = backendSourceFile(resolved.id);
|
|
115
|
+
if (file === undefined) {
|
|
116
|
+
return resolved;
|
|
117
|
+
}
|
|
118
|
+
const from =
|
|
119
|
+
importer === undefined
|
|
120
|
+
? "an entry point"
|
|
121
|
+
: forwardSlashes(importer.replace(QUERY_OR_HASH, ""));
|
|
122
|
+
return this.error(
|
|
123
|
+
`Backend boundary: ${from} imports ${forwardSlashes(file)}, which is under the src of ${BACKEND_PACKAGE}. The frontend reaches the backend only through its HTTP interface.`,
|
|
124
|
+
);
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
127
|
}
|
|
@@ -74,15 +74,18 @@ export type LoginOutcome =
|
|
|
74
74
|
* `/api/auth/oauth/:provider/callback`), the backend's `LoginOutcome`.
|
|
75
75
|
*/
|
|
76
76
|
export const loginOutcome = z.union([
|
|
77
|
-
twoFactorChallenge.transform(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
)
|
|
77
|
+
twoFactorChallenge.transform((answer): LoginOutcome => ({
|
|
78
|
+
kind: "2fa",
|
|
79
|
+
answer,
|
|
80
|
+
})),
|
|
81
|
+
tenantAssignment.transform((answer): LoginOutcome => ({
|
|
82
|
+
kind: "tenant-assignment",
|
|
83
|
+
answer,
|
|
84
|
+
})),
|
|
85
|
+
sessionTokens.transform((tokens): LoginOutcome => ({
|
|
86
|
+
kind: "session",
|
|
87
|
+
tokens,
|
|
88
|
+
})),
|
|
86
89
|
]);
|
|
87
90
|
|
|
88
91
|
/**
|
|
@@ -203,12 +203,12 @@ function validCallback(flow: OAuthFlow | undefined, query: URLSearchParams) {
|
|
|
203
203
|
const state = query.get("state");
|
|
204
204
|
return Boolean(
|
|
205
205
|
flow &&
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
206
|
+
flow.expiresAt >= Date.now() &&
|
|
207
|
+
isString(code) &&
|
|
208
|
+
code.length <= MAX_CALLBACK_PARAMETER_LENGTH &&
|
|
209
|
+
isString(state) &&
|
|
210
|
+
state.length <= MAX_CALLBACK_PARAMETER_LENGTH &&
|
|
211
|
+
sameState(state, flow.state),
|
|
212
212
|
);
|
|
213
213
|
}
|
|
214
214
|
|
|
@@ -3,8 +3,7 @@ import { isNumber, isObject, isString } from "../../utils/type-check";
|
|
|
3
3
|
|
|
4
4
|
/** What a preview does to one block (`packages/dms/src/pages/settings/users/role-preview.ts`). */
|
|
5
5
|
export type PermissionPreviewBlock =
|
|
6
|
-
| { state: "
|
|
7
|
-
| { state: "readonly" | "limited"; withheld: string[] };
|
|
6
|
+
{ state: "hidden" } | { state: "readonly" | "limited"; withheld: string[] };
|
|
8
7
|
|
|
9
8
|
export type PermissionPreviewState = PermissionPreviewBlock["state"];
|
|
10
9
|
|
|
@@ -16,10 +16,7 @@ export type PeriodPreset =
|
|
|
16
16
|
| "custom";
|
|
17
17
|
|
|
18
18
|
export type PeriodComparison =
|
|
19
|
-
| "
|
|
20
|
-
| "previous-period"
|
|
21
|
-
| "previous-year"
|
|
22
|
-
| "custom";
|
|
19
|
+
"none" | "previous-period" | "previous-year" | "custom";
|
|
23
20
|
|
|
24
21
|
export interface PeriodRange {
|
|
25
22
|
from: Date;
|
|
@@ -64,9 +64,7 @@ type CompiledMessage = { type: 0 } | { t: 0 };
|
|
|
64
64
|
|
|
65
65
|
/** A message `rt` renders: its source text, a message function or a compiled AST. */
|
|
66
66
|
type RenderableMessage =
|
|
67
|
-
| string
|
|
68
|
-
| ((...args: never[]) => string)
|
|
69
|
-
| CompiledMessage;
|
|
67
|
+
string | ((...args: never[]) => string) | CompiledMessage;
|
|
70
68
|
|
|
71
69
|
function isRenderableMessage(value: unknown): value is RenderableMessage {
|
|
72
70
|
if (typeof value === "string" || typeof value === "function") return true;
|
|
@@ -24,8 +24,7 @@ interface FormIssue {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
type FormValidationResult<Output> =
|
|
27
|
-
|
|
28
|
-
| { issues: FormIssue[] };
|
|
27
|
+
{ value: Output; issues?: undefined } | { issues: FormIssue[] };
|
|
29
28
|
|
|
30
29
|
/** A zod schema as the Standard Schema `UForm` validates with. */
|
|
31
30
|
export interface LocalizedSchema<Output> {
|
|
@@ -57,10 +57,7 @@ export type ComposedTextTypedParam =
|
|
|
57
57
|
export type ComposedTextParamType = ComposedTextTypedParam["type"];
|
|
58
58
|
|
|
59
59
|
export type ComposedTextParam =
|
|
60
|
-
|
|
|
61
|
-
| number
|
|
62
|
-
| ComposedTextTypedParam
|
|
63
|
-
| ComposedText;
|
|
60
|
+
string | number | ComposedTextTypedParam | ComposedText;
|
|
64
61
|
|
|
65
62
|
/** Any text a block draws: a plain string (`$` for an i18n key) or a composed text. */
|
|
66
63
|
export type BlockText = string | ComposedText;
|
|
@@ -52,8 +52,7 @@ export interface ConfirmDialogLinkTarget {
|
|
|
52
52
|
|
|
53
53
|
/** Where a dialog's secondary action leads (backend `ConfirmDialogSecondaryTarget`). */
|
|
54
54
|
export type ConfirmDialogSecondaryTarget =
|
|
55
|
-
|
|
|
56
|
-
| ConfirmDialogDownloadTarget;
|
|
55
|
+
ConfirmDialogLinkTarget | ConfirmDialogDownloadTarget;
|
|
57
56
|
|
|
58
57
|
/**
|
|
59
58
|
* A button next to cancel and confirm, running its target with the dialog
|
|
@@ -5,12 +5,7 @@ import type { JsonValue } from "./json";
|
|
|
5
5
|
* `src/store/types.ts` in `@antelopejs/dms`).
|
|
6
6
|
*/
|
|
7
7
|
export type StoreModuleState =
|
|
8
|
-
| "
|
|
9
|
-
| "busy"
|
|
10
|
-
| "active"
|
|
11
|
-
| "disabled"
|
|
12
|
-
| "error"
|
|
13
|
-
| "pending";
|
|
8
|
+
"available" | "busy" | "active" | "disabled" | "error" | "pending";
|
|
14
9
|
|
|
15
10
|
/** Where a module's code comes from (`ModuleSourceKind` on the backend). */
|
|
16
11
|
export type ModuleSourceKind = "npm" | "github" | "gitlab" | "git" | "local";
|
|
@@ -18,19 +13,10 @@ export type ModuleSourceKind = "npm" | "github" | "gitlab" | "git" | "local";
|
|
|
18
13
|
export type StoreFrontendState = "none" | "synced" | "pending" | "unknown";
|
|
19
14
|
|
|
20
15
|
export type StoreOperationKind =
|
|
21
|
-
| "
|
|
22
|
-
| "update"
|
|
23
|
-
| "enable"
|
|
24
|
-
| "disable"
|
|
25
|
-
| "uninstall"
|
|
26
|
-
| "apply";
|
|
16
|
+
"install" | "update" | "enable" | "disable" | "uninstall" | "apply";
|
|
27
17
|
|
|
28
18
|
export type StoreOperationStep =
|
|
29
|
-
| "
|
|
30
|
-
| "dependencies"
|
|
31
|
-
| "unload"
|
|
32
|
-
| "load"
|
|
33
|
-
| "save";
|
|
19
|
+
"resolve" | "dependencies" | "unload" | "load" | "save";
|
|
34
20
|
|
|
35
21
|
export interface StoreOperation {
|
|
36
22
|
moduleId: string;
|
|
@@ -35,8 +35,9 @@ import { headerButtonProps } from "./headerButton";
|
|
|
35
35
|
* component places there names the component, which runs it. Buttons behind
|
|
36
36
|
* a permission the user lacks never reach the client.
|
|
37
37
|
*/
|
|
38
|
-
export interface LayoutHeaderAction
|
|
39
|
-
|
|
38
|
+
export interface LayoutHeaderAction extends Partial<
|
|
39
|
+
Omit<CustomButton, "id" | "color" | "variant">
|
|
40
|
+
> {
|
|
40
41
|
id: string;
|
|
41
42
|
color?: ButtonProps["color"];
|
|
42
43
|
variant?: ButtonProps["variant"];
|
|
@@ -14,17 +14,16 @@ import { headerButtonProps } from "./headerButton";
|
|
|
14
14
|
const props = defineProps<{ header: PreviewHeader }>();
|
|
15
15
|
|
|
16
16
|
const DEFAULT_ICON = "i-ph-file";
|
|
17
|
-
const ACTIONS_CLASS =
|
|
17
|
+
const ACTIONS_CLASS =
|
|
18
|
+
"flex w-full flex-wrap items-center gap-2 md:ms-auto md:w-auto";
|
|
18
19
|
|
|
19
20
|
const marker = { [PREVIEW_HEADER_ATTRIBUTE]: "" };
|
|
20
21
|
|
|
21
22
|
const actions = computed(() =>
|
|
22
|
-
(props.header.actions ?? []).map(
|
|
23
|
-
(action)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}),
|
|
27
|
-
),
|
|
23
|
+
(props.header.actions ?? []).map((action): ButtonProps => ({
|
|
24
|
+
...headerButtonProps(action),
|
|
25
|
+
label: action.label,
|
|
26
|
+
})),
|
|
28
27
|
);
|
|
29
28
|
</script>
|
|
30
29
|
|
|
@@ -38,7 +37,11 @@ const actions = computed(() =>
|
|
|
38
37
|
>
|
|
39
38
|
<template #actions>
|
|
40
39
|
<div v-if="actions.length" :class="ACTIONS_CLASS">
|
|
41
|
-
<UButton
|
|
40
|
+
<UButton
|
|
41
|
+
v-for="(button, index) in actions"
|
|
42
|
+
:key="index"
|
|
43
|
+
v-bind="button"
|
|
44
|
+
/>
|
|
42
45
|
</div>
|
|
43
46
|
</template>
|
|
44
47
|
</PageHeader>
|
|
@@ -8,11 +8,7 @@ export type StageCardWidth = "default" | "wide" | "xwide";
|
|
|
8
8
|
|
|
9
9
|
/** Color of the icon well above the title. */
|
|
10
10
|
export type StageCardTone =
|
|
11
|
-
| "
|
|
12
|
-
| "success"
|
|
13
|
-
| "warning"
|
|
14
|
-
| "error"
|
|
15
|
-
| "neutral";
|
|
11
|
+
"primary" | "success" | "warning" | "error" | "neutral";
|
|
16
12
|
|
|
17
13
|
interface StageCardProps {
|
|
18
14
|
as?: string;
|
package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue
CHANGED
|
@@ -232,7 +232,9 @@ const goToNotifications = () => {
|
|
|
232
232
|
<div class="text-muted mt-1 text-[10px]">
|
|
233
233
|
<time
|
|
234
234
|
:datetime="notification.createdAt"
|
|
235
|
-
:title="
|
|
235
|
+
:title="
|
|
236
|
+
formatNotificationFullTime(notification.createdAt, locale)
|
|
237
|
+
"
|
|
236
238
|
>
|
|
237
239
|
{{ formatRelativeTime(notification.createdAt, t, locale) }}
|
|
238
240
|
</time>
|
|
@@ -75,9 +75,9 @@ const actionLabelUi = {
|
|
|
75
75
|
}}
|
|
76
76
|
</template>
|
|
77
77
|
<template #meta>
|
|
78
|
-
<time :datetime="props.notification.createdAt" :title="fullTime">
|
|
79
|
-
props.time
|
|
80
|
-
|
|
78
|
+
<time :datetime="props.notification.createdAt" :title="fullTime">
|
|
79
|
+
{{ props.time }}
|
|
80
|
+
</time>
|
|
81
81
|
<span
|
|
82
82
|
v-if="props.source"
|
|
83
83
|
:class="[SOURCE_TAG_CLASS, props.source.isModule && MODULE_TAG_CLASS]"
|
package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/role-permissions.ts
CHANGED
|
@@ -353,7 +353,7 @@ function removeDependents(
|
|
|
353
353
|
const dependsOnRemoved = (id: string) =>
|
|
354
354
|
!removed.has(id) &&
|
|
355
355
|
dependenciesOf(index, id).some((dependency) => removed.has(dependency));
|
|
356
|
-
for (let next = [...selection].find(dependsOnRemoved); next;
|
|
356
|
+
for (let next = [...selection].find(dependsOnRemoved); next;) {
|
|
357
357
|
dependents.push(next);
|
|
358
358
|
for (const descendant of index.subtrees.get(next) ?? [next]) {
|
|
359
359
|
removed.add(descendant);
|
|
@@ -51,9 +51,7 @@ export interface TotpSetup {
|
|
|
51
51
|
|
|
52
52
|
/** Something on the Security page that needs the user's attention. */
|
|
53
53
|
export type SecurityAttention =
|
|
54
|
-
| "
|
|
55
|
-
| "backup_codes_unsaved"
|
|
56
|
-
| "backup_codes_low";
|
|
54
|
+
"two_factor_off" | "backup_codes_unsaved" | "backup_codes_low";
|
|
57
55
|
|
|
58
56
|
/** Strongest first, as the server ranks the attention tones. */
|
|
59
57
|
const ATTENTION_TONE_ORDER: Tone[] = [
|
|
@@ -32,9 +32,7 @@ export interface DependencyDraft {
|
|
|
32
32
|
|
|
33
33
|
/** Why a draft cannot be sent, by field: i18n keys under the dialog's errors. */
|
|
34
34
|
export type DependencyDraftError =
|
|
35
|
-
| "
|
|
36
|
-
| "package_invalid"
|
|
37
|
-
| "config_invalid";
|
|
35
|
+
"package_required" | "package_invalid" | "config_invalid";
|
|
38
36
|
|
|
39
37
|
export interface DependencyDraftErrors {
|
|
40
38
|
package?: DependencyDraftError;
|
|
@@ -5,11 +5,7 @@ import { unreadToneWith } from "../../build/components/pages/settings/notificati
|
|
|
5
5
|
|
|
6
6
|
/** Icon well colour a sender may set on a notification. */
|
|
7
7
|
export type NotificationTone =
|
|
8
|
-
| "
|
|
9
|
-
| "primary"
|
|
10
|
-
| "success"
|
|
11
|
-
| "warning"
|
|
12
|
-
| "error";
|
|
8
|
+
"neutral" | "primary" | "success" | "warning" | "error";
|
|
13
9
|
|
|
14
10
|
export interface UserNotification {
|
|
15
11
|
_id: string;
|
package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSlot.vue
CHANGED
|
@@ -64,11 +64,13 @@ const navigation = computed(() =>
|
|
|
64
64
|
);
|
|
65
65
|
|
|
66
66
|
function sync(): void {
|
|
67
|
-
bridge.post(
|
|
67
|
+
bridge.post(
|
|
68
|
+
mockupPageRender(
|
|
68
69
|
props.page,
|
|
69
70
|
mockupDataTree(props.page, props.realData),
|
|
70
71
|
navigation.value,
|
|
71
|
-
)
|
|
72
|
+
),
|
|
73
|
+
);
|
|
72
74
|
bridge.post(previewInspectMessage(true));
|
|
73
75
|
bridge.post(previewMinHeightMessage(OVERVIEW_MIN_HEIGHT));
|
|
74
76
|
}
|
|
@@ -11,8 +11,10 @@ export type { BlockAction } from "#dms-core/app/entries/types/block-action";
|
|
|
11
11
|
* A button running a target (interface-dms `BannerButtonAction`): the block
|
|
12
12
|
* that offers it runs it on `press`, with its confirmation.
|
|
13
13
|
*/
|
|
14
|
-
export interface BlockButtonAction
|
|
15
|
-
|
|
14
|
+
export interface BlockButtonAction extends Pick<
|
|
15
|
+
CustomButton,
|
|
16
|
+
"label" | "icon" | "target" | "confirm"
|
|
17
|
+
> {
|
|
16
18
|
variant?: ButtonProps["variant"];
|
|
17
19
|
color?: Tone;
|
|
18
20
|
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { computed, ref, type Ref } from "vue";
|
|
2
2
|
import type { MockupDataMode, MockupPageState } from "../../utils/mockup";
|
|
3
|
-
import {
|
|
4
|
-
mockupPreviewPath,
|
|
5
|
-
readsRealData,
|
|
6
|
-
} from "../../utils/mockupRealData";
|
|
3
|
+
import { mockupPreviewPath, readsRealData } from "../../utils/mockupRealData";
|
|
7
4
|
|
|
8
5
|
/**
|
|
9
6
|
* Whether the page on screen reads its live routes, and the preview frame's
|
package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSectionEditing.ts
CHANGED
|
@@ -17,8 +17,7 @@ export interface EditedSection {
|
|
|
17
17
|
|
|
18
18
|
/** What is being dragged: a page, or a category's section. */
|
|
19
19
|
export type SectionDrag =
|
|
20
|
-
|
|
21
|
-
| { kind: "section"; category: string };
|
|
20
|
+
{ kind: "page"; page: string } | { kind: "section"; category: string };
|
|
22
21
|
|
|
23
22
|
/**
|
|
24
23
|
* Where a drop lands, drawn as a line: before the page `index` of the section
|
|
@@ -147,8 +147,7 @@ function parseSource(value: JsonValue | undefined): SpecSource | undefined {
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
type WriteAnswer =
|
|
150
|
-
|
|
151
|
-
| { ok: false; issue: MockupIssue };
|
|
150
|
+
{ ok: true; digest: string } | { ok: false; issue: MockupIssue };
|
|
152
151
|
|
|
153
152
|
function parseWriteAnswer(
|
|
154
153
|
value: JsonValue | undefined,
|