@powerhousedao/codegen 6.0.0-dev.247 → 6.0.0-dev.249
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/{file-builders-yzqy7Qgw.mjs → file-builders-C1NnoSS9.mjs} +65 -173
- package/dist/file-builders-C1NnoSS9.mjs.map +1 -0
- package/dist/{index-DWf4zaOD.d.mts → index-DEK_3FV-.d.mts} +3 -88
- package/dist/index-DEK_3FV-.d.mts.map +1 -0
- package/dist/index.d.mts +13 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +351 -208
- package/dist/index.mjs.map +1 -1
- package/dist/src/file-builders/index.d.mts +2 -2
- package/dist/src/file-builders/index.mjs +2 -2
- package/dist/src/name-builders/index.d.mts +1 -1
- package/dist/src/name-builders/index.mjs +1 -1
- package/dist/src/templates/index.d.mts +3 -3
- package/dist/src/templates/index.d.mts.map +1 -1
- package/dist/src/templates/index.mjs +1 -1
- package/dist/src/utils/index.d.mts +2 -2
- package/dist/src/utils/index.mjs +1 -1
- package/package.json +9 -5
- package/dist/file-builders-yzqy7Qgw.mjs.map +0 -1
- package/dist/index-DWf4zaOD.d.mts.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import { ANALYTICS_ENGINE_CORE_PACKAGE, BOILERPLATE_ALLOWED_BUILDS, GRAPHQL_PACKAGE, GRAPHQL_TAG_PACKAGE, PEER_EXTERNAL_DEPENDENCIES, REACTOR_API_PACKAGE, VERSIONED_DEV_DEPENDENCIES, VERSIONED_PEER_DEPENDENCIES, defaultManifest, directoryExists, externalDevDependencies, fileExists, fileExistsSync, isDirectory, makeVersionedDependenciesMap, packageJsonExports, spawnAsync, writeFileEnsuringDir } from "@powerhousedao/shared/clis";
|
|
2
|
+
import { readdirSync } from "fs";
|
|
3
|
+
import path, { join } from "path";
|
|
1
4
|
import { DocumentModelGlobalStateSchema, ManifestSchema } from "@powerhousedao/shared/document-model";
|
|
5
|
+
import fs, { copyFile, mkdir, readdir, writeFile } from "node:fs/promises";
|
|
2
6
|
import { camelCase, capitalCase, constantCase, kebabCase, pascalCase } from "change-case";
|
|
3
|
-
import path, { join } from "path";
|
|
4
7
|
import { DEFAULT_REGISTRY_URL } from "@powerhousedao/shared/registry";
|
|
5
|
-
import { capitalize, concat, conditional, constant, endsWith, filter, find, first, flatMap, forEach, isDefined, isIncludedIn, isNonNullish, isNot, isStrictEqual, isString, isTruthy, last, map, merge, pipe, prop, sort, split, startsWith, subtract, unique, uniqueBy, when } from "remeda";
|
|
8
|
+
import { capitalize, concat, conditional, constant, endsWith, filter, find, first, flatMap, forEach, isDefined, isIncludedIn, isNonNullish, isNot, isStrictEqual, isString, isTruthy, last, map, mapValues, merge, pipe, prop, sort, split, startsWith, subtract, unique, uniqueBy, when } from "remeda";
|
|
6
9
|
import { IndentationText, Project, SyntaxKind, VariableDeclarationKind, ts } from "ts-morph";
|
|
7
10
|
import arg from "arg";
|
|
8
|
-
import { readdirSync } from "fs";
|
|
9
|
-
import { VERSIONED_DEPENDENCIES, VERSIONED_DEV_DEPENDENCIES, directoryExists, fileExists, fileExistsSync, isDirectory, makeVersionedDependencies, spawnAsync, writeFileEnsuringDir } from "@powerhousedao/shared/clis";
|
|
10
11
|
import { format } from "prettier";
|
|
11
12
|
import { z } from "zod";
|
|
12
13
|
import { loadJsonFile, loadJsonFileSync } from "load-json-file";
|
|
13
|
-
import fs, { copyFile, mkdir, readdir, writeFile } from "node:fs/promises";
|
|
14
14
|
import { stripVTControlCharacters } from "node:util";
|
|
15
15
|
import path$1, { join as join$1, relative } from "node:path";
|
|
16
16
|
import { generate } from "@graphql-codegen/cli";
|
|
@@ -4723,141 +4723,15 @@ const mcpTemplate = json`
|
|
|
4723
4723
|
//#region src/templates/boilerplate/npmrc.ts
|
|
4724
4724
|
const npmrcTemplate = `@jsr:registry=https://npm.jsr.io`;
|
|
4725
4725
|
//#endregion
|
|
4726
|
-
//#region src/file-builders/constants.ts
|
|
4727
|
-
const packageJsonExports = {
|
|
4728
|
-
".": {
|
|
4729
|
-
types: "./dist/types/index.d.ts",
|
|
4730
|
-
browser: "./dist/browser/index.js",
|
|
4731
|
-
node: "./dist/node/index.mjs"
|
|
4732
|
-
},
|
|
4733
|
-
"./document-models": {
|
|
4734
|
-
types: "./dist/types/document-models/index.d.ts",
|
|
4735
|
-
browser: "./dist/browser/document-models/index.js",
|
|
4736
|
-
node: "./dist/node/document-models/index.mjs"
|
|
4737
|
-
},
|
|
4738
|
-
"./document-models/*": {
|
|
4739
|
-
types: "./dist/types/document-models/*/index.d.ts",
|
|
4740
|
-
browser: "./dist/browser/document-models/*/index.js",
|
|
4741
|
-
node: "./dist/node/document-models/*/index.mjs"
|
|
4742
|
-
},
|
|
4743
|
-
"./editors": {
|
|
4744
|
-
types: "./dist/types/editors/index.d.ts",
|
|
4745
|
-
browser: "./dist/browser/editors/index.js",
|
|
4746
|
-
node: "./dist/node/editors/index.mjs"
|
|
4747
|
-
},
|
|
4748
|
-
"./editors/*": {
|
|
4749
|
-
types: "./dist/types/editors/*/editor.d.ts",
|
|
4750
|
-
browser: "./dist/browser/editors/*/editor.js",
|
|
4751
|
-
node: "./dist/node/editors/*/editor.mjs"
|
|
4752
|
-
},
|
|
4753
|
-
"./subgraphs": {
|
|
4754
|
-
types: "./dist/types/subgraphs/index.d.ts",
|
|
4755
|
-
browser: "./dist/browser/subgraphs/index.js",
|
|
4756
|
-
node: "./dist/node/subgraphs/index.mjs"
|
|
4757
|
-
},
|
|
4758
|
-
"./processors": {
|
|
4759
|
-
types: "./dist/types/processors/index.d.ts",
|
|
4760
|
-
browser: "./dist/browser/processors/index.js",
|
|
4761
|
-
node: "./dist/node/processors/index.mjs"
|
|
4762
|
-
},
|
|
4763
|
-
"./manifest": "./dist/powerhouse.manifest.json",
|
|
4764
|
-
"./style.css": "./dist/style.css"
|
|
4765
|
-
};
|
|
4766
|
-
const packageScripts = {
|
|
4767
|
-
"test:watch": "vitest",
|
|
4768
|
-
lint: "eslint --config eslint.config.js --cache",
|
|
4769
|
-
"lint:fix": "npm run lint -- --fix",
|
|
4770
|
-
tsc: "tsc",
|
|
4771
|
-
"tsc:watch": "tsc --watch",
|
|
4772
|
-
generate: "ph-cli generate",
|
|
4773
|
-
connect: "ph-cli connect",
|
|
4774
|
-
build: "ph-cli build",
|
|
4775
|
-
reactor: "ph-cli reactor",
|
|
4776
|
-
service: "ph-cli service",
|
|
4777
|
-
vetra: "ph-cli vetra",
|
|
4778
|
-
"service-startup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-startup.sh",
|
|
4779
|
-
"service-unstartup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh"
|
|
4780
|
-
};
|
|
4781
|
-
const externalDependencies = {
|
|
4782
|
-
"@powerhousedao/document-engineering": "1.40.3",
|
|
4783
|
-
graphql: "16.12.0",
|
|
4784
|
-
"graphql-tag": "^2.12.6",
|
|
4785
|
-
zod: "4.3.6",
|
|
4786
|
-
react: "^19.2.3",
|
|
4787
|
-
"react-dom": "^19.2.3"
|
|
4788
|
-
};
|
|
4789
|
-
const externalDevDependencies = {
|
|
4790
|
-
"@electric-sql/pglite": "0.3.15",
|
|
4791
|
-
"@electric-sql/pglite-tools": "0.2.20",
|
|
4792
|
-
"@eslint/js": "^9.38.0",
|
|
4793
|
-
"@tailwindcss/cli": "^4.1.18",
|
|
4794
|
-
"@types/node": "^24.9.2",
|
|
4795
|
-
"@types/react": "^19.2.3",
|
|
4796
|
-
"@vitest/coverage-v8": "4.1.1",
|
|
4797
|
-
eslint: "^9.38.0",
|
|
4798
|
-
"eslint-config-prettier": "^10.1.8",
|
|
4799
|
-
"eslint-plugin-prettier": "^5.5.4",
|
|
4800
|
-
"eslint-plugin-react": "^7.37.5",
|
|
4801
|
-
"eslint-plugin-react-hooks": "^7.0.1",
|
|
4802
|
-
globals: "^16.4.0",
|
|
4803
|
-
tailwindcss: "^4.1.16",
|
|
4804
|
-
typescript: "^5.9.3",
|
|
4805
|
-
"typescript-eslint": "^8.46.2",
|
|
4806
|
-
"vite-tsconfig-paths": "6.1.1",
|
|
4807
|
-
vitest: "4.1.1"
|
|
4808
|
-
};
|
|
4809
|
-
const defaultManifest = {
|
|
4810
|
-
name: "",
|
|
4811
|
-
description: "",
|
|
4812
|
-
category: "",
|
|
4813
|
-
publisher: {
|
|
4814
|
-
name: "",
|
|
4815
|
-
url: ""
|
|
4816
|
-
},
|
|
4817
|
-
documentModels: [],
|
|
4818
|
-
editors: [],
|
|
4819
|
-
apps: [],
|
|
4820
|
-
subgraphs: [],
|
|
4821
|
-
processors: []
|
|
4822
|
-
};
|
|
4823
|
-
//#endregion
|
|
4824
4726
|
//#region src/templates/boilerplate/package.json.ts
|
|
4825
|
-
/**
|
|
4826
|
-
* Renders a JS object as the inner body of a JSON object
|
|
4827
|
-
*/
|
|
4828
4727
|
function innerJsonBody(value) {
|
|
4829
4728
|
return JSON.stringify(value, null, 2).slice(2, -2).trimEnd();
|
|
4830
4729
|
}
|
|
4730
|
+
function sortedJsonBody(value) {
|
|
4731
|
+
return innerJsonBody(Object.fromEntries(Object.entries(value).sort(([a], [b]) => a.localeCompare(b))));
|
|
4732
|
+
}
|
|
4831
4733
|
const exportsTemplate = innerJsonBody(packageJsonExports);
|
|
4832
|
-
const
|
|
4833
|
-
const externalDevDepsTemplate = innerJsonBody(externalDevDependencies);
|
|
4834
|
-
const scriptsTemplate = json`
|
|
4835
|
-
"test": "vitest run",
|
|
4836
|
-
"test:watch": "vitest",
|
|
4837
|
-
"test:coverage": "vitest run --coverage",
|
|
4838
|
-
"lint": "eslint --config eslint.config.js --cache --cache-strategy content",
|
|
4839
|
-
"lint:fix": "npm run lint -- --fix",
|
|
4840
|
-
"tsc": "tsc",
|
|
4841
|
-
"tsc:watch": "tsc --watch",
|
|
4842
|
-
"check-circular-imports": "npx dpdm -T ./index.ts",
|
|
4843
|
-
"generate": "ph-cli generate",
|
|
4844
|
-
"connect": "ph-cli connect",
|
|
4845
|
-
"build": "ph-cli build",
|
|
4846
|
-
"reactor": "ph-cli reactor",
|
|
4847
|
-
"service": "ph-cli service",
|
|
4848
|
-
"vetra": "ph-cli vetra",
|
|
4849
|
-
"service-startup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-startup.sh",
|
|
4850
|
-
"service-unstartup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh"
|
|
4851
|
-
`.raw;
|
|
4852
|
-
const dependenciesTemplate = (versionedDependencies) => json`
|
|
4853
|
-
${versionedDependencies.join(",\n ")},
|
|
4854
|
-
${externalDepsTemplate}
|
|
4855
|
-
`.raw;
|
|
4856
|
-
const devDependenciesTemplate = (versionedDevDependencies) => json`
|
|
4857
|
-
${versionedDevDependencies.join(",\n ")},
|
|
4858
|
-
${externalDevDepsTemplate}
|
|
4859
|
-
`.raw;
|
|
4860
|
-
const packageJsonTemplate = (projectName, versionedDependencies, versionedDevDependencies) => json`
|
|
4734
|
+
const packageJsonTemplate = (projectName, peerDependencies, devDependencies) => json`
|
|
4861
4735
|
{
|
|
4862
4736
|
"name": "${projectName}",
|
|
4863
4737
|
"version": "1.0.0",
|
|
@@ -4871,25 +4745,32 @@ const packageJsonTemplate = (projectName, versionedDependencies, versionedDevDep
|
|
|
4871
4745
|
${exportsTemplate}
|
|
4872
4746
|
},
|
|
4873
4747
|
"scripts": {
|
|
4874
|
-
|
|
4748
|
+
"test": "vitest run",
|
|
4749
|
+
"test:watch": "vitest",
|
|
4750
|
+
"test:coverage": "vitest run --coverage",
|
|
4751
|
+
"lint": "eslint --config eslint.config.js --cache --cache-strategy content",
|
|
4752
|
+
"lint:fix": "npm run lint -- --fix",
|
|
4753
|
+
"tsc": "tsc",
|
|
4754
|
+
"tsc:watch": "tsc --watch",
|
|
4755
|
+
"check-circular-imports": "npx dpdm -T ./index.ts",
|
|
4756
|
+
"generate": "ph-cli generate",
|
|
4757
|
+
"connect": "ph-cli connect",
|
|
4758
|
+
"build": "ph-cli build",
|
|
4759
|
+
"reactor": "ph-cli reactor",
|
|
4760
|
+
"service": "ph-cli service",
|
|
4761
|
+
"vetra": "ph-cli vetra",
|
|
4762
|
+
"service-startup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-startup.sh",
|
|
4763
|
+
"service-unstartup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh"
|
|
4875
4764
|
},
|
|
4876
|
-
"
|
|
4877
|
-
${
|
|
4765
|
+
"peerDependencies": {
|
|
4766
|
+
${sortedJsonBody(peerDependencies)}
|
|
4878
4767
|
},
|
|
4879
4768
|
"devDependencies": {
|
|
4880
|
-
${
|
|
4769
|
+
${sortedJsonBody(devDependencies)}
|
|
4881
4770
|
}
|
|
4882
4771
|
}
|
|
4883
4772
|
`.raw;
|
|
4884
|
-
|
|
4885
|
-
//#region src/templates/boilerplate/pnpm-workspace.ts
|
|
4886
|
-
const pnpmWorkspaceTemplate = `allowBuilds:
|
|
4887
|
-
"@apollo/protobufjs": true
|
|
4888
|
-
"@parcel/watcher": true
|
|
4889
|
-
esbuild: true
|
|
4890
|
-
protobufjs: true
|
|
4891
|
-
"@datadog/pprof": true
|
|
4892
|
-
`;
|
|
4773
|
+
const pnpmWorkspaceTemplate = `allowBuilds:\n${BOILERPLATE_ALLOWED_BUILDS.map((pkg) => ` ${/[@/]/.test(pkg) ? `"${pkg}"` : pkg}: true`).join("\n")}\n`;
|
|
4893
4774
|
//#endregion
|
|
4894
4775
|
//#region src/templates/boilerplate/package.json.legacy.ts
|
|
4895
4776
|
const packageJsonScriptsTemplate = {
|
|
@@ -6693,7 +6574,7 @@ export * from "./processor.js";
|
|
|
6693
6574
|
//#endregion
|
|
6694
6575
|
//#region src/templates/processors/analytics/processor.ts
|
|
6695
6576
|
const analyticsProcessorTemplate = (v) => ts$1`
|
|
6696
|
-
import type { AnalyticsSeriesInput, AnalyticsPath, IAnalyticsStore } from "
|
|
6577
|
+
import type { AnalyticsSeriesInput, AnalyticsPath, IAnalyticsStore } from "${ANALYTICS_ENGINE_CORE_PACKAGE}";
|
|
6697
6578
|
import type { OperationWithContext, IProcessor } from "@powerhousedao/reactor-browser";
|
|
6698
6579
|
|
|
6699
6580
|
export class ${v.pascalCaseName} implements IProcessor {
|
|
@@ -6897,8 +6778,8 @@ export interface DB {
|
|
|
6897
6778
|
//#endregion
|
|
6898
6779
|
//#region src/templates/subgraphs/index-file.ts
|
|
6899
6780
|
const subgraphIndexFileTemplate = (v) => ts$1`
|
|
6900
|
-
import { BaseSubgraph } from "
|
|
6901
|
-
import type { DocumentNode } from "
|
|
6781
|
+
import { BaseSubgraph } from "${REACTOR_API_PACKAGE}";
|
|
6782
|
+
import type { DocumentNode } from "${GRAPHQL_PACKAGE}";
|
|
6902
6783
|
import { schema } from "./schema.js";
|
|
6903
6784
|
import { getResolvers } from "./resolvers.js";
|
|
6904
6785
|
|
|
@@ -6922,8 +6803,8 @@ const subgraphLibFileTemplate = () => ts$1`
|
|
|
6922
6803
|
//#endregion
|
|
6923
6804
|
//#region src/templates/subgraphs/custom-schema.ts
|
|
6924
6805
|
const customSubgraphSchemaTemplate = (v) => ts$1`
|
|
6925
|
-
import { gql } from "
|
|
6926
|
-
import type { DocumentNode } from "
|
|
6806
|
+
import { gql } from "${GRAPHQL_TAG_PACKAGE}";
|
|
6807
|
+
import type { DocumentNode } from "${GRAPHQL_PACKAGE}";
|
|
6927
6808
|
|
|
6928
6809
|
export const schema: DocumentNode = gql\`
|
|
6929
6810
|
"""
|
|
@@ -6942,7 +6823,7 @@ type Query {
|
|
|
6942
6823
|
//#endregion
|
|
6943
6824
|
//#region src/templates/subgraphs/custom-resolvers.ts
|
|
6944
6825
|
const customSubgraphResolversTemplate = (v) => ts$1`
|
|
6945
|
-
import { type ISubgraph } from "
|
|
6826
|
+
import { type ISubgraph } from "${REACTOR_API_PACKAGE}";
|
|
6946
6827
|
|
|
6947
6828
|
export const getResolvers = (subgraph: ISubgraph): Record<string, unknown> => {
|
|
6948
6829
|
const reactor = subgraph.reactorClient;
|
|
@@ -7371,7 +7252,7 @@ function validateDocumentModelState(documentModelState) {
|
|
|
7371
7252
|
//#endregion
|
|
7372
7253
|
//#region src/file-builders/editor-common.ts
|
|
7373
7254
|
/** Generates the `module.ts` file for a document editor or app */
|
|
7374
|
-
function makeEditorModuleFile({ project, editorDirPath, editorName, documentModelId, editorId, legacyMultipleDocumentTypes }) {
|
|
7255
|
+
async function makeEditorModuleFile({ project, editorDirPath, editorName, documentModelId, editorId, legacyMultipleDocumentTypes }) {
|
|
7375
7256
|
if (documentModelId && !!legacyMultipleDocumentTypes) throw new Error("Cannot specify both documentModelId and legacyMultipleDocumentTypes");
|
|
7376
7257
|
const { sourceFile } = getOrCreateSourceFile(project, path.join(editorDirPath, "module.ts"));
|
|
7377
7258
|
sourceFile.replaceWithText("");
|
|
@@ -7382,6 +7263,7 @@ function makeEditorModuleFile({ project, editorDirPath, editorName, documentMode
|
|
|
7382
7263
|
documentTypes: documentModelId ? `["${documentModelId}"]` : JSON.stringify(legacyMultipleDocumentTypes)
|
|
7383
7264
|
});
|
|
7384
7265
|
sourceFile.replaceWithText(template);
|
|
7266
|
+
await formatSourceFileWithPrettier(sourceFile);
|
|
7385
7267
|
}
|
|
7386
7268
|
async function makeEditorsFile(args) {
|
|
7387
7269
|
const { project, editorsDirPath } = args;
|
|
@@ -7474,7 +7356,7 @@ async function tsMorphGenerateApp({ project, editorDir, editorName, editorId, al
|
|
|
7474
7356
|
isDragAndDropEnabled,
|
|
7475
7357
|
editorDirPath
|
|
7476
7358
|
});
|
|
7477
|
-
makeEditorModuleFile({
|
|
7359
|
+
await makeEditorModuleFile({
|
|
7478
7360
|
project,
|
|
7479
7361
|
editorName,
|
|
7480
7362
|
editorId,
|
|
@@ -7606,12 +7488,12 @@ async function writeModuleFiles(projectDir = process.cwd()) {
|
|
|
7606
7488
|
await writeGeneratedSubgraphsFiles(projectDir);
|
|
7607
7489
|
}
|
|
7608
7490
|
async function writeAiConfigFiles(projectDir = process.cwd()) {
|
|
7609
|
-
await writeFileEnsuringDir(join(projectDir, "CLAUDE.md"), agentsTemplate);
|
|
7610
|
-
await writeFileEnsuringDir(join(projectDir, "AGENTS.md"), agentsTemplate);
|
|
7611
|
-
await writeFileEnsuringDir(join(projectDir, ".mcp.json"), mcpTemplate);
|
|
7612
|
-
await writeFileEnsuringDir(join(projectDir, ".gemini/settings.json"), geminiSettingsTemplate);
|
|
7613
|
-
await writeFileEnsuringDir(join(projectDir, ".cursor/mcp.json"), cursorMcpTemplate);
|
|
7614
|
-
await writeFileEnsuringDir(join(projectDir, ".claude/settings.local.json"), claudeSettingsLocalTemplate);
|
|
7491
|
+
await writeFileEnsuringDir(join(projectDir, "CLAUDE.md"), agentsTemplate.trimStart());
|
|
7492
|
+
await writeFileEnsuringDir(join(projectDir, "AGENTS.md"), agentsTemplate.trimStart());
|
|
7493
|
+
await writeFileEnsuringDir(join(projectDir, ".mcp.json"), mcpTemplate.trimStart());
|
|
7494
|
+
await writeFileEnsuringDir(join(projectDir, ".gemini/settings.json"), geminiSettingsTemplate.trimStart());
|
|
7495
|
+
await writeFileEnsuringDir(join(projectDir, ".cursor/mcp.json"), cursorMcpTemplate.trimStart());
|
|
7496
|
+
await writeFileEnsuringDir(join(projectDir, ".claude/settings.local.json"), claudeSettingsLocalTemplate.trimStart());
|
|
7615
7497
|
}
|
|
7616
7498
|
async function writeProjectRootFiles(args, projectDir = process.cwd()) {
|
|
7617
7499
|
const { name, tag, version, remoteDrive, packageManager } = args;
|
|
@@ -7648,16 +7530,26 @@ async function writeAllGeneratedProjectFiles(projectDir = process.cwd()) {
|
|
|
7648
7530
|
//#endregion
|
|
7649
7531
|
//#region src/file-builders/boilerplate/package.json.ts
|
|
7650
7532
|
async function buildBoilerplatePackageJson(args) {
|
|
7651
|
-
const { name, tag, version
|
|
7652
|
-
|
|
7653
|
-
names:
|
|
7533
|
+
const { name, tag, version } = args;
|
|
7534
|
+
const workspacePeers = await makeVersionedDependenciesMap({
|
|
7535
|
+
names: VERSIONED_PEER_DEPENDENCIES,
|
|
7654
7536
|
tag,
|
|
7655
7537
|
version
|
|
7656
|
-
})
|
|
7538
|
+
});
|
|
7539
|
+
const workspaceDevs = await makeVersionedDependenciesMap({
|
|
7657
7540
|
names: VERSIONED_DEV_DEPENDENCIES,
|
|
7658
7541
|
tag,
|
|
7659
7542
|
version
|
|
7660
|
-
})
|
|
7543
|
+
});
|
|
7544
|
+
return packageJsonTemplate(name, {
|
|
7545
|
+
...workspacePeers,
|
|
7546
|
+
...mapValues(PEER_EXTERNAL_DEPENDENCIES, (v) => v.peer)
|
|
7547
|
+
}, {
|
|
7548
|
+
...workspaceDevs,
|
|
7549
|
+
...workspacePeers,
|
|
7550
|
+
...mapValues(PEER_EXTERNAL_DEPENDENCIES, (v) => v.dev),
|
|
7551
|
+
...externalDevDependencies
|
|
7552
|
+
});
|
|
7661
7553
|
}
|
|
7662
7554
|
//#endregion
|
|
7663
7555
|
//#region src/file-builders/clis/generate-cli-docs.ts
|
|
@@ -7706,7 +7598,7 @@ async function tsMorphGenerateDocumentEditor({ project, editorDir, editorName, e
|
|
|
7706
7598
|
...documentTypeMetadata,
|
|
7707
7599
|
...editorVariableNames
|
|
7708
7600
|
});
|
|
7709
|
-
makeEditorModuleFile({
|
|
7601
|
+
await makeEditorModuleFile({
|
|
7710
7602
|
project,
|
|
7711
7603
|
editorName,
|
|
7712
7604
|
editorId,
|
|
@@ -8169,8 +8061,8 @@ async function makeOperationModuleTestFile(args) {
|
|
|
8169
8061
|
}
|
|
8170
8062
|
const importNames = makeOperationImportNames(args);
|
|
8171
8063
|
const namedImports = importNames.map((name) => ({ name }));
|
|
8172
|
-
|
|
8173
|
-
if (!actionsImportDeclaration)
|
|
8064
|
+
const actionsImportDeclaration = sourceFile.getImportDeclarations().filter((i) => !i.isTypeOnly()).find((importDeclaration) => importDeclaration.getModuleSpecifier().getText().includes(versionImportPath));
|
|
8065
|
+
if (!actionsImportDeclaration) sourceFile.addImportDeclaration({
|
|
8174
8066
|
namedImports,
|
|
8175
8067
|
moduleSpecifier: versionImportPath
|
|
8176
8068
|
});
|
|
@@ -8206,7 +8098,7 @@ async function makeOperationModuleTestFile(args) {
|
|
|
8206
8098
|
}), map((o) => makeTestCaseForOperation(o, isPhDocumentOfTypeFunctionName)));
|
|
8207
8099
|
describeCallBody.addStatements(testCasesToAdd);
|
|
8208
8100
|
const GENERATE_MOCK_NAME = "generateMock";
|
|
8209
|
-
const GENERATE_MOCK_MODULE_SPECIFIER = "
|
|
8101
|
+
const GENERATE_MOCK_MODULE_SPECIFIER = "document-model";
|
|
8210
8102
|
const generateMockImport = sourceFile.getImportDeclaration((i) => i.getNamedImports().some((v) => v.getText().includes(GENERATE_MOCK_NAME)));
|
|
8211
8103
|
if (sourceFile.getText().includes(GENERATE_MOCK_NAME) && !generateMockImport) sourceFile.addImportDeclaration({
|
|
8212
8104
|
namedImports: [GENERATE_MOCK_NAME],
|
|
@@ -8858,6 +8750,6 @@ async function makeSubgraphsIndexFile(args) {
|
|
|
8858
8750
|
await formatSourceFileWithPrettier(sourceFile);
|
|
8859
8751
|
}
|
|
8860
8752
|
//#endregion
|
|
8861
|
-
export { ensureDirectoriesExist as $,
|
|
8753
|
+
export { ensureDirectoriesExist as $, claudeSettingsLocalTemplate as $n, getDocumentModelDirName as $t, writeProjectRootFiles as A, exportsTemplate as An, documentModelUtilsTemplate as At, getDefaultProjectOptions as B, syncAndPublishWorkflowTemplate as Bn, documentModelModuleFileTemplate as Bt, writeCIFiles as C, styleTemplate as Cn, relationalDbFactoryTemplate as Ct, writeGeneratedProjectRootFiles as D, packageJsonExportsTemplate as Dn, analyticsProcessorTemplate as Dt, writeGeneratedProcessorsFiles as E, buildPowerhouseConfigTemplate as En, factoryBuildersTemplate as Et, validateDocumentModelState as F, licenseTemplate as Fn, makeOperationsImports as Ft, getObjectProperty as G, upgradeManifestsTemplate as Gn, documentModelSchemaIndexTemplate as Gt, getAllImportNames as H, eslintConfigTemplate as Hn, documentModelHooksFileTemplate as Ht, updateVersionedImports as I, indexTsTemplate as In, makeTestCaseForOperation as It, getStringPropertyValue as J, switchboardEntrypointTemplate as Jn, documentModelOperationsModuleOperationsFileTemplate as Jt, getProperyAssignmentByName as K, documentModelsIndexTemplate as Kn, documentModelGenReducerFileTemplate as Kt, getInitialStates as L, legacyIndexHtmlTemplate as Ln, documentModelTestFileTemplate as Lt, makeEditorModuleFile as M, npmrcTemplate as Mn, upgradeManifestTemplate as Mt, makeEditorsFile as N, mcpTemplate as Nn, documentModelOperationsModuleTestFileTemplate as Nt, writeGeneratedSubgraphsFiles as O, packageJsonScriptsTemplate as On, analyticsIndexTemplate as Ot, makeEditorsIndexFile as P, mainTsxTemplate as Pn, makeOperationImportNames as Pt, buildStringLiteral as Q, cursorMcpTemplate as Qn, getModuleExportType as Qt, DEFAULT_PROJECT_OPTIONS as R, indexHtmlTemplate as Rn, documentModelSrcUtilsTemplate as Rt, writeAllGeneratedProjectFiles as S, subgraphsIndexTemplate as Sn, relationalDbIndexTemplate as St, writeGeneratedEditorsFiles as T, ManifestTemplate as Tn, processorsFactoryTemplate as Tt, getBooleanPropertyValue as U, editorsIndexTemplate as Un, documentModelGenUtilsTemplate as Ut, getAllImportModuleSpecifiers as V, geminiSettingsTemplate as Vn, documentModelIndexTemplate as Vt, getObjectLiteral as W, editorsTemplate as Wn, documentModelGenTypesTemplate as Wt, loadDocumentModelInDir as X, dockerfileTemplate as Xn, documentModelOperationsModuleCreatorsFileTemplate as Xt, getVariableDeclarationByTypeName as Y, nginxConfTemplate as Yn, documentModelOperationsModuleErrorFileTemplate as Yt, buildObjectLiteral as Z, connectEntrypointTemplate as Zn, documentModelOperationModuleActionsFileTemplate as Zt, getCommandsHelpInfo as _, documentEditorEditorFileTemplate as _n, subgraphLibFileTemplate as _t, getOrCreateManifestFile as a, getActionInputName as an, appFoldersFileTemplate as ar, getAppMetadata as at, buildBoilerplatePackageJson as b, tsConfigTemplate as bn, relationalDbProcessorTemplate as bt, operationHasEmptyInput as c, getActionTypeName as cn, driveExplorerFileTemplate as cr, formatSourceFileWithPrettier as ct, generateDocumentModelZodSchemas as d, documentModelDocumentSchemaFileTemplate as dn, documentModelDocumentTypeMetadata as dt, getDocumentModelSpecByVersionNumber as en, agentsTemplate as er, getOrCreateDirectory as et, generateTypesAndZodSchemasFromGraphql as f, documentModelGenCreatorsFileTemplate as fn, configSpec as ft, getCommandHelpInfo as g, documentEditorModuleFileTemplate as gn, customSubgraphSchemaTemplate as gt, tsMorphGenerateDocumentEditor as h, documentModelRootActionsFileTemplate as hn, customSubgraphResolversTemplate as ht, createOrUpdateManifest as i, getLatestDocumentModelSpecVersionNumber as in, folderTreeFileTemplate as ir, getProcessorMetadata as it, tsMorphGenerateApp as j, packageJsonTemplate as jn, upgradeTransitionTemplate as jt, writeModuleFiles as k, pnpmWorkspaceTemplate as kn, analyticsFactoryTemplate as kt, operationHasInput as l, documentModelGenIndexFileTemplate as ln, appDriveContentsFileTemplate as lr, runPrettier as lt, scalarsValidation as m, documentModelGenActionsFileTemplate as mn, parseConfig as mt, tsMorphGenerateSubgraph as n, getEditorVariableNames as nn, appConfigFileTemplate as nr, getPreviousVersionSourceFile as nt, makeModulesIndexFile as o, getActionInputTypeNames as on, appFilesFileTemplate as or, getEditorMetadata as ot, scalars as p, documentModelGenControllerFileTemplate as pn, parseArgs as pt, getStringArrayPropertyElements as q, documentModelsTemplate as qn, documentModelPhFactoriesFileTemplate as qt, tsMorphGenerateProcessor as r, getLatestDocumentModelSpec as rn, driveExplorerNavigationBreadcrumbsFileTemplate as rr, getSubgraphMetadata as rt, operationHasAttachment as s, getActionType as sn, emptyStateFileTemplate as sr, formatSafe as st, makeSubgraphsIndexFile as t, getDocumentModelVariableNames as tn, appEditorFileTemplate as tr, getOrCreateSourceFile as tt, tsMorphGenerateDocumentModel as u, documentModelDocumentTypeTemplate as un, createDocumentFileTemplate as ur, getDocumentTypeMetadata as ut, makeCliDocsFromHelp as v, docsFromCliHelpTemplate as vn, subgraphIndexFileTemplate as vt, writeGeneratedDocumentModelsFiles as w, readmeTemplate as wn, processorsIndexTemplate as wt, writeAiConfigFiles as x, tsconfigPathsTemplate as xn, relationalDbMigrationsTemplate as xt, writeCliDocsMarkdownFile as y, vitestConfigTemplate as yn, relationalDbSchemaTemplate as yt, buildTsMorphProject as z, gitIgnoreTemplate as zn, documentModelSrcIndexFileTemplate as zt };
|
|
8862
8754
|
|
|
8863
|
-
//# sourceMappingURL=file-builders-
|
|
8755
|
+
//# sourceMappingURL=file-builders-C1NnoSS9.mjs.map
|