@powerhousedao/vetra-builder-package 5.0.2-alpha → 5.1.0-staging

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 (153) hide show
  1. package/dist/document-models/builder-team/actions.d.ts +28 -0
  2. package/dist/document-models/builder-team/actions.d.ts.map +1 -0
  3. package/dist/document-models/builder-team/actions.js +10 -0
  4. package/dist/document-models/builder-team/builder-team.json +234 -0
  5. package/dist/document-models/builder-team/gen/actions.d.ts +8 -8
  6. package/dist/document-models/builder-team/gen/actions.d.ts.map +1 -1
  7. package/dist/document-models/builder-team/gen/actions.js +4 -4
  8. package/dist/document-models/builder-team/gen/creators.d.ts +8 -4
  9. package/dist/document-models/builder-team/gen/creators.d.ts.map +1 -1
  10. package/dist/document-models/builder-team/gen/creators.js +8 -4
  11. package/dist/document-models/builder-team/gen/document-model.d.ts.map +1 -1
  12. package/dist/document-models/builder-team/gen/document-model.js +220 -220
  13. package/dist/document-models/builder-team/gen/document-schema.d.ts +180 -0
  14. package/dist/document-models/builder-team/gen/document-schema.d.ts.map +1 -0
  15. package/dist/document-models/builder-team/gen/document-schema.js +33 -0
  16. package/dist/document-models/builder-team/gen/document-type.d.ts +2 -0
  17. package/dist/document-models/builder-team/gen/document-type.d.ts.map +1 -0
  18. package/dist/document-models/builder-team/gen/document-type.js +1 -0
  19. package/dist/document-models/builder-team/gen/index.d.ts +14 -5
  20. package/dist/document-models/builder-team/gen/index.d.ts.map +1 -1
  21. package/dist/document-models/builder-team/gen/index.js +14 -5
  22. package/dist/document-models/builder-team/gen/member/actions.d.ts +5 -5
  23. package/dist/document-models/builder-team/gen/member/actions.d.ts.map +1 -1
  24. package/dist/document-models/builder-team/gen/member/actions.js +1 -1
  25. package/dist/document-models/builder-team/gen/member/creators.d.ts +2 -2
  26. package/dist/document-models/builder-team/gen/member/creators.d.ts.map +1 -1
  27. package/dist/document-models/builder-team/gen/member/creators.js +5 -6
  28. package/dist/document-models/builder-team/gen/member/error.d.ts.map +1 -1
  29. package/dist/document-models/builder-team/gen/member/operations.d.ts +3 -3
  30. package/dist/document-models/builder-team/gen/member/operations.d.ts.map +1 -1
  31. package/dist/document-models/builder-team/gen/member/operations.js +3 -3
  32. package/dist/document-models/builder-team/gen/packages/actions.d.ts +6 -6
  33. package/dist/document-models/builder-team/gen/packages/actions.d.ts.map +1 -1
  34. package/dist/document-models/builder-team/gen/packages/actions.js +1 -1
  35. package/dist/document-models/builder-team/gen/packages/creators.d.ts +2 -2
  36. package/dist/document-models/builder-team/gen/packages/creators.d.ts.map +1 -1
  37. package/dist/document-models/builder-team/gen/packages/creators.js +6 -7
  38. package/dist/document-models/builder-team/gen/packages/error.d.ts.map +1 -1
  39. package/dist/document-models/builder-team/gen/packages/operations.d.ts +3 -3
  40. package/dist/document-models/builder-team/gen/packages/operations.d.ts.map +1 -1
  41. package/dist/document-models/builder-team/gen/packages/operations.js +3 -3
  42. package/dist/document-models/builder-team/gen/ph-factories.d.ts.map +1 -1
  43. package/dist/document-models/builder-team/gen/ph-factories.js +16 -14
  44. package/dist/document-models/builder-team/gen/profile/actions.d.ts +7 -7
  45. package/dist/document-models/builder-team/gen/profile/actions.d.ts.map +1 -1
  46. package/dist/document-models/builder-team/gen/profile/actions.js +1 -1
  47. package/dist/document-models/builder-team/gen/profile/creators.d.ts +2 -2
  48. package/dist/document-models/builder-team/gen/profile/creators.d.ts.map +1 -1
  49. package/dist/document-models/builder-team/gen/profile/creators.js +7 -8
  50. package/dist/document-models/builder-team/gen/profile/error.d.ts.map +1 -1
  51. package/dist/document-models/builder-team/gen/profile/operations.d.ts +3 -3
  52. package/dist/document-models/builder-team/gen/profile/operations.d.ts.map +1 -1
  53. package/dist/document-models/builder-team/gen/profile/operations.js +3 -3
  54. package/dist/document-models/builder-team/gen/reducer.d.ts +1 -3
  55. package/dist/document-models/builder-team/gen/reducer.d.ts.map +1 -1
  56. package/dist/document-models/builder-team/gen/reducer.js +38 -38
  57. package/dist/document-models/builder-team/gen/schema/index.d.ts +1 -1
  58. package/dist/document-models/builder-team/gen/schema/index.d.ts.map +1 -1
  59. package/dist/document-models/builder-team/gen/schema/index.js +1 -1
  60. package/dist/document-models/builder-team/gen/spaces/actions.d.ts +6 -6
  61. package/dist/document-models/builder-team/gen/spaces/actions.d.ts.map +1 -1
  62. package/dist/document-models/builder-team/gen/spaces/actions.js +1 -1
  63. package/dist/document-models/builder-team/gen/spaces/creators.d.ts +2 -2
  64. package/dist/document-models/builder-team/gen/spaces/creators.d.ts.map +1 -1
  65. package/dist/document-models/builder-team/gen/spaces/creators.js +6 -7
  66. package/dist/document-models/builder-team/gen/spaces/error.d.ts.map +1 -1
  67. package/dist/document-models/builder-team/gen/spaces/operations.d.ts +3 -3
  68. package/dist/document-models/builder-team/gen/spaces/operations.d.ts.map +1 -1
  69. package/dist/document-models/builder-team/gen/spaces/operations.js +3 -3
  70. package/dist/document-models/builder-team/gen/types.d.ts +4 -5
  71. package/dist/document-models/builder-team/gen/types.d.ts.map +1 -1
  72. package/dist/document-models/builder-team/gen/types.js +1 -2
  73. package/dist/document-models/builder-team/gen/utils.d.ts +7 -4
  74. package/dist/document-models/builder-team/gen/utils.d.ts.map +1 -1
  75. package/dist/document-models/builder-team/gen/utils.js +41 -20
  76. package/dist/document-models/builder-team/hooks.d.ts +11 -0
  77. package/dist/document-models/builder-team/hooks.d.ts.map +1 -0
  78. package/dist/document-models/builder-team/hooks.js +26 -0
  79. package/dist/document-models/builder-team/index.d.ts +5 -41
  80. package/dist/document-models/builder-team/index.d.ts.map +1 -1
  81. package/dist/document-models/builder-team/index.js +5 -18
  82. package/dist/document-models/builder-team/module.d.ts +5 -0
  83. package/dist/document-models/builder-team/module.d.ts.map +1 -0
  84. package/dist/document-models/builder-team/module.js +10 -0
  85. package/dist/document-models/builder-team/src/index.d.ts +2 -0
  86. package/dist/document-models/builder-team/src/index.d.ts.map +1 -0
  87. package/dist/document-models/builder-team/src/index.js +1 -0
  88. package/dist/document-models/builder-team/src/reducers/member.d.ts +2 -2
  89. package/dist/document-models/builder-team/src/reducers/member.d.ts.map +1 -1
  90. package/dist/document-models/builder-team/src/reducers/member.js +4 -4
  91. package/dist/document-models/builder-team/src/reducers/packages.d.ts +2 -2
  92. package/dist/document-models/builder-team/src/reducers/packages.d.ts.map +1 -1
  93. package/dist/document-models/builder-team/src/reducers/packages.js +5 -5
  94. package/dist/document-models/builder-team/src/reducers/profile.d.ts +2 -2
  95. package/dist/document-models/builder-team/src/reducers/profile.d.ts.map +1 -1
  96. package/dist/document-models/builder-team/src/reducers/profile.js +6 -6
  97. package/dist/document-models/builder-team/src/reducers/spaces.d.ts +2 -2
  98. package/dist/document-models/builder-team/src/reducers/spaces.d.ts.map +1 -1
  99. package/dist/document-models/builder-team/src/reducers/spaces.js +5 -5
  100. package/dist/document-models/builder-team/src/tests/document-model.test.js +3 -2
  101. package/dist/document-models/builder-team/src/tests/member.test.js +5 -5
  102. package/dist/document-models/builder-team/src/tests/packages.test.js +5 -5
  103. package/dist/document-models/builder-team/src/tests/profile.test.js +7 -7
  104. package/dist/document-models/builder-team/src/tests/spaces.test.js +5 -5
  105. package/dist/document-models/builder-team/utils.d.ts +14 -0
  106. package/dist/document-models/builder-team/utils.d.ts.map +1 -0
  107. package/dist/document-models/builder-team/utils.js +7 -0
  108. package/dist/document-models/document-models.d.ts +3 -0
  109. package/dist/document-models/document-models.d.ts.map +1 -0
  110. package/dist/document-models/document-models.js +4 -0
  111. package/dist/document-models/index.d.ts +1 -2
  112. package/dist/document-models/index.d.ts.map +1 -1
  113. package/dist/document-models/index.js +1 -2
  114. package/dist/editors/builder-team-editor/components/EditName.d.ts +3 -0
  115. package/dist/editors/builder-team-editor/components/EditName.d.ts.map +1 -0
  116. package/dist/editors/builder-team-editor/components/EditName.js +31 -0
  117. package/dist/editors/builder-team-editor/components/PackagesTable.d.ts.map +1 -1
  118. package/dist/editors/builder-team-editor/components/PackagesTable.js +0 -1
  119. package/dist/editors/builder-team-editor/editor.d.ts +1 -1
  120. package/dist/editors/builder-team-editor/editor.d.ts.map +1 -1
  121. package/dist/editors/builder-team-editor/editor.js +2 -4
  122. package/dist/editors/builder-team-editor/hooks/usePackageHandlers.d.ts +1 -2
  123. package/dist/editors/builder-team-editor/hooks/usePackageHandlers.d.ts.map +1 -1
  124. package/dist/editors/builder-team-editor/hooks/usePackageHandlers.js +1 -1
  125. package/dist/editors/builder-team-editor/module.d.ts +4 -0
  126. package/dist/editors/builder-team-editor/module.d.ts.map +1 -0
  127. package/dist/editors/builder-team-editor/module.js +10 -0
  128. package/dist/editors/editors.d.ts +3 -0
  129. package/dist/editors/editors.d.ts.map +1 -0
  130. package/dist/editors/editors.js +4 -0
  131. package/dist/editors/index.d.ts +1 -2
  132. package/dist/editors/index.d.ts.map +1 -1
  133. package/dist/editors/index.js +1 -2
  134. package/dist/index.d.ts +2 -2
  135. package/dist/index.d.ts.map +1 -1
  136. package/dist/index.js +2 -4
  137. package/dist/processors/vetra-builder-relational-db-processor/builder-team-handlers.d.ts +1 -1
  138. package/dist/processors/vetra-builder-relational-db-processor/builder-team-handlers.d.ts.map +1 -1
  139. package/dist/processors/vetra-builder-relational-db-processor/builder-team-handlers.js +1 -1
  140. package/dist/scripts/add-builder-team-model.d.ts +2 -0
  141. package/dist/scripts/add-builder-team-model.d.ts.map +1 -0
  142. package/dist/scripts/add-builder-team-model.js +122 -0
  143. package/dist/scripts/create-remote-drives.d.ts +17 -0
  144. package/dist/scripts/create-remote-drives.d.ts.map +1 -0
  145. package/dist/scripts/create-remote-drives.js +946 -0
  146. package/dist/scripts/introspect-schema.d.ts +8 -0
  147. package/dist/scripts/introspect-schema.d.ts.map +1 -0
  148. package/dist/scripts/introspect-schema.js +216 -0
  149. package/dist/scripts/upload-to-drive.js +0 -2
  150. package/dist/style.css +8 -1
  151. package/dist/subgraphs/vetra-builders/resolvers.d.ts.map +1 -1
  152. package/dist/subgraphs/vetra-builders/resolvers.js +0 -1
  153. package/package.json +47 -31
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../editors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AACV,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../editors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC"}
@@ -1,2 +1 @@
1
- export {};
2
- export { module as BuilderTeamEditor } from "./builder-team-editor/index.js";
1
+ export { BuilderTeamEditor } from "./builder-team-editor/module.js";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Manifest } from "document-model";
2
+ export { documentModels } from "./document-models/document-models.js";
3
+ export { editors } from "./editors/editors.js";
2
4
  export declare const manifest: Manifest;
