@powerhousedao/vetra-builder-package 5.1.0-staging → 5.2.0-staging.10
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/dist/document-models/builder-team/actions.d.ts.map +1 -1
- package/dist/document-models/builder-team/gen/document-model.js +2 -2
- package/dist/document-models/builder-team/gen/document-schema.d.ts +21 -151
- package/dist/document-models/builder-team/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/builder-team/gen/member/actions.d.ts +1 -1
- package/dist/document-models/builder-team/gen/member/actions.d.ts.map +1 -1
- package/dist/document-models/builder-team/gen/member/actions.js +1 -1
- package/dist/document-models/builder-team/gen/member/operations.d.ts +2 -2
- package/dist/document-models/builder-team/gen/member/operations.d.ts.map +1 -1
- package/dist/document-models/builder-team/gen/member/operations.js +0 -2
- package/dist/document-models/builder-team/gen/packages/actions.d.ts +1 -1
- package/dist/document-models/builder-team/gen/packages/actions.d.ts.map +1 -1
- package/dist/document-models/builder-team/gen/packages/actions.js +1 -1
- package/dist/document-models/builder-team/gen/packages/operations.d.ts +2 -2
- package/dist/document-models/builder-team/gen/packages/operations.d.ts.map +1 -1
- package/dist/document-models/builder-team/gen/packages/operations.js +0 -2
- package/dist/document-models/builder-team/gen/profile/actions.d.ts +1 -1
- package/dist/document-models/builder-team/gen/profile/actions.d.ts.map +1 -1
- package/dist/document-models/builder-team/gen/profile/actions.js +1 -1
- package/dist/document-models/builder-team/gen/profile/operations.d.ts +2 -2
- package/dist/document-models/builder-team/gen/profile/operations.d.ts.map +1 -1
- package/dist/document-models/builder-team/gen/profile/operations.js +0 -2
- package/dist/document-models/builder-team/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/builder-team/gen/reducer.js +32 -16
- package/dist/document-models/builder-team/gen/schema/types.d.ts +13 -1
- package/dist/document-models/builder-team/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/builder-team/gen/schema/zod.d.ts +3 -3
- package/dist/document-models/builder-team/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/builder-team/gen/schema/zod.js +22 -22
- package/dist/document-models/builder-team/gen/spaces/actions.d.ts +1 -1
- package/dist/document-models/builder-team/gen/spaces/actions.d.ts.map +1 -1
- package/dist/document-models/builder-team/gen/spaces/actions.js +1 -1
- package/dist/document-models/builder-team/gen/spaces/operations.d.ts +2 -2
- package/dist/document-models/builder-team/gen/spaces/operations.d.ts.map +1 -1
- package/dist/document-models/builder-team/gen/spaces/operations.js +0 -2
- package/dist/document-models/builder-team/gen/types.d.ts.map +1 -1
- package/dist/document-models/builder-team/index.d.ts +0 -4
- package/dist/document-models/builder-team/index.d.ts.map +1 -1
- package/dist/document-models/builder-team/index.js +0 -4
- package/dist/document-models/builder-team/src/reducers/member.d.ts.map +1 -1
- package/dist/document-models/builder-team/src/reducers/member.js +4 -1
- package/dist/document-models/builder-team/src/reducers/packages.d.ts.map +1 -1
- package/dist/document-models/builder-team/src/reducers/packages.js +3 -3
- package/dist/document-models/builder-team/src/reducers/spaces.d.ts.map +1 -1
- package/dist/document-models/builder-team/src/reducers/spaces.js +2 -2
- package/dist/document-models/builder-team/src/tests/document-model.test.d.ts +4 -0
- package/dist/document-models/builder-team/src/tests/document-model.test.d.ts.map +1 -1
- package/dist/document-models/builder-team/src/tests/document-model.test.js +91 -6
- package/dist/document-models/builder-team/src/tests/member.test.d.ts +0 -4
- package/dist/document-models/builder-team/src/tests/member.test.d.ts.map +1 -1
- package/dist/document-models/builder-team/src/tests/member.test.js +12 -17
- package/dist/document-models/builder-team/src/tests/packages.test.d.ts +0 -4
- package/dist/document-models/builder-team/src/tests/packages.test.d.ts.map +1 -1
- package/dist/document-models/builder-team/src/tests/packages.test.js +22 -17
- package/dist/document-models/builder-team/src/tests/profile.test.d.ts +0 -4
- package/dist/document-models/builder-team/src/tests/profile.test.d.ts.map +1 -1
- package/dist/document-models/builder-team/src/tests/profile.test.js +18 -19
- package/dist/document-models/builder-team/src/tests/spaces.test.d.ts +0 -4
- package/dist/document-models/builder-team/src/tests/spaces.test.d.ts.map +1 -1
- package/dist/document-models/builder-team/src/tests/spaces.test.js +22 -17
- package/package.json +35 -34
|
@@ -1,40 +1,45 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is a scaffold file meant for customization:
|
|
3
|
-
* - change it by adding new tests or modifying the existing ones
|
|
4
|
-
*/
|
|
5
|
-
import { describe, it, expect, beforeEach } from "vitest";
|
|
6
1
|
import { generateMock } from "@powerhousedao/codegen";
|
|
7
|
-
import {
|
|
8
|
-
import { reducer } from "
|
|
9
|
-
|
|
10
|
-
import { utils } from "../../utils.js";
|
|
11
|
-
describe("Spaces Operations", () => {
|
|
12
|
-
let document;
|
|
13
|
-
beforeEach(() => {
|
|
14
|
-
document = utils.createDocument();
|
|
15
|
-
});
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { reducer, utils, isBuilderTeamDocument, addSpace, updateSpaceInfo, removeSpace, reorderSpaces, AddSpaceInputSchema, UpdateSpaceInfoInputSchema, RemoveSpaceInputSchema, ReorderSpacesInputSchema, } from "@powerhousedao/vetra-builder-package/document-models/builder-team";
|
|
4
|
+
describe("SpacesOperations", () => {
|
|
16
5
|
it("should handle addSpace operation", () => {
|
|
6
|
+
const document = utils.createDocument();
|
|
17
7
|
const input = generateMock(AddSpaceInputSchema());
|
|
18
|
-
const updatedDocument = reducer(document,
|
|
8
|
+
const updatedDocument = reducer(document, addSpace(input));
|
|
9
|
+
expect(isBuilderTeamDocument(updatedDocument)).toBe(true);
|
|
19
10
|
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
20
11
|
expect(updatedDocument.operations.global[0].action.type).toBe("ADD_SPACE");
|
|
21
12
|
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
22
13
|
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
23
14
|
});
|
|
24
15
|
it("should handle updateSpaceInfo operation", () => {
|
|
16
|
+
const document = utils.createDocument();
|
|
25
17
|
const input = generateMock(UpdateSpaceInfoInputSchema());
|
|
26
|
-
const updatedDocument = reducer(document,
|
|
18
|
+
const updatedDocument = reducer(document, updateSpaceInfo(input));
|
|
19
|
+
expect(isBuilderTeamDocument(updatedDocument)).toBe(true);
|
|
27
20
|
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
28
21
|
expect(updatedDocument.operations.global[0].action.type).toBe("UPDATE_SPACE_INFO");
|
|
29
22
|
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
30
23
|
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
31
24
|
});
|
|
32
25
|
it("should handle removeSpace operation", () => {
|
|
26
|
+
const document = utils.createDocument();
|
|
33
27
|
const input = generateMock(RemoveSpaceInputSchema());
|
|
34
|
-
const updatedDocument = reducer(document,
|
|
28
|
+
const updatedDocument = reducer(document, removeSpace(input));
|
|
29
|
+
expect(isBuilderTeamDocument(updatedDocument)).toBe(true);
|
|
35
30
|
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
36
31
|
expect(updatedDocument.operations.global[0].action.type).toBe("REMOVE_SPACE");
|
|
37
32
|
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
38
33
|
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
39
34
|
});
|
|
35
|
+
it("should handle reorderSpaces operation", () => {
|
|
36
|
+
const document = utils.createDocument();
|
|
37
|
+
const input = generateMock(ReorderSpacesInputSchema());
|
|
38
|
+
const updatedDocument = reducer(document, reorderSpaces(input));
|
|
39
|
+
expect(isBuilderTeamDocument(updatedDocument)).toBe(true);
|
|
40
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
41
|
+
expect(updatedDocument.operations.global[0].action.type).toBe("REORDER_SPACES");
|
|
42
|
+
expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
|
|
43
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
44
|
+
});
|
|
40
45
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/vetra-builder-package",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.2.0-staging.10",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
@@ -68,14 +68,39 @@
|
|
|
68
68
|
"default": "./dist/editors/*/index.js"
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
|
+
"scripts": {
|
|
72
|
+
"lint": "eslint --config eslint.config.js --cache --cache-strategy content",
|
|
73
|
+
"lint:fix": "npm run lint -- --fix",
|
|
74
|
+
"build:tsc": "tsc",
|
|
75
|
+
"build:tsc:watch": "tsc --watch",
|
|
76
|
+
"build:css": "npx @tailwindcss/cli -i ./style.css -o ./dist/style.css",
|
|
77
|
+
"build:css:watch": "npx @tailwindcss/cli -i ./style.css -o ./dist/style.css --watch",
|
|
78
|
+
"build": "npm run tsc && npm run tailwind",
|
|
79
|
+
"test": "vitest run",
|
|
80
|
+
"test:watch": "vitest",
|
|
81
|
+
"typecheck": "tsc --noEmit",
|
|
82
|
+
"prepublishOnly": "npm run build",
|
|
83
|
+
"generate": "ph-cli generate",
|
|
84
|
+
"connect": "ph-cli connect",
|
|
85
|
+
"reactor": "ph-cli reactor",
|
|
86
|
+
"service": "ph-cli service",
|
|
87
|
+
"service-startup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-startup.sh",
|
|
88
|
+
"service-unstartup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh",
|
|
89
|
+
"tsc": "tsc",
|
|
90
|
+
"tsc:watch": "tsc --watch",
|
|
91
|
+
"tailwind": "npx @tailwindcss/cli -i ./style.css -o ./dist/style.css",
|
|
92
|
+
"check-circular-imports": "npx dpdm -T ./index.ts",
|
|
93
|
+
"vetra": "ph-cli vetra",
|
|
94
|
+
"migrate": "ph-cli migrate"
|
|
95
|
+
},
|
|
71
96
|
"dependencies": {
|
|
72
|
-
"@powerhousedao/builder-tools": "
|
|
73
|
-
"@powerhousedao/common": "
|
|
74
|
-
"@powerhousedao/connect": "
|
|
75
|
-
"@powerhousedao/design-system": "
|
|
97
|
+
"@powerhousedao/builder-tools": "staging",
|
|
98
|
+
"@powerhousedao/common": "staging",
|
|
99
|
+
"@powerhousedao/connect": "staging",
|
|
100
|
+
"@powerhousedao/design-system": "staging",
|
|
76
101
|
"@powerhousedao/document-engineering": "^1.38.0",
|
|
77
|
-
"@renown/sdk": "
|
|
78
|
-
"document-model": "
|
|
102
|
+
"@renown/sdk": "staging",
|
|
103
|
+
"document-model": "staging",
|
|
79
104
|
"graphql": "^16.10.0",
|
|
80
105
|
"graphql-request": "^7.2.0",
|
|
81
106
|
"graphql-tag": "^2.12.6",
|
|
@@ -83,7 +108,7 @@
|
|
|
83
108
|
"luxon": "^3.7.2",
|
|
84
109
|
"nanoid": "^5.1.6",
|
|
85
110
|
"uuid": "^11.1.0",
|
|
86
|
-
"zod": "
|
|
111
|
+
"zod": "4.1.13"
|
|
87
112
|
},
|
|
88
113
|
"devDependencies": {
|
|
89
114
|
"@electric-sql/pglite": "^0.2.17",
|
|
@@ -137,29 +162,5 @@
|
|
|
137
162
|
"react-dom": "^19.2.0"
|
|
138
163
|
},
|
|
139
164
|
"readme": "ERROR: No README data found!",
|
|
140
|
-
"_id": "@powerhousedao/vetra-builder-package@5.0.1-staging"
|
|
141
|
-
|
|
142
|
-
"lint": "eslint --config eslint.config.js --cache --cache-strategy content",
|
|
143
|
-
"lint:fix": "npm run lint -- --fix",
|
|
144
|
-
"build:tsc": "tsc",
|
|
145
|
-
"build:tsc:watch": "tsc --watch",
|
|
146
|
-
"build:css": "npx @tailwindcss/cli -i ./style.css -o ./dist/style.css",
|
|
147
|
-
"build:css:watch": "npx @tailwindcss/cli -i ./style.css -o ./dist/style.css --watch",
|
|
148
|
-
"build": "npm run tsc && npm run tailwind",
|
|
149
|
-
"test": "vitest run",
|
|
150
|
-
"test:watch": "vitest",
|
|
151
|
-
"typecheck": "tsc --noEmit",
|
|
152
|
-
"generate": "ph-cli generate",
|
|
153
|
-
"connect": "ph-cli connect",
|
|
154
|
-
"reactor": "ph-cli reactor",
|
|
155
|
-
"service": "ph-cli service",
|
|
156
|
-
"service-startup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-startup.sh",
|
|
157
|
-
"service-unstartup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh",
|
|
158
|
-
"tsc": "tsc",
|
|
159
|
-
"tsc:watch": "tsc --watch",
|
|
160
|
-
"tailwind": "npx @tailwindcss/cli -i ./style.css -o ./dist/style.css",
|
|
161
|
-
"check-circular-imports": "npx dpdm -T ./index.ts",
|
|
162
|
-
"vetra": "ph-cli vetra",
|
|
163
|
-
"migrate": "ph-cli migrate"
|
|
164
|
-
}
|
|
165
|
-
}
|
|
165
|
+
"_id": "@powerhousedao/vetra-builder-package@5.0.1-staging"
|
|
166
|
+
}
|