@tywalk/pcf-helper 1.4.4 → 1.4.6
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/bin/build.js +3 -0
- package/bin/deploy.js +3 -0
- package/bin/import.js +3 -0
- package/bin/upgrade.js +3 -0
- package/package.json +1 -1
- package/tasks/build-pcf.js +2 -1
- package/tasks/import-pcf.js +2 -1
- package/tasks/upgrade-pcf.js +2 -1
package/bin/build.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const task = require('../tasks/build-pcf');
|
|
3
|
+
const version = require('../package.json').version;
|
|
3
4
|
const [, , ...args] = process.argv;
|
|
4
5
|
|
|
6
|
+
console.log('PCF Helper version', version);
|
|
7
|
+
|
|
5
8
|
const pathArgument = args.find(a => ['-p', '--path'].includes(a));
|
|
6
9
|
if (typeof pathArgument === 'undefined') {
|
|
7
10
|
console.error('Path argument is required. Use --path to specify the path to solution folder.');
|
package/bin/deploy.js
CHANGED
|
@@ -3,8 +3,11 @@ const upgradeTask = require('../tasks/upgrade-pcf');
|
|
|
3
3
|
const buildTask = require('../tasks/build-pcf');
|
|
4
4
|
const importTask = require('../tasks/import-pcf');
|
|
5
5
|
const { formatMsToSec } = require('../util/performanceUtil');
|
|
6
|
+
const version = require('../package.json').version;
|
|
6
7
|
const [, , ...args] = process.argv;
|
|
7
8
|
|
|
9
|
+
console.log('PCF Helper version', version);
|
|
10
|
+
|
|
8
11
|
const pathArgument = args.find(a => ['-p', '--path'].includes(a));
|
|
9
12
|
if (typeof pathArgument === 'undefined') {
|
|
10
13
|
console.error('Path argument is required. Use --path to specify the path to solution folder.');
|
package/bin/import.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const task = require('../tasks/import-pcf');
|
|
3
|
+
const version = require('../package.json').version;
|
|
3
4
|
const [, , ...args] = process.argv;
|
|
4
5
|
|
|
6
|
+
console.log('PCF Helper version', version);
|
|
7
|
+
|
|
5
8
|
const pathArgument = args.find(a => ['-p', '--path'].includes(a));
|
|
6
9
|
if (typeof pathArgument === 'undefined') {
|
|
7
10
|
console.error('Path argument is required. Use --path to specify the path to solution folder.');
|
package/bin/upgrade.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const task = require('../tasks/upgrade-pcf');
|
|
3
|
+
const version = require('../package.json').version;
|
|
3
4
|
const [, , ...args] = process.argv;
|
|
4
5
|
|
|
6
|
+
console.log('PCF Helper version', version);
|
|
7
|
+
|
|
5
8
|
const pathArgument = args.find(a => ['-p', '--path'].includes(a));
|
|
6
9
|
if (typeof pathArgument === 'undefined') {
|
|
7
10
|
console.error('Path argument is required. Use --path to specify the path to solution folder.');
|
package/package.json
CHANGED
package/tasks/build-pcf.js
CHANGED
|
@@ -2,6 +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
6
|
const tick = performance.now();
|
|
6
7
|
const task = spawnSync('dotnet build', ['--restore', '-c', 'Release', path], {
|
|
7
8
|
cwd: process.cwd(),
|
|
@@ -26,7 +27,7 @@ function run(path) {
|
|
|
26
27
|
console.error('Unable to complete build: One or more errors ocurred.');
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
console.log(formatMsToSec('Build finished in %is
|
|
30
|
+
console.log(formatMsToSec('Build finished in %is.\n\n', tock - tick));
|
|
30
31
|
return task.status;
|
|
31
32
|
}
|
|
32
33
|
|
package/tasks/import-pcf.js
CHANGED
|
@@ -4,6 +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
8
|
const tick = performance.now();
|
|
8
9
|
if (!env) {
|
|
9
10
|
console.warn('Path argument not provided. Assuming active auth profile organization.');
|
|
@@ -40,7 +41,7 @@ function run(path, env, verbose) {
|
|
|
40
41
|
console.error('Unable to complete import: One or more errors ocurred.');
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
|
-
console.log(formatMsToSec('Import finished in %is
|
|
44
|
+
console.log(formatMsToSec('Import finished in %is.\n\n', tock - tick));
|
|
44
45
|
return task.status;
|
|
45
46
|
}
|
|
46
47
|
|
package/tasks/upgrade-pcf.js
CHANGED
|
@@ -2,6 +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
6
|
const tick = performance.now();
|
|
6
7
|
const task = spawnSync(`pac solution version -s Solution -sp ${path} && pac pcf version -s Manifest && npm version patch`, {
|
|
7
8
|
cwd: process.cwd(),
|
|
@@ -26,7 +27,7 @@ function run(path) {
|
|
|
26
27
|
console.error('Unable to complete upgrade: One or more errors ocurred.');
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
console.log(formatMsToSec('Upgrade finished in %is
|
|
30
|
+
console.log(formatMsToSec('Upgrade finished in %is.\n\n', tock - tick));
|
|
30
31
|
return task.status;
|
|
31
32
|
}
|
|
32
33
|
|