@powerhousedao/renown-package 0.0.0
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/LICENSE +661 -0
- package/README.md +179 -0
- package/dist/document-models/index.d.ts +2 -0
- package/dist/document-models/index.js +1 -0
- package/dist/document-models/renown-user/gen/actions.d.ts +3 -0
- package/dist/document-models/renown-user/gen/actions.js +1 -0
- package/dist/document-models/renown-user/gen/creators.d.ts +1 -0
- package/dist/document-models/renown-user/gen/creators.js +1 -0
- package/dist/document-models/renown-user/gen/document-model.d.ts +2 -0
- package/dist/document-models/renown-user/gen/document-model.js +70 -0
- package/dist/document-models/renown-user/gen/index.d.ts +7 -0
- package/dist/document-models/renown-user/gen/index.js +6 -0
- package/dist/document-models/renown-user/gen/object.d.ts +14 -0
- package/dist/document-models/renown-user/gen/object.js +25 -0
- package/dist/document-models/renown-user/gen/ph-factories.d.ts +26 -0
- package/dist/document-models/renown-user/gen/ph-factories.js +52 -0
- package/dist/document-models/renown-user/gen/profile/actions.d.ts +15 -0
- package/dist/document-models/renown-user/gen/profile/actions.js +1 -0
- package/dist/document-models/renown-user/gen/profile/creators.d.ts +5 -0
- package/dist/document-models/renown-user/gen/profile/creators.js +5 -0
- package/dist/document-models/renown-user/gen/profile/error.d.ts +1 -0
- package/dist/document-models/renown-user/gen/profile/error.js +1 -0
- package/dist/document-models/renown-user/gen/profile/object.d.ts +8 -0
- package/dist/document-models/renown-user/gen/profile/object.js +13 -0
- package/dist/document-models/renown-user/gen/profile/operations.d.ts +8 -0
- package/dist/document-models/renown-user/gen/profile/operations.js +1 -0
- package/dist/document-models/renown-user/gen/reducer.d.ts +4 -0
- package/dist/document-models/renown-user/gen/reducer.js +28 -0
- package/dist/document-models/renown-user/gen/schema/index.d.ts +2 -0
- package/dist/document-models/renown-user/gen/schema/index.js +2 -0
- package/dist/document-models/renown-user/gen/schema/types.d.ts +154 -0
- package/dist/document-models/renown-user/gen/schema/types.js +1 -0
- package/dist/document-models/renown-user/gen/schema/zod.d.ts +13 -0
- package/dist/document-models/renown-user/gen/schema/zod.js +37 -0
- package/dist/document-models/renown-user/gen/types.d.ts +9 -0
- package/dist/document-models/renown-user/gen/types.js +1 -0
- package/dist/document-models/renown-user/gen/utils.d.ts +21 -0
- package/dist/document-models/renown-user/gen/utils.js +44 -0
- package/dist/document-models/renown-user/index.d.ts +26 -0
- package/dist/document-models/renown-user/index.js +21 -0
- package/dist/document-models/renown-user/src/reducers/profile.d.ts +2 -0
- package/dist/document-models/renown-user/src/reducers/profile.js +11 -0
- package/dist/document-models/renown-user/src/tests/document-model.test.d.ts +5 -0
- package/dist/document-models/renown-user/src/tests/document-model.test.js +18 -0
- package/dist/document-models/renown-user/src/tests/profile.test.d.ts +5 -0
- package/dist/document-models/renown-user/src/tests/profile.test.js +24 -0
- package/dist/document-models/renown-user/src/utils.d.ts +1 -0
- package/dist/document-models/renown-user/src/utils.js +1 -0
- package/dist/editors/hooks/useRenownUserDocument.d.ts +3 -0
- package/dist/editors/hooks/useRenownUserDocument.js +8 -0
- package/dist/editors/index.d.ts +2 -0
- package/dist/editors/index.js +1 -0
- package/dist/editors/renown-user-editor/editor.d.ts +3 -0
- package/dist/editors/renown-user-editor/editor.js +33 -0
- package/dist/editors/renown-user-editor/index.d.ts +2 -0
- package/dist/editors/renown-user-editor/index.js +11 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +6 -0
- package/dist/powerhouse.manifest.json +33 -0
- package/dist/processors/factory.d.ts +7 -0
- package/dist/processors/factory.js +22 -0
- package/dist/processors/index.d.ts +4 -0
- package/dist/processors/index.js +3 -0
- package/dist/processors/renown-user/factory.d.ts +3 -0
- package/dist/processors/renown-user/factory.js +22 -0
- package/dist/processors/renown-user/index.d.ts +9 -0
- package/dist/processors/renown-user/index.js +81 -0
- package/dist/processors/renown-user/migrations.d.ts +3 -0
- package/dist/processors/renown-user/migrations.js +36 -0
- package/dist/processors/renown-user/schema.d.ts +14 -0
- package/dist/processors/renown-user/schema.js +1 -0
- package/dist/style.css +17667 -0
- package/dist/subgraphs/index.d.ts +3 -0
- package/dist/subgraphs/index.js +2 -0
- package/dist/subgraphs/renown-read-model/index.d.ts +10 -0
- package/dist/subgraphs/renown-read-model/index.js +11 -0
- package/dist/subgraphs/renown-read-model/resolvers.d.ts +2 -0
- package/dist/subgraphs/renown-read-model/resolvers.js +106 -0
- package/dist/subgraphs/renown-read-model/schema.d.ts +2 -0
- package/dist/subgraphs/renown-read-model/schema.js +35 -0
- package/dist/subgraphs/renown-user/index.d.ts +10 -0
- package/dist/subgraphs/renown-user/index.js +11 -0
- package/dist/subgraphs/renown-user/resolvers.d.ts +2 -0
- package/dist/subgraphs/renown-user/resolvers.js +108 -0
- package/dist/subgraphs/renown-user/schema.d.ts +2 -0
- package/dist/subgraphs/renown-user/schema.js +63 -0
- package/dist/vitest.config.d.ts +2 -0
- package/dist/vitest.config.js +8 -0
- package/package.json +103 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Subgraph } from "@powerhousedao/reactor-api";
|
|
2
|
+
import type { DocumentNode } from "graphql";
|
|
3
|
+
export declare class RenownReadModelSubgraph extends Subgraph {
|
|
4
|
+
name: string;
|
|
5
|
+
typeDefs: DocumentNode;
|
|
6
|
+
resolvers: Record<string, unknown>;
|
|
7
|
+
additionalContextFields: {};
|
|
8
|
+
onSetup(): Promise<void>;
|
|
9
|
+
onDisconnect(): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Subgraph } from "@powerhousedao/reactor-api";
|
|
2
|
+
import { schema } from "./schema.js";
|
|
3
|
+
import { getResolvers } from "./resolvers.js";
|
|
4
|
+
export class RenownReadModelSubgraph extends Subgraph {
|
|
5
|
+
name = "renown-read-model";
|
|
6
|
+
typeDefs = schema;
|
|
7
|
+
resolvers = getResolvers(this);
|
|
8
|
+
additionalContextFields = {};
|
|
9
|
+
async onSetup() { }
|
|
10
|
+
async onDisconnect() { }
|
|
11
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { RenownUserProcessor } from "../../processors/renown-user/index.js";
|
|
2
|
+
const mapToProfile = (user) => ({
|
|
3
|
+
documentId: user.document_id,
|
|
4
|
+
username: user.username,
|
|
5
|
+
ethAddress: user.eth_address,
|
|
6
|
+
userImage: user.user_image,
|
|
7
|
+
createdAt: user.created_at,
|
|
8
|
+
updatedAt: user.updated_at,
|
|
9
|
+
});
|
|
10
|
+
export const getResolvers = (subgraph) => {
|
|
11
|
+
const db = subgraph.relationalDb;
|
|
12
|
+
return {
|
|
13
|
+
Query: {
|
|
14
|
+
getProfile: async (parent, args) => {
|
|
15
|
+
const { driveId, id, username, ethAddress, searchInput } = args.input;
|
|
16
|
+
let query = RenownUserProcessor.query(driveId, db).selectFrom("renown_user");
|
|
17
|
+
// Priority: id > username > ethAddress > searchInput
|
|
18
|
+
if (id) {
|
|
19
|
+
query = query.where("renown_user.document_id", "=", id);
|
|
20
|
+
}
|
|
21
|
+
else if (username) {
|
|
22
|
+
query = query.where("renown_user.username", "=", username);
|
|
23
|
+
}
|
|
24
|
+
else if (ethAddress) {
|
|
25
|
+
query = query.where("renown_user.eth_address", "=", ethAddress);
|
|
26
|
+
}
|
|
27
|
+
else if (searchInput) {
|
|
28
|
+
// Search across username and eth_address
|
|
29
|
+
query = query.where((eb) => eb.or([
|
|
30
|
+
eb("renown_user.username", "like", `%${searchInput}%`),
|
|
31
|
+
eb("renown_user.eth_address", "like", `%${searchInput}%`),
|
|
32
|
+
]));
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
throw new Error("At least one of id, username, ethAddress, or searchInput must be provided");
|
|
36
|
+
}
|
|
37
|
+
const result = await query.selectAll().executeTakeFirst();
|
|
38
|
+
return result ? mapToProfile(result) : null;
|
|
39
|
+
},
|
|
40
|
+
getProfiles: async (parent, args) => {
|
|
41
|
+
const { driveId, ids, usernames, ethAddresses, searchString } = args.input;
|
|
42
|
+
let query = RenownUserProcessor.query(driveId, db).selectFrom("renown_user");
|
|
43
|
+
// Build OR conditions based on provided inputs
|
|
44
|
+
if (ids && ids.length > 0) {
|
|
45
|
+
query = query.where((eb) => eb.or([
|
|
46
|
+
eb("renown_user.document_id", "in", ids),
|
|
47
|
+
...(usernames && usernames.length > 0
|
|
48
|
+
? [eb("renown_user.username", "in", usernames)]
|
|
49
|
+
: []),
|
|
50
|
+
...(ethAddresses && ethAddresses.length > 0
|
|
51
|
+
? [eb("renown_user.eth_address", "in", ethAddresses)]
|
|
52
|
+
: []),
|
|
53
|
+
...(searchString
|
|
54
|
+
? [
|
|
55
|
+
eb.or([
|
|
56
|
+
eb("renown_user.username", "like", `%${searchString}%`),
|
|
57
|
+
eb("renown_user.eth_address", "like", `%${searchString}%`),
|
|
58
|
+
]),
|
|
59
|
+
]
|
|
60
|
+
: []),
|
|
61
|
+
]));
|
|
62
|
+
}
|
|
63
|
+
else if (usernames && usernames.length > 0) {
|
|
64
|
+
query = query.where((eb) => eb.or([
|
|
65
|
+
eb("renown_user.username", "in", usernames),
|
|
66
|
+
...(ethAddresses && ethAddresses.length > 0
|
|
67
|
+
? [eb("renown_user.eth_address", "in", ethAddresses)]
|
|
68
|
+
: []),
|
|
69
|
+
...(searchString
|
|
70
|
+
? [
|
|
71
|
+
eb.or([
|
|
72
|
+
eb("renown_user.username", "like", `%${searchString}%`),
|
|
73
|
+
eb("renown_user.eth_address", "like", `%${searchString}%`),
|
|
74
|
+
]),
|
|
75
|
+
]
|
|
76
|
+
: []),
|
|
77
|
+
]));
|
|
78
|
+
}
|
|
79
|
+
else if (ethAddresses && ethAddresses.length > 0) {
|
|
80
|
+
query = query.where((eb) => eb.or([
|
|
81
|
+
eb("renown_user.eth_address", "in", ethAddresses),
|
|
82
|
+
...(searchString
|
|
83
|
+
? [
|
|
84
|
+
eb.or([
|
|
85
|
+
eb("renown_user.username", "like", `%${searchString}%`),
|
|
86
|
+
eb("renown_user.eth_address", "like", `%${searchString}%`),
|
|
87
|
+
]),
|
|
88
|
+
]
|
|
89
|
+
: []),
|
|
90
|
+
]));
|
|
91
|
+
}
|
|
92
|
+
else if (searchString) {
|
|
93
|
+
query = query.where((eb) => eb.or([
|
|
94
|
+
eb("renown_user.username", "like", `%${searchString}%`),
|
|
95
|
+
eb("renown_user.eth_address", "like", `%${searchString}%`),
|
|
96
|
+
]));
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
throw new Error("At least one of ids, usernames, ethAddresses, or searchString must be provided");
|
|
100
|
+
}
|
|
101
|
+
const results = await query.selectAll().execute();
|
|
102
|
+
return results.map(mapToProfile);
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { gql } from "graphql-tag";
|
|
2
|
+
export const schema = gql `
|
|
3
|
+
"""
|
|
4
|
+
Subgraph definition for Renown Read Model
|
|
5
|
+
"""
|
|
6
|
+
type RenownProfile {
|
|
7
|
+
documentId: String!
|
|
8
|
+
username: String
|
|
9
|
+
ethAddress: String
|
|
10
|
+
userImage: String
|
|
11
|
+
createdAt: String
|
|
12
|
+
updatedAt: String
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
input GetProfileInput {
|
|
16
|
+
driveId: String!
|
|
17
|
+
id: String
|
|
18
|
+
username: String
|
|
19
|
+
ethAddress: String
|
|
20
|
+
searchInput: String
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
input GetProfilesInput {
|
|
24
|
+
driveId: String!
|
|
25
|
+
ids: [String!]
|
|
26
|
+
usernames: [String!]
|
|
27
|
+
ethAddresses: [String!]
|
|
28
|
+
searchString: String
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
type Query {
|
|
32
|
+
getProfile(input: GetProfileInput!): RenownProfile
|
|
33
|
+
getProfiles(input: GetProfilesInput!): [RenownProfile!]!
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Subgraph } from "@powerhousedao/reactor-api";
|
|
2
|
+
import type { DocumentNode } from "graphql";
|
|
3
|
+
export declare class RenownUserSubgraph extends Subgraph {
|
|
4
|
+
name: string;
|
|
5
|
+
typeDefs: DocumentNode;
|
|
6
|
+
resolvers: Record<string, unknown>;
|
|
7
|
+
additionalContextFields: {};
|
|
8
|
+
onSetup(): Promise<void>;
|
|
9
|
+
onDisconnect(): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Subgraph } from "@powerhousedao/reactor-api";
|
|
2
|
+
import { schema } from "./schema.js";
|
|
3
|
+
import { getResolvers } from "./resolvers.js";
|
|
4
|
+
export class RenownUserSubgraph extends Subgraph {
|
|
5
|
+
name = "renown-user";
|
|
6
|
+
typeDefs = schema;
|
|
7
|
+
resolvers = getResolvers(this);
|
|
8
|
+
additionalContextFields = {};
|
|
9
|
+
async onSetup() { }
|
|
10
|
+
async onDisconnect() { }
|
|
11
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { addFile } from "document-drive";
|
|
2
|
+
import { actions, } from "../../document-models/renown-user/index.js";
|
|
3
|
+
import { setName } from "document-model";
|
|
4
|
+
export const getResolvers = (subgraph) => {
|
|
5
|
+
const reactor = subgraph.reactor;
|
|
6
|
+
return {
|
|
7
|
+
Query: {
|
|
8
|
+
RenownUser: async () => {
|
|
9
|
+
return {
|
|
10
|
+
getDocument: async (args) => {
|
|
11
|
+
const { docId, driveId } = args;
|
|
12
|
+
if (!docId) {
|
|
13
|
+
throw new Error("Document id is required");
|
|
14
|
+
}
|
|
15
|
+
if (driveId) {
|
|
16
|
+
const docIds = await reactor.getDocuments(driveId);
|
|
17
|
+
if (!docIds.includes(docId)) {
|
|
18
|
+
throw new Error(`Document with id ${docId} is not part of ${driveId}`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const doc = await reactor.getDocument(docId);
|
|
22
|
+
return {
|
|
23
|
+
driveId: driveId,
|
|
24
|
+
...doc,
|
|
25
|
+
...doc.header,
|
|
26
|
+
created: doc.header.createdAtUtcIso,
|
|
27
|
+
lastModified: doc.header.lastModifiedAtUtcIso,
|
|
28
|
+
state: doc.state.global,
|
|
29
|
+
stateJSON: doc.state.global,
|
|
30
|
+
revision: doc.header?.revision?.global ?? 0,
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
getDocuments: async (args) => {
|
|
34
|
+
const { driveId } = args;
|
|
35
|
+
const docsIds = await reactor.getDocuments(driveId);
|
|
36
|
+
const docs = await Promise.all(docsIds.map(async (docId) => {
|
|
37
|
+
const doc = await reactor.getDocument(docId);
|
|
38
|
+
return {
|
|
39
|
+
driveId: driveId,
|
|
40
|
+
...doc,
|
|
41
|
+
...doc.header,
|
|
42
|
+
created: doc.header.createdAtUtcIso,
|
|
43
|
+
lastModified: doc.header.lastModifiedAtUtcIso,
|
|
44
|
+
state: doc.state.global,
|
|
45
|
+
stateJSON: doc.state.global,
|
|
46
|
+
revision: doc.header?.revision?.global ?? 0,
|
|
47
|
+
};
|
|
48
|
+
}));
|
|
49
|
+
return docs.filter((doc) => doc.header.documentType === "powerhouse/renown-user");
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
Mutation: {
|
|
55
|
+
RenownUser_createDocument: async (_, args) => {
|
|
56
|
+
const { driveId, name } = args;
|
|
57
|
+
const document = await reactor.addDocument("powerhouse/renown-user");
|
|
58
|
+
if (driveId) {
|
|
59
|
+
await reactor.addAction(driveId, addFile({
|
|
60
|
+
name,
|
|
61
|
+
id: document.header.id,
|
|
62
|
+
documentType: "powerhouse/renown-user",
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
if (name) {
|
|
66
|
+
await reactor.addAction(document.header.id, setName(name));
|
|
67
|
+
}
|
|
68
|
+
return document.header.id;
|
|
69
|
+
},
|
|
70
|
+
RenownUser_setUsername: async (_, args) => {
|
|
71
|
+
const { docId, input } = args;
|
|
72
|
+
const doc = await reactor.getDocument(docId);
|
|
73
|
+
if (!doc) {
|
|
74
|
+
throw new Error("Document not found");
|
|
75
|
+
}
|
|
76
|
+
const result = await reactor.addAction(docId, actions.setUsername(input));
|
|
77
|
+
if (result.status !== "SUCCESS") {
|
|
78
|
+
throw new Error(result.error?.message ?? "Failed to setUsername");
|
|
79
|
+
}
|
|
80
|
+
return true;
|
|
81
|
+
},
|
|
82
|
+
RenownUser_setEthAddress: async (_, args) => {
|
|
83
|
+
const { docId, input } = args;
|
|
84
|
+
const doc = await reactor.getDocument(docId);
|
|
85
|
+
if (!doc) {
|
|
86
|
+
throw new Error("Document not found");
|
|
87
|
+
}
|
|
88
|
+
const result = await reactor.addAction(docId, actions.setEthAddress(input));
|
|
89
|
+
if (result.status !== "SUCCESS") {
|
|
90
|
+
throw new Error(result.error?.message ?? "Failed to setEthAddress");
|
|
91
|
+
}
|
|
92
|
+
return true;
|
|
93
|
+
},
|
|
94
|
+
RenownUser_setUserImage: async (_, args) => {
|
|
95
|
+
const { docId, input } = args;
|
|
96
|
+
const doc = await reactor.getDocument(docId);
|
|
97
|
+
if (!doc) {
|
|
98
|
+
throw new Error("Document not found");
|
|
99
|
+
}
|
|
100
|
+
const result = await reactor.addAction(docId, actions.setUserImage(input));
|
|
101
|
+
if (result.status !== "SUCCESS") {
|
|
102
|
+
throw new Error(result.error?.message ?? "Failed to setUserImage");
|
|
103
|
+
}
|
|
104
|
+
return true;
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { gql } from "graphql-tag";
|
|
2
|
+
export const schema = gql `
|
|
3
|
+
"""
|
|
4
|
+
Subgraph definition for RenownUser (powerhouse/renown-user)
|
|
5
|
+
"""
|
|
6
|
+
type RenownUserState {
|
|
7
|
+
"Add your global state fields here"
|
|
8
|
+
username: String
|
|
9
|
+
ethAddress: EthereumAddress
|
|
10
|
+
userImage: String
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
"""
|
|
14
|
+
Queries: RenownUser
|
|
15
|
+
"""
|
|
16
|
+
type RenownUserQueries {
|
|
17
|
+
getDocument(docId: PHID!, driveId: PHID): RenownUser
|
|
18
|
+
getDocuments(driveId: String!): [RenownUser!]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
type Query {
|
|
22
|
+
RenownUser: RenownUserQueries
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
"""
|
|
26
|
+
Mutations: RenownUser
|
|
27
|
+
"""
|
|
28
|
+
type Mutation {
|
|
29
|
+
RenownUser_createDocument(name: String!, driveId: String): String
|
|
30
|
+
|
|
31
|
+
RenownUser_setUsername(
|
|
32
|
+
driveId: String
|
|
33
|
+
docId: PHID
|
|
34
|
+
input: RenownUser_SetUsernameInput
|
|
35
|
+
): Int
|
|
36
|
+
RenownUser_setEthAddress(
|
|
37
|
+
driveId: String
|
|
38
|
+
docId: PHID
|
|
39
|
+
input: RenownUser_SetEthAddressInput
|
|
40
|
+
): Int
|
|
41
|
+
RenownUser_setUserImage(
|
|
42
|
+
driveId: String
|
|
43
|
+
docId: PHID
|
|
44
|
+
input: RenownUser_SetUserImageInput
|
|
45
|
+
): Int
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
"""
|
|
49
|
+
Module: Profile
|
|
50
|
+
"""
|
|
51
|
+
input RenownUser_SetUsernameInput {
|
|
52
|
+
"Add your inputs here"
|
|
53
|
+
username: String!
|
|
54
|
+
}
|
|
55
|
+
input RenownUser_SetEthAddressInput {
|
|
56
|
+
"Add your inputs here"
|
|
57
|
+
ethAddress: EthereumAddress!
|
|
58
|
+
}
|
|
59
|
+
input RenownUser_SetUserImageInput {
|
|
60
|
+
"Add your inputs here"
|
|
61
|
+
userImage: String!
|
|
62
|
+
}
|
|
63
|
+
`;
|
package/package.json
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@powerhousedao/renown-package",
|
|
3
|
+
"description": "",
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"license": "AGPL-3.0-only",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"files": [
|
|
8
|
+
"/dist"
|
|
9
|
+
],
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./document-models": {
|
|
16
|
+
"types": "./dist/document-models/index.d.ts",
|
|
17
|
+
"default": "./dist/document-models/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./editors": {
|
|
20
|
+
"types": "./dist/editors/index.d.ts",
|
|
21
|
+
"default": "./dist/editors/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./subgraphs": {
|
|
24
|
+
"types": "./dist/subgraphs/index.d.ts",
|
|
25
|
+
"default": "./dist/subgraphs/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./processors": {
|
|
28
|
+
"types": "./dist/processors/index.d.ts",
|
|
29
|
+
"default": "./dist/processors/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./manifest": {
|
|
32
|
+
"types": "./dist/manifest.d.ts",
|
|
33
|
+
"default": "./dist/manifest.js"
|
|
34
|
+
},
|
|
35
|
+
"./style.css": "./dist/style.css"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@powerhousedao/builder-tools": "staging",
|
|
39
|
+
"@powerhousedao/common": "staging",
|
|
40
|
+
"@powerhousedao/design-system": "staging",
|
|
41
|
+
"@powerhousedao/document-engineering": "^1.37.0",
|
|
42
|
+
"@powerhousedao/vetra": "staging",
|
|
43
|
+
"document-model": "staging",
|
|
44
|
+
"graphql": "^16.10.0",
|
|
45
|
+
"graphql-tag": "^2.12.6",
|
|
46
|
+
"kysely": "^0.28.7",
|
|
47
|
+
"uuid": "^11.1.0",
|
|
48
|
+
"zod": "^3.24.2"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@electric-sql/pglite": "^0.2.12",
|
|
52
|
+
"@eslint/js": "^9.22.0",
|
|
53
|
+
"@powerhousedao/analytics-engine-core": "^0.5.0",
|
|
54
|
+
"@powerhousedao/codegen": "staging",
|
|
55
|
+
"@powerhousedao/ph-cli": "staging",
|
|
56
|
+
"@powerhousedao/reactor-api": "staging",
|
|
57
|
+
"@powerhousedao/reactor-browser": "staging",
|
|
58
|
+
"@powerhousedao/reactor-local": "staging",
|
|
59
|
+
"@powerhousedao/scalars": "2.0.1",
|
|
60
|
+
"@powerhousedao/switchboard": "staging",
|
|
61
|
+
"@tailwindcss/cli": "^4.0.15",
|
|
62
|
+
"@testing-library/react": "^16.3.0",
|
|
63
|
+
"@types/node": "^22.13.11",
|
|
64
|
+
"@types/react": "^18.3.19",
|
|
65
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
66
|
+
"document-drive": "staging",
|
|
67
|
+
"eslint": "^9.22.0",
|
|
68
|
+
"eslint-plugin-react": "^7.37.4",
|
|
69
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
70
|
+
"globals": "^16.0.0",
|
|
71
|
+
"package-manager-detector": "^0.2.8",
|
|
72
|
+
"pm2": "^5.4.3",
|
|
73
|
+
"react": "^18.3.1",
|
|
74
|
+
"react-dom": "^18.3.1",
|
|
75
|
+
"tailwindcss": "^4.1.4",
|
|
76
|
+
"typescript": "^5.8.3",
|
|
77
|
+
"typescript-eslint": "^8.30.1",
|
|
78
|
+
"vite": "^6.2.3",
|
|
79
|
+
"vitest": "^3.0.9"
|
|
80
|
+
},
|
|
81
|
+
"peerDependencies": {
|
|
82
|
+
"react": "^18.3.1",
|
|
83
|
+
"react-dom": "^18.3.1"
|
|
84
|
+
},
|
|
85
|
+
"scripts": {
|
|
86
|
+
"lint": "eslint .",
|
|
87
|
+
"lint:fix": "eslint . --fix",
|
|
88
|
+
"build:tsc": "tsc",
|
|
89
|
+
"build:tsc:watch": "tsc --watch",
|
|
90
|
+
"build:css": "npx @tailwindcss/cli -i ./style.css -o ./dist/style.css",
|
|
91
|
+
"build:css:watch": "npx @tailwindcss/cli -i ./style.css -o ./dist/style.css --watch",
|
|
92
|
+
"build": "npm run build:tsc && npm run build:css",
|
|
93
|
+
"test": "vitest run",
|
|
94
|
+
"test:watch": "vitest",
|
|
95
|
+
"typecheck": "tsc --noEmit",
|
|
96
|
+
"generate": "ph-cli generate",
|
|
97
|
+
"connect": "ph-cli connect",
|
|
98
|
+
"reactor": "ph-cli reactor",
|
|
99
|
+
"service": "ph-cli service",
|
|
100
|
+
"service-startup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-startup.sh",
|
|
101
|
+
"service-unstartup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh"
|
|
102
|
+
}
|
|
103
|
+
}
|