@antelopejs/dms 0.20.7 → 0.20.8-next.916.gd319141
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/bin/control/commands-verify.mjs +8 -49
- package/bin/control/options.mjs +0 -1
- package/bin/control/run-state.mjs +1 -1
- package/bin/control/timing.mjs +1 -16
- package/bin/control/timing.test.mjs +0 -11
- package/bin/control/verify/decode.mjs +4 -144
- package/bin/control/verify/decode.test.mjs +1 -149
- package/bin/control/verify/formal.mjs +22 -218
- package/bin/control/verify/formal.test.mjs +60 -117
- package/bin/control/verify/map.test.mjs +0 -73
- package/bin/control/verify/types.mjs +4 -18
- package/bin/dms-control.mjs +0 -2
- package/dist/implementations/dms/page/controller.d.ts +2 -1
- package/dist/implementations/dms/page/controller.js.map +1 -1
- package/dist/implementations/dms-builder/engine/connection-access-config.js +2 -2
- package/dist/implementations/dms-builder/engine/connection-targets.js.map +1 -1
- package/dist/implementations/dms-builder/engine/database-access.d.ts +1 -1
- package/dist/implementations/dms-builder/engine/database-access.js +2 -2
- package/dist/implementations/dms-builder/engine/database-check-input.d.ts +3 -2
- package/dist/implementations/dms-builder/engine/database-check-input.js.map +1 -1
- package/dist/implementations/dms-builder/engine/database-check.js +2 -2
- package/dist/implementations/dms-builder/engine/database-check.js.map +1 -1
- package/dist/implementations/dms-builder/engine/probe-answer.d.ts +44 -1
- package/dist/implementations/dms-builder/engine/probe-answer.js +2 -5
- package/dist/implementations/dms-builder/engine/probe-answer.js.map +1 -1
- package/dist/mockup/files.d.ts +1 -1
- package/dist/mockup/files.js +2 -2
- package/dist/pages/settings/users/roles.js.map +1 -1
- package/dist/store/internal/frontend/frontend-ready.d.ts +2 -1
- package/dist/store/internal/frontend/frontend-ready.js.map +1 -1
- package/dist/store/operations.js +4 -4
- package/dist/store/operations.js.map +1 -1
- package/dist/utils/upload-constraints.d.ts +1 -1
- package/dist/utils/upload-constraints.js +2 -2
- package/dist/utils/upload-constraints.js.map +1 -1
- package/dist/validation/issue-message.d.ts +1 -1
- package/dist/validation/issue-message.js +3 -3
- package/dist/validation/issue-message.js.map +1 -1
- package/frontend-vue/layers/dms-core/app/utils/formatter.ts +1 -0
- package/frontend-vue/layers/dms-layout/app/build/composables/navigation/useVisitNavBadges.ts +11 -14
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/security/useSecurityFormat.ts +5 -5
- package/frontend-vue/layers/dms-layout/app/build/utils/modules-catalog.ts +7 -2
- package/frontend-vue/layers/dms-layout/app/build/utils/notificationPayload.ts +9 -5
- package/frontend-vue/layers/dms-layout/app/composables/page/useModuleHistory.ts +4 -1
- package/frontend-vue/layers/dms-layout/app/composables/page/useModulesListing.ts +7 -17
- package/frontend-vue/layers/dms-layout/app/custom-pages/modules.vue +5 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupCatalog.ts +4 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSpec.ts +18 -16
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewFrame.ts +2 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/containers/drawerSize.ts +4 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/relationBadges.ts +2 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/form/fieldComponentProps.ts +2 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/layout/sidePanelState.ts +5 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/period/periodQuery.ts +6 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableRowActionValues.ts +13 -13
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/writeError.ts +2 -2
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreview.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewMessages.ts +26 -18
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupCatalog.ts +7 -2
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSpec.ts +2 -1
- package/frontend-vue/layers/dms-ui/app/components/chart/ApexChartHost.vue +2 -0
- package/frontend-vue/layers/dms-ui/app/composables/useExportJob.ts +2 -2
- package/package.json +32 -30
- package/skills/dms-project/scripts/dms-dev.sh +0 -0
- package/bin/control/verify/behaviour.mjs +0 -183
- package/bin/control/verify/behaviour.test.mjs +0 -472
- package/bin/control/verify/emit.mjs +0 -539
- package/bin/control/verify/judgement.mjs +0 -101
- package/bin/control/verify/verdict.mjs +0 -327
- package/frontend-vue/scripts/probes/capture-frontend-probe.cjs +0 -23
- package/frontend-vue/scripts/probes/frontend-behavior.cjs +0 -606
- package/frontend-vue/scripts/probes/frontend-legacy.cjs +0 -620
- package/frontend-vue/scripts/probes/frontend-probe-controls.cjs +0 -322
- package/frontend-vue/scripts/prove-comment-emit.mjs +0 -171
- package/frontend-vue/scripts/prove-component-registration.mjs +0 -259
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
import assert from "node:assert/strict";
|
|
2
|
-
import { execFileSync } from "node:child_process";
|
|
3
|
-
import { readFileSync, writeFileSync } from "node:fs";
|
|
4
|
-
import { dirname, join, relative, resolve } from "node:path";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
import { createRequire } from "node:module";
|
|
7
|
-
import { z } from "zod";
|
|
8
|
-
|
|
9
|
-
const frontend = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
10
|
-
const root = resolve(frontend, "../../..");
|
|
11
|
-
/** @type {(id: string) => typeof import("vite")} */
|
|
12
|
-
const require = createRequire(import.meta.url);
|
|
13
|
-
const { createServer } = require("vite");
|
|
14
|
-
const baseRef = process.argv[2] ?? "HEAD^";
|
|
15
|
-
assert(process.argv[3], "Pass the baseline worktree as the third argument");
|
|
16
|
-
const baseRoot = resolve(process.argv[3]);
|
|
17
|
-
const baseFrontend = join(baseRoot, "packages/dms/frontend-vue");
|
|
18
|
-
assert.equal(
|
|
19
|
-
execFileSync("git", ["rev-parse", "HEAD"], {
|
|
20
|
-
cwd: baseRoot,
|
|
21
|
-
encoding: "utf8",
|
|
22
|
-
}),
|
|
23
|
-
execFileSync("git", ["rev-parse", baseRef], { cwd: root, encoding: "utf8" }),
|
|
24
|
-
"The baseline files belong to the requested revision",
|
|
25
|
-
);
|
|
26
|
-
const base = execFileSync(
|
|
27
|
-
"git",
|
|
28
|
-
["show", `${baseRef}:packages/dms/frontend-vue/dms.frontend.ts`],
|
|
29
|
-
{ cwd: root, encoding: "utf8" },
|
|
30
|
-
);
|
|
31
|
-
const renamed = new Map(
|
|
32
|
-
execFileSync(
|
|
33
|
-
"git",
|
|
34
|
-
["diff", "--name-status", "--find-renames=100%", baseRef, "HEAD"],
|
|
35
|
-
{ cwd: root, encoding: "utf8" },
|
|
36
|
-
)
|
|
37
|
-
.trim()
|
|
38
|
-
.split("\n")
|
|
39
|
-
.filter((line) => line.startsWith("R100\t"))
|
|
40
|
-
.map((line) => {
|
|
41
|
-
const [, before, after] = line.split("\t");
|
|
42
|
-
return [
|
|
43
|
-
relative(frontend, resolve(root, after)),
|
|
44
|
-
relative(frontend, resolve(root, before)),
|
|
45
|
-
];
|
|
46
|
-
}),
|
|
47
|
-
);
|
|
48
|
-
const current = readFileSync(join(frontend, "dms.frontend.ts"), "utf8");
|
|
49
|
-
const baseId = join(baseFrontend, "__registry-proof-base.ts");
|
|
50
|
-
const currentId = join(frontend, "__registry-proof-current.ts");
|
|
51
|
-
const server = await createServer({
|
|
52
|
-
root: frontend,
|
|
53
|
-
configFile: false,
|
|
54
|
-
optimizeDeps: { noDiscovery: true },
|
|
55
|
-
server: { middlewareMode: true, watch: null },
|
|
56
|
-
plugins: [
|
|
57
|
-
{
|
|
58
|
-
name: "registration-observer",
|
|
59
|
-
enforce: "pre",
|
|
60
|
-
resolveId(id, importer) {
|
|
61
|
-
if ([baseId, currentId].includes(id)) return id;
|
|
62
|
-
if (id === "#dms/frontend-module") return "\0registry-sdk";
|
|
63
|
-
if (id.endsWith(".vue")) {
|
|
64
|
-
const file = id.startsWith("/layers/")
|
|
65
|
-
? resolve(frontend, "." + id)
|
|
66
|
-
: resolve(dirname(importer), id);
|
|
67
|
-
return (
|
|
68
|
-
"\0registry-component:" +
|
|
69
|
-
relative(
|
|
70
|
-
file.startsWith(baseFrontend + "/") ? baseFrontend : frontend,
|
|
71
|
-
file,
|
|
72
|
-
)
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
if (/\/app\/(?:plugins|middleware)\//.test(id) || id.endsWith(".css"))
|
|
76
|
-
return "\0registry-inert:" + id;
|
|
77
|
-
},
|
|
78
|
-
load(id) {
|
|
79
|
-
if ([baseId, currentId].includes(id))
|
|
80
|
-
return (
|
|
81
|
-
(id === baseId ? base : current) +
|
|
82
|
-
(id === currentId && process.env.REGISTRATION_PROOF_DROP_COMPONENT
|
|
83
|
-
? "\ndelete components[Object.keys(components)[0]];"
|
|
84
|
-
: "") +
|
|
85
|
-
(id === currentId && process.env.REGISTRATION_PROOF_REVERSE_ORDER
|
|
86
|
-
? "\nconst originalSortedEntries = sortedEntries; sortedEntries = loaders => originalSortedEntries(loaders).reverse();"
|
|
87
|
-
: "") +
|
|
88
|
-
"\nexport const registryMaps = { components, customPages, dynamicPages, layouts, errorPages };"
|
|
89
|
-
);
|
|
90
|
-
if (id === "\0registry-sdk")
|
|
91
|
-
return "export const useDmsRuntimeConfig = () => ({ public: { dms: {} } });";
|
|
92
|
-
if (id.startsWith("\0registry-component:")) {
|
|
93
|
-
const target = id.slice("\0registry-component:".length);
|
|
94
|
-
return `export default { target: ${JSON.stringify(renamed.get(target) ?? target)} };`;
|
|
95
|
-
}
|
|
96
|
-
if (id.startsWith("\0registry-inert:"))
|
|
97
|
-
return `function plugin() {} plugin.registryId = ${JSON.stringify(id)}; export default plugin;`;
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
],
|
|
101
|
-
});
|
|
102
|
-
/**
|
|
103
|
-
* A module as the observer plugin loads it: the layer's registration function and the maps it fills.
|
|
104
|
-
*
|
|
105
|
-
* @typedef {object} RegistryModule
|
|
106
|
-
* @property {{ setup: (sdk: object) => unknown }} default
|
|
107
|
-
* @property {Record<string, Record<string, () => unknown>>} registryMaps
|
|
108
|
-
*/
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @param {unknown} value
|
|
112
|
-
* @returns {value is Record<string, unknown>}
|
|
113
|
-
*/
|
|
114
|
-
function isRecord(value) {
|
|
115
|
-
return typeof value === "object" && value !== null;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* @param {unknown} value
|
|
120
|
-
* @returns {value is () => unknown}
|
|
121
|
-
*/
|
|
122
|
-
function isLoader(value) {
|
|
123
|
-
return typeof value === "function";
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* @param {unknown} value
|
|
128
|
-
* @returns {value is Record<string, () => unknown>}
|
|
129
|
-
*/
|
|
130
|
-
function isLoaderMap(value) {
|
|
131
|
-
return isRecord(value) && Object.values(value).every(isLoader);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* @param {unknown} value
|
|
136
|
-
* @returns {value is RegistryModule}
|
|
137
|
-
*/
|
|
138
|
-
function isRegistryModule(value) {
|
|
139
|
-
return (
|
|
140
|
-
isRecord(value) &&
|
|
141
|
-
isRecord(value.default) &&
|
|
142
|
-
typeof value.default.setup === "function" &&
|
|
143
|
-
isRecord(value.registryMaps) &&
|
|
144
|
-
Object.values(value.registryMaps).every(isLoaderMap)
|
|
145
|
-
);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* @param {unknown} value
|
|
150
|
-
* @returns {value is { default: { target: unknown } }}
|
|
151
|
-
*/
|
|
152
|
-
function hasTarget(value) {
|
|
153
|
-
return (
|
|
154
|
-
isRecord(value) &&
|
|
155
|
-
isRecord(value.default) &&
|
|
156
|
-
Object.hasOwn(value.default, "target")
|
|
157
|
-
);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* @param {unknown} value
|
|
162
|
-
* @returns {value is ((...args: never[]) => unknown) & { registryId?: unknown }}
|
|
163
|
-
*/
|
|
164
|
-
function isFunction(value) {
|
|
165
|
-
return z.function().safeParse(value).success;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* @param {string} id
|
|
170
|
-
* @returns {Promise<RegistryModule>}
|
|
171
|
-
*/
|
|
172
|
-
async function loadRegistry(id) {
|
|
173
|
-
/** @type {unknown} */
|
|
174
|
-
const module = await server.ssrLoadModule(id);
|
|
175
|
-
if (!isRegistryModule(module))
|
|
176
|
-
throw new Error(`${id} exports no registration setup and registry maps`);
|
|
177
|
-
return module;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* @param {RegistryModule} module
|
|
182
|
-
* @returns {Promise<{ events: unknown[][], maps: Record<string, [string, unknown][]> }>}
|
|
183
|
-
*/
|
|
184
|
-
async function registration(module) {
|
|
185
|
-
/** @type {unknown[][]} */
|
|
186
|
-
const events = [];
|
|
187
|
-
/** @type {Record<string | symbol, unknown>} */
|
|
188
|
-
const target = { options: { public: {} } };
|
|
189
|
-
const sdk = new Proxy(target, {
|
|
190
|
-
get(target, name) {
|
|
191
|
-
if (name in target) return target[name];
|
|
192
|
-
return (/** @type {unknown[]} */ ...args) =>
|
|
193
|
-
events.push([
|
|
194
|
-
name,
|
|
195
|
-
...args.map((value) => {
|
|
196
|
-
if (isFunction(value))
|
|
197
|
-
return {
|
|
198
|
-
function: value.name,
|
|
199
|
-
arity: value.length,
|
|
200
|
-
importedModule: value.registryId,
|
|
201
|
-
};
|
|
202
|
-
return isRecord(value) && value.__asyncLoader
|
|
203
|
-
? { kind: "async-component" }
|
|
204
|
-
: value;
|
|
205
|
-
}),
|
|
206
|
-
]);
|
|
207
|
-
},
|
|
208
|
-
});
|
|
209
|
-
module.default.setup(sdk);
|
|
210
|
-
/** @type {Record<string, [string, unknown][]>} */
|
|
211
|
-
const maps = {};
|
|
212
|
-
for (const [name, entries] of Object.entries(module.registryMaps)) {
|
|
213
|
-
maps[name] = [];
|
|
214
|
-
for (const [key, load] of Object.entries(entries).sort(([a], [b]) =>
|
|
215
|
-
a.localeCompare(b),
|
|
216
|
-
)) {
|
|
217
|
-
const loaded = await load();
|
|
218
|
-
if (!hasTarget(loaded))
|
|
219
|
-
throw new Error(`${key} loads no default export with a target`);
|
|
220
|
-
maps[name].push([key, loaded.default.target]);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
return { events, maps };
|
|
224
|
-
}
|
|
225
|
-
try {
|
|
226
|
-
const before = await registration(await loadRegistry(baseId));
|
|
227
|
-
const after = await registration(await loadRegistry(currentId));
|
|
228
|
-
assert.deepEqual(
|
|
229
|
-
after.maps,
|
|
230
|
-
before.maps,
|
|
231
|
-
"Vite-expanded registration keys and loader targets",
|
|
232
|
-
);
|
|
233
|
-
assert.deepEqual(
|
|
234
|
-
after.events,
|
|
235
|
-
before.events,
|
|
236
|
-
"complete setup registration names, order, aliases and options",
|
|
237
|
-
);
|
|
238
|
-
assert(
|
|
239
|
-
!after.maps.components.some(
|
|
240
|
-
([key]) =>
|
|
241
|
-
key.endsWith("/table/TableBody.vue") ||
|
|
242
|
-
key.endsWith("/ImagePresentation.vue"),
|
|
243
|
-
),
|
|
244
|
-
);
|
|
245
|
-
if (process.env.REGISTRATION_PROOF_OUTPUT)
|
|
246
|
-
writeFileSync(
|
|
247
|
-
process.env.REGISTRATION_PROOF_OUTPUT,
|
|
248
|
-
JSON.stringify(
|
|
249
|
-
{ before, after, identicalFileRenames: [...renamed] },
|
|
250
|
-
null,
|
|
251
|
-
2,
|
|
252
|
-
),
|
|
253
|
-
);
|
|
254
|
-
console.log(
|
|
255
|
-
`PASS Vite registration parity against ${baseRef} (${after.maps.components.length} component loaders; ${after.events.length} registration events)`,
|
|
256
|
-
);
|
|
257
|
-
} finally {
|
|
258
|
-
await server.close();
|
|
259
|
-
}
|