@powerhousedao/codegen 6.0.0-dev.62 → 6.0.0-dev.67

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.
@@ -14,13 +14,16 @@ describe("Build boilerplate package.json file", () => {
14
14
  });
15
15
  test("Should build a versioned boilerplate with tag", { timeout: 100000 }, async () => {
16
16
  const name = "test-project";
17
- const testTags = ["", "latest", "dev", "staging"];
17
+ const testTags = ["", "latest", "dev"];
18
18
  for (const tag of testTags) {
19
19
  const packageJson = await buildBoilerplatePackageJson({
20
20
  name,
21
21
  tag,
22
22
  });
23
23
  const validationResult = validate(packageJson);
24
+ if (!validationResult.valid) {
25
+ console.log(validationResult);
26
+ }
24
27
  expect(validationResult.valid).toBe(true);
25
28
  }
26
29
  });
@@ -1 +1 @@
1
- {"version":3,"file":"build-package-json.test.js","sourceRoot":"","sources":["../../../../src/file-builders/boilerplate/build-package-json.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE,QAAQ,CAAC,qCAAqC,EAAE,GAAG,EAAE;IACnD,IAAI,CAAC,mDAAmD,EAAE,KAAK,IAAI,EAAE;QACnE,MAAM,IAAI,GAAG,cAAc,CAAC;QAC5B,MAAM,OAAO,GAAG,OAAO,CAAC;QACxB,MAAM,WAAW,GAAG,MAAM,2BAA2B,CAAC;YACpD,IAAI;YACJ,OAAO;SACR,CAAC,CAAC;QACH,MAAM,gBAAgB,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;QAC/C,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IACH,IAAI,CACF,+CAA+C,EAC/C,EAAE,OAAO,EAAE,MAAM,EAAE,EACnB,KAAK,IAAI,EAAE;QACT,MAAM,IAAI,GAAG,cAAc,CAAC;QAC5B,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAa,CAAC;QAC9D,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;YAC3B,MAAM,WAAW,GAAG,MAAM,2BAA2B,CAAC;gBACpD,IAAI;gBACJ,GAAG;aACJ,CAAC,CAAC;YACH,MAAM,gBAAgB,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;YAC/C,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"build-package-json.test.js","sourceRoot":"","sources":["../../../../src/file-builders/boilerplate/build-package-json.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE,QAAQ,CAAC,qCAAqC,EAAE,GAAG,EAAE;IACnD,IAAI,CAAC,mDAAmD,EAAE,KAAK,IAAI,EAAE;QACnE,MAAM,IAAI,GAAG,cAAc,CAAC;QAC5B,MAAM,OAAO,GAAG,OAAO,CAAC;QACxB,MAAM,WAAW,GAAG,MAAM,2BAA2B,CAAC;YACpD,IAAI;YACJ,OAAO;SACR,CAAC,CAAC;QACH,MAAM,gBAAgB,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;QAC/C,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IACH,IAAI,CACF,+CAA+C,EAC/C,EAAE,OAAO,EAAE,MAAM,EAAE,EACnB,KAAK,IAAI,EAAE;QACT,MAAM,IAAI,GAAG,cAAc,CAAC;QAC5B,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAa,CAAC;QACnD,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;YAC3B,MAAM,WAAW,GAAG,MAAM,2BAA2B,CAAC;gBACpD,IAAI;gBACJ,GAAG;aACJ,CAAC,CAAC;YACH,MAAM,gBAAgB,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;YAC/C,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;gBAC5B,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;YAChC,CAAC;YACD,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"package.json.d.ts","sourceRoot":"","sources":["../../../../src/templates/boilerplate/package.json.ts"],"names":[],"mappings":"AAmGA,eAAO,MAAM,mBAAmB,GAC9B,aAAa,MAAM,EACnB,uBAAuB,MAAM,EAAE,EAC/B,0BAA0B,MAAM,EAAE,WA4B/B,CAAC"}
1
+ {"version":3,"file":"package.json.d.ts","sourceRoot":"","sources":["../../../../src/templates/boilerplate/package.json.ts"],"names":[],"mappings":"AAkGA,eAAO,MAAM,mBAAmB,GAC9B,aAAa,MAAM,EACnB,uBAAuB,MAAM,EAAE,EAC/B,0BAA0B,MAAM,EAAE,WA4B/B,CAAC"}
@@ -63,13 +63,12 @@ const dependenciesTemplate = (versionedDependencies) => json `
63
63
  "@powerhousedao/document-engineering": "1.40.1",
64
64
  "graphql": "^16.10.0",
65
65
  "graphql-tag": "^2.12.6",
66
- "zod": "^4.3.5"
66
+ "zod": "^4.3.5",
67
+ "@electric-sql/pglite": "0.3.15"
67
68
  `;
68
69
  const devDependenciesTemplate = (versionedDevDependencies) => json `
69
70
  ${versionedDevDependencies.join(",\n")},
70
- "@electric-sql/pglite": "^0.2.12",
71
71
  "@eslint/js": "^9.38.0",
72
- "@powerhousedao/analytics-engine-core": "0.6.4",
73
72
  "@tailwindcss/cli": "^4.1.4",
74
73
  "@testing-library/react": "^16.3.0",
75
74
  "@types/node": "^24.9.2",
@@ -1 +1 @@
1
- {"version":3,"file":"package.json.js","sourceRoot":"","sources":["../../../../src/templates/boilerplate/package.json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,MAAM,eAAe,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC3B,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;;;CAkB3B,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,qBAA+B,EAAE,EAAE,CAAC,IAAI,CAAA;IAClE,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC;;;;;CAKpC,CAAC;AAEF,MAAM,uBAAuB,GAAG,CAAC,wBAAkC,EAAE,EAAE,CAAC,IAAI,CAAA;IACxE,wBAAwB,CAAC,IAAI,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAyBvC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,WAAmB,EACnB,qBAA+B,EAC/B,wBAAkC,EAClC,EAAE,CACF,IAAI,CAAA;;aAEO,WAAW;;;;;;;;MAQlB,eAAe;;;MAGf,eAAe;;;MAGf,oBAAoB,CAAC,qBAAqB,CAAC;;;MAG3C,uBAAuB,CAAC,wBAAwB,CAAC;;;;;;;CAOtD,CAAC,GAAG,CAAC"}
1
+ {"version":3,"file":"package.json.js","sourceRoot":"","sources":["../../../../src/templates/boilerplate/package.json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,MAAM,eAAe,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC3B,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;;;CAkB3B,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,qBAA+B,EAAE,EAAE,CAAC,IAAI,CAAA;IAClE,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC;;;;;;CAMpC,CAAC;AAEF,MAAM,uBAAuB,GAAG,CAAC,wBAAkC,EAAE,EAAE,CAAC,IAAI,CAAA;IACxE,wBAAwB,CAAC,IAAI,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;CAuBvC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,WAAmB,EACnB,qBAA+B,EAC/B,wBAAkC,EAClC,EAAE,CACF,IAAI,CAAA;;aAEO,WAAW;;;;;;;;MAQlB,eAAe;;;MAGf,eAAe;;;MAGf,oBAAoB,CAAC,qBAAqB,CAAC;;;MAG3C,uBAAuB,CAAC,wBAAwB,CAAC;;;;;;;CAOtD,CAAC,GAAG,CAAC"}
@@ -4,7 +4,7 @@ export const analyticsFactoryTemplate = (v) => ts `
4
4
  import type {
5
5
  ProcessorRecord,
6
6
  IProcessorHostModule
7
- } from "@powerhousedao/reactor";
7
+ } from "@powerhousedao/reactor-browser";
8
8
  import { type PHDocumentHeader } from "document-model";
