@powerhousedao/codegen 6.2.0-dev.29 → 6.2.0-dev.30
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-NNaY31PO.mjs → file-builders-DuI7d4bA.mjs} +149 -164
- package/dist/file-builders-DuI7d4bA.mjs.map +1 -0
- package/dist/index-DtbVU1fc.d.mts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +73 -68
- package/dist/index.mjs.map +1 -1
- package/dist/src/file-builders/index.mjs +1 -1
- package/dist/src/name-builders/index.mjs +1 -1
- package/dist/src/templates/index.d.mts +8 -5
- package/dist/src/templates/index.d.mts.map +1 -1
- package/dist/src/templates/index.mjs +2 -2
- package/dist/src/utils/index.d.mts +4 -5
- package/dist/src/utils/index.d.mts.map +1 -1
- package/dist/src/utils/index.mjs +2 -2
- package/package.json +4 -4
- package/dist/file-builders-NNaY31PO.mjs.map +0 -1
|
@@ -4,7 +4,6 @@ import { Dirent } from "fs";
|
|
|
4
4
|
import { DocumentModelGlobalState } from "@powerhousedao/shared/document-model";
|
|
5
5
|
import * as ts_morph0 from "ts-morph";
|
|
6
6
|
import { IndentationText, ObjectLiteralExpression, Project, SourceFile, SyntaxKind, VariableStatement, ts } from "ts-morph";
|
|
7
|
-
import { BuiltInParserName, LiteralUnion } from "prettier";
|
|
8
7
|
|
|
9
8
|
//#region src/utils/constants.d.ts
|
|
10
9
|
/** Document model metadata for the `powerhouse/document-model` document type.
|
|
@@ -32,10 +31,10 @@ declare function getDocumentTypeMetadata({
|
|
|
32
31
|
}: GetDocumentTypeMetadataArgs): DocumentModelDocumentTypeMetadata;
|
|
33
32
|
//#endregion
|
|
34
33
|
//#region src/utils/format-with-prettier.d.ts
|
|
35
|
-
/** Formats the text of a ts-morph source file with
|
|
34
|
+
/** Formats the text of a ts-morph source file with oxfmt before writing the text to memory */
|
|
36
35
|
declare function formatSourceFileWithPrettier(sourceFile: SourceFile): Promise<void>;
|
|
37
|
-
declare function formatSafe(sourceText: string, parser?:
|
|
38
|
-
declare function
|
|
36
|
+
declare function formatSafe(sourceText: string, parser?: string): Promise<string>;
|
|
37
|
+
declare function runOxfmt(): Promise<void>;
|
|
39
38
|
//#endregion
|
|
40
39
|
//#region src/utils/get-editor-metadata.d.ts
|
|
41
40
|
declare function getEditorMetadata(project: Project, dirName: string): {
|
|
@@ -153,5 +152,5 @@ declare function updateVersionedImports(args: {
|
|
|
153
152
|
version: number;
|
|
154
153
|
}): void;
|
|
155
154
|
//#endregion
|
|
156
|
-
export { DEFAULT_PROJECT_OPTIONS, DocumentModelStateValidationResult, buildObjectLiteral, buildStringLiteral, buildTsMorphProject, configSpec, documentModelDocumentTypeMetadata, ensureDirectoriesExist, formatSafe, formatSourceFileWithPrettier, getAllImportModuleSpecifiers, getAllImportNames, getAppMetadata, getBooleanPropertyValue, getDefaultProjectOptions, getDocumentTypeMetadata, getEditorMetadata, getInitialStates, getObjectLiteral, getObjectProperty, getOrCreateDirectory, getOrCreateSourceFile, getPreviousVersionSourceFile, getProcessorMetadata, getProperyAssignmentByName, getStringArrayPropertyElements, getStringPropertyValue, getSubgraphMetadata, getVariableDeclarationByTypeName, loadDocumentModelInDir, parseArgs, parseConfig,
|
|
155
|
+
export { DEFAULT_PROJECT_OPTIONS, DocumentModelStateValidationResult, buildObjectLiteral, buildStringLiteral, buildTsMorphProject, configSpec, documentModelDocumentTypeMetadata, ensureDirectoriesExist, formatSafe, formatSourceFileWithPrettier, getAllImportModuleSpecifiers, getAllImportNames, getAppMetadata, getBooleanPropertyValue, getDefaultProjectOptions, getDocumentTypeMetadata, getEditorMetadata, getInitialStates, getObjectLiteral, getObjectProperty, getOrCreateDirectory, getOrCreateSourceFile, getPreviousVersionSourceFile, getProcessorMetadata, getProperyAssignmentByName, getStringArrayPropertyElements, getStringPropertyValue, getSubgraphMetadata, getVariableDeclarationByTypeName, loadDocumentModelInDir, parseArgs, parseConfig, runOxfmt, updateVersionedImports, validateDocumentModelState };
|
|
157
156
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/utils/constants.ts","../../../src/utils/document-type-metadata.ts","../../../src/utils/format-with-prettier.ts","../../../src/utils/get-editor-metadata.ts","../../../src/utils/get-processor-metadata.ts","../../../src/utils/get-subgraph-metadata.ts","../../../src/utils/source-files.ts","../../../src/utils/syntax-builders.ts","../../../src/utils/syntax-getters.ts","../../../src/utils/ts-morph-project.ts","../../../src/utils/unsafe-utils.ts","../../../src/utils/update-versioned-imports.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/utils/constants.ts","../../../src/utils/document-type-metadata.ts","../../../src/utils/format-with-prettier.ts","../../../src/utils/get-editor-metadata.ts","../../../src/utils/get-processor-metadata.ts","../../../src/utils/get-subgraph-metadata.ts","../../../src/utils/source-files.ts","../../../src/utils/syntax-builders.ts","../../../src/utils/syntax-getters.ts","../../../src/utils/ts-morph-project.ts","../../../src/utils/unsafe-utils.ts","../../../src/utils/update-versioned-imports.ts"],"mappings":";;;;;;;;;;;;cAIa,iCAAA;EAAA;;;;;;;KCcR,2BAAA;EACH,OAAA,EAAS,OAAA;EACT,eAAA;AAAA;;;ADhBF;iBCqBgB,uBAAA,CAAA;EACd,OAAA;EACA;AAAA,GACC,2BAAA,GAA2B,iCAAA;;;;iBCrBR,4BAAA,CAA6B,UAAA,EAAY,UAAA,GAAU,OAAA;AAAA,iBAgBnD,UAAA,CACpB,UAAA,UACA,MAAA,YACC,OAAA;AAAA,iBAWmB,QAAA,CAAA,GAAQ,OAAA;;;iBCnBd,iBAAA,CAAkB,OAAA,EAAS,OAAA,EAAS,OAAA;;;;;;iBAwBpC,cAAA,CAAe,OAAA,EAAS,OAAA,EAAS,OAAA;;;;;;;;;;iBCrBjC,oBAAA,CAAqB,OAAA,EAAS,OAAA,EAAS,OAAA;;;;;;;;iBChBvC,m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cCtJD,uBAAA;EAAA;;;;8BAWH,eAAA,CAAA,SAAA;IAAA;;;;iBAGM,wBAAA,CAAyB,gBAAA;;;;;;8BAAD,eAAA,CAAA,SAAA;IAAA;;;ARFA;AAAA,iBQUxB,mBAAA,CAAoB,UAAA,WAAkB,OAAA;;;iBCtBtC,gBAAA,CAAiB,UAAA;EAAc,MAAA;EAAa,KAAA;AAAA;;;;;;iBCA5C,sBAAA,CAAuB,IAAA;EACrC,UAAA,EAAY,UAAA;EACZ,OAAA;AAAA"}
|
package/dist/src/utils/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as buildStringLiteral, B as buildTsMorphProject, G as getObjectLiteral, H as getAllImportModuleSpecifiers, I as validateDocumentModelState, J as getStringArrayPropertyElements, K as getObjectProperty, L as updateVersionedImports, Q as buildObjectLiteral, R as getInitialStates, U as getAllImportNames, V as getDefaultProjectOptions, W as getBooleanPropertyValue, X as getVariableDeclarationByTypeName, Y as getStringPropertyValue, Z as loadDocumentModelInDir, at as getProcessorMetadata, ct as formatSafe, dt as getDocumentTypeMetadata, et as ensureDirectoriesExist, ft as documentModelDocumentTypeMetadata, ht as parseConfig, it as getSubgraphMetadata, lt as formatSourceFileWithPrettier, mt as parseArgs, nt as getOrCreateSourceFile, ot as getAppMetadata, pt as configSpec, q as getProperyAssignmentByName, rt as getPreviousVersionSourceFile, st as getEditorMetadata, tt as getOrCreateDirectory, ut as
|
|
2
|
-
export { DEFAULT_PROJECT_OPTIONS, buildObjectLiteral, buildStringLiteral, buildTsMorphProject, configSpec, documentModelDocumentTypeMetadata, ensureDirectoriesExist, formatSafe, formatSourceFileWithPrettier, getAllImportModuleSpecifiers, getAllImportNames, getAppMetadata, getBooleanPropertyValue, getDefaultProjectOptions, getDocumentTypeMetadata, getEditorMetadata, getInitialStates, getObjectLiteral, getObjectProperty, getOrCreateDirectory, getOrCreateSourceFile, getPreviousVersionSourceFile, getProcessorMetadata, getProperyAssignmentByName, getStringArrayPropertyElements, getStringPropertyValue, getSubgraphMetadata, getVariableDeclarationByTypeName, loadDocumentModelInDir, parseArgs, parseConfig,
|
|
1
|
+
import { $ as buildStringLiteral, B as buildTsMorphProject, G as getObjectLiteral, H as getAllImportModuleSpecifiers, I as validateDocumentModelState, J as getStringArrayPropertyElements, K as getObjectProperty, L as updateVersionedImports, Q as buildObjectLiteral, R as getInitialStates, U as getAllImportNames, V as getDefaultProjectOptions, W as getBooleanPropertyValue, X as getVariableDeclarationByTypeName, Y as getStringPropertyValue, Z as loadDocumentModelInDir, at as getProcessorMetadata, ct as formatSafe, dt as getDocumentTypeMetadata, et as ensureDirectoriesExist, ft as documentModelDocumentTypeMetadata, ht as parseConfig, it as getSubgraphMetadata, lt as formatSourceFileWithPrettier, mt as parseArgs, nt as getOrCreateSourceFile, ot as getAppMetadata, pt as configSpec, q as getProperyAssignmentByName, rt as getPreviousVersionSourceFile, st as getEditorMetadata, tt as getOrCreateDirectory, ut as runOxfmt, z as DEFAULT_PROJECT_OPTIONS } from "../../file-builders-DuI7d4bA.mjs";
|
|
2
|
+
export { DEFAULT_PROJECT_OPTIONS, buildObjectLiteral, buildStringLiteral, buildTsMorphProject, configSpec, documentModelDocumentTypeMetadata, ensureDirectoriesExist, formatSafe, formatSourceFileWithPrettier, getAllImportModuleSpecifiers, getAllImportNames, getAppMetadata, getBooleanPropertyValue, getDefaultProjectOptions, getDocumentTypeMetadata, getEditorMetadata, getInitialStates, getObjectLiteral, getObjectProperty, getOrCreateDirectory, getOrCreateSourceFile, getPreviousVersionSourceFile, getProcessorMetadata, getProperyAssignmentByName, getStringArrayPropertyElements, getStringPropertyValue, getSubgraphMetadata, getVariableDeclarationByTypeName, loadDocumentModelInDir, parseArgs, parseConfig, runOxfmt, updateVersionedImports, validateDocumentModelState };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/codegen",
|
|
3
|
-
"version": "6.2.0-dev.
|
|
3
|
+
"version": "6.2.0-dev.30",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
"graphql-codegen-typescript-validation-schema": "0.18.1",
|
|
48
48
|
"load-json-file": "^7.0.1",
|
|
49
49
|
"npm-registry-fetch": "^19.1.1",
|
|
50
|
-
"
|
|
50
|
+
"oxfmt": "0.55.0",
|
|
51
51
|
"read-pkg": "10.1.0",
|
|
52
52
|
"remeda": "2.33.7",
|
|
53
53
|
"ts-morph": "27.0.2",
|
|
54
54
|
"write-json-file": "^7.0.0",
|
|
55
55
|
"write-package": "7.2.0",
|
|
56
56
|
"zod": "4.3.6",
|
|
57
|
-
"@powerhousedao/shared": "6.2.0-dev.
|
|
58
|
-
"document-model": "6.2.0-dev.
|
|
57
|
+
"@powerhousedao/shared": "6.2.0-dev.30",
|
|
58
|
+
"document-model": "6.2.0-dev.30"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@pnpm/find-workspace-dir": "^1000.1.5",
|