@powerhousedao/codegen 6.2.2-dev.42 → 6.2.2-dev.44
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-DaV8C_6p.mjs → file-builders-B4QZXx5u.mjs} +448 -38
- package/dist/file-builders-B4QZXx5u.mjs.map +1 -0
- package/dist/{index-DyhHw5PG.d.mts → index-DSucUSbm.d.mts} +41 -2
- package/dist/index-DSucUSbm.d.mts.map +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +296 -89
- 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 +17 -2
- 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 +1 -1
- package/dist/src/utils/index.mjs +1 -1
- package/package.json +3 -3
- package/dist/file-builders-DaV8C_6p.mjs.map +0 -1
- package/dist/index-DyhHw5PG.d.mts.map +0 -1
|
@@ -96,6 +96,45 @@ declare function tsMorphGenerateDocumentEditor({
|
|
|
96
96
|
*/
|
|
97
97
|
declare function tsMorphGenerateDocumentModel(documentModelState: DocumentModelGlobalState, project: Project): Promise<void>;
|
|
98
98
|
//#endregion
|
|
99
|
+
//#region src/file-builders/document-model/upgrade-migration.d.ts
|
|
100
|
+
type ScopeFill = Record<string, unknown>;
|
|
101
|
+
/**
|
|
102
|
+
* How the generated upgrade transition migrates state from the previous
|
|
103
|
+
* version. "fill" carries per-scope objects of added fields with their
|
|
104
|
+
* initial values; "manual" means the schema difference cannot be migrated
|
|
105
|
+
* mechanically and the generated reducer must throw until hand-written.
|
|
106
|
+
*/
|
|
107
|
+
type MigrationPlan = {
|
|
108
|
+
kind: "fill";
|
|
109
|
+
fills: {
|
|
110
|
+
global?: ScopeFill;
|
|
111
|
+
local?: ScopeFill;
|
|
112
|
+
};
|
|
113
|
+
} | {
|
|
114
|
+
kind: "manual";
|
|
115
|
+
reason: string;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Derives the migration between two consecutive spec versions. Mechanical
|
|
119
|
+
* changes — field additions on the scope's state type (initialized from the
|
|
120
|
+
* new version's initial value, falling back to the schema's zero value) and
|
|
121
|
+
* field removals — produce a "fill" plan. Anything else (changed field
|
|
122
|
+
* types, edits to nested types that pre-existing documents reference,
|
|
123
|
+
* additions codegen cannot synthesize a value for) produces a "manual" plan.
|
|
124
|
+
*/
|
|
125
|
+
declare function buildMigrationPlan(args: {
|
|
126
|
+
previousSpec: DocumentSpecification | undefined;
|
|
127
|
+
specification: DocumentSpecification;
|
|
128
|
+
stateName: string;
|
|
129
|
+
localStateName: string;
|
|
130
|
+
}): MigrationPlan;
|
|
131
|
+
/**
|
|
132
|
+
* Serializes a fill value to TypeScript source. Fill values come from JSON
|
|
133
|
+
* (initial values) or the zero-value synthesizer, so JSON serialization is
|
|
134
|
+
* sufficient.
|
|
135
|
+
*/
|
|
136
|
+
declare function fillToTsLiteral(fill: ScopeFill): string;
|
|
137
|
+
//#endregion
|
|
99
138
|
//#region src/file-builders/document-model/utils.d.ts
|
|
100
139
|
declare function operationHasInput(operation: OperationSpecification): boolean;
|
|
101
140
|
declare function operationHasEmptyInput(operation: OperationSpecification): boolean | undefined;
|
|
@@ -344,5 +383,5 @@ type CommandHelpInfo$1 = {
|
|
|
344
383
|
helpTopics: HelpTopic[];
|
|
345
384
|
};
|
|
346
385
|
//#endregion
|
|
347
|
-
export { makeEditorsFile as A,
|
|
348
|
-
//# sourceMappingURL=index-
|
|
386
|
+
export { writeGeneratedSubgraphsFiles as $, makeEditorsFile as A, getCommandHelpInfo as B, tsMorphGenerateSubgraph as C, pruneManifestSection as D, getOrCreateManifestFile as E, ScopeFill as F, applyProjectCustomizations as G, makeCliDocsFromHelp as H, buildMigrationPlan as I, writeCIFiles as J, writeAiConfigFiles as K, fillToTsLiteral as L, operationHasEmptyInput as M, operationHasInput as N, makeModulesIndexFile as O, MigrationPlan as P, writeGeneratedProjectRootFiles as Q, tsMorphGenerateDocumentModel as R, makeSubgraphsIndexFile as S, createOrUpdateManifest as T, writeCliDocsMarkdownFile as U, getCommandsHelpInfo as V, buildBoilerplatePackageJson as W, writeGeneratedEditorsFiles as X, writeGeneratedDocumentModelsFiles as Y, writeGeneratedProcessorsFiles as Z, getLatestDocumentModelSpecVersionNumber as _, DocumentModelDocumentTypeMetadata$1 as a, getActionType as b, DocumentModelVariableNames as c, HelpTopic as d, writeModuleFiles as et, getDocumentModelDirName as f, getLatestDocumentModelSpec as g, getEditorVariableNames as h, CommonMakeEditorComponentArgs as i, makeEditorsIndexFile as j, makeEditorModuleFile as k, EditorVariableNames$1 as l, getDocumentModelVariableNames as m, CommandHelpInfo$1 as n, tsMorphGenerateApp as nt, DocumentModelFileMakerArgs as o, getDocumentModelSpecByVersionNumber as p, writeAllGeneratedProjectFiles as q, CommonGenerateEditorArgs$1 as r, DocumentModelModuleFileMakerArgs$1 as s, CommandEntry$1 as t, writeProjectRootFiles as tt, GenerateDocumentModelArgs as u, getActionInputName as v, tsMorphGenerateProcessor as w, getActionTypeName as x, getActionInputTypeNames as y, tsMorphGenerateDocumentEditor as z };
|
|
387
|
+
//# sourceMappingURL=index-DSucUSbm.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DSucUSbm.d.mts","names":[],"sources":["../src/file-builders/app.ts","../src/file-builders/boilerplate/generated-project-files.ts","../src/file-builders/boilerplate/package.json.ts","../src/file-builders/clis/generate-cli-docs.ts","../src/file-builders/document-editor.ts","../src/file-builders/document-model/document-model.ts","../src/file-builders/document-model/upgrade-migration.ts","../src/file-builders/document-model/utils.ts","../src/file-builders/editor-common.ts","../src/file-builders/index-files.ts","../src/file-builders/manifest.ts","../src/file-builders/processors/processor.ts","../src/file-builders/subgraphs.ts","../src/name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A;AAAA,iBAKN,6BAAA,CAA8B,iBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;KC5DlC,6BAAA;EACV,OAAA,EAAS,OAAA;EACT,aAAA;EACA,uBAAA;AAAA;AAAA,KAGU,0BAAA;EACV,OAAA,EAAS,OAAA;EACT,SAAA;EACA,UAAA;EACA,QAAA;AAAA;AAAA,KAGU,mCAAA;EACV,eAAA;EACA,6BAAA;EACA,oBAAA;EACA,uBAAA;AAAA;AAAA,KAGU,qBAAA,GAAsB,UAAA,QAAkB,sBAAA;AAAA,KAExC,0BAAA,GAA6B,UAAA,QAChC,6BAAA;AAAA,KAGG,yBAAA;EACV,UAAA;EACA,kBAAA,EAAoB,wBAAA;AAAA;AAAA,KAGV,0BAAA,GAA6B,0BAAA;EACvC,OAAA,EAAS,OAAA;EACT,kBAAA,EAAoB,wBAAA;EACpB,OAAA;EACA,aAAA;EACA,QAAA;EACA,aAAA,EAAe,qBAAA;EACf,kBAAA;EACA,iBAAA;EACA,cAAA;EACA,UAAA;EACA,qBAAA;EACA,oBAAA;EACA,oBAAA;EACA,uBAAA;EACA,cAAA;EACA,cAAA;EACA,iBAAA;EACA,UAAA;EACA,aAAA;EACA,UAAA;EACA,YAAA;EACA,eAAA;AAAA;AAAA,KAGU,kCAAA,GAAmC,0BAAA;EAC7C,MAAA,EAAQ,mBAAA;AAAA;AAAA,KAGE,cAAA;EACV,IAAA;EACA,OAAA;IACE,WAAA;IACA,UAAA,SAAmB,SAAA;EAAA;AAAA;AAAA,KAIX,SAAA;EACV,QAAA;EACA,KAAA;EACA,WAAA;EACA,QAAA;AAAA;AAAA,KAGU,iBAAA;EACV,IAAA;EACA,WAAA;EACA,UAAA,EAAY,SAAA;AAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DocumentModelDocumentTypeMetadata, c as DocumentModelVariableNames, d as HelpTopic, i as CommonMakeEditorComponentArgs, l as EditorVariableNames, n as CommandHelpInfo, o as DocumentModelFileMakerArgs, r as CommonGenerateEditorArgs, s as DocumentModelModuleFileMakerArgs, t as CommandEntry, u as GenerateDocumentModelArgs } from "./index-
|
|
1
|
+
import { a as DocumentModelDocumentTypeMetadata, c as DocumentModelVariableNames, d as HelpTopic, i as CommonMakeEditorComponentArgs, l as EditorVariableNames, n as CommandHelpInfo, o as DocumentModelFileMakerArgs, r as CommonGenerateEditorArgs, s as DocumentModelModuleFileMakerArgs, t as CommandEntry, u as GenerateDocumentModelArgs } from "./index-DSucUSbm.mjs";
|
|
2
2
|
import { a as parseConfig, i as parseArgs, n as validateDocumentModelState, r as configSpec, t as DocumentModelStateValidationResult } from "./validation-Z3z0BJlu.mjs";
|
|
3
3
|
import { FEATURE_DEPENDENCIES } from "@powerhousedao/shared/clis";
|
|
4
4
|
import { PackageJson } from "read-pkg";
|