@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.
Files changed (61) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/implementations/dms/resolver-timeout.d.ts +1 -0
  3. package/dist/implementations/dms/resolver-timeout.js +13 -3
  4. package/dist/implementations/dms/resolver-timeout.js.map +1 -1
  5. package/dist/test/antelope.test.js +2 -1
  6. package/dist/test/antelope.test.js.map +1 -1
  7. package/dist/test/helpers/db.js +19 -11
  8. package/dist/test/helpers/db.js.map +1 -1
  9. package/dist/test/integration/auth/two-factor-codes.test.js +4 -2
  10. package/dist/test/integration/auth/two-factor-codes.test.js.map +1 -1
  11. package/dist/test/unit/implementations/dms/dynamic-menu-hardening.test.js +8 -5
  12. package/dist/test/unit/implementations/dms/dynamic-menu-hardening.test.js.map +1 -1
  13. package/dist/test/unit/implementations/dms/layout-banners.test.js +20 -7
  14. package/dist/test/unit/implementations/dms/layout-banners.test.js.map +1 -1
  15. package/frontend-vue/layers/dms-ui/app/components/grid/GridRow.vue +14 -6
  16. package/frontend-vue/layers/dms-ui/app/components/grid/columns.ts +37 -0
  17. package/frontend-vue/package.json +1 -1
  18. package/frontend-vue/pnpm-lock.yaml +5 -5
  19. package/frontend-vue/tests/form-enclosing-form.test.ts +0 -21
  20. package/frontend-vue/tests/form-load-error.test.ts +0 -22
  21. package/frontend-vue/tests/grid-responsive-columns.test.ts +30 -31
  22. package/frontend-vue/tests/nuxt-ui-aria-labels.test.ts +1 -28
  23. package/frontend-vue/tests/period-live-pause.test.ts +0 -13
  24. package/frontend-vue/tests/period-max-days.test.ts +0 -14
  25. package/frontend-vue/tests/row-side-panel.test.ts +0 -12
  26. package/frontend-vue/tests/table-cell-wrap.test.ts +0 -12
  27. package/frontend-vue/tests/table-density-menu.test.ts +0 -21
  28. package/frontend-vue/tests/table-live-hold.test.ts +0 -44
  29. package/frontend-vue/tests/table-row-hover.test.ts +0 -10
  30. package/frontend-vue/tests/table-scroll-area.test.ts +0 -8
  31. package/frontend-vue/tests/table-view-card-props.test.ts +0 -17
  32. package/frontend-vue/tests/table-view-cards-reorder.test.ts +0 -16
  33. package/frontend-vue/tests/table-view-grouped.test.ts +0 -55
  34. package/frontend-vue/tests/table-view-pinned-rows.test.ts +0 -15
  35. package/frontend-vue/tests/table-view-record-link.test.ts +0 -17
  36. package/frontend-vue/tests/table-view-refresh.test.ts +0 -17
  37. package/frontend-vue/tests/table-view-url-tab.test.ts +0 -14
  38. package/frontend-vue/tests/tone.test.ts +0 -19
  39. package/package.json +5 -5
  40. package/dist/test/integration/auth/login.test.d.ts +0 -1
  41. package/dist/test/integration/auth/login.test.js +0 -57
  42. package/dist/test/integration/auth/login.test.js.map +0 -1
  43. package/dist/test/integration/auth/refresh.test.d.ts +0 -1
  44. package/dist/test/integration/auth/refresh.test.js +0 -59
  45. package/dist/test/integration/auth/refresh.test.js.map +0 -1
  46. package/dist/test/integration/auth/sessions.test.d.ts +0 -1
  47. package/dist/test/integration/auth/sessions.test.js +0 -58
  48. package/dist/test/integration/auth/sessions.test.js.map +0 -1
  49. package/dist/test/integration/auth/signup.test.d.ts +0 -1
  50. package/dist/test/integration/auth/signup.test.js +0 -99
  51. package/dist/test/integration/auth/signup.test.js.map +0 -1
  52. package/dist/test/unit/skills/dms-dev-script.test.d.ts +0 -1
  53. package/dist/test/unit/skills/dms-dev-script.test.js +0 -137
  54. package/dist/test/unit/skills/dms-dev-script.test.js.map +0 -1
  55. package/frontend-vue/tests/form-reload-on-reopen.test.ts +0 -20
  56. package/frontend-vue/tests/icon-aria-hidden.test.ts +0 -29
  57. package/frontend-vue/tests/skeleton-paragraph.test.ts +0 -30
  58. package/frontend-vue/tests/tab-slot-spacing.test.ts +0 -29
  59. package/frontend-vue/tests/table-empty-body-viewport.test.ts +0 -25
  60. package/frontend-vue/tests/table-header-placement.test.ts +0 -21
  61. package/frontend-vue/tests/vue-inventory.test.ts +0 -107
