@nizza/devkit 0.1.0-alpha.1 ā 0.1.0-alpha.2
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/package.json
CHANGED
|
@@ -45,8 +45,8 @@ async function runExecutor(opts, ctx) {
|
|
|
45
45
|
isDryRun && _devkit.logger.info('š Skip publish (dry run) \n');
|
|
46
46
|
_devkit.logger.info(`${commandToPublish} \n`);
|
|
47
47
|
// Execute the command to publish the package.
|
|
48
|
-
process.chdir(projectRoot);
|
|
49
|
-
await (0, _shared1.runCommand)(commandToPublish);
|
|
48
|
+
// process.chdir(projectRoot);
|
|
49
|
+
await (0, _shared1.runCommand)(commandToPublish, projectRoot);
|
|
50
50
|
_devkit.logger.info(`\nš Successfully published ${packageName}@${packageVersion}`);
|
|
51
51
|
} else {
|
|
52
52
|
_devkit.logger.warn(`š» Package version "${packageVersion}" is invalid.`);
|
|
@@ -30,5 +30,5 @@ export declare function shortId(length?: number): string;
|
|
|
30
30
|
* @throws {Error} If the project configuration is invalid or not found.
|
|
31
31
|
*/
|
|
32
32
|
export declare function getProjectConfig(ctx: ExecutorContext): ProjectConfiguration;
|
|
33
|
-
export declare function runCommand(command: string): Promise<void>;
|
|
33
|
+
export declare function runCommand(command: string, cwd?: string | URL): Promise<void>;
|
|
34
34
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/executors/shared/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAMhD;;;;;GAKG;AACH,wBAAgB,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAGrD;AAED;;;;;;GAMG;AACH,wBAAgB,GAAG,CACjB,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,EAC9B,OAAO,CAAC,EAAE,MAAM,GACf,gBAAgB,CAUlB;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,MAAM,SAAI,UAIjC;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,eAAe,GAAG,oBAAoB,CAK3E;AAED,wBAAsB,UAAU,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/executors/shared/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAMhD;;;;;GAKG;AACH,wBAAgB,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAGrD;AAED;;;;;;GAMG;AACH,wBAAgB,GAAG,CACjB,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,EAC9B,OAAO,CAAC,EAAE,MAAM,GACf,gBAAgB,CAUlB;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,MAAM,SAAI,UAIjC;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,eAAe,GAAG,oBAAoB,CAK3E;AAED,wBAAsB,UAAU,CAC9B,OAAO,EAAE,MAAM,EACf,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,GACjB,OAAO,CAAC,IAAI,CAAC,CAkBf"}
|
|
@@ -57,9 +57,13 @@ function getProjectConfig(ctx) {
|
|
|
57
57
|
if (!projectConfig) throw new Error('Invalid project configuration.');
|
|
58
58
|
return projectConfig;
|
|
59
59
|
}
|
|
60
|
-
async function runCommand(command) {
|
|
60
|
+
async function runCommand(command, cwd) {
|
|
61
61
|
try {
|
|
62
|
-
const { stdout, stderr } = await execAsync(command
|
|
62
|
+
const { stdout, stderr } = await execAsync(command, {
|
|
63
|
+
...cwd && {
|
|
64
|
+
cwd
|
|
65
|
+
}
|
|
66
|
+
});
|
|
63
67
|
if (stderr) {
|
|
64
68
|
_devkit.logger.error(`Error running command:`);
|
|
65
69
|
_devkit.logger.error(stderr);
|