3
- export declare const documentModels: import("document-model").DocumentModelModule<import("./document-models/builder-team/index.js").BuilderTeamPHState>[];
4
- export declare const editors: import("document-model").EditorModule[];
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAK/C,eAAO,MAAM,QAAQ,EAAE,QAAuB,CAAC;AAC/C,eAAO,MAAM,cAAc,sHAAuC,CAAC;AACnE,eAAO,MAAM,OAAO,yCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,eAAO,MAAM,QAAQ,EAAE,QAAuB,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,4 @@
1
1
  import manifestJson from "./powerhouse.manifest.json" with { type: "json" };
2
- import * as documentModelsExports from './document-models/index.js';
3
- import * as editorsExports from './editors/index.js';
2
+ export { documentModels } from "./document-models/document-models.js";
3
+ export { editors } from "./editors/editors.js";
4
4
  export const manifest = manifestJson;
5
- export const documentModels = Object.values(documentModelsExports);
6
- export const editors = Object.values(editorsExports);
@@ -5,7 +5,7 @@ export declare class BuilderTeamHandlers {
5
5
  private db;
6
6
  private dbHelpers;
7
7
  constructor(db: IRelationalDb<DB>);
8
- handleBuilderTeamOperation(documentId: string, action: BuilderTeamAction, state: BuilderTeamState, driveId?: string): Promise<void>;
8
+ handleBuilderTeamOperation(documentId: string, action: BuilderTeamAction, state: BuilderTeamState): Promise<void>;
9
9
  private handleSetLogo;
10
10
  private handleSetProfileName;
11
11
  private handleSetSlug;
@@ -1 +1 @@
1
- {"version":3,"file":"builder-team-handlers.d.ts","sourceRoot":"","sources":["../../../processors/vetra-builder-relational-db-processor/builder-team-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAmBpD,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAGtB,MAAM,6CAA6C,CAAC;AAGrD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAMtC,qBAAa,mBAAmB;IAGlB,OAAO,CAAC,EAAE;IAFtB,OAAO,CAAC,SAAS,CAAkB;gBAEf,EAAE,EAAE,aAAa,CAAC,EAAE,CAAC;IAInC,0BAA0B,CAC9B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAE,gBAAgB,EACvB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC;YA6DF,aAAa;YAWb,oBAAoB;YAWpB,aAAa;YAWb,2BAA2B;YAW3B,mBAAmB;YAcnB,eAAe;YAmDf,kBAAkB;YAclB,sBAAsB;YA4CtB,cAAc;YA0Bd,iBAAiB;YAYjB,qBAAqB;YA4BrB,mBAAmB;YAcnB,gBAAgB;YAoDhB,uBAAuB;YA2DvB,qBAAqB;YAyBrB,mBAAmB;CAUlC"}
1
+ {"version":3,"file":"builder-team-handlers.d.ts","sourceRoot":"","sources":["../../../processors/vetra-builder-relational-db-processor/builder-team-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAmBpD,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAGtB,MAAM,6CAA6C,CAAC;AAGrD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAMtC,qBAAa,mBAAmB;IAGlB,OAAO,CAAC,EAAE;IAFtB,OAAO,CAAC,SAAS,CAAkB;gBAEf,EAAE,EAAE,aAAa,CAAC,EAAE,CAAC;IAInC,0BAA0B,CAC9B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAE,gBAAgB,GAAK,OAAO,CAAC,IAAI,CAAC;YA6D7B,aAAa;YAWb,oBAAoB;YAWpB,aAAa;YAWb,2BAA2B;YAW3B,mBAAmB;YAcnB,eAAe;YAmDf,kBAAkB;YAclB,sBAAsB;YA4CtB,cAAc;YA0Bd,iBAAiB;YAYjB,qBAAqB;YA4BrB,mBAAmB;YAcnB,gBAAgB;YAoDhB,uBAAuB;YA2DvB,qBAAqB;YAyBrB,mBAAmB;CAUlC"}
@@ -7,7 +7,7 @@ export class BuilderTeamHandlers {
7
7
  this.db = db;
8
8
  this.dbHelpers = new DatabaseHelpers(db);
9
9
  }
10
- async handleBuilderTeamOperation(documentId, action, state, driveId) {
10
+ async handleBuilderTeamOperation(documentId, action, state) {
11
11
  switch (action.type) {
12
12
  // Profile operations
13
13
  case "SET_LOGO":
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=add-builder-team-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-builder-team-model.d.ts","sourceRoot":"","sources":["../../scripts/add-builder-team-model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,122 @@
1
+ import { generateId } from 'document-model/core';
2
+ const GRAPHQL_ENDPOINT = 'http://localhost:4001/graphql';
3
+ const DRIVE_ID = 'vetra-builder-package';
4
+ async function graphqlRequest(query, variables) {
5
+ const response = await fetch(GRAPHQL_ENDPOINT, {
6
+ method: 'POST',
7
+ headers: { 'Content-Type': 'application/json' },
8
+ body: JSON.stringify({ query, variables }),
9
+ });
10
+ const result = await response.json();
11
+ if (result.errors) {
12
+ throw new Error(`GraphQL errors: ${JSON.stringify(result.errors, null, 2)}`);
13
+ }
14
+ return result.data;
15
+ }
16
+ async function createDocumentModelDocument(driveId, name, spec) {
17
+ console.log(`šŸ“„ Creating ${name} document model document...`);
18
+ // Create the document
19
+ const createMutation = `
20
+ mutation CreateDocumentModel($driveId: String, $name: String!) {
21
+ DocumentModel_createDocument(driveId: $driveId, name: $name)
22
+ }
23
+ `;
24
+ const result = await graphqlRequest(createMutation, {
25
+ driveId,
26
+ name,
27
+ });
28
+ const documentId = result.DocumentModel_createDocument;
29
+ console.log(` āœ“ Document created: ${documentId}`);
30
+ return documentId;
31
+ }
32
+ async function applyOperation(driveId, docId, operationType, input) {
33
+ const mutation = `
34
+ mutation Apply${operationType}($driveId: String, $docId: PHID, $input: DocumentModel_${operationType}Input!) {
35
+ DocumentModel_${operationType.toLowerCase()}(driveId: $driveId, docId: $docId, input: $input)
36
+ }
37
+ `;
38
+ await graphqlRequest(mutation, { driveId, docId, input });
39
+ }
40
+ async function main() {
41
+ console.log('=== Adding BuilderTeam Document Model to Remote Drive ===\n');
42
+ // Read the BuilderTeam specification
43
+ const spec = await import('../document-models/builder-team/builder-team.json', {
44
+ assert: { type: 'json' }
45
+ });
46
+ console.log('šŸ“‹ Loaded BuilderTeam specification');
47
+ console.log(` Version: ${spec.default.specifications[0].version}`);
48
+ console.log(` Modules: ${spec.default.specifications[0].modules.length}\n`);
49
+ // Create the document model document
50
+ const documentId = await createDocumentModelDocument(DRIVE_ID, spec.default.name, spec.default);
51
+ console.log('\nāš™ļø Populating document with specification...');
52
+ const specification = spec.default.specifications[0];
53
+ let operationCount = 0;
54
+ // Set basic metadata
55
+ console.log(' Setting metadata...');
56
+ await applyOperation(DRIVE_ID, documentId, 'SetModelName', { name: spec.default.name });
57
+ await applyOperation(DRIVE_ID, documentId, 'SetModelId', { id: spec.default.id });
58
+ await applyOperation(DRIVE_ID, documentId, 'SetModelExtension', { extension: spec.default.extension });
59
+ await applyOperation(DRIVE_ID, documentId, 'SetModelDescription', { description: spec.default.description });
60
+ await applyOperation(DRIVE_ID, documentId, 'SetAuthorName', { name: spec.default.author.name });
61
+ await applyOperation(DRIVE_ID, documentId, 'SetAuthorWebsite', { website: spec.default.author.website });
62
+ operationCount += 6;
63
+ // Set state schema
64
+ if (specification.state?.global?.schema) {
65
+ console.log(' Setting state schema...');
66
+ await applyOperation(DRIVE_ID, documentId, 'SetStateSchema', {
67
+ schema: specification.state.global.schema,
68
+ scope: 'global'
69
+ });
70
+ operationCount++;
71
+ }
72
+ if (specification.state?.global?.initialValue) {
73
+ await applyOperation(DRIVE_ID, documentId, 'SetInitialState', {
74
+ initialValue: specification.state.global.initialValue,
75
+ scope: 'global'
76
+ });
77
+ operationCount++;
78
+ }
79
+ // Add modules and operations
80
+ for (const module of specification.modules) {
81
+ console.log(` Adding module: ${module.name}`);
82
+ await applyOperation(DRIVE_ID, documentId, 'AddModule', {
83
+ id: module.id,
84
+ name: module.name,
85
+ description: module.description || ''
86
+ });
87
+ operationCount++;
88
+ if (module.operations) {
89
+ for (const operation of module.operations) {
90
+ await applyOperation(DRIVE_ID, documentId, 'AddOperation', {
91
+ id: operation.id,
92
+ moduleId: module.id,
93
+ name: operation.name,
94
+ description: operation.description || '',
95
+ scope: operation.scope
96
+ });
97
+ operationCount++;
98
+ if (operation.schema) {
99
+ await applyOperation(DRIVE_ID, documentId, 'SetOperationSchema', {
100
+ id: operation.id,
101
+ schema: operation.schema
102
+ });
103
+ operationCount++;
104
+ }
105
+ if (operation.reducer) {
106
+ await applyOperation(DRIVE_ID, documentId, 'SetOperationReducer', {
107
+ id: operation.id,
108
+ reducer: operation.reducer
109
+ });
110
+ operationCount++;
111
+ }
112
+ console.log(` āœ“ ${operation.name}`);
113
+ }
114
+ }
115
+ }
116
+ console.log(`\n āœ“ Applied ${operationCount} operations`);
117
+ console.log('\nāœ… BuilderTeam document model created successfully!');
118
+ console.log(` Drive: ${DRIVE_ID}`);
119
+ console.log(` Document ID: ${documentId}`);
120
+ console.log(` URL: http://localhost:4001/d/${DRIVE_ID}`);
121
+ }
122
+ main().catch(console.error);
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env tsx
2
+ /**
3
+ * Create Remote Drives from GitHub Repositories
4
+ *
5
+ * This script:
6
+ * 1. Fetches powerhouse.manifest.json from GitHub repositories
7
+ * 2. Creates remote drives at localhost:4001/graphql
8
+ * 3. Creates package documents in each drive with manifest data
9
+ * 4. Creates document model documents with full specifications
10
+ *
11
+ * Usage (from project root):
12
+ * npm run create-drives
13
+ * OR
14
+ * npx tsx scripts/create-remote-drives.ts
15
+ */
16
+ export {};
17
+ //# sourceMappingURL=create-remote-drives.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-remote-drives.d.ts","sourceRoot":"","sources":["../../scripts/create-remote-drives.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;GAaG"}