ph-cmd 5.1.0-dev.26 → 5.1.0-dev.28
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/use.d.ts +6 -1
- package/dist/src/commands/use.d.ts.map +1 -1
- package/dist/src/commands/use.js +26 -7
- package/dist/src/commands/use.js.map +1 -1
- 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/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -27,7 +27,12 @@ export declare const ENV_MAP: {
|
|
|
27
27
|
latest: string;
|
|
28
28
|
};
|
|
29
29
|
export type Environment = keyof typeof ENV_MAP;
|
|
30
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Checks if a string is a valid semver version
|
|
32
|
+
* Supports formats like: 1.0.0, 1.0.0-beta.1, 1.0.0-dev.123, v1.0.0
|
|
33
|
+
*/
|
|
34
|
+
export declare function isVersionString(str: string): boolean;
|
|
35
|
+
export declare const updatePackageJson: (envOrVersion: (typeof ENV_MAP)[keyof typeof ENV_MAP], localPath?: string, packageManager?: PackageManager, debug?: boolean, useResolved?: boolean) => Promise<void>;
|
|
31
36
|
export type UseOptions = {
|
|
32
37
|
dev?: boolean;
|
|
33
38
|
prod?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../src/commands/use.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAUxD,eAAO,MAAM,GAAG,mBAAmB,CAAC;AAGpC,eAAO,MAAM,gBAAgB,UA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,CAAC;AAGF,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,OAAO,CAAC;AAE/C;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAOpD;AAED,eAAO,MAAM,iBAAiB,GAC5B,cAAc,CAAC,OAAO,OAAO,EAAE,MAAM,OAAO,OAAO,CAAC,EACpD,YAAY,MAAM,EAClB,iBAAiB,cAAc,EAC/B,QAAQ,OAAO,EACf,cAAc,OAAO,kBAgEtB,CAAC;AAGF,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,iBAAiB,CACjC;IAAC,MAAM,GAAG,SAAS;IAAE,MAAM,GAAG,SAAS;IAAE,UAAU;CAAC,CA0CrD,CAAC;AAEF,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAyCpD"}
|
package/dist/src/commands/use.js
CHANGED
|
@@ -100,7 +100,18 @@ export const ENV_MAP = {
|
|
|
100
100
|
prod: "latest",
|
|
101
101
|
latest: "latest",
|
|
102
102
|
};
|
|
103
|
-
|
|
103
|
+
/**
|
|
104
|
+
* Checks if a string is a valid semver version
|
|
105
|
+
* Supports formats like: 1.0.0, 1.0.0-beta.1, 1.0.0-dev.123, v1.0.0
|
|
106
|
+
*/
|
|
107
|
+
export function isVersionString(str) {
|
|
108
|
+
// Remove leading 'v' if present
|
|
109
|
+
const version = str.startsWith("v") ? str.slice(1) : str;
|
|
110
|
+
// Semver regex pattern
|
|
111
|
+
const semverPattern = /^\d+\.\d+\.\d+(-[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)?(\+[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)?$/;
|
|
112
|
+
return semverPattern.test(version);
|
|
113
|
+
}
|
|
114
|
+
export const updatePackageJson = async (envOrVersion, localPath, packageManager, debug, useResolved) => {
|
|
104
115
|
const projectInfo = await getProjectInfo();
|
|
105
116
|
const pkgManager = packageManager || getPackageManagerFromLockfile(projectInfo.path);
|
|
106
117
|
if (debug) {
|
|
@@ -122,9 +133,14 @@ export const updatePackageJson = async (env, localPath, packageManager, debug, u
|
|
|
122
133
|
});
|
|
123
134
|
}
|
|
124
135
|
else {
|
|
136
|
+
// Determine the version tag to use
|
|
137
|
+
// For specific versions, add ^ prefix to allow semver range updates
|
|
138
|
+
const versionTag = isVersionString(envOrVersion)
|
|
139
|
+
? `^${envOrVersion.replace(/^v/, "")}` // Remove leading 'v' if present and add ^
|
|
140
|
+
: ENV_MAP[envOrVersion];
|
|
125
141
|
// For remote dependencies, add version tags
|
|
126
142
|
powerhousePackages.forEach((packageName) => {
|
|
127
|
-
dependencies.push(`${packageName}@${
|
|
143
|
+
dependencies.push(`${packageName}@${versionTag}`);
|
|
128
144
|
});
|
|
129
145
|
}
|
|
130
146
|
if (debug) {
|
|
@@ -150,30 +166,33 @@ export const updatePackageJson = async (env, localPath, packageManager, debug, u
|
|
|
150
166
|
}
|
|
151
167
|
};
|
|
152
168
|
export const use = async (environment, localPath, options) => {
|
|
169
|
+
const isVersion = environment ? isVersionString(environment) : false;
|
|
153
170
|
if (!environment ||
|
|
154
171
|
(!options.force &&
|
|
155
172
|
environment !== "local" &&
|
|
173
|
+
!isVersion &&
|
|
156
174
|
!Object.keys(ENV_MAP).includes(environment))) {
|
|
157
|
-
throw new Error(`❌ Invalid environment, use --force or use one of the following: ${Object.keys(ENV_MAP).join(", ")}`);
|
|
175
|
+
throw new Error(`❌ Invalid environment, use --force or use one of the following: ${Object.keys(ENV_MAP).join(", ")}, or a specific version (e.g., 5.1.0)`);
|
|
158
176
|
}
|
|
159
177
|
if (environment === "local" && !localPath) {
|
|
160
178
|
throw new Error("❌ Local environment requires a local path, please specify the path to the local environment");
|
|
161
179
|
}
|
|
162
180
|
const { debug } = options;
|
|
163
|
-
|
|
181
|
+
// environment can be an Environment key or a version string
|
|
182
|
+
const envOrVersion = environment;
|
|
164
183
|
if (debug) {
|
|
165
184
|
console.log(">>> options", options);
|
|
166
185
|
}
|
|
167
186
|
const projectInfo = await getProjectInfo();
|
|
168
187
|
const packageManager = resolvePackageManagerOptions(options) ??
|
|
169
188
|
getPackageManagerFromLockfile(projectInfo.path);
|
|
170
|
-
await updatePackageJson(
|
|
189
|
+
await updatePackageJson(envOrVersion, localPath, packageManager, debug, options.useResolved);
|
|
171
190
|
};
|
|
172
191
|
export function useCommand(program) {
|
|
173
192
|
const useCmd = program
|
|
174
193
|
.command("use")
|
|
175
|
-
.description("Allows you to change your environment (latest,
|
|
176
|
-
.argument("[environment]", "The environment to use (latest, dev, prod, local)")
|
|
194
|
+
.description("Allows you to change your environment (latest, dev, staging, prod, local) or use a specific version (e.g., 5.1.0)")
|
|
195
|
+
.argument("[environment]", "The environment to use (latest, dev, staging, prod, local) or a specific version (e.g., 5.1.0)")
|
|
177
196
|
.argument("[localPath]", "The path to the local environment (you have to specify the path to the local environment)")
|
|
178
197
|
.option("--force", "force environment to use")
|
|
179
198
|
.option("--use-resolved", "Use resolved dependency versions")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use.js","sourceRoot":"","sources":["../../../src/commands/use.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OA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,SAAS,EACT,cAAgC,EAChC,KAAK,EACL,OAAO,CAAC,WAAW,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,OAAgB;IACzC,MAAM,MAAM,GAAG,OAAO;SACnB,OAAO,CAAC,KAAK,CAAC;SACd,WAAW,CACV,mHAAmH,CACpH;SACA,QAAQ,CACP,eAAe,EACf,gGAAgG,CACjG;SACA,QAAQ,CACP,aAAa,EACb,2FAA2F,CAC5F;SACA,MAAM,CAAC,SAAS,EAAE,0BAA0B,CAAC;SAC7C,MAAM,CAAC,gBAAgB,EAAE,kCAAkC,CAAC;SAC5D,MAAM,CAAC,oCAAoC,EAAE,4BAA4B,CAAC;SAC1E,MAAM,CAAC,QAAQ,EAAE,+BAA+B,CAAC;SACjD,MAAM,CAAC,QAAQ,EAAE,+BAA+B,CAAC;SACjD,MAAM,CAAC,OAAO,EAAE,8BAA8B,CAAC;SAC/C,MAAM,CAAC,SAAS,EAAE,sBAAsB,CAAC,CAAC;IAE7C,+DAA+D;IAC/D,OAAO,cAAc,CACnB,MAAM,EACN,GAAG,EACH,OAAO;IACP,uEAAuE;IACvE,CAAC,WAAW,EAAE,EAAE;QACd,IACE,CAAC,WAAW;YACZ,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;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"}
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "5.1.0-dev.
|
|
1
|
+
export declare const version = "5.1.0-dev.28";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/src/version.js
CHANGED