9
9
  import type { ProcessorApp } from "@powerhousedao/common";
10
10
  import { ${v.pascalCaseName}Processor } from "./index.js";
@@ -3,7 +3,7 @@ const analyticsPathFromString = "`/${this.NAMESPACE}/${strand.driveId}/${strand.
3
3
  export const analyticsIndexTemplate = (v) => ts `
4
4
  import type { AnalyticsSeriesInput, IAnalyticsStore } from "@powerhousedao/analytics-engine-core";
5
5
  import { AnalyticsPath } from "@powerhousedao/analytics-engine-core";
6
- import type { OperationWithContext, IProcessor } from "@powerhousedao/reactor";
6
+ import type { OperationWithContext, IProcessor } from "@powerhousedao/reactor-browser";
7
7
 
8
8
  export class ${v.pascalCaseName}Processor implements IProcessor {
9
9
  private readonly NAMESPACE = "${v.pascalCaseName}";
@@ -9,7 +9,7 @@ import type {
9
9
  ProcessorRecord,
10
10
  IProcessorHostModule,
11
11
  ProcessorFactory,
12
- } from "@powerhousedao/reactor";
12
+ } from "@powerhousedao/reactor-browser";
13
13
  import type { PHDocumentHeader } from "document-model";
14
14
 
15
15
  export const processorFactory = async (module: IProcessorHostModule) => {
@@ -5,7 +5,7 @@ import type {
5
5
  ProcessorRecord,
6
6
  IProcessorHostModule,
7
7
  ProcessorFilter
8
- } from "@powerhousedao/reactor"
8
+ } from "@powerhousedao/reactor-browser"
9
9
  import type { PHDocumentHeader } from "document-model";
10
10
  import type { ProcessorApp } from "@powerhousedao/common";
11
11
  import { ${v.pascalCaseName}Processor } from "./index.js";
@@ -1,7 +1,7 @@
1
1
  import { ts } from "@tmpl/core";
2
2
  const defaultNamespaceComment = '// Default namespace: `${this.name}_${driveId.replaceAll("-", "_")}`';
3
3
  export const relationalDbIndexTemplate = (v) => ts `
4
- import { RelationalDbProcessor } from "@powerhousedao/reactor";
4
+ import { RelationalDbProcessor } from "@powerhousedao/reactor-browser";
5
5
  import type { OperationWithContext } from "document-model";
6
6
  import { up } from "./migrations.js";
7
7
  import type { DB } from "./schema.js";
@@ -1,6 +1,6 @@
1
1
  import { ts } from "@tmpl/core";
2
2
  export const relationalDbMigrationsTemplate = () => ts `
3
- import type { IRelationalDb } from "@powerhousedao/reactor"
3
+ import type { IRelationalDb } from "@powerhousedao/reactor-browser"
4
4
 
5
5
  export async function up(db: IRelationalDb<any>): Promise<void> {
6
6
  // Create table