@tywalk/pcf-helper-run 1.2.0 → 1.2.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/dist/index.js +15 -2
- package/dist/package.json +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -254,13 +254,26 @@ addCommonOptions(commander_1.program.command('init'))
|
|
|
254
254
|
// Define the session command
|
|
255
255
|
addCommonOptions(commander_1.program.command('session'))
|
|
256
256
|
.description('run development session')
|
|
257
|
+
.option('-u, --url <url>', 'remote environment URL')
|
|
258
|
+
.option('-s, --script <script>', 'remote script to intercept')
|
|
259
|
+
.option('-t, --stylesheet <stylesheet>', 'remote stylesheet to intercept')
|
|
260
|
+
.option('-b, --bundle <path>', 'local bundle path')
|
|
261
|
+
.option('-c, --css <path>', 'local CSS path')
|
|
262
|
+
.option('-f, --config <path>', 'config file path', 'dev-config.json')
|
|
257
263
|
.action((options) => {
|
|
258
264
|
const { logger, tick } = setupExecutionContext(options);
|
|
259
265
|
let result = 0;
|
|
260
266
|
try {
|
|
261
267
|
logger.log('[PCF Helper Run] ' + (0, performanceUtil_1.formatTime)(new Date()) + ' session started.\n');
|
|
262
|
-
|
|
263
|
-
|
|
268
|
+
if (!options.url) {
|
|
269
|
+
const config = tasks.loadConfig(options.config || 'dev-config.json');
|
|
270
|
+
options.url = config.remoteEnvironmentUrl;
|
|
271
|
+
options.script = config.remoteScriptToIntercept;
|
|
272
|
+
options.stylesheet = config.remoteStylesheetToIntercept;
|
|
273
|
+
options.bundle = config.localBundlePath;
|
|
274
|
+
options.css = config.localCssPath;
|
|
275
|
+
}
|
|
276
|
+
tasks.runSession(options.url, options.script, options.stylesheet, options.bundle, options.css);
|
|
264
277
|
}
|
|
265
278
|
catch (e) {
|
|
266
279
|
logger.error('[PCF Helper Run] One or more tasks failed during session: ', (e && e.message) || 'unknown error');
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tywalk/pcf-helper-run",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "A simple command-line utility for building and publishing PCF controls to Dataverse.",
|
|
5
5
|
"types": "./types/",
|
|
6
6
|
"files": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@tywalk/color-logger": "^1.0.3",
|
|
28
|
-
"@tywalk/pcf-helper": "^1.
|
|
28
|
+
"@tywalk/pcf-helper": "^1.5.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/jest": "^29.5.14",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tywalk/pcf-helper-run",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "A simple command-line utility for building and publishing PCF controls to Dataverse.",
|
|
5
5
|
"types": "./types/",
|
|
6
6
|
"files": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@tywalk/color-logger": "^1.0.3",
|
|
28
|
-
"@tywalk/pcf-helper": "^1.
|
|
28
|
+
"@tywalk/pcf-helper": "^1.5.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/jest": "^29.5.14",
|