@tywalk/pcf-helper-run 1.1.22 → 1.1.23
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/dist/__tests__/pcf-helper-run.test.js +38 -0
- package/dist/index.js +38 -8
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
const child_process_1 = require("child_process");
|
|
4
37
|
const package_json_1 = require("../package.json");
|
|
38
|
+
const tasks = __importStar(require("@tywalk/pcf-helper"));
|
|
5
39
|
test('displays version', (done) => {
|
|
6
40
|
const task = (0, child_process_1.spawn)('node', ['./dist/index.js', '-v']);
|
|
7
41
|
let output = '';
|
|
@@ -45,3 +79,7 @@ test('errors if incorrect command is provided', (done) => {
|
|
|
45
79
|
done();
|
|
46
80
|
});
|
|
47
81
|
});
|
|
82
|
+
test('runBuild exists', () => {
|
|
83
|
+
const exists = typeof (tasks === null || tasks === void 0 ? void 0 : tasks.runBuild) === 'function';
|
|
84
|
+
expect(exists).toBe(true);
|
|
85
|
+
});
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,41 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
6
36
|
var _a, _b, _c;
|
|
7
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
const
|
|
38
|
+
const tasks = __importStar(require("@tywalk/pcf-helper"));
|
|
9
39
|
const color_logger_1 = require("@tywalk/color-logger");
|
|
10
40
|
const package_json_1 = require("./package.json");
|
|
11
41
|
const performanceUtil_1 = require("./util/performanceUtil");
|
|
@@ -46,17 +76,17 @@ if (env === '' && !runInit) {
|
|
|
46
76
|
}
|
|
47
77
|
function executeTasks() {
|
|
48
78
|
if (commandArgument === 'upgrade' || runAll) {
|
|
49
|
-
const upgradeResult =
|
|
79
|
+
const upgradeResult = tasks.runUpgrade(path, isVerbose);
|
|
50
80
|
if (upgradeResult === 1)
|
|
51
81
|
return 1;
|
|
52
82
|
}
|
|
53
83
|
if (commandArgument === 'build' || runAll) {
|
|
54
|
-
const buildResult =
|
|
84
|
+
const buildResult = tasks.runBuild(path, isVerbose);
|
|
55
85
|
if (buildResult === 1)
|
|
56
86
|
return 1;
|
|
57
87
|
}
|
|
58
88
|
if (commandArgument === 'import' || runAll) {
|
|
59
|
-
const importResult =
|
|
89
|
+
const importResult = tasks.runImport(path, env, isVerbose);
|
|
60
90
|
if (importResult === 1)
|
|
61
91
|
return 1;
|
|
62
92
|
}
|
|
@@ -76,7 +106,7 @@ function executeTasks() {
|
|
|
76
106
|
logger.error('Publisher Prefix argument is required. Use --publisher-prefix to specify the name of the control.');
|
|
77
107
|
process.exit(1);
|
|
78
108
|
}
|
|
79
|
-
const initResult =
|
|
109
|
+
const initResult = tasks.runInit(path, name, publisherName, publisherPrefix, isVerbose);
|
|
80
110
|
if (initResult === 1)
|
|
81
111
|
return 1;
|
|
82
112
|
}
|
package/dist/package.json
CHANGED