@sap-ux/create 0.8.57 → 0.8.60

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.
@@ -38,8 +38,7 @@ async function addCardsEditorConfig(basePath, simulate, skipInstall) {
38
38
  if (!simulate) {
39
39
  await new Promise((resolve) => fs.commit(resolve));
40
40
  if (!skipInstall) {
41
- (0, common_1.runNpmInstallCommand)(basePath);
42
- logger.info('Executed npm install');
41
+ (0, common_1.runNpmInstallCommand)(basePath, [], { logger });
43
42
  }
44
43
  }
45
44
  else {
@@ -1,9 +1,14 @@
1
+ import type { Logger } from '@sap-ux/logger';
1
2
  export { promptYUIQuestions } from './prompts';
2
3
  /**
3
4
  * Run npm install command.
4
5
  *
5
6
  * @param basePath - path to application root
6
7
  * @param [installArgs] - optional string array of arguments
8
+ * @param [options] - optional options
9
+ * @param [options.logger] - optional logger instance
7
10
  */
8
- export declare function runNpmInstallCommand(basePath: string, installArgs?: string[]): void;
11
+ export declare function runNpmInstallCommand(basePath: string, installArgs?: string[], options?: {
12
+ logger?: Logger;
13
+ }): void;
9
14
  //# sourceMappingURL=index.d.ts.map
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.promptYUIQuestions = void 0;
4
4
  exports.runNpmInstallCommand = runNpmInstallCommand;
5
- const child_process_1 = require("child_process");
5
+ const project_access_1 = require("@sap-ux/project-access");
6
6
  var prompts_1 = require("./prompts");
7
7
  Object.defineProperty(exports, "promptYUIQuestions", { enumerable: true, get: function () { return prompts_1.promptYUIQuestions; } });
8
8
  /**
@@ -10,13 +10,17 @@ Object.defineProperty(exports, "promptYUIQuestions", { enumerable: true, get: fu
10
10
  *
11
11
  * @param basePath - path to application root
12
12
  * @param [installArgs] - optional string array of arguments
13
+ * @param [options] - optional options
14
+ * @param [options.logger] - optional logger instance
13
15
  */
14
- function runNpmInstallCommand(basePath, installArgs = []) {
15
- const npmCommand = process.platform.startsWith('win') ? 'npm.cmd' : 'npm';
16
- const args = ['install', ...installArgs];
17
- (0, child_process_1.spawnSync)(npmCommand, args, {
18
- cwd: basePath,
19
- stdio: [0, 1, 2]
16
+ function runNpmInstallCommand(basePath, installArgs = [], options) {
17
+ const logger = options?.logger;
18
+ (0, project_access_1.execNpmCommand)(['install', ...installArgs], { cwd: basePath, logger: logger })
19
+ .then(() => {
20
+ logger?.info('npm install completed successfully.');
21
+ })
22
+ .catch((error) => {
23
+ logger?.error(`npm install failed. '${error.message}'`);
20
24
  });
21
25
  }
22
26
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/create",
3
3
  "description": "SAP Fiori tools module to add or remove features",
4
- "version": "0.8.57",
4
+ "version": "0.8.60",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -30,17 +30,17 @@
30
30
  "mem-fs": "2.1.0",
31
31
  "mem-fs-editor": "9.4.0",
32
32
  "prompts": "2.4.2",
33
- "@sap-ux/abap-deploy-config-inquirer": "1.0.9",
34
- "@sap-ux/abap-deploy-config-writer": "0.0.51",
35
- "@sap-ux/adp-tooling": "0.12.65",
36
- "@sap-ux/app-config-writer": "0.4.44",
37
- "@sap-ux/cap-config-writer": "0.7.50",
33
+ "@sap-ux/abap-deploy-config-inquirer": "1.0.11",
34
+ "@sap-ux/abap-deploy-config-writer": "0.0.52",
35
+ "@sap-ux/adp-tooling": "0.12.66",
36
+ "@sap-ux/app-config-writer": "0.4.45",
37
+ "@sap-ux/cap-config-writer": "0.7.51",
38
38
  "@sap-ux/cards-editor-config-writer": "0.4.5",
39
39
  "@sap-ux/inquirer-common": "0.4.9",
40
40
  "@sap-ux/logger": "0.6.0",
41
41
  "@sap-ux/mockserver-config-writer": "0.6.5",
42
- "@sap-ux/preview-middleware": "0.16.98",
43
- "@sap-ux/project-access": "1.28.2",
42
+ "@sap-ux/preview-middleware": "0.16.100",
43
+ "@sap-ux/project-access": "1.28.3",
44
44
  "@sap-ux/system-access": "0.5.13",
45
45
  "@sap-ux/ui5-config": "0.25.0"
46
46
  },