ph-cmd 5.1.0 → 5.2.0-dev.1
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/cli.js +30 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/__tests__/update.test.js +1 -1
- package/dist/src/commands/__tests__/update.test.js.map +1 -1
- package/dist/src/commands/__tests__/use.test.js +1 -1
- package/dist/src/commands/__tests__/use.test.js.map +1 -1
- package/dist/src/commands/index.d.ts +1 -4
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +1 -7
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init.d.ts +1 -21
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +153 -65
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/setup-globals.js +1 -1
- package/dist/src/commands/setup-globals.js.map +1 -1
- package/dist/src/commands/update.d.ts +1 -12
- package/dist/src/commands/update.d.ts.map +1 -1
- package/dist/src/commands/update.js +92 -101
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/commands/update.old.d.ts +13 -0
- package/dist/src/commands/update.old.d.ts.map +1 -0
- package/dist/src/commands/update.old.js +105 -0
- package/dist/src/commands/update.old.js.map +1 -0
- package/dist/src/commands/use-local.d.ts +2 -0
- package/dist/src/commands/use-local.d.ts.map +1 -0
- package/dist/src/commands/use-local.js +115 -0
- package/dist/src/commands/use-local.js.map +1 -0
- package/dist/src/commands/use.d.ts +1 -49
- package/dist/src/commands/use.d.ts.map +1 -1
- package/dist/src/commands/use.js +106 -188
- package/dist/src/commands/use.js.map +1 -1
- package/dist/src/commands/use.old.d.ts +55 -0
- package/dist/src/commands/use.old.d.ts.map +1 -0
- package/dist/src/commands/use.old.js +219 -0
- package/dist/src/commands/use.old.js.map +1 -0
- package/dist/src/help.d.ts +1 -1
- package/dist/src/help.d.ts.map +1 -1
- package/dist/src/help.js +12 -7
- package/dist/src/help.js.map +1 -1
- package/dist/src/utils/constants.d.ts +6 -0
- package/dist/src/utils/constants.d.ts.map +1 -1
- package/dist/src/utils/constants.js +32 -2
- package/dist/src/utils/constants.js.map +1 -1
- package/dist/src/utils/file-system.d.ts +2 -0
- package/dist/src/utils/file-system.d.ts.map +1 -0
- package/dist/src/utils/file-system.js +12 -0
- package/dist/src/utils/file-system.js.map +1 -0
- package/dist/src/utils/help-formatting.d.ts.map +1 -1
- package/dist/src/utils/help-formatting.js +13 -1
- package/dist/src/utils/help-formatting.js.map +1 -1
- package/dist/src/utils/package-manager.d.ts +0 -7
- package/dist/src/utils/package-manager.d.ts.map +1 -1
- package/dist/src/utils/package-manager.js +27 -25
- package/dist/src/utils/package-manager.js.map +1 -1
- package/dist/src/utils/parsing.d.ts +20 -0
- package/dist/src/utils/parsing.d.ts.map +1 -0
- package/dist/src/utils/parsing.js +52 -0
- package/dist/src/utils/parsing.js.map +1 -0
- package/dist/src/utils/run-cmd.d.ts +2 -0
- package/dist/src/utils/run-cmd.d.ts.map +1 -0
- package/dist/src/utils/run-cmd.js +11 -0
- package/dist/src/utils/run-cmd.js.map +1 -0
- package/dist/src/utils/validate-remote-drive.d.ts +4 -3
- package/dist/src/utils/validate-remote-drive.d.ts.map +1 -1
- package/dist/src/utils/validate-remote-drive.js +21 -7
- package/dist/src/utils/validate-remote-drive.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.d.ts.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use.old.js","sourceRoot":"","sources":["../../../src/commands/use.old.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,C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AAC;YAChC,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAC5B,CAAC;YACD,OAAO,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAC;YAChE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/dist/src/help.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare const updateHelp = "\nCommand Overview:\n The update command hel
|
|
|
9
9
|
/**
|
|
10
10
|
* Help text for the use command
|
|
11
11
|
*/
|
|
12
|
-
export declare const useHelp = "\nCommand Overview:\n The use command allows you to quickly switch between different environments for all Powerhouse\n dependencies in your project. It provides a convenient way to toggle between development,\n production,
|
|
12
|
+
export declare const useHelp = "\nCommand Overview:\n The use command allows you to quickly switch between different environments for all Powerhouse\n dependencies in your project. It provides a convenient way to toggle between development,\n production, local versions, or a specific version of the packages.\n\n This command:\n 1. Updates all installed Powerhouse dependencies to the specified environment or version\n 2. Can link to local dependencies from a monorepo for development\n 3. Only updates dependencies that are already present in your package.json\n 4. Supports special packages without the @powerhousedao prefix\n\nArguments:\n <environment> Required. The environment or version to use. Valid options:\n - dev: Use development versions (@dev tag)\n - staging: Use staging versions (@staging tag)\n - prod/latest: Use production versions (@latest tag)\n - local: Use local filesystem versions (requires localPath)\n - <version>: Use a specific version (e.g., 5.1.0, 1.0.0-beta.1)\n\n [localPath] Path to the local monorepo. Required when environment is 'local'.\n This should be the root of your Powerhouse monorepo.\n\nOptions:\n --force Force environment to use, even if not in the predefined list\n\n --package-manager Override the auto-detected package manager with the specified one.\n\n --debug Show additional logs during execution for troubleshooting.\n\n --use-resolved Resolves tags to their actual version numbers. For example:\n - @dev tag will be resolved to the latest dev version (e.g. v1.0.1-dev.1)\n - @latest tag will be resolved to the latest stable version (e.g. v1.0.0)\n This ensures you get the exact version that matches the tag.\n\nSpecial Cases:\n - Local Development: When using the 'local' environment, dependencies are linked directly\n to local filesystem paths, allowing for real-time development and testing.\n\n - Missing Dependencies: The command only updates Powerhouse dependencies that are already\n installed in your project. It won't add new ones.\n\nExamples:\n $ ph use dev # Switch all dependencies to development versions\n $ ph use staging # Switch all dependencies to staging versions\n $ ph use prod # Switch all dependencies to production versions\n $ ph use latest # Same as 'prod', use latest production versions\n $ ph use 5.1.0 # Switch all dependencies to version 5.1.0\n $ ph use 1.0.0-beta.1 # Switch all dependencies to a pre-release version\n $ ph use local /path/to/monorepo # Link to local versions in the specified monorepo\n $ ph use dev --package-manager npm # Use npm instead of the auto-detected package manager\n $ ph use dev --debug # Show debug information during execution\n $ ph use dev --use-resolved # Resolve @dev tags to actual version numbers (e.g. v1.0.1-dev.1)\n";
|
|
13
13
|
/**
|
|
14
14
|
* Help text for the setup-globals command
|
|
15
15
|
*/
|
package/dist/src/help.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/help.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU,miEAmCtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/help.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU,miEAmCtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,slGAqDnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,kgEA0C5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,w4EA+CpB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,64CA2BxB,CAAC"}
|
package/dist/src/help.js
CHANGED
|
@@ -48,28 +48,30 @@ export const useHelp = `
|
|
|
48
48
|
Command Overview:
|
|
49
49
|
The use command allows you to quickly switch between different environments for all Powerhouse
|
|
50
50
|
dependencies in your project. It provides a convenient way to toggle between development,
|
|
51
|
-
production,
|
|
51
|
+
production, local versions, or a specific version of the packages.
|
|
52
52
|
|
|
53
53
|
This command:
|
|
54
|
-
1. Updates all installed Powerhouse dependencies to the specified environment
|
|
54
|
+
1. Updates all installed Powerhouse dependencies to the specified environment or version
|
|
55
55
|
2. Can link to local dependencies from a monorepo for development
|
|
56
56
|
3. Only updates dependencies that are already present in your package.json
|
|
57
57
|
4. Supports special packages without the @powerhousedao prefix
|
|
58
58
|
|
|
59
59
|
Arguments:
|
|
60
|
-
<environment> Required. The environment to use. Valid options:
|
|
60
|
+
<environment> Required. The environment or version to use. Valid options:
|
|
61
61
|
- dev: Use development versions (@dev tag)
|
|
62
|
+
- staging: Use staging versions (@staging tag)
|
|
62
63
|
- prod/latest: Use production versions (@latest tag)
|
|
63
64
|
- local: Use local filesystem versions (requires localPath)
|
|
64
|
-
|
|
65
|
+
- <version>: Use a specific version (e.g., 5.1.0, 1.0.0-beta.1)
|
|
66
|
+
|
|
65
67
|
[localPath] Path to the local monorepo. Required when environment is 'local'.
|
|
66
68
|
This should be the root of your Powerhouse monorepo.
|
|
67
69
|
|
|
68
70
|
Options:
|
|
69
71
|
--force Force environment to use, even if not in the predefined list
|
|
70
|
-
|
|
72
|
+
|
|
71
73
|
--package-manager Override the auto-detected package manager with the specified one.
|
|
72
|
-
|
|
74
|
+
|
|
73
75
|
--debug Show additional logs during execution for troubleshooting.
|
|
74
76
|
|
|
75
77
|
--use-resolved Resolves tags to their actual version numbers. For example:
|
|
@@ -80,14 +82,17 @@ Options:
|
|
|
80
82
|
Special Cases:
|
|
81
83
|
- Local Development: When using the 'local' environment, dependencies are linked directly
|
|
82
84
|
to local filesystem paths, allowing for real-time development and testing.
|
|
83
|
-
|
|
85
|
+
|
|
84
86
|
- Missing Dependencies: The command only updates Powerhouse dependencies that are already
|
|
85
87
|
installed in your project. It won't add new ones.
|
|
86
88
|
|
|
87
89
|
Examples:
|
|
88
90
|
$ ph use dev # Switch all dependencies to development versions
|
|
91
|
+
$ ph use staging # Switch all dependencies to staging versions
|
|
89
92
|
$ ph use prod # Switch all dependencies to production versions
|
|
90
93
|
$ ph use latest # Same as 'prod', use latest production versions
|
|
94
|
+
$ ph use 5.1.0 # Switch all dependencies to version 5.1.0
|
|
95
|
+
$ ph use 1.0.0-beta.1 # Switch all dependencies to a pre-release version
|
|
91
96
|
$ ph use local /path/to/monorepo # Link to local versions in the specified monorepo
|
|
92
97
|
$ ph use dev --package-manager npm # Use npm instead of the auto-detected package manager
|
|
93
98
|
$ ph use dev --debug # Show debug information during execution
|
package/dist/src/help.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/help.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCzB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/help.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCzB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDtB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0C/B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CvB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2B3B,CAAC;AAEF,8CAA8C"}
|
|
@@ -3,6 +3,8 @@ export declare const PH_BIN = "ph-cli";
|
|
|
3
3
|
export declare const PH_CLI_COMMANDS: string[];
|
|
4
4
|
export declare const POWERHOUSE_CONFIG_FILE = "powerhouse.config.json";
|
|
5
5
|
export declare const HOME_DIR: string;
|
|
6
|
+
export declare const PH_GLOBAL_DIR_NAME = ".ph";
|
|
7
|
+
export declare const PH_GLOBAL_PACKAGE_NAME = "ph-global";
|
|
6
8
|
export declare const PH_GLOBAL_PROJECT_NAME = ".ph";
|
|
7
9
|
export declare const POWERHOUSE_GLOBAL_DIR: string;
|
|
8
10
|
export declare const packageManagers: {
|
|
@@ -50,4 +52,8 @@ export declare const packageManagers: {
|
|
|
50
52
|
readonly installDepsCommand: "npm install";
|
|
51
53
|
};
|
|
52
54
|
};
|
|
55
|
+
export declare const PACKAGES_DEPENDENCIES: readonly ["@powerhousedao/builder-tools", "@powerhousedao/codegen", "@powerhousedao/common", "@powerhousedao/config", "@powerhousedao/design-system", "document-drive", "document-model", "@powerhousedao/reactor", "@powerhousedao/reactor-api", "@powerhousedao/reactor-browser", "@powerhousedao/reactor-local", "@powerhousedao/reactor-mcp", "@powerhousedao/switchboard-gui", "@powerhousedao/vetra"];
|
|
56
|
+
export declare const CLIS_DEPENDENCIES: string[];
|
|
57
|
+
export declare const APPS_DEPENDENCIES: string[];
|
|
58
|
+
export declare const ALL_POWERHOUSE_DEPENDENCIES: string[];
|
|
53
59
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,QAAkB,CAAC;AAC3C,eAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,QAAkB,CAAC;AAC3C,eAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,eAAO,MAAM,eAAe,UAkB3B,CAAC;AACF,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,QAAQ,QAAY,CAAC;AAClC,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AACxC,eAAO,MAAM,sBAAsB,cAAc,CAAC;AAElD,eAAO,MAAM,sBAAsB,QAAqB,CAAC;AACzD,eAAO,MAAM,qBAAqB,QAA0C,CAAC;AAE7E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ClB,CAAC;AAEX,eAAO,MAAM,qBAAqB,6YAexB,CAAC;AAEX,eAAO,MAAM,iBAAiB,UAAsC,CAAC;AACrE,eAAO,MAAM,iBAAiB,UAG7B,CAAC;AAEF,eAAO,MAAM,2BAA2B,UAIvC,CAAC"}
|
|
@@ -19,11 +19,15 @@ export const PH_CLI_COMMANDS = [
|
|
|
19
19
|
"list",
|
|
20
20
|
"inspect",
|
|
21
21
|
"version",
|
|
22
|
+
"login",
|
|
22
23
|
];
|
|
23
24
|
export const POWERHOUSE_CONFIG_FILE = "powerhouse.config.json";
|
|
24
25
|
export const HOME_DIR = homedir();
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
26
|
+
export const PH_GLOBAL_DIR_NAME = ".ph";
|
|
27
|
+
export const PH_GLOBAL_PACKAGE_NAME = "ph-global";
|
|
28
|
+
// Keep PH_GLOBAL_PROJECT_NAME for backwards compatibility
|
|
29
|
+
export const PH_GLOBAL_PROJECT_NAME = PH_GLOBAL_DIR_NAME;
|
|
30
|
+
export const POWERHOUSE_GLOBAL_DIR = path.join(HOME_DIR, PH_GLOBAL_DIR_NAME);
|
|
27
31
|
export const packageManagers = {
|
|
28
32
|
bun: {
|
|
29
33
|
installCommand: "bun add {{dependency}}",
|
|
@@ -69,4 +73,30 @@ export const packageManagers = {
|
|
|
69
73
|
installDepsCommand: "npm install",
|
|
70
74
|
},
|
|
71
75
|
};
|
|
76
|
+
export const PACKAGES_DEPENDENCIES = [
|
|
77
|
+
"@powerhousedao/builder-tools",
|
|
78
|
+
"@powerhousedao/codegen",
|
|
79
|
+
"@powerhousedao/common",
|
|
80
|
+
"@powerhousedao/config",
|
|
81
|
+
"@powerhousedao/design-system",
|
|
82
|
+
"document-drive",
|
|
83
|
+
"document-model",
|
|
84
|
+
"@powerhousedao/reactor",
|
|
85
|
+
"@powerhousedao/reactor-api",
|
|
86
|
+
"@powerhousedao/reactor-browser",
|
|
87
|
+
"@powerhousedao/reactor-local",
|
|
88
|
+
"@powerhousedao/reactor-mcp",
|
|
89
|
+
"@powerhousedao/switchboard-gui",
|
|
90
|
+
"@powerhousedao/vetra",
|
|
91
|
+
];
|
|
92
|
+
export const CLIS_DEPENDENCIES = ["ph-cmd", "@powerhousedao/ph-cli"];
|
|
93
|
+
export const APPS_DEPENDENCIES = [
|
|
94
|
+
"@powerhousedao/connect",
|
|
95
|
+
"@powerhousedao/switchboard",
|
|
96
|
+
];
|
|
97
|
+
export const ALL_POWERHOUSE_DEPENDENCIES = [
|
|
98
|
+
...PACKAGES_DEPENDENCIES,
|
|
99
|
+
...CLIS_DEPENDENCIES,
|
|
100
|
+
...APPS_DEPENDENCIES,
|
|
101
|
+
];
|
|
72
102
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC3C,MAAM,CAAC,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ChC,8BAA8B;IAC9B,4BAA4B;IAC5B,gCAAgC;IAChC,sBAAsB;CACd,CAAC;AAEX,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,uBAAuB,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,wBAAwB;IACxB,4BAA4B;CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,GAAG,qBAAqB;IACxB,GAAG,iBAAiB;IACpB,GAAG,iBAAiB;CACrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-system.d.ts","sourceRoot":"","sources":["../../../src/utils/file-system.ts"],"names":[],"mappings":"AAGA,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO9D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { constants } from "node:fs";
|
|
2
|
+
import { access } from "node:fs/promises";
|
|
3
|
+
export async function dirExists(path) {
|
|
4
|
+
try {
|
|
5
|
+
await access(path, constants.F_OK);
|
|
6
|
+
return true;
|
|
7
|
+
}
|
|
8
|
+
catch {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=file-system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-system.js","sourceRoot":"","sources":["../../../src/utils/file-system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAY;IAC1C,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help-formatting.d.ts","sourceRoot":"","sources":["../../../src/utils/help-formatting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQzC,eAAO,MAAM,sBAAsB;;;;CAOlC,CAAC;AAiEF;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CA2DxE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAS1D;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAOjE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAe7D;
|
|
1
|
+
{"version":3,"file":"help-formatting.d.ts","sourceRoot":"","sources":["../../../src/utils/help-formatting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQzC,eAAO,MAAM,sBAAsB;;;;CAOlC,CAAC;AAiEF;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CA2DxE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAS1D;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAOjE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAe7D;AAeD;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BxE"}
|
|
@@ -148,6 +148,17 @@ export function captureCommanderHelp(program) {
|
|
|
148
148
|
console.log = originalConsoleLog;
|
|
149
149
|
return helpText;
|
|
150
150
|
}
|
|
151
|
+
const extraHelpLines = `
|
|
152
|
+
init [name] [options] Initialize a new project
|
|
153
|
+
use [release] [options] Specify your version of Powerhouse dependencies
|
|
154
|
+
update Update your powerhouse dependencies
|
|
155
|
+
`;
|
|
156
|
+
function injectExtraHelpLines(helpText, extraLines) {
|
|
157
|
+
const result = `${extraLines}${helpText}`
|
|
158
|
+
.replaceAll("\n\n", "")
|
|
159
|
+
.replace("\n", "");
|
|
160
|
+
return result;
|
|
161
|
+
}
|
|
151
162
|
/**
|
|
152
163
|
* Generates and displays the merged help output
|
|
153
164
|
* @param {Command} program - Commander program instance
|
|
@@ -167,7 +178,8 @@ export async function generateMergedHelp(program) {
|
|
|
167
178
|
restoreCommandDescriptions(program);
|
|
168
179
|
// Merge and display help
|
|
169
180
|
const mergedHelp = mergeHelp(helpText, forwardedHelp);
|
|
170
|
-
|
|
181
|
+
const withExtraLines = injectExtraHelpLines(mergedHelp, extraHelpLines);
|
|
182
|
+
console.log(withExtraLines);
|
|
171
183
|
}
|
|
172
184
|
else {
|
|
173
185
|
console.log(captureCommanderHelp(program));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help-formatting.js","sourceRoot":"","sources":["../../../src/utils/help-formatting.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,6BAA6B,EAC7B,cAAc,GACf,MAAM,sBAAsB,CAAC;AAE9B,8CAA8C;AAC9C,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,kDAAkD;IAClD,kBAAkB,EAAE,EAAE;IACtB,4CAA4C;IAC5C,eAAe,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC;IACnE,2DAA2D;IAC3D,mBAAmB,EAAE,cAAc;CACpC,CAAC;AAEF;;;;GAIG;AACH,SAAS,mBAAmB,CAAC,IAAY;I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AC;QAE7B,2CAA2C;QAC3C,MAAM,QAAQ,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;QAE/C,gCAAgC;QAChC,0BAA0B,CAAC,OAAO,CAAC,CAAC;QACpC,yBAAyB;QACzB,MAAM,UAAU,GAAG,SAAS,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;QACtD,MAAM,cAAc,GAAG,oBAAoB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC9B,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC"}
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import type { GlobalProjectOptions, PackageManager, PathValidation, ProjectInfo } from "./types.js";
|
|
2
|
-
export declare function resolvePackageManagerOptions(options: {
|
|
3
|
-
packageManager?: string;
|
|
4
|
-
npm?: boolean;
|
|
5
|
-
pnpm?: boolean;
|
|
6
|
-
yarn?: boolean;
|
|
7
|
-
bun?: boolean;
|
|
8
|
-
}): string | undefined;
|
|
9
2
|
export declare function defaultPathValidation(): boolean;
|
|
10
3
|
export declare function isPowerhouseProject(dir: string): boolean;
|
|
11
4
|
export declare function findNodeProjectRoot(dir: string, pathValidation?: PathValidation): string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-manager.d.ts","sourceRoot":"","sources":["../../../src/utils/package-manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"package-manager.d.ts","sourceRoot":"","sources":["../../../src/utils/package-manager.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,WAAW,EACZ,MAAM,YAAY,CAAC;AAEpB,wBAAgB,qBAAqB,YAEpC;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,WAI9C;AAED,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,MAAM,EACX,cAAc,GAAE,cAAsC,iBAevD;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAYrE;AAED,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAUzE;AAED,wBAAsB,cAAc,CAClC,KAAK,CAAC,EAAE,OAAO,EACf,qBAAqB,UAAO,GAC3B,OAAO,CAAC,WAAW,CAAC,CA6BtB;AAED,wBAAgB,gBAAgB,CAC9B,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,OAAO,EACf,aAAa,UAAQ,UAoCtB;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,GACjC,WAAW,MAAM,EACjB,YAAY,MAAM,KACjB,MAAM,GAAG,IAeX,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,cAAc,MAAM,EACpB,UAAS,oBAAyB,kBAoDnC,CAAC"}
|
|
@@ -1,26 +1,9 @@
|
|
|
1
|
-
import { createProject
|
|
1
|
+
import { createProject } from "@powerhousedao/codegen";
|
|
2
2
|
import { execSync } from "node:child_process";
|
|
3
|
-
import { existsSync } from "node:fs";
|
|
3
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
4
4
|
import path, { dirname } from "node:path";
|
|
5
|
-
import { HOME_DIR, PH_BIN_PATH,
|
|
6
|
-
|
|
7
|
-
if (options.packageManager) {
|
|
8
|
-
return options.packageManager;
|
|
9
|
-
}
|
|
10
|
-
if (options.npm) {
|
|
11
|
-
return "npm";
|
|
12
|
-
}
|
|
13
|
-
if (options.pnpm) {
|
|
14
|
-
return "pnpm";
|
|
15
|
-
}
|
|
16
|
-
if (options.yarn) {
|
|
17
|
-
return "yarn";
|
|
18
|
-
}
|
|
19
|
-
if (options.bun) {
|
|
20
|
-
return "bun";
|
|
21
|
-
}
|
|
22
|
-
return undefined;
|
|
23
|
-
}
|
|
5
|
+
import { HOME_DIR, PH_BIN_PATH, PH_GLOBAL_DIR_NAME, PH_GLOBAL_PACKAGE_NAME, POWERHOUSE_CONFIG_FILE, POWERHOUSE_GLOBAL_DIR, packageManagers, } from "./constants.js";
|
|
6
|
+
import { parsePackageManager, parseTag } from "./parsing.js";
|
|
24
7
|
export function defaultPathValidation() {
|
|
25
8
|
return true;
|
|
26
9
|
}
|
|
@@ -153,6 +136,21 @@ export const createGlobalProject = async (projectName, options = {}) => {
|
|
|
153
136
|
// check if the global project already exists
|
|
154
137
|
const globalProjectExists = existsSync(POWERHOUSE_GLOBAL_DIR);
|
|
155
138
|
if (globalProjectExists) {
|
|
139
|
+
// Fix existing installations with invalid ".ph" package name
|
|
140
|
+
const packageJsonPath = path.join(POWERHOUSE_GLOBAL_DIR, "package.json");
|
|
141
|
+
if (existsSync(packageJsonPath)) {
|
|
142
|
+
try {
|
|
143
|
+
const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
|
|
144
|
+
if (packageJson.name?.startsWith(".")) {
|
|
145
|
+
console.log("📦 Fixing invalid package name in global project...");
|
|
146
|
+
packageJson.name = PH_GLOBAL_PACKAGE_NAME;
|
|
147
|
+
writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
catch {
|
|
151
|
+
// Ignore errors reading/writing package.json
|
|
152
|
+
}
|
|
153
|
+
}
|
|
156
154
|
console.log(`📦 Using global project: ${POWERHOUSE_GLOBAL_DIR}`);
|
|
157
155
|
return;
|
|
158
156
|
}
|
|
@@ -160,12 +158,16 @@ export const createGlobalProject = async (projectName, options = {}) => {
|
|
|
160
158
|
process.chdir(HOME_DIR);
|
|
161
159
|
try {
|
|
162
160
|
await createProject({
|
|
163
|
-
name:
|
|
164
|
-
interactive: false,
|
|
161
|
+
name: PH_GLOBAL_DIR_NAME,
|
|
165
162
|
tag: parseTag(options),
|
|
166
|
-
packageManager:
|
|
167
|
-
getPackageManagerFromPath(PH_BIN_PATH),
|
|
163
|
+
packageManager: parsePackageManager(options) ?? getPackageManagerFromPath(PH_BIN_PATH),
|
|
168
164
|
});
|
|
165
|
+
// Fix the package.json name - ".ph" is invalid for npm/vite
|
|
166
|
+
// The directory name can be ".ph" but the package name must be valid
|
|
167
|
+
const packageJsonPath = path.join(POWERHOUSE_GLOBAL_DIR, "package.json");
|
|
168
|
+
const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
|
|
169
|
+
packageJson.name = PH_GLOBAL_PACKAGE_NAME;
|
|
170
|
+
writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
|
169
171
|
console.log(`🚀 Global project initialized successfully: ${POWERHOUSE_GLOBAL_DIR}`);
|
|
170
172
|
}
|
|
171
173
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-manager.js","sourceRoot":"","sources":["../../../src/utils/package-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"package-manager.js","sourceRoot":"","sources":["../../../src/utils/package-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EACL,QAAQ,EACR,WAAW,EACX,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,GAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAQ7D,MAAM,UAAU,qBAAqB;IACnC,OAAO,IAAI,CAAC;AACd,CAAC;A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EAAE,CAAC,CAAC;QACjE,OAAO;IACT,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;IACjD,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAExB,IAAI,CAAC;QACH,MAAM,aAAa,CAAC;YAClB,IAAI,EAAE,kBAAkB;YACxB,GAAG,EAAE,QAAQ,CAAC,OAAO,CAAC;YACtB,cAAc,EACZ,mBAAmB,CAAC,OAAO,CAAC,IAAI,yBAAyB,CAAC,WAAW,CAAC;SACzE,CAAC,CAAC;QAEH,4DAA4D;QAC5D,qEAAqE;QACrE,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,cAAc,CAAC,CAAC;QACzE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC,CAEpE,CAAC;QACF,WAAW,CAAC,IAAI,GAAG,sBAAsB,CAAC;QAC1C,aAAa,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAErE,OAAO,CAAC,GAAG,CACT,+CAA+C,qBAAqB,EAAE,CACvE,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,2CAA2C,EAAE,KAAK,CAAC,CAAC;IACpE,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare function parseTag(args: {
|
|
2
|
+
tag?: string;
|
|
3
|
+
dev?: boolean;
|
|
4
|
+
staging?: boolean;
|
|
5
|
+
}): string;
|
|
6
|
+
export declare function parsePackageManager(args: {
|
|
7
|
+
packageManager?: string;
|
|
8
|
+
npm?: boolean;
|
|
9
|
+
pnpm?: boolean;
|
|
10
|
+
yarn?: boolean;
|
|
11
|
+
bun?: boolean;
|
|
12
|
+
}): string | undefined;
|
|
13
|
+
export declare function handleMutuallyExclusiveOptions(options: Record<string, string | boolean | number | undefined>, optionsName: string): void;
|
|
14
|
+
export declare function getTagFromVersion(version: string): "dev" | "latest" | "staging";
|
|
15
|
+
export declare function logVersionUpdate(args: {
|
|
16
|
+
name: string;
|
|
17
|
+
version: string;
|
|
18
|
+
newVersion: string;
|
|
19
|
+
}): void;
|
|
20
|
+
//# sourceMappingURL=parsing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsing.d.ts","sourceRoot":"","sources":["../../../src/utils/parsing.ts"],"names":[],"mappings":"AAEA,wBAAgB,QAAQ,CAAC,IAAI,EAAE;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,UAMA;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,sBAYA;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC,EAC9D,WAAW,EAAE,MAAM,QAcpB;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,gCAIhD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB,QAKA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
export function parseTag(args) {
|
|
3
|
+
const { tag, dev, staging } = args;
|
|
4
|
+
if (tag)
|
|
5
|
+
return tag;
|
|
6
|
+
if (dev)
|
|
7
|
+
return "dev";
|
|
8
|
+
if (staging)
|
|
9
|
+
return "staging";
|
|
10
|
+
return "latest";
|
|
11
|
+
}
|
|
12
|
+
export function parsePackageManager(args) {
|
|
13
|
+
const { npm, pnpm, yarn, bun, packageManager } = args;
|
|
14
|
+
if (npm)
|
|
15
|
+
return "npm";
|
|
16
|
+
if (pnpm)
|
|
17
|
+
return "pnpm";
|
|
18
|
+
if (yarn)
|
|
19
|
+
return "yarn";
|
|
20
|
+
if (bun)
|
|
21
|
+
return "bun";
|
|
22
|
+
if (packageManager)
|
|
23
|
+
return packageManager;
|
|
24
|
+
const userAgentPackageManager = process.env.npm_config_user_agent?.match(/^(pnpm|npm|yarn|bun)\b/)?.[1];
|
|
25
|
+
if (userAgentPackageManager)
|
|
26
|
+
return userAgentPackageManager;
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
export function handleMutuallyExclusiveOptions(options, optionsName) {
|
|
30
|
+
const mutuallyExclusiveOptions = Object.entries(options)
|
|
31
|
+
.map(([k, v]) => {
|
|
32
|
+
if (v !== undefined)
|
|
33
|
+
return k;
|
|
34
|
+
return undefined;
|
|
35
|
+
})
|
|
36
|
+
.filter((v) => v !== undefined);
|
|
37
|
+
if (mutuallyExclusiveOptions.length > 1) {
|
|
38
|
+
throw new Error(`Cannot specify multiple ${optionsName} options. You provided: ${mutuallyExclusiveOptions.join(", ")}`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export function getTagFromVersion(version) {
|
|
42
|
+
if (version.includes("dev"))
|
|
43
|
+
return "dev";
|
|
44
|
+
if (version.includes("staging"))
|
|
45
|
+
return "staging";
|
|
46
|
+
return "latest";
|
|
47
|
+
}
|
|
48
|
+
export function logVersionUpdate(args) {
|
|
49
|
+
const { name, version, newVersion } = args;
|
|
50
|
+
console.log(`⚙️ Updating ${chalk.bold(name)}: ${chalk.blue(version)} -> ${chalk.green(newVersion)}`);
|
|
51
|
+
}
|
|
52
|
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B,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;IAElC,IAAI,wBAAwB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CACb,2BAA2B,WAAW,2BAA2B,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACvG,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC1C,IAAI,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;QAAE,OAAO,SAAS,CAAC;IAClD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAIhC;IACC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAC3C,OAAO,CAAC,GAAG,CACT,eAAe,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CACxF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-cmd.d.ts","sourceRoot":"","sources":["../../../src/utils/run-cmd.ts"],"names":[],"mappings":"AAEA,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,QAOrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-cmd.js","sourceRoot":"","sources":["../../../src/utils/run-cmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,UAAU,MAAM,CAAC,OAAe;IACpC,IAAI,CAAC;QACH,QAAQ,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAC1C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QAC1C,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* Sets up a remote drive for initialization by validating and creating
|
|
3
|
+
* a Vetra document if needed.
|
|
4
|
+
* Returns true if setup succeeds, false if it should stop execution.
|
|
4
5
|
*/
|
|
5
|
-
export declare function
|
|
6
|
+
export declare function setupRemoteDrive(remoteDriveUrl: string): Promise<boolean>;
|
|
6
7
|
//# sourceMappingURL=validate-remote-drive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-remote-drive.d.ts","sourceRoot":"","sources":["../../../src/utils/validate-remote-drive.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validate-remote-drive.d.ts","sourceRoot":"","sources":["../../../src/utils/validate-remote-drive.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,OAAO,CAAC,CA+DlB"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { getVetraDocuments } from "@powerhousedao/common/utils";
|
|
1
|
+
import { createVetraDocument, getVetraDocuments, } from "@powerhousedao/common/utils";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Sets up a remote drive for initialization by validating and creating
|
|
4
|
+
* a Vetra document if needed.
|
|
5
|
+
* Returns true if setup succeeds, false if it should stop execution.
|
|
5
6
|
*/
|
|
6
|
-
export async function
|
|
7
|
+
export async function setupRemoteDrive(remoteDriveUrl) {
|
|
7
8
|
try {
|
|
8
9
|
// Parse driveId from URL
|
|
9
10
|
const driveId = remoteDriveUrl.split("/").pop();
|
|
@@ -14,10 +15,23 @@ export async function validateRemoteDrive(remoteDriveUrl) {
|
|
|
14
15
|
// Construct GraphQL endpoint from base URL
|
|
15
16
|
const url = new URL(remoteDriveUrl);
|
|
16
17
|
const graphqlEndpoint = `${url.protocol}//${url.host}/graphql`;
|
|
17
|
-
|
|
18
|
+
let documents = await getVetraDocuments(graphqlEndpoint, driveId);
|
|
18
19
|
if (documents.length === 0) {
|
|
19
|
-
console.
|
|
20
|
-
|
|
20
|
+
console.log("No vetra package document found in the provided drive, creating one...");
|
|
21
|
+
try {
|
|
22
|
+
await createVetraDocument(graphqlEndpoint, driveId, "vetra-package");
|
|
23
|
+
// Re-fetch documents after creation
|
|
24
|
+
documents = await getVetraDocuments(graphqlEndpoint, driveId);
|
|
25
|
+
if (documents.length === 0) {
|
|
26
|
+
console.error("❌ Failed to create vetra package document in the remote drive");
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
console.log("✅ Vetra package document created successfully");
|
|
30
|
+
}
|
|
31
|
+
catch (createError) {
|
|
32
|
+
console.error("❌ Failed to create vetra package document:", createError);
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
21
35
|
}
|
|
22
36
|
if (documents.length > 1) {
|
|
23
37
|
console.warn("⚠️ Multiple vetra package documents were found in the provided remote drive, this might be an error in your remote drive");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-remote-drive.js","sourceRoot":"","sources":["../../../src/utils/validate-remote-drive.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"validate-remote-drive.js","sourceRoot":"","sources":["../../../src/utils/validate-remote-drive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AAErC;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,cAAsB;IAEtB,IAAI,CAAC;QACH,yBAAyB;QACzB,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M,YAAY,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAE5D,IAAI,YAAY,EAAE,CAAC;YACjB,OAAO,CAAC,KAAK,CACX,mKAAmK,CACpK,CAAC;YACF,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,KAAK,CAAC,CAAC;QAC7D,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "5.0.
|
|
1
|
+
export declare const version = "5.2.0-dev.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,gBAAgB,CAAC"}
|
package/dist/src/version.js
CHANGED
package/dist/src/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC"}
|