@powerhousedao/ph-cli 5.0.1-staging.13 → 5.0.1-staging.15
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/src/commands/migrate.d.ts +3 -0
- package/dist/src/commands/migrate.d.ts.map +1 -0
- package/dist/src/commands/migrate.js +8 -0
- package/dist/src/commands/migrate.js.map +1 -0
- package/dist/src/commands/register-commands.d.ts.map +1 -1
- package/dist/src/commands/register-commands.js +2 -0
- package/dist/src/commands/register-commands.js.map +1 -1
- package/dist/src/services/generate.d.ts +4 -0
- package/dist/src/services/generate.d.ts.map +1 -1
- package/dist/src/services/generate.js +13 -1
- package/dist/src/services/generate.js.map +1 -1
- package/dist/src/services/migrate/migrate.d.ts +3 -0
- package/dist/src/services/migrate/migrate.d.ts.map +1 -0
- package/dist/src/services/migrate/migrate.js +282 -0
- package/dist/src/services/migrate/migrate.js.map +1 -0
- package/dist/src/services/migrate/migrations/templates/document-models.d.ts +2 -0
- package/dist/src/services/migrate/migrations/templates/document-models.d.ts.map +1 -0
- package/dist/src/services/migrate/migrations/templates/document-models.js +6 -0
- package/dist/src/services/migrate/migrations/templates/document-models.js.map +1 -0
- package/dist/src/services/migrate/migrations/templates/editors.d.ts +2 -0
- package/dist/src/services/migrate/migrations/templates/editors.d.ts.map +1 -0
- package/dist/src/services/migrate/migrations/templates/editors.js +6 -0
- package/dist/src/services/migrate/migrations/templates/editors.js.map +1 -0
- package/dist/src/services/migrate/migrations/templates/index.d.ts +2 -0
- package/dist/src/services/migrate/migrations/templates/index.d.ts.map +1 -0
- package/dist/src/services/migrate/migrations/templates/index.js +7 -0
- package/dist/src/services/migrate/migrations/templates/index.js.map +1 -0
- package/dist/src/services/migrate/migrations/templates/packageJson.d.ts +55 -0
- package/dist/src/services/migrate/migrations/templates/packageJson.d.ts.map +1 -0
- package/dist/src/services/migrate/migrations/templates/packageJson.js +55 -0
- package/dist/src/services/migrate/migrations/templates/packageJson.js.map +1 -0
- package/dist/src/services/migrate/migrations/templates/tsConfig.d.ts +2 -0
- package/dist/src/services/migrate/migrations/templates/tsConfig.d.ts.map +1 -0
- package/dist/src/services/migrate/migrations/templates/tsConfig.js +45 -0
- package/dist/src/services/migrate/migrations/templates/tsConfig.js.map +1 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../src/commands/migrate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,QAE9C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
async function migrate() {
|
|
2
|
+
const { migrate } = await import("../services/migrate/migrate.js");
|
|
3
|
+
return await migrate();
|
|
4
|
+
}
|
|
5
|
+
export function migrateCommand(program) {
|
|
6
|
+
program.command("migrate").description("Run migrations").action(migrate);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=migrate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../../src/commands/migrate.ts"],"names":[],"mappings":"AAEA,KAAK,UAAU,OAAO;IACpB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,gCAAgC,CAAC,CAAC;IACnE,OAAO,MAAM,OAAO,EAAE,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-commands.d.ts","sourceRoot":"","sources":["../../../src/commands/register-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"register-commands.d.ts","sourceRoot":"","sources":["../../../src/commands/register-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAWhD,eAAO,MAAM,QAAQ,4BAYpB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,QAEhD"}
|
|
@@ -4,6 +4,7 @@ import { helpCommand } from "./help.js";
|
|
|
4
4
|
import { inspectCommand } from "./inspect.js";
|
|
5
5
|
import { installCommand } from "./install.js";
|
|
6
6
|
import { listCommand } from "./list.js";
|
|
7
|
+
import { migrateCommand } from "./migrate.js";
|
|
7
8
|
import { serviceCommand } from "./service.js";
|
|
8
9
|
import { switchboardCommand } from "./switchboard.js";
|
|
9
10
|
import { uninstallCommand } from "./uninstall.js";
|
|
@@ -19,6 +20,7 @@ export const commands = [
|
|
|
19
20
|
inspectCommand,
|
|
20
21
|
switchboardCommand,
|
|
21
22
|
vetraCommand,
|
|
23
|
+
migrateCommand,
|
|
22
24
|
];
|
|
23
25
|
export function registerCommands(program) {
|
|
24
26
|
commands.forEach((command) => command(program));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-commands.js","sourceRoot":"","sources":["../../../src/commands/register-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,cAAc;IACd,eAAe;IACf,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB,cAAc;IACd,WAAW;IACX,cAAc;IACd,kBAAkB;IAClB,YAAY;
|
|
1
|
+
{"version":3,"file":"register-commands.js","sourceRoot":"","sources":["../../../src/commands/register-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,cAAc;IACd,eAAe;IACf,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB,cAAc;IACd,WAAW;IACX,cAAc;IACd,kBAAkB;IAClB,YAAY;IACZ,cAAc;CACf,CAAC;AAEF,MAAM,UAAU,gBAAgB,CAAC,OAAgB;IAC/C,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -6,7 +6,10 @@ export type GenerateOptions = {
|
|
|
6
6
|
skipFormat?: boolean;
|
|
7
7
|
force?: boolean;
|
|
8
8
|
watch?: boolean;
|
|
9
|
+
specifiedPackageName?: string;
|
|
9
10
|
editor?: string;
|
|
11
|
+
editorId?: string;
|
|
12
|
+
editorDirName?: string;
|
|
10
13
|
processor?: string;
|
|
11
14
|
documentTypes?: string;
|
|
12
15
|
allowedDocumentTypes?: string;
|
|
@@ -17,6 +20,7 @@ export type GenerateOptions = {
|
|
|
17
20
|
file?: string;
|
|
18
21
|
driveEditor?: string;
|
|
19
22
|
driveEditorAppId?: string;
|
|
23
|
+
driveEditorDirName?: string;
|
|
20
24
|
migrationFile?: string;
|
|
21
25
|
schemaFile?: string;
|
|
22
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/services/generate.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,WAAW,GAAG,cAAc,CAAC;IAC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E,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,EAAE,eAAe,iBA0FzB"}
|
|
@@ -17,8 +17,11 @@ export async function startGenerate(filePath, options) {
|
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
19
|
const command = {
|
|
20
|
+
specifiedPackageName: options.specifiedPackageName,
|
|
20
21
|
editor: !!options.editor,
|
|
21
22
|
editorName: options.editor,
|
|
23
|
+
editorId: options.editorId,
|
|
24
|
+
editorDirName: options.editorDirName,
|
|
22
25
|
documentTypes: options.documentTypes,
|
|
23
26
|
allowedDocumentTypes: options.allowedDocumentTypes,
|
|
24
27
|
processor: !!options.processor,
|
|
@@ -31,6 +34,7 @@ export async function startGenerate(filePath, options) {
|
|
|
31
34
|
driveEditor: !!options.driveEditor,
|
|
32
35
|
driveEditorName: options.driveEditor,
|
|
33
36
|
driveEditorAppId: options.driveEditorAppId,
|
|
37
|
+
driveEditorDirName: options.driveEditorDirName,
|
|
34
38
|
isDragAndDropEnabled: options.isDragAndDropEnabled,
|
|
35
39
|
migrationFile: options.migrationFile,
|
|
36
40
|
schemaFile: options.schemaFile,
|
|
@@ -45,13 +49,21 @@ export async function startGenerate(filePath, options) {
|
|
|
45
49
|
appId: command.driveEditorAppId,
|
|
46
50
|
allowedDocumentTypes: command.allowedDocumentTypes,
|
|
47
51
|
isDragAndDropEnabled: command.isDragAndDropEnabled,
|
|
52
|
+
driveEditorDirName: command.driveEditorDirName,
|
|
48
53
|
});
|
|
49
54
|
}
|
|
50
55
|
else if (command.editor) {
|
|
51
56
|
if (!command.editorName) {
|
|
52
57
|
throw new Error("Editor name is required (--editor or -e)");
|
|
53
58
|
}
|
|
54
|
-
await generateEditor(
|
|
59
|
+
await generateEditor({
|
|
60
|
+
name: command.editorName,
|
|
61
|
+
documentTypes: command.documentTypes?.split(/[|,;]/g) ?? [],
|
|
62
|
+
config: config,
|
|
63
|
+
editorId: command.editorId,
|
|
64
|
+
specifiedPackageName: command.specifiedPackageName,
|
|
65
|
+
editorDirName: command.editorDirName,
|
|
66
|
+
});
|
|
55
67
|
}
|
|
56
68
|
else if (command.processor && options.processor) {
|
|
57
69
|
const processorType = options.processorType === "relationalDb" ? "relationalDb" : "analytics";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/services/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,IAAI,YAAY,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/services/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,IAAI,YAAY,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,IAAI,MAAM,MAAM,CAAC;AA6BxB,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,QAA4B,EAC5B,OAAwB;IAExB,MAAM,UAAU,GAAG,SAAS,EAAE,CAAC;IAE/B,MAAM,MAAM,GAAG;QACb,GAAG,UAAU;QACb,GAAG;YACD,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;YACvD,GAAG,CAAC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@
|
|
|
1
|
+
import { existsSync, readdirSync } from "node:fs";
|
|
2
|
+
import { readdir, writeFile } from "node:fs/promises";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import { readPackage } from "read-pkg";
|
|
5
|
+
import { Project, SyntaxKind } from "ts-morph";
|
|
6
|
+
import { writePackage } from "write-pkg";
|
|
7
|
+
import { generate } from "../../commands/generate.js";
|
|
8
|
+
import { indexTsTemplate } from "./migrations/templates/index.js";
|
|
9
|
+
import { packageJsonExportsTemplate, packageJsonScriptsTemplate, } from "./migrations/templates/packageJson.js";
|
|
10
|
+
import { tsConfigTemplate } from "./migrations/templates/tsConfig.js";
|
|
11
|
+
/** Run all migrations */
|
|
12
|
+
export async function migrate() {
|
|
13
|
+
await migratePackageJson();
|
|
14
|
+
await migrateTsConfig();
|
|
15
|
+
await runGenerateOnAllDocumentModels();
|
|
16
|
+
await runGenerateOnAllEditors();
|
|
17
|
+
const project = new Project({
|
|
18
|
+
tsConfigFilePath: path.resolve("tsconfig.json"),
|
|
19
|
+
compilerOptions: {
|
|
20
|
+
verbatimModuleSyntax: false,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
deleteLegacyEditorDirIndexFiles(project);
|
|
24
|
+
migrateEditorFiles(project);
|
|
25
|
+
migrateRootIndex(project);
|
|
26
|
+
removeZDotSchemaUsage(project);
|
|
27
|
+
removeCreatorsUsage(project);
|
|
28
|
+
removeUtilsDefaultExportUsage(project);
|
|
29
|
+
fixImports(project);
|
|
30
|
+
}
|
|
31
|
+
/** Ensure that the project package.json has the correct scripts and exports. */
|
|
32
|
+
async function migratePackageJson() {
|
|
33
|
+
const packageJson = await readPackage();
|
|
34
|
+
const existingScripts = packageJson.scripts;
|
|
35
|
+
const existingExports = !!packageJson.exports &&
|
|
36
|
+
!Array.isArray(packageJson.exports) &&
|
|
37
|
+
typeof packageJson.exports !== "string"
|
|
38
|
+
? packageJson.exports
|
|
39
|
+
: {};
|
|
40
|
+
const newScripts = {
|
|
41
|
+
...existingScripts,
|
|
42
|
+
...packageJsonScriptsTemplate,
|
|
43
|
+
};
|
|
44
|
+
const newExports = {
|
|
45
|
+
...existingExports,
|
|
46
|
+
...packageJsonExportsTemplate,
|
|
47
|
+
};
|
|
48
|
+
packageJson.scripts = newScripts;
|
|
49
|
+
packageJson.exports = newExports;
|
|
50
|
+
await writePackage(packageJson);
|
|
51
|
+
}
|
|
52
|
+
/** Ensure that the project tsconfig.json matches the boilerplate tsconfig.json. */
|
|
53
|
+
async function migrateTsConfig() {
|
|
54
|
+
const tsConfigPath = path.join(process.cwd(), "tsconfig.json");
|
|
55
|
+
await writeFile(tsConfigPath, tsConfigTemplate);
|
|
56
|
+
}
|
|
57
|
+
/** Ensure that the project index.ts file uses the new exports for editors and document models */
|
|
58
|
+
function migrateRootIndex(project) {
|
|
59
|
+
const indexPath = path.join(process.cwd(), "index.ts");
|
|
60
|
+
let source = project.getSourceFile(indexPath);
|
|
61
|
+
if (!source) {
|
|
62
|
+
source = project.createSourceFile(indexPath);
|
|
63
|
+
}
|
|
64
|
+
source.replaceWithText(indexTsTemplate);
|
|
65
|
+
project.saveSync();
|
|
66
|
+
}
|
|
67
|
+
/** Ensure that the project's editor.tsx files use default exports for lazy loading */
|
|
68
|
+
function migrateEditorFiles(project) {
|
|
69
|
+
const editorsPath = path.join(process.cwd(), "editors");
|
|
70
|
+
const dirs = readdirSync(editorsPath, { withFileTypes: true })
|
|
71
|
+
.filter((entry) => entry.isDirectory())
|
|
72
|
+
.map((entry) => entry.name);
|
|
73
|
+
for (const dir of dirs) {
|
|
74
|
+
const editorFilePath = path.join(editorsPath, dir, "editor.tsx");
|
|
75
|
+
const source = project.getSourceFile(editorFilePath);
|
|
76
|
+
if (!source)
|
|
77
|
+
continue;
|
|
78
|
+
const text = source.getFullText();
|
|
79
|
+
const replaceNamedExportWithDefaultExport = text.replace("export function Editor", "export default function Editor");
|
|
80
|
+
source.replaceWithText(replaceNamedExportWithDefaultExport);
|
|
81
|
+
project.saveSync();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/** Delete the legacy index files in editor directories which are now replaced by module.ts files */
|
|
85
|
+
function deleteLegacyEditorDirIndexFiles(project) {
|
|
86
|
+
const editorsPath = path.join(process.cwd(), "editors");
|
|
87
|
+
const dirs = readdirSync(editorsPath, { withFileTypes: true })
|
|
88
|
+
.filter((entry) => entry.isDirectory())
|
|
89
|
+
.map((entry) => entry.name);
|
|
90
|
+
for (const dir of dirs) {
|
|
91
|
+
const indexFilePath = path.join(editorsPath, dir, "index.ts");
|
|
92
|
+
const source = project.getSourceFile(indexFilePath);
|
|
93
|
+
if (!source)
|
|
94
|
+
continue;
|
|
95
|
+
source.delete();
|
|
96
|
+
project.saveSync();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/** Remove usage of the `z` re-export of document model schemas which caused naming conflicts */
|
|
100
|
+
function removeZDotSchemaUsage(project) {
|
|
101
|
+
const sourceFiles = project.getSourceFiles();
|
|
102
|
+
for (const sourceFile of sourceFiles) {
|
|
103
|
+
const path = sourceFile.getFilePath();
|
|
104
|
+
if (!path.includes(process.cwd()))
|
|
105
|
+
continue;
|
|
106
|
+
if (path.includes("zod.ts"))
|
|
107
|
+
continue;
|
|
108
|
+
const text = sourceFile.getFullText();
|
|
109
|
+
if (/import\s+(?:\{\s*z\s*\}|z)\s+from\s+['"]zod['"]/.test(text))
|
|
110
|
+
continue;
|
|
111
|
+
const withoutZDot = text.replace(/z\./g, "");
|
|
112
|
+
sourceFile.replaceWithText(withoutZDot);
|
|
113
|
+
project.saveSync();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/** Remove usage of the `creators` as an aliased full module export which is no longer needed */
|
|
117
|
+
function removeCreatorsUsage(project) {
|
|
118
|
+
const sourceFiles = project.getSourceFiles();
|
|
119
|
+
for (const sourceFile of sourceFiles) {
|
|
120
|
+
const path = sourceFile.getFilePath();
|
|
121
|
+
if (!path.includes(process.cwd()))
|
|
122
|
+
continue;
|
|
123
|
+
const creatorsInvocations = sourceFile
|
|
124
|
+
.getStatements()
|
|
125
|
+
.filter((statement) => statement.getKind() === SyntaxKind.PropertyAccessExpression)
|
|
126
|
+
.filter((statement) => statement.getText().includes("creators."));
|
|
127
|
+
for (const creatorInvocation of creatorsInvocations) {
|
|
128
|
+
const withoutCreators = creatorInvocation
|
|
129
|
+
.getText()
|
|
130
|
+
.replace(/creators\./g, "");
|
|
131
|
+
creatorInvocation.replaceWithText(withoutCreators);
|
|
132
|
+
project.saveSync();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
/** Remove usage of the `utils` import which is no longer exported as a default import */
|
|
137
|
+
function removeUtilsDefaultExportUsage(project) {
|
|
138
|
+
const sourceFiles = project.getSourceFiles();
|
|
139
|
+
for (const sourceFile of sourceFiles) {
|
|
140
|
+
const path = sourceFile.getFilePath();
|
|
141
|
+
if (!path.includes(process.cwd()))
|
|
142
|
+
continue;
|
|
143
|
+
const statement = sourceFile
|
|
144
|
+
.getImportDeclarations()
|
|
145
|
+
.find((importDeclaration) => importDeclaration.getText().includes("import utils"));
|
|
146
|
+
if (statement) {
|
|
147
|
+
statement.remove();
|
|
148
|
+
project.saveSync();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
/** Fix missing imports in the project */
|
|
153
|
+
function fixImports(project) {
|
|
154
|
+
const sourceFiles = project.getSourceFiles();
|
|
155
|
+
for (const sourceFile of sourceFiles) {
|
|
156
|
+
const path = sourceFile.getFilePath();
|
|
157
|
+
if (!path.includes(process.cwd()))
|
|
158
|
+
continue;
|
|
159
|
+
sourceFile.fixMissingImports(undefined, {
|
|
160
|
+
importModuleSpecifierPreference: "project-relative",
|
|
161
|
+
autoImportSpecifierExcludeRegexes: ["document-model", "document-drive"],
|
|
162
|
+
importModuleSpecifierEnding: "js",
|
|
163
|
+
preferTypeOnlyAutoImports: false,
|
|
164
|
+
});
|
|
165
|
+
sourceFile.fixUnusedIdentifiers();
|
|
166
|
+
project.saveSync();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/** Run the generate command on all document models */
|
|
170
|
+
async function runGenerateOnAllDocumentModels() {
|
|
171
|
+
await generate(undefined, {});
|
|
172
|
+
}
|
|
173
|
+
/** Run the generate command on all editors */
|
|
174
|
+
async function runGenerateOnAllEditors() {
|
|
175
|
+
const editorsPath = path.join(process.cwd(), "editors");
|
|
176
|
+
const dirs = (await readdir(editorsPath, { withFileTypes: true }))
|
|
177
|
+
.filter((entry) => entry.isDirectory())
|
|
178
|
+
.map((entry) => entry.name);
|
|
179
|
+
for (const dir of dirs) {
|
|
180
|
+
const moduleFilePath = path.join(editorsPath, dir, "module.ts");
|
|
181
|
+
const indexFilePath = path.join(editorsPath, dir, "index.ts");
|
|
182
|
+
const hasModuleFile = existsSync(moduleFilePath);
|
|
183
|
+
const hasIndexFile = existsSync(indexFilePath);
|
|
184
|
+
if (!hasModuleFile && !hasIndexFile) {
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
const filePathToUse = hasModuleFile ? moduleFilePath : indexFilePath;
|
|
188
|
+
const { id, name, documentTypes, isDriveEditor } = extractEditorModuleInfo(filePathToUse);
|
|
189
|
+
if (!name) {
|
|
190
|
+
throw new Error(`Editor ${dir} is missing name`);
|
|
191
|
+
}
|
|
192
|
+
if (!id) {
|
|
193
|
+
throw new Error(`Editor ${dir} is missing id`);
|
|
194
|
+
}
|
|
195
|
+
if (isDriveEditor) {
|
|
196
|
+
const configFilePath = path.join(editorsPath, dir, "config.ts");
|
|
197
|
+
const hasConfigFile = existsSync(configFilePath);
|
|
198
|
+
const allowedDocumentTypes = hasConfigFile
|
|
199
|
+
? extractAllowedDocumentTypes(configFilePath)
|
|
200
|
+
: undefined;
|
|
201
|
+
const args = {
|
|
202
|
+
driveEditor: name,
|
|
203
|
+
driveEditorAppId: id,
|
|
204
|
+
driveEditorDirName: dir,
|
|
205
|
+
};
|
|
206
|
+
if (allowedDocumentTypes) {
|
|
207
|
+
args.allowedDocumentTypes = allowedDocumentTypes.join(",");
|
|
208
|
+
}
|
|
209
|
+
await generate(undefined, args);
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
const args = {
|
|
213
|
+
editor: name,
|
|
214
|
+
editorId: id,
|
|
215
|
+
editorDirName: dir,
|
|
216
|
+
documentTypes: documentTypes?.join(","),
|
|
217
|
+
};
|
|
218
|
+
await generate(undefined, args);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
/** Extract the name, id, document types, and whether the editor is a drive editor from the editor module */
|
|
223
|
+
function extractEditorModuleInfo(filePath) {
|
|
224
|
+
const project = new Project({
|
|
225
|
+
tsConfigFilePath: path.resolve("tsconfig.json"),
|
|
226
|
+
compilerOptions: {
|
|
227
|
+
verbatimModuleSyntax: false,
|
|
228
|
+
},
|
|
229
|
+
});
|
|
230
|
+
const sourceFile = project.getSourceFileOrThrow(filePath);
|
|
231
|
+
const moduleDeclaration = getVariableDeclarationByTypeName(sourceFile, "EditorModule");
|
|
232
|
+
const variable = moduleDeclaration?.getInitializerIfKind(SyntaxKind.ObjectLiteralExpression);
|
|
233
|
+
const documentTypes = getObjectProperty(variable, "documentTypes", SyntaxKind.ArrayLiteralExpression)
|
|
234
|
+
?.getElements()
|
|
235
|
+
.map((element) => element.getText())
|
|
236
|
+
.map((text) => text.replace(/["']/g, ""));
|
|
237
|
+
const configProperty = getObjectProperty(variable, "config", SyntaxKind.ObjectLiteralExpression);
|
|
238
|
+
const id = getStringLiteralValue(getObjectProperty(configProperty, "id", SyntaxKind.StringLiteral));
|
|
239
|
+
const name = getStringLiteralValue(getObjectProperty(configProperty, "name", SyntaxKind.StringLiteral));
|
|
240
|
+
const isDriveEditor = documentTypes?.includes("powerhouse/document-drive");
|
|
241
|
+
return { id, name, documentTypes, isDriveEditor };
|
|
242
|
+
}
|
|
243
|
+
/** Extract the allowed document types from the drive editor config */
|
|
244
|
+
function extractAllowedDocumentTypes(filePath) {
|
|
245
|
+
const project = new Project({
|
|
246
|
+
tsConfigFilePath: path.resolve("tsconfig.json"),
|
|
247
|
+
compilerOptions: {
|
|
248
|
+
verbatimModuleSyntax: false,
|
|
249
|
+
},
|
|
250
|
+
});
|
|
251
|
+
const sourceFile = project.getSourceFile(filePath);
|
|
252
|
+
if (!sourceFile)
|
|
253
|
+
return;
|
|
254
|
+
const configVariableDeclaration = getVariableDeclarationByTypeName(sourceFile, "PHDriveEditorConfig");
|
|
255
|
+
const configVariable = configVariableDeclaration?.getInitializerIfKind(SyntaxKind.ObjectLiteralExpression);
|
|
256
|
+
if (!configVariable)
|
|
257
|
+
return;
|
|
258
|
+
const allowedDocumentTypes = getArrayLiteralExpressionElementsText(getObjectProperty(configVariable, "allowedDocumentTypes", SyntaxKind.ArrayLiteralExpression));
|
|
259
|
+
return allowedDocumentTypes;
|
|
260
|
+
}
|
|
261
|
+
function getVariableDeclarationByTypeName(sourceFile, typeName) {
|
|
262
|
+
const variableDeclarations = sourceFile.getVariableDeclarations();
|
|
263
|
+
return variableDeclarations.find((declaration) => declaration.getType().getText().includes(typeName));
|
|
264
|
+
}
|
|
265
|
+
function getStringLiteralValue(stringLiteral) {
|
|
266
|
+
return stringLiteral?.getText().replace(/["']/g, "");
|
|
267
|
+
}
|
|
268
|
+
function getObjectProperty(object, propertyName, propertyType) {
|
|
269
|
+
return object
|
|
270
|
+
?.getProperty(propertyName)
|
|
271
|
+
?.asKind(SyntaxKind.PropertyAssignment)
|
|
272
|
+
?.getChildren()
|
|
273
|
+
.find((child) => child.getKind() === propertyType)
|
|
274
|
+
?.asKind(propertyType);
|
|
275
|
+
}
|
|
276
|
+
function getArrayLiteralExpressionElementsText(arrayLiteralExpression) {
|
|
277
|
+
return arrayLiteralExpression
|
|
278
|
+
?.getElements()
|
|
279
|
+
.map((element) => element.getText())
|
|
280
|
+
.map((text) => text.replace(/["']/g, ""));
|
|
281
|
+
}
|
|
282
|
+
//# sourceMappingURL=migrate.js.map
|
|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W,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CACnD,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB,CAAC,aAAwC;IACrE,OAAO,aAAa,EAAE,OAAO,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AACvD,CAAC;AAED,SAAS,iBAAiB,CACxB,MAA2C,EAC3C,YAAoB,EACpB,YAAe;IAEf,OAAO,MAAM;QACX,EAAE,WAAW,CAAC,YAAY,CAAC;QAC3B,EAAE,MAAM,CAAC,UAAU,CAAC,kBAAkB,CAAC;QACvC,EAAE,WAAW,EAAE;SACd,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,YAAY,CAAC;QAClD,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,qCAAqC,CAC5C,sBAA0D;IAE1D,OAAO,sBAAsB;QAC3B,EAAE,WAAW,EAAE;SACd,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;SACnC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-models.d.ts","sourceRoot":"","sources":["../../../../../../src/services/migrate/migrations/templates/document-models.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,iIAIlC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-models.js","sourceRoot":"","sources":["../../../../../../src/services/migrate/migrations/templates/document-models.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;CAIrC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editors.d.ts","sourceRoot":"","sources":["../../../../../../src/services/migrate/migrations/templates/editors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,4GAI3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editors.js","sourceRoot":"","sources":["../../../../../../src/services/migrate/migrations/templates/editors.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;;;;CAI9B,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const indexTsTemplate = "import type { Manifest } from \"document-model\";\nimport manifestJson from \"./powerhouse.manifest.json\" with { type: \"json\" };\nexport { documentModels } from \"./document-models/document-models.js\";\nexport { editors } from \"./editors/editors.js\";\nexport const manifest: Manifest = manifestJson;\n";
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/services/migrate/migrations/templates/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,wTAK3B,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const indexTsTemplate = `import type { Manifest } from "document-model";
|
|
2
|
+
import manifestJson from "./powerhouse.manifest.json" with { type: "json" };
|
|
3
|
+
export { documentModels } from "./document-models/document-models.js";
|
|
4
|
+
export { editors } from "./editors/editors.js";
|
|
5
|
+
export const manifest: Manifest = manifestJson;
|
|
6
|
+
`;
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/services/migrate/migrations/templates/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;CAK9B,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export declare const packageJsonScriptsTemplate: {
|
|
2
|
+
build: string;
|
|
3
|
+
test: string;
|
|
4
|
+
"test:watch": string;
|
|
5
|
+
lint: string;
|
|
6
|
+
"lint:fix": string;
|
|
7
|
+
tsc: string;
|
|
8
|
+
"tsc:watch": string;
|
|
9
|
+
tailwind: string;
|
|
10
|
+
prepublishOnly: string;
|
|
11
|
+
"check-circular-imports": string;
|
|
12
|
+
generate: string;
|
|
13
|
+
connect: string;
|
|
14
|
+
reactor: string;
|
|
15
|
+
service: string;
|
|
16
|
+
vetra: string;
|
|
17
|
+
migrate: string;
|
|
18
|
+
"service-startup": string;
|
|
19
|
+
"service-unstartup": string;
|
|
20
|
+
};
|
|
21
|
+
export declare const packageJsonExportsTemplate: {
|
|
22
|
+
".": {
|
|
23
|
+
types: string;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
"./document-models": {
|
|
27
|
+
types: string;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
"./editors": {
|
|
31
|
+
types: string;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
"./document-models/*": {
|
|
35
|
+
types: string;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
"./editors/*": {
|
|
39
|
+
types: string;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
"./subgraphs": {
|
|
43
|
+
types: string;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
"./processors": {
|
|
47
|
+
types: string;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
"./manifest": {
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
"./style.css": string;
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=packageJson.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageJson.d.ts","sourceRoot":"","sources":["../../../../../../src/services/migrate/migrations/templates/packageJson.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;CAqBtC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCtC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export const packageJsonScriptsTemplate = {
|
|
2
|
+
build: "npm run tsc && npm run tailwind",
|
|
3
|
+
test: "vitest run",
|
|
4
|
+
"test:watch": "vitest",
|
|
5
|
+
lint: "eslint --config eslint.config.js --cache --cache-strategy content",
|
|
6
|
+
"lint:fix": "npm run lint --fix",
|
|
7
|
+
tsc: "tsc",
|
|
8
|
+
"tsc:watch": "tsc --watch",
|
|
9
|
+
tailwind: "npx @tailwindcss/cli -i ./style.css -o ./dist/style.css",
|
|
10
|
+
prepublishOnly: "npm run build",
|
|
11
|
+
"check-circular-imports": "npx dpdm -T ./index.ts",
|
|
12
|
+
generate: "ph-cli generate",
|
|
13
|
+
connect: "ph-cli connect",
|
|
14
|
+
reactor: "ph-cli reactor",
|
|
15
|
+
service: "ph-cli service",
|
|
16
|
+
vetra: "ph-cli vetra",
|
|
17
|
+
migrate: "ph-cli migrate",
|
|
18
|
+
"service-startup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-startup.sh",
|
|
19
|
+
"service-unstartup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh",
|
|
20
|
+
};
|
|
21
|
+
export const packageJsonExportsTemplate = {
|
|
22
|
+
".": {
|
|
23
|
+
types: "./dist/index.d.ts",
|
|
24
|
+
default: "./dist/index.js",
|
|
25
|
+
},
|
|
26
|
+
"./document-models": {
|
|
27
|
+
types: "./dist/document-models/index.d.ts",
|
|
28
|
+
default: "./dist/document-models/index.js",
|
|
29
|
+
},
|
|
30
|
+
"./editors": {
|
|
31
|
+
types: "./dist/editors/index.d.ts",
|
|
32
|
+
default: "./dist/editors/index.js",
|
|
33
|
+
},
|
|
34
|
+
"./document-models/*": {
|
|
35
|
+
types: "./dist/document-models/*/index.d.ts",
|
|
36
|
+
default: "./dist/document-models/*/index.js",
|
|
37
|
+
},
|
|
38
|
+
"./editors/*": {
|
|
39
|
+
types: "./dist/editors/*/index.d.ts",
|
|
40
|
+
default: "./dist/editors/*/index.js",
|
|
41
|
+
},
|
|
42
|
+
"./subgraphs": {
|
|
43
|
+
types: "./dist/subgraphs/index.d.ts",
|
|
44
|
+
default: "./dist/subgraphs/index.js",
|
|
45
|
+
},
|
|
46
|
+
"./processors": {
|
|
47
|
+
types: "./dist/processors/index.d.ts",
|
|
48
|
+
default: "./dist/processors/index.js",
|
|
49
|
+
},
|
|
50
|
+
"./manifest": {
|
|
51
|
+
default: "./dist/powerhouse.manifest.json",
|
|
52
|
+
},
|
|
53
|
+
"./style.css": "./dist/style.css",
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=packageJson.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageJson.js","sourceRoot":"","sources":["../../../../../../src/services/migrate/migrations/templates/packageJson.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,KAAK,EAAE,iCAAiC;IACxC,IAAI,EAAE,YAAY;IAClB,YAAY,EAAE,QAAQ;IACtB,IAAI,EAAE,mEAAmE;IACzE,UAAU,EAAE,oBAAoB;IAChC,GAAG,EAAE,KAAK;IACV,WAAW,EAAE,aAAa;IAC1B,QAAQ,EAAE,yDAAyD;IACnE,cAAc,EAAE,eAAe;IAC/B,wBAAwB,EAAE,wBAAwB;IAClD,QAAQ,EAAE,iBAAiB;IAC3B,OAAO,EAAE,gBAAgB;IACzB,OAAO,EAAE,gBAAgB;IACzB,OAAO,EAAE,gBAAgB;IACzB,KAAK,EAAE,cAAc;IACrB,OAAO,EAAE,gBAAgB;IACzB,iBAAiB,EACf,2EAA2E;IAC7E,mBAAmB,EACjB,6EAA6E;CAChF,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,GAAG,EAAE;QACH,KAAK,EAAE,mBAAmB;QAC1B,OAAO,EAAE,iBAAiB;KAC3B;IACD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