@wssto2/vue-core 0.12.0 → 0.12.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 +8 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/identity/entities.d.ts +3 -2
- package/dist/playwright/session.d.ts +5 -11
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.12.1 — 2026-10-18
|
|
4
|
+
|
|
5
|
+
go-core `v1.16.1`: a type the wire writes as text is generated as a string.
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **modules:** regenerated from go-core v1.16.1. In the identity entities `ClauseInfo.qualifier` and `PermissionAccess.qualifier` are `Qualifier` (`"own" | "own_location" | "all"`, exported from `modules/identity/entities`); they were `number`, while the wire sends the text.
|
|
9
|
+
- **playwright:** `SessionExtra.access` and `accessOf` use the generated `MyAccess`; the `WireAccess` workaround for the number-typed qualifier is gone.
|
|
10
|
+
|
|
3
11
|
## 0.12.0 — 2026-10-18
|
|
4
12
|
|
|
5
13
|
The developer kit an application copied: one `vue-core` command for the ratcheted lint, the feature-folder architecture rules, the feature generator and the e2e timings, the ESLint config, and Playwright mocks of the library's own endpoints. Nothing existing changes. go-core is unchanged (`v1.15.0`; v1.16.0 changes no wire type).
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** The version of @wssto2/vue-core (kept equal to package.json by index.test.ts). */
|
|
2
|
-
export declare const version = "0.12.
|
|
2
|
+
export declare const version = "0.12.1";
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ export type ChangeRow = {
|
|
|
22
22
|
export type ChangeView = "all" | "access" | "details";
|
|
23
23
|
export type ClauseInfo = {
|
|
24
24
|
scope: Scope;
|
|
25
|
-
qualifier:
|
|
25
|
+
qualifier: Qualifier;
|
|
26
26
|
attrs?: Record<string, string[]>;
|
|
27
27
|
role?: string;
|
|
28
28
|
binding_id?: number;
|
|
@@ -56,7 +56,7 @@ export type PendingEmail = {
|
|
|
56
56
|
};
|
|
57
57
|
export type PermissionAccess = {
|
|
58
58
|
scope: Scope;
|
|
59
|
-
qualifier:
|
|
59
|
+
qualifier: Qualifier;
|
|
60
60
|
clauses: ClauseInfo[];
|
|
61
61
|
};
|
|
62
62
|
export type PersonRef = {
|
|
@@ -73,6 +73,7 @@ export type ProfileResponse = {
|
|
|
73
73
|
created_at: string;
|
|
74
74
|
pending_email: PendingEmail | null;
|
|
75
75
|
};
|
|
76
|
+
export type Qualifier = "own" | "own_location" | "all";
|
|
76
77
|
export type Scope = {
|
|
77
78
|
level: string;
|
|
78
79
|
id?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Page } from "@playwright/test";
|
|
2
2
|
import type { AccessQualifier } from "../platform";
|
|
3
|
-
import type { MyAccess, Node,
|
|
3
|
+
import type { MyAccess, Node, SessionResponse, User } from "../modules/identity/entities";
|
|
4
4
|
/** The signed-in person a spec starts with: only what go-core's identity returns. An app adds its own fields through `mockAuth`'s `user`. */
|
|
5
5
|
export declare const defaultUser: User;
|
|
6
6
|
export type MockAuthOptions = {
|
|
@@ -18,24 +18,19 @@ export type HeldAt = {
|
|
|
18
18
|
level: string;
|
|
19
19
|
id?: number;
|
|
20
20
|
};
|
|
21
|
-
type WireAccess = Omit<MyAccess, "permissions"> & {
|
|
22
|
-
permissions: Record<string, Omit<PermissionAccess, "qualifier"> & {
|
|
23
|
-
qualifier: AccessQualifier;
|
|
24
|
-
}>;
|
|
25
|
-
};
|
|
26
21
|
/** Fields of the session payload to set or replace (an `impersonator`, another `expires_at`), and any the application adds. */
|
|
27
22
|
export type SessionExtra = Partial<Omit<SessionResponse, "access">> & {
|
|
28
|
-
access?:
|
|
23
|
+
access?: MyAccess;
|
|
29
24
|
} & Record<string, unknown>;
|
|
30
25
|
/** The `/auth/me` `access` payload for the given permissions, every one at `scope` with its qualifier. The organization has no id: it is go-core's root scope, and `root` says a binding is there. */
|
|
31
|
-
export declare function accessOf(policies: string[], qualifiers?: Record<string, AccessQualifier>, scope?: HeldAt):
|
|
26
|
+
export declare function accessOf(policies: string[], qualifiers?: Record<string, AccessQualifier>, scope?: HeldAt): MyAccess;
|
|
32
27
|
/** The session payload of go-core's identity (`/auth/me`, `/auth/refresh`, `/auth/login-as`), without its envelope. */
|
|
33
28
|
export declare function authResponse(policies?: string[], extra?: SessionExtra): {
|
|
34
29
|
navigation: Node[];
|
|
35
30
|
user: unknown;
|
|
36
31
|
impersonator?: (import("../identity").Impersonator | null) | undefined;
|
|
37
32
|
expires_at: string;
|
|
38
|
-
access:
|
|
33
|
+
access: MyAccess;
|
|
39
34
|
};
|
|
40
35
|
/** The same, as the server sends it: inside go-core's `{ success, data }` envelope. */
|
|
41
36
|
export declare const authBody: (policies?: string[], extra?: SessionExtra) => {
|
|
@@ -46,9 +41,8 @@ export declare const authBody: (policies?: string[], extra?: SessionExtra) => {
|
|
|
46
41
|
user: unknown;
|
|
47
42
|
impersonator?: (import("../identity").Impersonator | null) | undefined;
|
|
48
43
|
expires_at: string;
|
|
49
|
-
access:
|
|
44
|
+
access: MyAccess;
|
|
50
45
|
};
|
|
51
46
|
};
|
|
52
47
|
/** Signs the page in: answers go-core identity's `GET /api/v1/auth/me` with a session that holds `policies`. */
|
|
53
48
|
export declare function mockAuth(page: Page, policies?: string[], options?: MockAuthOptions): Promise<void>;
|
|
54
|
-
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wssto2/vue-core",
|
|
3
|
-
"version": "0.12.
|
|
4
|
-
"goCore": "v1.
|
|
3
|
+
"version": "0.12.1",
|
|
4
|
+
"goCore": "v1.16.1",
|
|
5
5
|
"description": "Shared Vue 3 library for go-core applications: app shell, list / record / form pages and their controls.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"vue",
|