create-powerapps-project 0.15.0 → 0.15.4

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/CHANGELOG.json CHANGED
@@ -2,7 +2,67 @@
2
2
  "name": "create-powerapps-project",
3
3
  "entries": [
4
4
  {
5
- "date": "Sun, 16 Jan 2022 21:29:55 GMT",
5
+ "date": "Sun, 16 Jan 2022 22:56:55 GMT",
6
+ "tag": "create-powerapps-project_v0.15.4",
7
+ "version": "0.15.4",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "derek.finlinson@journeyteam.com",
12
+ "package": "create-powerapps-project",
13
+ "commit": "acf6ca4763a9d98fa7683fe517deb872f12f4c42",
14
+ "comment": "Fix logging for real"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Sun, 16 Jan 2022 22:41:55 GMT",
21
+ "tag": "create-powerapps-project_v0.15.3",
22
+ "version": "0.15.3",
23
+ "comments": {
24
+ "patch": [
25
+ {
26
+ "author": "derek.finlinson@journeyteam.com",
27
+ "package": "create-powerapps-project",
28
+ "commit": "b1658649d8258e68522e6eadd79a2bbf3a4733d8",
29
+ "comment": "Fix logging"
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Sun, 16 Jan 2022 22:28:32 GMT",
36
+ "tag": "create-powerapps-project_v0.15.2",
37
+ "version": "0.15.2",
38
+ "comments": {
39
+ "patch": [
40
+ {
41
+ "author": "derek.finlinson@journeyteam.com",
42
+ "package": "create-powerapps-project",
43
+ "commit": "10bfc68da12fdaf50dfd2a0f1b8d11406d578cbf",
44
+ "comment": "Remove pnpm"
45
+ }
46
+ ]
47
+ }
48
+ },
49
+ {
50
+ "date": "Sun, 16 Jan 2022 22:08:05 GMT",
51
+ "tag": "create-powerapps-project_v0.15.1",
52
+ "version": "0.15.1",
53
+ "comments": {
54
+ "patch": [
55
+ {
56
+ "author": "derek.finlinson@journeyteam.com",
57
+ "package": "create-powerapps-project",
58
+ "commit": "aeca9adacfc74eed6b3362a26bd094b4bd26039f",
59
+ "comment": "Fix program command"
60
+ }
61
+ ]
62
+ }
63
+ },
64
+ {
65
+ "date": "Sun, 16 Jan 2022 21:30:27 GMT",
6
66
  "tag": "create-powerapps-project_v0.15.0",
7
67
  "version": "0.15.0",
8
68
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,17 +1,49 @@
1
1
  # Change Log - create-powerapps-project
2
2
 
3
- This log was last generated on Sun, 16 Jan 2022 21:29:55 GMT and should not be manually modified.
3
+ This log was last generated on Sun, 16 Jan 2022 22:56:55 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## 0.15.0
7
+ ## 0.15.4
8
8
 
9
- Sun, 16 Jan 2022 21:29:55 GMT
9
+ Sun, 16 Jan 2022 22:56:55 GMT
10
10
 
11
- ### Minor changes
11
+ ### Patches
12
12
 
13
- - Remove dependencies; Fix plop dependency (derek.finlinson@journeyteam.com)
13
+ - Fix logging for real (derek.finlinson@journeyteam.com)
14
14
 
15
+ ## 0.15.3
16
+
17
+ Sun, 16 Jan 2022 22:41:55 GMT
18
+
19
+ ### Patches
20
+
21
+ - Fix logging (derek.finlinson@journeyteam.com)
22
+
23
+ ## 0.15.2
24
+
25
+ Sun, 16 Jan 2022 22:28:32 GMT
26
+
27
+ ### Patches
28
+
29
+ - Remove pnpm (derek.finlinson@journeyteam.com)
30
+
31
+ ## 0.15.1
32
+
33
+ Sun, 16 Jan 2022 22:08:05 GMT
34
+
35
+ ### Patches
36
+
37
+ - Fix program command (derek.finlinson@journeyteam.com)
38
+
39
+ ## 0.15.0
40
+
41
+ Sun, 16 Jan 2022 21:30:27 GMT
42
+
43
+ ### Minor changes
44
+
45
+ - Remove dependencies; Fix plop dependency (derek.finlinson@journeyteam.com)
46
+
15
47
  ## 0.14.7
16
48
 
17
49
  Tue, 07 Dec 2021 19:52:53 GMT
package/lib/getEnvInfo.js CHANGED
@@ -15,8 +15,7 @@ const getEnvInfo = () => {
15
15
  exports.getEnvInfo = getEnvInfo;
16
16
  const initialize = async () => {
17
17
  envInfoCache = JSON.parse(await envinfo_1.default.run({
18
- Binaries: ['Yarn', 'npm'],
19
- npmGlobalPackages: ['pnpm']
18
+ Binaries: ['Yarn', 'npm']
20
19
  }, { json: true, showNotFound: false }));
21
20
  if (envInfoCache.Binaries.Yarn) {
22
21
  envInfoCache.Binaries.Yarn.path = expandHome(envInfoCache.Binaries.Yarn.path);
@@ -24,9 +23,6 @@ const initialize = async () => {
24
23
  if (envInfoCache.Binaries.npm) {
25
24
  envInfoCache.Binaries.npm.path = expandHome(envInfoCache.Binaries.npm.path);
26
25
  }
27
- if (envInfoCache.npmGlobalPackages.pnpm) {
28
- envInfoCache.npmGlobalPackages.pnpm.path = 'pnpm';
29
- }
30
26
  return envInfoCache;
31
27
  };
32
28
  exports.initialize = initialize;
package/lib/index.js CHANGED
@@ -1,33 +1,24 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
  "use strict";
3
3
  var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  const commander_1 = require("commander");
8
+ const kleur_1 = __importDefault(require("kleur"));
8
9
  const createDataverseProject_1 = __importDefault(require("./createDataverseProject"));
9
- commander_1.program
10
- // eslint-disable-next-line @typescript-eslint/no-var-requires
11
- .version(require('../package').version)
12
- .usage('<command> [options]');
13
- // Deploy command
14
- commander_1.program
15
- .command('init')
10
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
11
+ const packageJson = require('../package');
12
+ const program = new commander_1.Command(packageJson.name);
13
+ program
14
+ .version(packageJson.version)
16
15
  .description('Create new Dataverse project')
16
+ .usage(kleur_1.default.green('[type]'))
17
17
  .argument('[type]', 'Type of project to generate')
18
- .action((type) => {
18
+ .action(type => {
19
19
  (0, createDataverseProject_1.default)(type);
20
20
  });
21
- // Show help on unknown command
22
- commander_1.program
23
- .arguments('<command>')
24
- .action((cmd) => {
25
- commander_1.program.outputHelp();
26
- console.log();
27
- console.log(`Unknown command ${cmd}.`);
28
- console.log();
29
- });
30
- commander_1.program.parse(process.argv);
21
+ program.parse(process.argv);
31
22
  if (!process.argv.slice(1).length) {
32
- commander_1.program.outputHelp();
23
+ program.outputHelp();
33
24
  }
package/lib/logger.js CHANGED
@@ -11,16 +11,16 @@ const emptySquare = '\u25a1';
11
11
  const log = (method, symbol, ...args) => {
12
12
  const now = new Date();
13
13
  const timestamp = kleur_1.default.gray(`[${now.toLocaleTimeString()}]`);
14
- console[method](timestamp, symbol, args);
14
+ console[method](timestamp, symbol, ...args);
15
15
  };
16
16
  exports.logger = {
17
17
  info(...args) {
18
- log('info', kleur_1.default.green(square), args);
18
+ log('info', kleur_1.default.green(square), ...args);
19
19
  },
20
20
  warn(...args) {
21
- log('warn', kleur_1.default.yellow(triangle), args);
21
+ log('warn', kleur_1.default.yellow(triangle), ...args);
22
22
  },
23
23
  error(...args) {
24
- log('error', kleur_1.default.red(emptySquare), args);
24
+ log('error', kleur_1.default.red(emptySquare), ...args);
25
25
  }
26
26
  };
@@ -13,10 +13,6 @@ const getNpm = () => {
13
13
  const npmInfo = (0, getEnvInfo_1.getEnvInfo)().Binaries.npm;
14
14
  return npmInfo && npmInfo.path;
15
15
  };
16
- const getPnpm = () => {
17
- const pnpmInfo = (0, getEnvInfo_1.getEnvInfo)().npmGlobalPackages.pnpm;
18
- return pnpmInfo && pnpmInfo.path;
19
- };
20
16
  const install = (cwd, type) => {
21
17
  const packages = getPackages(type);
22
18
  if ((0, exports.getYarn)()) {
@@ -25,12 +21,6 @@ const install = (cwd, type) => {
25
21
  (0, child_process_1.spawnSync)((0, exports.getYarn)(), ['add', ...packages.dependencies], { stdio: 'inherit', cwd });
26
22
  }
27
23
  }
28
- else if (getPnpm()) {
29
- (0, child_process_1.spawnSync)(getPnpm(), ['add', ...packages.devDependencies], { stdio: 'inherit', cwd });
30
- if (packages.dependencies) {
31
- (0, child_process_1.spawnSync)(getPnpm(), ['add', ...packages.dependencies], { stdio: 'inherit', cwd });
32
- }
33
- }
34
24
  else {
35
25
  (0, child_process_1.spawnSync)(getNpm(), ['add', ...packages.devDependencies], { stdio: 'inherit', cwd });
36
26
  if (packages.dependencies) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-powerapps-project",
3
3
  "description": "💧 plop generator for Dataverse development",
4
- "version": "0.15.0",
4
+ "version": "0.15.4",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",
7
7
  "bin": {