@antelopejs/dms 0.8.0 → 0.8.1
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 +16 -0
- package/dist/implementations/dms/resolver-timeout.d.ts +1 -0
- package/dist/implementations/dms/resolver-timeout.js +13 -3
- package/dist/implementations/dms/resolver-timeout.js.map +1 -1
- package/dist/test/antelope.test.js +2 -1
- package/dist/test/antelope.test.js.map +1 -1
- package/dist/test/helpers/db.js +19 -11
- package/dist/test/helpers/db.js.map +1 -1
- package/dist/test/integration/auth/two-factor-codes.test.js +4 -2
- package/dist/test/integration/auth/two-factor-codes.test.js.map +1 -1
- package/dist/test/unit/implementations/dms/dynamic-menu-hardening.test.js +8 -5
- package/dist/test/unit/implementations/dms/dynamic-menu-hardening.test.js.map +1 -1
- package/dist/test/unit/implementations/dms/layout-banners.test.js +20 -7
- package/dist/test/unit/implementations/dms/layout-banners.test.js.map +1 -1
- package/frontend-vue/layers/dms-ui/app/components/grid/GridRow.vue +14 -6
- package/frontend-vue/layers/dms-ui/app/components/grid/columns.ts +37 -0
- package/frontend-vue/package.json +1 -1
- package/frontend-vue/pnpm-lock.yaml +5 -5
- package/frontend-vue/tests/form-enclosing-form.test.ts +0 -21
- package/frontend-vue/tests/form-load-error.test.ts +0 -22
- package/frontend-vue/tests/grid-responsive-columns.test.ts +30 -31
- package/frontend-vue/tests/nuxt-ui-aria-labels.test.ts +1 -28
- package/frontend-vue/tests/period-live-pause.test.ts +0 -13
- package/frontend-vue/tests/period-max-days.test.ts +0 -14
- package/frontend-vue/tests/row-side-panel.test.ts +0 -12
- package/frontend-vue/tests/table-cell-wrap.test.ts +0 -12
- package/frontend-vue/tests/table-density-menu.test.ts +0 -21
- package/frontend-vue/tests/table-live-hold.test.ts +0 -44
- package/frontend-vue/tests/table-row-hover.test.ts +0 -10
- package/frontend-vue/tests/table-scroll-area.test.ts +0 -8
- package/frontend-vue/tests/table-view-card-props.test.ts +0 -17
- package/frontend-vue/tests/table-view-cards-reorder.test.ts +0 -16
- package/frontend-vue/tests/table-view-grouped.test.ts +0 -55
- package/frontend-vue/tests/table-view-pinned-rows.test.ts +0 -15
- package/frontend-vue/tests/table-view-record-link.test.ts +0 -17
- package/frontend-vue/tests/table-view-refresh.test.ts +0 -17
- package/frontend-vue/tests/table-view-url-tab.test.ts +0 -14
- package/frontend-vue/tests/tone.test.ts +0 -19
- package/package.json +5 -5
- package/dist/test/integration/auth/login.test.d.ts +0 -1
- package/dist/test/integration/auth/login.test.js +0 -57
- package/dist/test/integration/auth/login.test.js.map +0 -1
- package/dist/test/integration/auth/refresh.test.d.ts +0 -1
- package/dist/test/integration/auth/refresh.test.js +0 -59
- package/dist/test/integration/auth/refresh.test.js.map +0 -1
- package/dist/test/integration/auth/sessions.test.d.ts +0 -1
- package/dist/test/integration/auth/sessions.test.js +0 -58
- package/dist/test/integration/auth/sessions.test.js.map +0 -1
- package/dist/test/integration/auth/signup.test.d.ts +0 -1
- package/dist/test/integration/auth/signup.test.js +0 -99
- package/dist/test/integration/auth/signup.test.js.map +0 -1
- package/dist/test/unit/skills/dms-dev-script.test.d.ts +0 -1
- package/dist/test/unit/skills/dms-dev-script.test.js +0 -137
- package/dist/test/unit/skills/dms-dev-script.test.js.map +0 -1
- package/frontend-vue/tests/form-reload-on-reopen.test.ts +0 -20
- package/frontend-vue/tests/icon-aria-hidden.test.ts +0 -29
- package/frontend-vue/tests/skeleton-paragraph.test.ts +0 -30
- package/frontend-vue/tests/tab-slot-spacing.test.ts +0 -29
- package/frontend-vue/tests/table-empty-body-viewport.test.ts +0 -25
- package/frontend-vue/tests/table-header-placement.test.ts +0 -21
- package/frontend-vue/tests/vue-inventory.test.ts +0 -107
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from "node:fs";
|
|
2
|
-
import { expect, it } from "vitest";
|
|
3
|
-
|
|
4
|
-
/** The room the page leaves between its blocks. */
|
|
5
|
-
const BLOCK_SPACING = "space-y-6";
|
|
6
|
-
|
|
7
|
-
const sourceOf = (file: string) =>
|
|
8
|
-
readFileSync(new URL(`../layers/${file}`, import.meta.url), "utf8");
|
|
9
|
-
|
|
10
|
-
// A tab holding two blocks stacked them edge to edge, while the page spaces
|
|
11
|
-
// the same two blocks placed outside a tab.
|
|
12
|
-
it("spaces the blocks of a tab the way the page spaces its own", () => {
|
|
13
|
-
expect(sourceOf("dms-layout/app/pages/[...slug].vue")).toContain(
|
|
14
|
-
`dms-page-stack ${BLOCK_SPACING}`,
|
|
15
|
-
);
|
|
16
|
-
expect(sourceOf("dms-ui/app/components/tab/Tab.vue")).toMatch(
|
|
17
|
-
new RegExp(
|
|
18
|
-
`<div class="[^"]*\\b${BLOCK_SPACING}\\b[^"]*"[^>]*>\\s*<slot :name="item.slot" />`,
|
|
19
|
-
),
|
|
20
|
-
);
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
// A guard holding two blocks drew them edge to edge: the page spaces its own
|
|
24
|
-
// wrapper, not the blocks inside it.
|
|
25
|
-
it("spaces the blocks of a guard the way the page spaces its own", () => {
|
|
26
|
-
expect(sourceOf("dms-ui/app/components/guard/Guard.vue")).toMatch(
|
|
27
|
-
new RegExp(`<div class="[^"]*\\b${BLOCK_SPACING}\\b[^"]*" data-dms-guard>`),
|
|
28
|
-
);
|
|
29
|
-
});
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from "node:fs";
|
|
2
|
-
import { resolve } from "node:path";
|
|
3
|
-
import { describe, expect, it } from "vitest";
|
|
4
|
-
|
|
5
|
-
const tableSource = readFileSync(
|
|
6
|
-
resolve(__dirname, "../layers/dms-ui/app/build/components/table/Table.vue"),
|
|
7
|
-
"utf8",
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
describe("table empty body", () => {
|
|
11
|
-
it("centres on the visible part of a table wider than its card", () => {
|
|
12
|
-
expect(tableSource).toMatch(
|
|
13
|
-
/emptyBody:\s*"sticky start-0 w-\[var\(--dms-table-viewport,auto\)\]"/,
|
|
14
|
-
);
|
|
15
|
-
expect(tableSource).toMatch(
|
|
16
|
-
/<div :class="uiTable\.emptyBody\(\)">\s*<TableEmpty/,
|
|
17
|
-
);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it("knows the visible width of every table, not only expandable ones", () => {
|
|
21
|
-
expect(tableSource).toMatch(
|
|
22
|
-
/"--dms-table-viewport":\s*tableViewportWidth\.value > 0/,
|
|
23
|
-
);
|
|
24
|
-
});
|
|
25
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from "node:fs";
|
|
2
|
-
import { resolve } from "node:path";
|
|
3
|
-
import { describe, expect, it } from "vitest";
|
|
4
|
-
|
|
5
|
-
const tableSource = readFileSync(
|
|
6
|
-
resolve(__dirname, "../layers/dms-ui/app/build/components/table/Table.vue"),
|
|
7
|
-
"utf8",
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
describe("Table buttons placed in the page header", () => {
|
|
11
|
-
it("leaves them out of the toolbar", () => {
|
|
12
|
-
expect(tableSource).toMatch(
|
|
13
|
-
/\(props\.customButtons \?\? \[\]\)\.filter\(\s*\(button\) => button\.placement !== HEADER_PLACEMENT,\s*\)/,
|
|
14
|
-
);
|
|
15
|
-
expect(tableSource).toMatch(
|
|
16
|
-
/add\.isEnabled && add\.placement !== HEADER_PLACEMENT/,
|
|
17
|
-
);
|
|
18
|
-
expect(tableSource).toContain(':can-add-row="canAddFromToolbar"');
|
|
19
|
-
expect(tableSource).not.toContain("button.hidden");
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { readFileSync, readdirSync, statSync } from "node:fs";
|
|
2
|
-
import { join, relative } from "node:path";
|
|
3
|
-
import { describe, expect, it } from "vitest";
|
|
4
|
-
|
|
5
|
-
const EXPECTED_VUE_FILES = 278;
|
|
6
|
-
|
|
7
|
-
function walk(directory: string): string[] {
|
|
8
|
-
return readdirSync(directory).flatMap((name) => {
|
|
9
|
-
const path = join(directory, name);
|
|
10
|
-
return statSync(path).isDirectory() ? walk(path) : [path];
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function ownership(path: string): string | undefined {
|
|
15
|
-
const owners: Array<[RegExp, string]> = [
|
|
16
|
-
[/\/app\/(?:components|build\/components)\/.*\.vue$/, "component"],
|
|
17
|
-
[/\/app\/custom-pages\/.*\.vue$/, "custom-page"],
|
|
18
|
-
[/\/app\/pages\/.*\.vue$/, "dynamic-page"],
|
|
19
|
-
[/\/app\/custom-layouts\/.*\.vue$/, "layout"],
|
|
20
|
-
[/\/app\/error\.vue$/, "inertia-error-page"],
|
|
21
|
-
[/\/app\/emails\/.*\.vue$/, "server-email-template"],
|
|
22
|
-
];
|
|
23
|
-
// Forward slashes on every OS, so the patterns also match Windows paths.
|
|
24
|
-
const normalized = path.replaceAll("\\", "/");
|
|
25
|
-
return owners.find(([pattern]) => pattern.test(normalized))?.[1];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
describe("Vue source inventory", () => {
|
|
29
|
-
it("contains only Vue frontend source files", () => {
|
|
30
|
-
const files = walk(join(process.cwd(), "layers")).map((path) =>
|
|
31
|
-
path.replaceAll("\\", "/"),
|
|
32
|
-
);
|
|
33
|
-
expect(files.filter((path) => path.includes("/server/"))).toEqual([]);
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it("assigns every Vue file an explicit runtime owner", () => {
|
|
37
|
-
const files = walk(join(process.cwd(), "layers"))
|
|
38
|
-
.filter((path) => path.endsWith(".vue"))
|
|
39
|
-
.map((path) => relative(process.cwd(), path));
|
|
40
|
-
expect(files).toHaveLength(EXPECTED_VUE_FILES);
|
|
41
|
-
expect(files.filter((path) => !ownership(path))).toEqual([]);
|
|
42
|
-
expect(
|
|
43
|
-
files.filter((path) => ownership(path) === "server-email-template"),
|
|
44
|
-
).toHaveLength(10);
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
it("exposes entries for the frontend adapter", () => {
|
|
48
|
-
const root = process.cwd();
|
|
49
|
-
const frontendModule = readFileSync(join(root, "dms.frontend.ts"), "utf8");
|
|
50
|
-
|
|
51
|
-
expect(frontendModule).toContain(
|
|
52
|
-
'import "./layers/dms-layout/app/assets/css/main.css"',
|
|
53
|
-
);
|
|
54
|
-
expect(frontendModule).toContain('"./layers/**/app/custom-pages/**/*.vue"');
|
|
55
|
-
expect(frontendModule).toContain(
|
|
56
|
-
'"./layers/**/app/custom-layouts/**/*.vue"',
|
|
57
|
-
);
|
|
58
|
-
expect(frontendModule).toContain('"./layers/**/app/error.vue"');
|
|
59
|
-
expect(frontendModule).toContain('componentPrefix: "Dms"');
|
|
60
|
-
expect(frontendModule).toContain(
|
|
61
|
-
"sdk.registerComponent(pascalCase(name), component)",
|
|
62
|
-
);
|
|
63
|
-
for (const [name, alias] of [
|
|
64
|
-
["ActivityFeed", "ActivityFeedBlock"],
|
|
65
|
-
["Section", "SectionBlock"],
|
|
66
|
-
["FieldRow", "FieldRowBlock"],
|
|
67
|
-
]) {
|
|
68
|
-
expect(frontendModule).toContain(`${name}: "${alias}"`);
|
|
69
|
-
}
|
|
70
|
-
expect(frontendModule).toContain('.replace(/\\/index$/, "")');
|
|
71
|
-
expect(frontendModule).toContain(
|
|
72
|
-
"sdk.registerErrorPage(lazyComponent(loader), loader)",
|
|
73
|
-
);
|
|
74
|
-
|
|
75
|
-
const entries = walk(join(root, "layers"))
|
|
76
|
-
.map((path) => path.replaceAll("\\", "/"))
|
|
77
|
-
.filter(
|
|
78
|
-
(path) =>
|
|
79
|
-
path.includes("/app/custom-pages/") ||
|
|
80
|
-
path.endsWith("/app/error.vue"),
|
|
81
|
-
);
|
|
82
|
-
expect(entries).not.toHaveLength(0);
|
|
83
|
-
expect(
|
|
84
|
-
entries.every((path) => path.endsWith(".vue") && statSync(path).isFile()),
|
|
85
|
-
).toBe(true);
|
|
86
|
-
expect(
|
|
87
|
-
statSync(
|
|
88
|
-
join(root, "layers/dms-layout/app/custom-layouts/DefaultLayout.vue"),
|
|
89
|
-
).isFile(),
|
|
90
|
-
).toBe(true);
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
it("registers lazy components and reports deterministic name collisions", () => {
|
|
94
|
-
const frontendModule = readFileSync(
|
|
95
|
-
join(process.cwd(), "dms.frontend.ts"),
|
|
96
|
-
"utf8",
|
|
97
|
-
);
|
|
98
|
-
expect(frontendModule).toContain("defineAsyncComponent");
|
|
99
|
-
expect(frontendModule).toContain("sortedEntries(components)");
|
|
100
|
-
expect(frontendModule).toContain(
|
|
101
|
-
"Duplicate component name ${name}: ${previousPath}, ${path}",
|
|
102
|
-
);
|
|
103
|
-
expect(frontendModule).not.toMatch(
|
|
104
|
-
/components\|build\/components}[\s\S]*eager: true/,
|
|
105
|
-
);
|
|
106
|
-
});
|
|
107
|
-
});
|