@@ -1,6 +1,4 @@
1
1
  // @vitest-environment jsdom
2
- import { readFileSync, readdirSync, statSync } from "node:fs";
3
- import { join, relative } from "node:path";
4
2
  import { describe, expect, it } from "vitest";
5
3
  import { createSSRApp } from "vue";
6
4
  import { renderToString } from "vue/server-renderer";
@@ -10,15 +8,6 @@ import {
10
8
  isDmsTone,
11
9
  } from "../layers/dms-ui/app/build/utils/tone";
12
10
 
13
- const FORMER_TONE = /tone"?\s*[=:][^\n]*["']accent["']/i;
14
-
15
- function walk(directory: string): string[] {
16
- return readdirSync(directory).flatMap((name) => {
17
- const path = join(directory, name);
18
- return statSync(path).isDirectory() ? walk(path) : [path];
19
- });
20
- }
21
-
22
11
  describe("Tone", () => {
23
12
  it("knows the semantic tones only", () => {
24
13
  expect(isDmsTone("success")).toBe(true);
@@ -34,12 +23,4 @@ describe("Tone", () => {
34
23
  expect(html).toContain(name);
35
24
  }
36
25
  });
37
-
38
- it("is never passed as accent by a DMS component", () => {
39
- const offenders = walk(join(process.cwd(), "layers"))
40
- .filter((path) => path.endsWith(".vue"))
41
- .filter((path) => FORMER_TONE.test(readFileSync(path, "utf8")))
42
- .map((path) => relative(process.cwd(), path));
43
- expect(offenders).toEqual([]);
44
- });
45
26
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/dms",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/AntelopeJS/dms.git"
@@ -110,10 +110,10 @@
110
110
  "frontend:dev": "pnpm --dir playground frontend:dev",
111
111
  "lint:fix": "oxlint --fix --max-warnings=1000000 && oxfmt . && pnpm --dir frontend-vue lint:fix",
112
112
  "lint": "oxlint && oxfmt --check . && pnpm --dir frontend-vue lint && antelopejs-check-interface-ranges",
113
- "typecheck": "pnpm --filter @antelopejs/interface-dms build && tsc --noEmit",
114
- "test": "pnpm run build && ajs module test .",
115
- "test:unit": "pnpm run build && DMS_TEST_DIR=dist/test/unit ajs module test .",
116
- "test:integration": "pnpm run build && DMS_TEST_DIR=dist/test/integration ajs module test .",
113
+ "typecheck": "node scripts/unless-prebuilt.mjs pnpm --filter @antelopejs/interface-dms build && tsc --noEmit",
114
+ "test": "node scripts/unless-prebuilt.mjs pnpm run build && ajs module test .",
115
+ "test:unit": "node scripts/unless-prebuilt.mjs pnpm run build && DMS_TEST_DIR=dist/test/unit ajs module test .",
116
+ "test:integration": "node scripts/unless-prebuilt.mjs pnpm run build && DMS_TEST_DIR=dist/test/integration ajs module test .",
117
117
  "test:watch": "tsc -w & tsc-alias -w",
118
118
  "release": "pnpm --filter @antelopejs/interface-dms build && pnpm --dir frontend-vue install --frozen-lockfile && release-it",
119
119
  "country-database": "node scripts/fetch-country-database.mjs",
@@ -1 +0,0 @@
1
- export {};
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const chai_1 = require("chai");
4
- const auth_1 = require("../../helpers/auth");
5
- const db_1 = require("../../helpers/db");
6
- const http_1 = require("../../helpers/http");
7
- describe.skip("[integration] auth/login", () => {
8
- beforeEach(async () => {
9
- await (0, db_1.resetDatabase)();
10
- });
11
- it("logs in a registered user and returns a bearer token", async () => {
12
- const user = await (0, auth_1.registerUser)();
13
- const client = (0, http_1.createClient)();
14
- const response = await client.post("/api/auth/login", {
15
- email: user.email,
16
- password: user.password,
17
- });
18
- (0, chai_1.expect)(response.status).to.equal(200);
19
- (0, chai_1.expect)(response.data.token_type).to.equal("Bearer");
20
- (0, chai_1.expect)(response.data.access_token).to.be.a("string").and.not.empty;
21
- (0, chai_1.expect)(response.data.refresh_token).to.be.a("string").and.not.empty;
22
- (0, chai_1.expect)(response.data.user?.email).to.equal(user.email);
23
- });
24
- it("rejects a wrong password with 401", async () => {
25
- const user = await (0, auth_1.registerUser)();
26
- const client = (0, http_1.createClient)();
27
- const response = await client.post("/api/auth/login", {
28
- email: user.email,
29
- password: "WrongPassw0rd!",
30
- });
31
- (0, chai_1.expect)(response.status).to.equal(401);
32
- });
33
- it("rejects an unknown email with 401", async () => {
34
- const client = (0, http_1.createClient)();
35
- const response = await client.post("/api/auth/login", {
36
- email: "nobody@test.local",
37
- password: "WhateverP@ss1",
38
- });
39
- (0, chai_1.expect)(response.status).to.equal(401);
40
- });
41
- it("rejects a malformed payload with 400", async () => {
42
- const client = (0, http_1.createClient)();
43
- const response = await client.post("/api/auth/login", {
44
- email: "not-an-email",
45
- password: "x",
46
- });
47
- (0, chai_1.expect)(response.status).to.equal(400);
48
- });
49
- it("rejects a missing password with 400", async () => {
50
- const client = (0, http_1.createClient)();
51
- const response = await client.post("/api/auth/login", {
52
- email: "user@test.local",
53
- });
54
- (0, chai_1.expect)(response.status).to.equal(400);
55
- });
56
- });
57
- //# sourceMappingURL=login.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"login.test.js","sourceRoot":"","sources":["../../../../src/test/integration/auth/login.test.ts"],"names":[],"mappings":";;AAAA,+BAA8B;AAC9B,6CAAkD;AAClD,yCAAiD;AACjD,6CAAkD;AAMlD,QAAQ,CAAC,IAAI,CAAC,0BAA0B,EAAE,GAAG,EAAE;IAC7C,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,IAAA,kBAAa,GAAE,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sDAAsD,EAAE,KAAK,IAAI,EAAE;QACpE,MAAM,IAAI,GAAG,MAAM,IAAA,mBAAY,GAAE,CAAC;QAElC,MAAM,MAAM,GAAG,IAAA,mBAAY,GAAE,CAAC;QAC9B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,iBAAiB,EAAE;YACpD,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAC;QAEH,IAAA,aAAM,EAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAA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AQ,EAAE,eAAe;SAC1B,CAAC,CAAC;QAEH,IAAA,aAAM,EAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sCAAsC,EAAE,KAAK,IAAI,EAAE;QACpD,MAAM,MAAM,GAAG,IAAA,mBAAY,GAAE,CAAC;QAC9B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,iBAAiB,EAAE;YACpD,KAAK,EAAE,cAAc;YACrB,QAAQ,EAAE,GAAG;SACd,CAAC,CAAC;QAEH,IAAA,aAAM,EAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qCAAqC,EAAE,KAAK,IAAI,EAAE;QACnD,MAAM,MAAM,GAAG,IAAA,mBAAY,GAAE,CAAC;QAC9B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,iBAAiB,EAAE;YACpD,KAAK,EAAE,iBAAiB;SACzB,CAAC,CAAC;QAEH,IAAA,aAAM,EAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,59 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const chai_1 = require("chai");
4
- const jsonwebtoken_1 = require("jsonwebtoken");
5
- const auth_1 = require("../../helpers/auth");
6
- const db_1 = require("../../helpers/db");
7
- const http_1 = require("../../helpers/http");
8
- const REFRESH_URL = "/api/auth/refresh";
9
- const LOGOUT_URL = "/api/auth/logout";
10
- const SUCCESS_STATUS = 200;
11
- const UNAUTH_STATUS = 401;
12
- const NO_CONTENT_STATUS = 204;
13
- const BEARER = "Bearer";
14
- const FAKE_USER_ID = "000000000000000000000000";
15
- const FAKE_NAMESPACE = "default";
16
- const FAKE_SECRET = "fake-secret";
17
- const EXPIRED_EXPIRES_IN = -1;
18
- function buildExpiredToken() {
19
- return (0, jsonwebtoken_1.sign)({ id: FAKE_USER_ID, namespace: FAKE_NAMESPACE }, FAKE_SECRET, {
20
- expiresIn: EXPIRED_EXPIRES_IN,
21
- });
22
- }
23
- describe.skip("[integration] auth/refresh", () => {
24
- beforeEach(async () => {
25
- await (0, db_1.resetDatabase)();
26
- });
27
- it("returns a new access token from a valid refresh token", async () => {
28
- const user = await (0, auth_1.registerUser)();
29
- const client = (0, http_1.createClient)();
30
- const response = await client.post(REFRESH_URL, {
31
- token: user.refreshToken,
32
- });
33
- (0, chai_1.expect)(response.status).to.equal(SUCCESS_STATUS);
34
- (0, chai_1.expect)(response.data.token_type).to.equal(BEARER);
35
- (0, chai_1.expect)(response.data.access_token).to.be.a("string").and.not.empty;
36
- (0, chai_1.expect)(response.data.refresh_token).to.be.a("string").and.not.empty;
37
- });
38
- it("rejects an expired refresh token referencing an unknown user with 401", async () => {
39
- const client = (0, http_1.createClient)();
40
- const response = await client.post(REFRESH_URL, {
41
- token: buildExpiredToken(),
42
- });
43
- (0, chai_1.expect)(response.status).to.equal(UNAUTH_STATUS);
44
- });
45
- it("rejects a refresh token whose session has been revoked with 401", async () => {
46
- const user = await (0, auth_1.registerUser)();
47
- const authClient = (0, auth_1.authorizedClient)(user.accessToken);
48
- const logoutResponse = await authClient.post(LOGOUT_URL, {
49
- token: user.refreshToken,
50
- });
51
- (0, chai_1.expect)(logoutResponse.status).to.equal(NO_CONTENT_STATUS);
52
- const client = (0, http_1.createClient)();
53
- const response = await client.post(REFRESH_URL, {
54
- token: user.refreshToken,
55
- });
56
- (0, chai_1.expect)(response.status).to.equal(UNAUTH_STATUS);
57
- });
58
- });
59
- //# sourceMappingURL=refresh.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"refres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BAAY,GAAE,CAAC;QAC9B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE;YAC9C,KAAK,EAAE,IAAI,CAAC,YAAY;SACzB,CAAC,CAAC;QAEH,IAAA,aAAM,EAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,58 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const chai_1 = require("chai");
4
- const auth_1 = require("../../helpers/auth");
5
- const db_1 = require("../../helpers/db");
6
- const http_1 = require("../../helpers/http");
7
- const SESSIONS_URL = "/settings/user/profile/sessions";
8
- const LOGOUT_URL = "/api/auth/logout";
9
- const UNAUTH_STATUS = 401;
10
- const SUCCESS_STATUS = 200;
11
- const NO_CONTENT_STATUS = 204;
12
- describe.skip("[integration] auth/sessions", () => {
13
- beforeEach(async () => {
14
- await (0, db_1.resetDatabase)();
15
- });
16
- it("lists the current session after login", async () => {
17
- const user = await (0, auth_1.registerUser)({ owner: true });
18
- const session = await (0, auth_1.loginUser)(user.email, user.password);
19
- const client = (0, auth_1.authorizedClient)(session.accessToken);
20
- const response = await client.get(SESSIONS_URL);
21
- (0, chai_1.expect)(response.status).to.equal(SUCCESS_STATUS);
22
- (0, chai_1.expect)(response.data).to.be.an("array");
23
- (0, chai_1.expect)(response.data.length).to.be.at.least(1);
24
- const current = response.data.find((entry) => entry.isCurrent);
25
- (0, chai_1.expect)(current).to.exist;
26
- });
27
- it("logout deletes the current session from the sessions list", async () => {
28
- const user = await (0, auth_1.registerUser)({ owner: true });
29
- const session = await (0, auth_1.loginUser)(user.email, user.password);
30
- const client = (0, auth_1.authorizedClient)(session.accessToken);
31
- const beforeLogout = await client.get(SESSIONS_URL);
32
- (0, chai_1.expect)(beforeLogout.status).to.equal(SUCCESS_STATUS);
33
- const initialCount = beforeLogout.data.length;
34
- const currentBefore = beforeLogout.data.find((entry) => entry.isCurrent);
35
- (0, chai_1.expect)(currentBefore).to.exist;
36
- const logoutResponse = await client.post(LOGOUT_URL, {
37
- token: session.refreshToken,
38
- });
39
- (0, chai_1.expect)(logoutResponse.status).to.equal(NO_CONTENT_STATUS);
40
- const fallbackClient = (0, auth_1.authorizedClient)(user.accessToken);
41
- const afterLogout = await fallbackClient.get(SESSIONS_URL);
42
- (0, chai_1.expect)(afterLogout.status).to.equal(SUCCESS_STATUS);
43
- (0, chai_1.expect)(afterLogout.data.length).to.equal(initialCount - 1);
44
- const revokedStillPresent = afterLogout.data.some((entry) => entry._id === currentBefore._id);
45
- (0, chai_1.expect)(revokedStillPresent).to.equal(false);
46
- });
47
- it("rejects unauthenticated GET /sessions with 401", async () => {
48
- const client = (0, http_1.createClient)();
49
- const response = await client.get(SESSIONS_URL);
50
- (0, chai_1.expect)(response.status).to.equal(UNAUTH_STATUS);
51
- });
52
- it("rejects unauthenticated DELETE /sessions with 401", async () => {
53
- const client = (0, http_1.createClient)();
54
- const response = await client.delete(SESSIONS_URL);
55
- (0, chai_1.expect)(response.status).to.equal(UNAUTH_STATUS);
56
- });
57
- });
58
- //# sourceMappingURL=sessions.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sessions.test.js","sourceRoot":"","sources":["../../../../src/test/integration/auth/sessions.test.ts"],"names":[],"mappings":";;AAAA,+BAA8B;AAC9B,6CAA+E;AAC/E,yCAAiD;AACjD,6CAAkD;AAElD,MAAM,YAAY,GAAG,iCAAiC,CAAC;AACvD,MAAM,UAAU,GAAG,kBAAkB,CAAC;AACtC,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAM9B,QAAQ,CAAC,IAAI,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAChD,UAAU,CAAC,KAAK,IA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KAAK,aAAa,CAAC,GAAG,CAC5D,CAAC;QACF,IAAA,aAAM,EAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gDAAgD,EAAE,KAAK,IAAI,EAAE;QAC9D,MAAM,MAAM,GAAG,IAAA,mBAAY,GAAE,CAAC;QAC9B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAEhD,IAAA,aAAM,EAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mDAAmD,EAAE,KAAK,IAAI,EAAE;QACjE,MAAM,MAAM,GAAG,IAAA,mBAAY,GAAE,CAAC;QAC9B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAEnD,IAAA,aAAM,EAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,99 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const chai_1 = require("chai");
4
- const db_1 = require("../../helpers/db");
5
- const fixtures_1 = require("../../helpers/fixtures");
6
- const http_1 = require("../../helpers/http");
7
- const SIGNUP_URL = "/api/auth/signup";
8
- const VALID_PASSWORD = "TestPassw0rd!";
9
- const WEAK_PASSWORD = "weak";
10
- const TEST_EMAIL = "signup-success@test.local";
11
- const OTHER_EMAIL = "other@test.local";
12
- const NAME = "Signup User";
13
- const LANG = "en";
14
- const EXPIRED_INVITE_MS = -1000;
15
- const UNKNOWN_TOKEN = "00000000-0000-0000-0000-000000000000";
16
- describe.skip("[integration] auth/signup", () => {
17
- beforeEach(async () => {
18
- await (0, db_1.resetDatabase)();
19
- });
20
- it("signs up a user with a valid invite and returns tokens", async () => {
21
- const invite = await (0, fixtures_1.seedUserInvite)({ email: TEST_EMAIL });
22
- const client = (0, http_1.createClient)();
23
- const response = await client.post(SIGNUP_URL, {
24
- name: NAME,
25
- email: TEST_EMAIL,
26
- password: VALID_PASSWORD,
27
- lang: LANG,
28
- token: invite.token,
29
- });
30
- (0, chai_1.expect)(response.status).to.equal(200);
31
- (0, chai_1.expect)(response.data.token_type).to.equal("Bearer");
32
- (0, chai_1.expect)(response.data.access_token).to.be.a("string").and.not.empty;
33
- (0, chai_1.expect)(response.data.refresh_token).to.be.a("string").and.not.empty;
34
- (0, chai_1.expect)(response.data.user?.email).to.equal(TEST_EMAIL);
35
- });
36
- it("rejects signup with an unknown token with 400", async () => {
37
- const client = (0, http_1.createClient)();
38
- const response = await client.post(SIGNUP_URL, {
39
- name: NAME,
40
- email: TEST_EMAIL,
41
- password: VALID_PASSWORD,
42
- lang: LANG,
43
- token: UNKNOWN_TOKEN,
44
- });
45
- (0, chai_1.expect)(response.status).to.equal(400);
46
- });
47
- it("rejects signup when body email does not match invite email with 400", async () => {
48
- const invite = await (0, fixtures_1.seedUserInvite)({ email: TEST_EMAIL });
49
- const client = (0, http_1.createClient)();
50
- const response = await client.post(SIGNUP_URL, {
51
- name: NAME,
52
- email: OTHER_EMAIL,
53
- password: VALID_PASSWORD,
54
- lang: LANG,
55
- token: invite.token,
56
- });
57
- (0, chai_1.expect)(response.status).to.equal(400);
58
- });
59
- it("rejects signup when invite is expired with 400", async () => {
60
- const invite = await (0, fixtures_1.seedUserInvite)({
61
- email: TEST_EMAIL,
62
- lifetimeMs: EXPIRED_INVITE_MS,
63
- });
64
- const client = (0, http_1.createClient)();
65
- const response = await client.post(SIGNUP_URL, {
66
- name: NAME,
67
- email: TEST_EMAIL,
68
- password: VALID_PASSWORD,
69
- lang: LANG,
70
- token: invite.token,
71
- });
72
- (0, chai_1.expect)(response.status).to.equal(400);
73
- });
74
- it("rejects signup with a malformed email with 400", async () => {
75
- const invite = await (0, fixtures_1.seedUserInvite)({ email: TEST_EMAIL });
76
- const client = (0, http_1.createClient)();
77
- const response = await client.post(SIGNUP_URL, {
78
- name: NAME,
79
- email: "not-an-email",
80
- password: VALID_PASSWORD,
81
- lang: LANG,
82
- token: invite.token,
83
- });
84
- (0, chai_1.expect)(response.status).to.equal(400);
85
- });
86
- it("rejects signup with a weak password with 400", async () => {
87
- const invite = await (0, fixtures_1.seedUserInvite)({ email: TEST_EMAIL });
88
- const client = (0, http_1.createClient)();
89
- const response = await client.post(SIGNUP_URL, {
90
- name: NAME,
91
- email: TEST_EMAIL,
92
- password: WEAK_PASSWORD,
93
- lang: LANG,
94
- token: invite.token,
95
- });
96
- (0, chai_1.expect)(response.status).to.equal(400);
97
- });
98
- });
99
- //# sourceMappingURL=signup.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"signup.test.js","sourceRoot":"","sources":["../../../../src/test/integration/auth/signup.test.ts"],"names":[],"mappings":";;AAAA,+BAA8B;AAC9B,yCAAiD;AACjD,qDAAwD;AACxD,6CAAkD;AAElD,MAAM,UAAU,GAAG,kBAAkB,CAAC;AACtC,MAAM,cAAc,GAAG,eAAe,CAAC;AACvC,MAAM,aAAa,GAAG,MAAM,CAAC;AAC7B,MAAM,UAAU,GAAG,2BAA2B,CAAC;AAC/C,MAAM,WAAW,GAAG,kBAAkB,CAAC;AACvC,MAAM,IAAI,GAAG,aAAa,CAAC;AAC3B,MAAM,IAAI,GAAG,IAAI,CAAC;AAClB,MAAM,iBAAiB,GAAG,CAAC,IAAI,CAAC;AAChC,MAAM,aAAa,GAAG,sCAAsC,CAAC;AAM7D,QAAQ,CAAC,IAAI,CAAC,2BAA2B,EAAE,GAAG,EAAE;IAC9C,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,IAAA,kBAAa,GAAE,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,EA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1 +0,0 @@
1
- export {};
@@ -1,137 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const node_child_process_1 = require("node:child_process");
4
- const node_fs_1 = require("node:fs");
5
- const node_os_1 = require("node:os");
6
- const node_path_1 = require("node:path");
7
- const node_util_1 = require("node:util");
8
- const chai_1 = require("chai");
9
- const PACKAGE_ROOT = (0, node_path_1.resolve)(__dirname, "..", "..", "..", "..");
10
- const SCRIPT = (0, node_path_1.join)(PACKAGE_ROOT, "skills", "dms-dev", "scripts", "dms-dev.sh");
11
- const SCRIPT_TIMEOUT_MS = 30_000;
12
- const SUITE_TIMEOUT_MS = 90_000;
13
- const STOP_GRACE_SECONDS = "1";
14
- const READY_TIMEOUT_SECONDS = "15";
15
- const PROJECT_PORTS = { first: 6110, second: 6120 };
16
- const FAKE_BACKEND = `#!/usr/bin/env bash
17
- mkdir -p .antelope
18
- printf '{"pid": %s, "servers": {"api": {"endpoints": [{"protocol": "http", "host": "0.0.0.0", "port": %s}]}}}' "$$" "$FAKE_PORT" > .antelope/dev.json
19
- sleep 300 &
20
- echo "Server started, listening on http://localhost:$FAKE_PORT"
21
- wait
22
- `;
23
- const FAKE_FRONTEND = `#!/usr/bin/env bash
24
- trap '' TERM
25
- sleep 300 &
26
- echo "Server ready on http://localhost:$((FAKE_PORT + 1))"
27
- wait
28
- `;
29
- const runProcess = (0, node_util_1.promisify)(node_child_process_1.execFile);
30
- function createProject(root, name, port) {
31
- const dir = (0, node_path_1.join)(root, name);
32
- (0, node_fs_1.mkdirSync)((0, node_path_1.join)(dir, "bin"), { recursive: true });
33
- (0, node_fs_1.writeFileSync)((0, node_path_1.join)(dir, "package.json"), "{}");
34
- (0, node_fs_1.writeFileSync)((0, node_path_1.join)(dir, "bin", "antelope-runner"), FAKE_BACKEND);
35
- (0, node_fs_1.writeFileSync)((0, node_path_1.join)(dir, "bin", "ajs-dms"), FAKE_FRONTEND);
36
- (0, node_fs_1.chmodSync)((0, node_path_1.join)(dir, "bin", "antelope-runner"), 0o755);
37
- (0, node_fs_1.chmodSync)((0, node_path_1.join)(dir, "bin", "ajs-dms"), 0o755);
38
- return { dir, port };
39
- }
40
- async function runScript(project, command) {
41
- const env = {
42
- ...process.env,
43
- FAKE_PORT: String(project.port),
44
- DMS_BACK_DIR: project.dir,
45
- DMS_BACK_CMD: (0, node_path_1.join)(project.dir, "bin", "antelope-runner"),
46
- DMS_FRONT_CMD: `${(0, node_path_1.join)(project.dir, "bin", "ajs-dms")} dev`,
47
- DMS_BACK_LOG: (0, node_path_1.join)(project.dir, "back.log"),
48
- DMS_FRONT_LOG: (0, node_path_1.join)(project.dir, "front.log"),
49
- DMS_DEV_STOP_GRACE: STOP_GRACE_SECONDS,
50
- DMS_DEV_TIMEOUT: READY_TIMEOUT_SECONDS,
51
- };
52
- try {
53
- const { stdout, stderr } = await runProcess("bash", [SCRIPT, command], {
54
- env,
55
- timeout: SCRIPT_TIMEOUT_MS,
56
- });
57
- return { code: 0, output: stdout + stderr };
58
- }
59
- catch (error) {
60
- const failure = error;
61
- return {
62
- code: failure.code ?? 1,
63
- output: `${failure.stdout ?? ""}${failure.stderr ?? ""}`,
64
- };
65
- }
66
- }
67
- function pidFile(project) {
68
- return (0, node_path_1.join)(project.dir, ".antelope", "dms-dev.pid");
69
- }
70
- function recordedPids(project) {
71
- return (0, node_fs_1.readFileSync)(pidFile(project), "utf8")
72
- .trim()
73
- .split("\n")
74
- .map((line) => Number(line.split(" ")[1]));
75
- }
76
- function isAlive(pid) {
77
- try {
78
- process.kill(pid, 0);
79
- return true;
80
- }
81
- catch {
82
- return false;
83
- }
84
- }
85
- describe("[unit] skills/dms-dev script", function () {
86
- this.timeout(SUITE_TIMEOUT_MS);
87
- let root;
88
- let first;
89
- let second;
90
- beforeEach(() => {
91
- root = (0, node_fs_1.mkdtempSync)((0, node_path_1.join)((0, node_os_1.tmpdir)(), "dms-dev-script-"));
92
- first = createProject(root, "first", PROJECT_PORTS.first);
93
- second = createProject(root, "second", PROJECT_PORTS.second);
94
- });
95
- afterEach(async () => {
96
- await runScript(first, "stop");
97
- await runScript(second, "stop");
98
- (0, node_fs_1.rmSync)(root, { recursive: true, force: true });
99
- });
100
- it("reports the ports the servers announce", async () => {
101
- const started = await runScript(first, "start");
102
- (0, chai_1.expect)(started.code, started.output).to.equal(0);
103
- (0, chai_1.expect)(started.output).to.contain(`backend ready on http://localhost:${PROJECT_PORTS.first}.`);
104
- (0, chai_1.expect)(started.output).to.contain(`frontend ready on http://localhost:${PROJECT_PORTS.first + 1}.`);
105
- });
106
- it("stops only the processes of its own project", async () => {
107
- await runScript(first, "start");
108
- await runScript(second, "start");
109
- const firstPids = recordedPids(first);
110
- const secondPids = recordedPids(second);
111
- const stopped = await runScript(first, "stop");
112
- (0, chai_1.expect)(stopped.code, stopped.output).to.equal(0);
113
- (0, chai_1.expect)(firstPids.filter(isAlive)).to.deep.equal([]);
114
- (0, chai_1.expect)(secondPids.filter(isAlive)).to.deep.equal(secondPids);
115
- (0, chai_1.expect)((0, node_fs_1.existsSync)(pidFile(first))).to.equal(false);
116
- });
117
- it("falls back to the project's directory when the pid file is gone", async () => {
118
- await runScript(first, "start");
119
- await runScript(second, "start");
120
- const firstPids = recordedPids(first);
121
- const secondPids = recordedPids(second);
122
- (0, node_fs_1.rmSync)(pidFile(first));
123
- const stopped = await runScript(first, "stop");
124
- (0, chai_1.expect)(stopped.code, stopped.output).to.equal(0);
125
- (0, chai_1.expect)(firstPids.filter(isAlive)).to.deep.equal([]);
126
- (0, chai_1.expect)(secondPids.filter(isAlive)).to.deep.equal(secondPids);
127
- });
128
- it("fails fast when the server command dies right away", async () => {
129
- (0, node_fs_1.rmSync)((0, node_path_1.join)(first.dir, "bin", "antelope-runner"));
130
- const startedAt = Date.now();
131
- const started = await runScript(first, "start");
132
- (0, chai_1.expect)(started.code).to.equal(1);
133
- (0, chai_1.expect)(started.output).to.contain("exited before becoming ready");
134
- (0, chai_1.expect)(Date.now() - startedAt).to.be.below(SCRIPT_TIMEOUT_MS / 2);
135
- });
136
- });
137
- //# sourceMappingURL=dms-dev-script.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dms-dev-script.test.js","sourceRoot":"","sources":["../../../../src/test/unit/skills/dms-dev-script.test.ts"],"names":[],"mappings":";;AAAA,2DAA8C;AAC9C,qCAQiB;AACjB,qCAAiC;AACjC,yCAA0C;AAC1C,yCAAsC;AACtC,+BAA8B;AAE9B,MAAM,YAAY,GAAG,IAAA,mBAAO,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAChE,MAAM,MAAM,GAAG,IAAA,gBAAI,EAAC,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;AAChF,MAAM,iBAAiB,GAAG,MAAM,CAAC;AACjC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAChC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAC/B,MAAM,qBAAqB,GAAG,IAAI,CAAC;AACnC,MAAM,aAAa,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AAGpD,MAAM,YAAY,GAAG;;;;;;CAMpB,CAAC;AAEF,MAAM,aAAa,GAAG;;;;;CAKrB,CAAC;AAEF,MAAM,UAAU,GAAG,IAAA,qBAAS,EAAC,6BAAQ,CAAC,CAAC;AAkBvC,SAAS,aAAa,CAAC,IAAY,EAAE,IAAY,EAAE,IAAY;IAC7D,MAAM,GAAG,GAAG,IAAA,gBAAI,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7B,IAAA,mBAAS,EAAC,IAAA,gBAAI,EAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACjD,IAAA,uBAAa,EAAC,IAAA,gBAAI,EAAC,GAAG,EAAE,cAAc,CAAC,EAAE,IAAI,CAAC,CAAC;IAC/C,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ACjD,IAAA,aAAM,EAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACpD,IAAA,aAAM,EAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oDAAoD,EAAE,KAAK,IAAI,EAAE;QAClE,IAAA,gBAAM,EAAC,IAAA,gBAAI,EAAC,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC;QAClD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAE7B,MAAM,OAAO,GAAG,MAAM,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAEhD,IAAA,aAAM,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACjC,IAAA,aAAM,EAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC;QAClE,IAAA,aAAM,EAAC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,GAAG,CAAC,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,20 +0,0 @@
1
- import { readFileSync } from "node:fs";
2
- import { expect, it } from "vitest";
3
-
4
- const formSource = readFileSync(
5
- new URL("../layers/dms-ui/app/components/form/Form.vue", import.meta.url),
6
- "utf8",
7
- );
8
-
9
- // The load of a form is cached under its component and page ids, which a
10
- // drawer or modal reopened on the same row shares: the second opening showed
11
- // the first one's values, stale if the row changed in between, and a save
12
- // then wrote them back.
13
- it("fetches its record again every time a form is mounted", () => {
14
- const loadBlock = formSource.slice(
15
- formSource.indexOf("if (props.fetchUrl) {"),
16
- );
17
- expect(loadBlock).toMatch(
18
- /const formLoad = await useDmsAsyncData\([\s\S]*?onMounted\(\(\) => \{\s*formLoad\.status\.value = "idle";\s*\}\);/,
19
- );
20
- });
@@ -1,29 +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 ICON_TAG = /<(?:UIcon|Icon)\b[^>]*?>/gs;
6
- const STATIC_ARIA_HIDDEN = /(?<![:\w-])aria-hidden=/;
7
-
8
- function walk(directory: string): string[] {
9
- return readdirSync(directory).flatMap((name) => {
10
- const path = join(directory, name);
11
- return statSync(path).isDirectory() ? walk(path) : [path];
12
- });
13
- }
14
-
15
- describe("icon aria-hidden bindings", () => {
16
- // The icon hands its attributes to Iconify's component, whose `ariaHidden`
17
- // prop is a Boolean: a static attribute reaches it as the string "true".
18
- it("binds aria-hidden on icons as a boolean", () => {
19
- const offenders = walk(join(process.cwd(), "layers"))
20
- .filter((path) => path.endsWith(".vue"))
21
- .flatMap((path) =>
22
- [...readFileSync(path, "utf8").matchAll(ICON_TAG)]
23
- .filter(([tag]) => STATIC_ARIA_HIDDEN.test(tag))
24
- .map(() => relative(process.cwd(), path)),
25
- );
26
-
27
- expect(offenders).toEqual([]);
28
- });
29
- });
@@ -1,30 +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 PARAGRAPH = /<p\b[^>]*>(.*?)<\/p>/gs;
6
- const SKELETON = /<USkeleton\b/;
7
-
8
- function walk(directory: string): string[] {
9
- return readdirSync(directory).flatMap((name) => {
10
- const path = join(directory, name);
11
- return statSync(path).isDirectory() ? walk(path) : [path];
12
- });
13
- }
14
-
15
- describe("skeleton placement", () => {
16
- // The skeleton renders a <div>. The browser's parser closes an open <p>
17
- // before a <div>, so the server markup no longer matches the client tree
18
- // and hydration reports a mismatch.
19
- it("keeps skeletons out of paragraphs", () => {
20
- const offenders = walk(join(process.cwd(), "layers"))
21
- .filter((path) => path.endsWith(".vue"))
22
- .flatMap((path) =>
23
- [...readFileSync(path, "utf8").matchAll(PARAGRAPH)]
24
- .filter(([, content]) => SKELETON.test(content ?? ""))
25
- .map(() => relative(process.cwd(), path)),
26
- );
27
-
28
- expect(offenders).toEqual([]);
29
- });
30
- });