@tywalk/pcf-helper 1.4.0 → 1.4.1
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 +1 -1
- package/tasks/build-pcf.js +5 -1
- package/tasks/import-pcf.js +10 -4
- package/tasks/upgrade-pcf.js +5 -1
package/package.json
CHANGED
package/tasks/build-pcf.js
CHANGED
|
@@ -14,7 +14,11 @@ function run(path) {
|
|
|
14
14
|
console.log('Build complete!');
|
|
15
15
|
} else {
|
|
16
16
|
if (task.error) {
|
|
17
|
-
|
|
17
|
+
if (task.signal === 'SIGKILL') {
|
|
18
|
+
console.error('Unable to complete build. A timeout of 5 minutes was reached.', task.error.message);
|
|
19
|
+
} else {
|
|
20
|
+
console.error('Unable to complete build: ', task.error.message);
|
|
21
|
+
}
|
|
18
22
|
console.debug('Error details: ', task.error.name, task.error.stack);
|
|
19
23
|
} else {
|
|
20
24
|
console.error('Unable to complete build: One or more errors ocurred.');
|
package/tasks/import-pcf.js
CHANGED
|
@@ -2,7 +2,7 @@ const { spawnSync } = require('child_process');
|
|
|
2
2
|
const { join, extname } = require('path');
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
|
|
5
|
-
function run(path, env) {
|
|
5
|
+
function run(path, env, verbose) {
|
|
6
6
|
const tick = performance.now();
|
|
7
7
|
if (!env) {
|
|
8
8
|
console.warn('Path argument not provided. Assuming active auth profile organization.');
|
|
@@ -18,7 +18,7 @@ function run(path, env) {
|
|
|
18
18
|
cwd: process.cwd(),
|
|
19
19
|
stdio: 'inherit',
|
|
20
20
|
shell: true,
|
|
21
|
-
timeout: 1000 * 60 *
|
|
21
|
+
timeout: 1000 * 60 * 5 // 5 minutes
|
|
22
22
|
});
|
|
23
23
|
const tock = performance.now();
|
|
24
24
|
|
|
@@ -26,8 +26,14 @@ function run(path, env) {
|
|
|
26
26
|
console.log('Import complete!');
|
|
27
27
|
} else {
|
|
28
28
|
if (task.error) {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
if (task.signal === 'SIGKILL') {
|
|
30
|
+
console.error('Unable to complete import. A timeout of 5 minutes was reached.', task.error.message);
|
|
31
|
+
} else {
|
|
32
|
+
console.error('Unable to complete import:', task.signal, task.error.message);
|
|
33
|
+
}
|
|
34
|
+
if (verbose) {
|
|
35
|
+
console.debug('Error details:', task.signal, task.error.stack);
|
|
36
|
+
}
|
|
31
37
|
} else {
|
|
32
38
|
console.error('Unable to complete import: One or more errors ocurred.');
|
|
33
39
|
}
|
package/tasks/upgrade-pcf.js
CHANGED
|
@@ -14,7 +14,11 @@ function run(path) {
|
|
|
14
14
|
console.log('Upgrade complete!');
|
|
15
15
|
} else {
|
|
16
16
|
if (task.error) {
|
|
17
|
-
|
|
17
|
+
if (task.signal === 'SIGKILL') {
|
|
18
|
+
console.error('Unable to complete upgrade. A timeout of 1 minutes was reached.', task.error.message);
|
|
19
|
+
} else {
|
|
20
|
+
console.error('Unable to complete upgrade: ', task.error.message);
|
|
21
|
+
}
|
|
18
22
|
console.debug('Error details: ', task.error.name, task.error.stack);
|
|
19
23
|
} else {
|
|
20
24
|
console.error('Unable to complete upgrade: One or more errors ocurred.');
|