@tywalk/pcf-helper 1.4.6 → 1.4.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tywalk/pcf-helper",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "description": "Command line helper for building and publishing PCF controls to Dataverse.",
5
5
  "scripts": {
6
6
  "test": "node test.js"
@@ -2,7 +2,7 @@ const { spawnSync } = require('child_process');
2
2
  const { formatMsToSec } = require('../util/performanceUtil');
3
3
 
4
4
  function run(path) {
5
- console.log('Starting build...\n\n');
5
+ console.log('[PCF Helper] Starting build...\n');
6
6
  const tick = performance.now();
7
7
  const task = spawnSync('dotnet build', ['--restore', '-c', 'Release', path], {
8
8
  cwd: process.cwd(),
@@ -13,21 +13,21 @@ function run(path) {
13
13
  const tock = performance.now();
14
14
 
15
15
  if (task.status === 0) {
16
- console.log('Build complete!');
16
+ console.log('[PCF Helper] Build complete!');
17
17
  } else {
18
18
  process.kill(task.pid);
19
19
  if (task.error) {
20
20
  if (task.signal === 'SIGTERM') {
21
- console.error('Unable to complete build. A timeout of 5 minutes was reached.', task.error.message);
21
+ console.error('[PCF Helper] Unable to complete build. A timeout of 5 minutes was reached.', task.error.message);
22
22
  } else {
23
- console.error('Unable to complete build: ', task.signal, task.error.message);
23
+ console.error('[PCF Helper] Unable to complete build: ', task.signal, task.error.message);
24
24
  }
25
- console.debug('Error details: ', task.signal, task.error.stack);
25
+ console.debug('[PCF Helper] Error details: ', task.signal, task.error.stack);
26
26
  } else {
27
- console.error('Unable to complete build: One or more errors ocurred.');
27
+ console.error('[PCF Helper] Unable to complete build: One or more errors ocurred.');
28
28
  }
29
29
  }
30
- console.log(formatMsToSec('Build finished in %is.\n\n', tock - tick));
30
+ console.log(formatMsToSec('[PCF Helper] Build finished in %is.\n', tock - tick));
31
31
  return task.status;
32
32
  }
33
33
 
@@ -4,7 +4,7 @@ const fs = require('fs');
4
4
  const { formatMsToSec } = require('../util/performanceUtil');
5
5
 
6
6
  function run(path, env, verbose) {
7
- console.log('Starting import...\n\n');
7
+ console.log('[PCF Helper] Starting import...\n');
8
8
  const tick = performance.now();
9
9
  if (!env) {
10
10
  console.warn('Path argument not provided. Assuming active auth profile organization.');
@@ -25,23 +25,23 @@ function run(path, env, verbose) {
25
25
  const tock = performance.now();
26
26
 
27
27
  if (task.status === 0) {
28
- console.log('Import complete!');
28
+ console.log('[PCF Helper] Import complete!');
29
29
  } else {
30
30
  process.kill(task.pid);
31
31
  if (task.error) {
32
32
  if (task.signal === 'SIGTERM') {
33
- console.error('Unable to complete import. A timeout of 5 minutes was reached.', task.error.message);
33
+ console.error('[PCF Helper] Unable to complete import. A timeout of 5 minutes was reached.', task.error.message);
34
34
  } else {
35
- console.error('Unable to complete import:', task.signal, task.error.message);
35
+ console.error('[PCF Helper] Unable to complete import:', task.signal, task.error.message);
36
36
  }
37
37
  if (verbose) {
38
- console.debug('Error details:', task.signal, task.error.stack);
38
+ console.debug('[PCF Helper] Error details:', task.signal, task.error.stack);
39
39
  }
40
40
  } else {
41
- console.error('Unable to complete import: One or more errors ocurred.');
41
+ console.error('[PCF Helper] Unable to complete import: One or more errors ocurred.');
42
42
  }
43
43
  }
44
- console.log(formatMsToSec('Import finished in %is.\n\n', tock - tick));
44
+ console.log(formatMsToSec('[PCF Helper] Import finished in %is.\n', tock - tick));
45
45
  return task.status;
46
46
  }
47
47
 
@@ -2,7 +2,7 @@ const { spawnSync } = require('child_process');
2
2
  const { formatMsToSec } = require('../util/performanceUtil');
3
3
 
4
4
  function run(path) {
5
- console.log('Starting upgrade...\n\n');
5
+ console.log('[PCF Helper] Starting upgrade...\n');
6
6
  const tick = performance.now();
7
7
  const task = spawnSync(`pac solution version -s Solution -sp ${path} && pac pcf version -s Manifest && npm version patch`, {
8
8
  cwd: process.cwd(),
@@ -13,21 +13,21 @@ function run(path) {
13
13
  const tock = performance.now();
14
14
 
15
15
  if (task.status === 0) {
16
- console.log('Upgrade complete!');
16
+ console.log('[PCF Helper] Upgrade complete!');
17
17
  } else {
18
18
  process.kill(task.pid);
19
19
  if (task.error) {
20
20
  if (task.signal === 'SIGTERM') {
21
- console.error('Unable to complete upgrade. A timeout of 1 minutes was reached.', task.error.message);
21
+ console.error('[PCF Helper] Unable to complete upgrade. A timeout of 1 minutes was reached.', task.error.message);
22
22
  } else {
23
- console.error('Unable to complete upgrade:', task.signal, task.error.message);
23
+ console.error('[PCF Helper] Unable to complete upgrade:', task.signal, task.error.message);
24
24
  }
25
- console.debug('Error details:', task.signale, task.error.stack);
25
+ console.debug('[PCF Helper] Error details:', task.signale, task.error.stack);
26
26
  } else {
27
- console.error('Unable to complete upgrade: One or more errors ocurred.');
27
+ console.error('[PCF Helper] Unable to complete upgrade: One or more errors ocurred.');
28
28
  }
29
29
  }
30
- console.log(formatMsToSec('Upgrade finished in %is.\n\n', tock - tick));
30
+ console.log(formatMsToSec('[PCF Helper] Upgrade finished in %is.\n', tock - tick));
31
31
  return task.status;
32
32
  }
33
33