piral-cli 0.13.8 → 0.14.0-beta.3156
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/README.md +5 -2
- package/lib/api.js +23 -23
- package/lib/api.js.map +1 -1
- package/lib/apps/build-pilet.js +18 -16
- package/lib/apps/build-pilet.js.map +1 -1
- package/lib/apps/build-piral.js +35 -34
- package/lib/apps/build-piral.js.map +1 -1
- package/lib/apps/debug-pilet.js +28 -27
- package/lib/apps/debug-pilet.js.map +1 -1
- package/lib/apps/debug-piral.js +15 -14
- package/lib/apps/debug-piral.js.map +1 -1
- package/lib/apps/declaration-piral.js +5 -3
- package/lib/apps/declaration-piral.js.map +1 -1
- package/lib/apps/new-pilet.js +43 -39
- package/lib/apps/new-pilet.js.map +1 -1
- package/lib/apps/new-piral.js +21 -20
- package/lib/apps/new-piral.js.map +1 -1
- package/lib/apps/pack-pilet.js +6 -4
- package/lib/apps/pack-pilet.js.map +1 -1
- package/lib/apps/publish-pilet.js +48 -47
- package/lib/apps/publish-pilet.js.map +1 -1
- package/lib/apps/publish-piral.js +23 -22
- package/lib/apps/publish-piral.js.map +1 -1
- package/lib/apps/upgrade-pilet.js +34 -33
- package/lib/apps/upgrade-pilet.js.map +1 -1
- package/lib/apps/upgrade-piral.js +20 -19
- package/lib/apps/upgrade-piral.js.map +1 -1
- package/lib/apps/validate-pilet.js +13 -11
- package/lib/apps/validate-pilet.js.map +1 -1
- package/lib/apps/validate-piral.js +12 -10
- package/lib/apps/validate-piral.js.map +1 -1
- package/lib/build/bundler-calls.d.ts +3 -0
- package/lib/build/bundler-calls.js +107 -0
- package/lib/build/bundler-calls.js.map +1 -0
- package/lib/build/run-build-pilet.d.ts +1 -0
- package/lib/build/run-build-pilet.js +65 -0
- package/lib/build/run-build-pilet.js.map +1 -0
- package/lib/build/run-build-piral.d.ts +1 -0
- package/lib/build/run-build-piral.js +66 -0
- package/lib/build/run-build-piral.js.map +1 -0
- package/lib/build/run-debug-mono-piral.d.ts +1 -0
- package/lib/build/run-debug-mono-piral.js +71 -0
- package/lib/build/run-debug-mono-piral.js.map +1 -0
- package/lib/build/run-debug-pilet.d.ts +1 -0
- package/lib/build/run-debug-pilet.js +90 -0
- package/lib/build/run-debug-pilet.js.map +1 -0
- package/lib/build/run-debug-piral.d.ts +1 -0
- package/lib/build/run-debug-piral.js +86 -0
- package/lib/build/run-debug-piral.js.map +1 -0
- package/lib/bundler.js +62 -25
- package/lib/bundler.js.map +1 -1
- package/lib/cli.js +2 -2
- package/lib/cli.js.map +1 -1
- package/lib/commands.js +12 -12
- package/lib/commands.js.map +1 -1
- package/lib/common/archive.js +8 -8
- package/lib/common/archive.js.map +1 -1
- package/lib/common/browser.js +2 -2
- package/lib/common/browser.js.map +1 -1
- package/lib/common/clients/lerna.js +4 -4
- package/lib/common/clients/lerna.js.map +1 -1
- package/lib/common/clients/npm.js +12 -12
- package/lib/common/clients/npm.js.map +1 -1
- package/lib/common/clients/pnpm.js +5 -5
- package/lib/common/clients/pnpm.js.map +1 -1
- package/lib/common/clients/yarn.js +5 -5
- package/lib/common/clients/yarn.js.map +1 -1
- package/lib/common/compatibility.js +9 -9
- package/lib/common/compatibility.js.map +1 -1
- package/lib/common/config.d.ts +5 -1
- package/lib/common/config.js +2 -1
- package/lib/common/config.js.map +1 -1
- package/lib/common/constants.d.ts +1 -1
- package/lib/common/constants.js +2 -2
- package/lib/common/constants.js.map +1 -1
- package/lib/common/declaration.js +19 -19
- package/lib/common/declaration.js.map +1 -1
- package/lib/common/emulator.js +24 -23
- package/lib/common/emulator.js.map +1 -1
- package/lib/common/envs.js +3 -3
- package/lib/common/envs.js.map +1 -1
- package/lib/common/hash.d.ts +1 -0
- package/lib/common/hash.js +8 -3
- package/lib/common/hash.js.map +1 -1
- package/lib/common/http.d.ts +1 -0
- package/lib/common/http.js +28 -14
- package/lib/common/http.js.map +1 -1
- package/lib/common/injectors.js +4 -4
- package/lib/common/injectors.js.map +1 -1
- package/lib/common/inspect.js +4 -4
- package/lib/common/inspect.js.map +1 -1
- package/lib/common/io.js +77 -73
- package/lib/common/io.js.map +1 -1
- package/lib/common/language.js +2 -2
- package/lib/common/language.js.map +1 -1
- package/lib/common/log.js +8 -8
- package/lib/common/log.js.map +1 -1
- package/lib/common/npm.d.ts +3 -1
- package/lib/common/npm.js +68 -48
- package/lib/common/npm.js.map +1 -1
- package/lib/common/pack.js +18 -18
- package/lib/common/pack.js.map +1 -1
- package/lib/common/package.d.ts +4 -2
- package/lib/common/package.js +182 -81
- package/lib/common/package.js.map +1 -1
- package/lib/common/patcher.js +20 -20
- package/lib/common/patcher.js.map +1 -1
- package/lib/common/port.js +3 -3
- package/lib/common/port.js.map +1 -1
- package/lib/common/rules.js +4 -4
- package/lib/common/rules.js.map +1 -1
- package/lib/common/scaffold.js +15 -15
- package/lib/common/scaffold.js.map +1 -1
- package/lib/common/scripts.js +5 -5
- package/lib/common/scripts.js.map +1 -1
- package/lib/common/template.js +4 -4
- package/lib/common/template.js.map +1 -1
- package/lib/external/index.js +1369 -611
- package/lib/helpers.js +2 -2
- package/lib/helpers.js.map +1 -1
- package/lib/inject.js +2 -2
- package/lib/inject.js.map +1 -1
- package/lib/injectors/pilet.d.ts +1 -10
- package/lib/injectors/pilet.js +74 -27
- package/lib/injectors/pilet.js.map +1 -1
- package/lib/injectors/piral.d.ts +4 -2
- package/lib/injectors/piral.js +20 -5
- package/lib/injectors/piral.js.map +1 -1
- package/lib/messages.d.ts +11 -3
- package/lib/messages.js +11 -3
- package/lib/messages.js.map +1 -1
- package/lib/pb-cli.js +1 -1
- package/lib/pb-cli.js.map +1 -1
- package/lib/pilet-cli.js +1 -1
- package/lib/pilet-cli.js.map +1 -1
- package/lib/piral-cli.js +1 -1
- package/lib/piral-cli.js.map +1 -1
- package/lib/plugin.js +10 -10
- package/lib/plugin.js.map +1 -1
- package/lib/release.js +3 -3
- package/lib/release.js.map +1 -1
- package/lib/resolvers.js +13 -13
- package/lib/resolvers.js.map +1 -1
- package/lib/rules/index.js +7 -7
- package/lib/rules/index.js.map +1 -1
- package/lib/rules/pilet-has-externals-as-peers.js +3 -3
- package/lib/rules/pilet-has-externals-as-peers.js.map +1 -1
- package/lib/rules/pilet-has-no-self-reference.js +1 -1
- package/lib/rules/pilet-has-no-self-reference.js.map +1 -1
- package/lib/rules/pilet-stays-small.js +3 -3
- package/lib/rules/pilet-stays-small.js.map +1 -1
- package/lib/rules/pilet-uses-latest-piral.js +1 -1
- package/lib/rules/pilet-uses-latest-piral.js.map +1 -1
- package/lib/rules/piral-entry-ends-with-html.js +1 -1
- package/lib/rules/piral-entry-ends-with-html.js.map +1 -1
- package/lib/rules/piral-has-valid-files.js +5 -5
- package/lib/rules/piral-has-valid-files.js.map +1 -1
- package/lib/runner.js +1 -1
- package/lib/runner.js.map +1 -1
- package/lib/select.js +6 -6
- package/lib/select.js.map +1 -1
- package/lib/types/common.d.ts +8 -0
- package/lib/types/public.d.ts +66 -12
- package/package.json +3 -3
- package/src/apps/build-pilet.ts +7 -4
- package/src/apps/build-piral.ts +6 -5
- package/src/apps/debug-pilet.ts +3 -2
- package/src/apps/debug-piral.ts +2 -1
- package/src/apps/declaration-piral.ts +3 -1
- package/src/apps/new-pilet.ts +7 -3
- package/src/apps/new-piral.ts +2 -1
- package/src/apps/pack-pilet.ts +3 -1
- package/src/apps/publish-pilet.ts +6 -5
- package/src/apps/publish-piral.ts +3 -2
- package/src/apps/upgrade-pilet.ts +5 -4
- package/src/apps/upgrade-piral.ts +2 -1
- package/src/apps/validate-pilet.ts +5 -2
- package/src/apps/validate-piral.ts +3 -1
- package/src/build/bundler-calls.ts +121 -0
- package/src/build/run-build-pilet.ts +89 -0
- package/src/build/run-build-piral.ts +88 -0
- package/src/build/run-debug-mono-piral.ts +87 -0
- package/src/build/run-debug-pilet.ts +114 -0
- package/src/build/run-debug-piral.ts +106 -0
- package/src/bundler.test.ts +83 -68
- package/src/bundler.ts +52 -12
- package/src/common/config.ts +6 -1
- package/src/common/constants.ts +1 -1
- package/src/common/emulator.ts +1 -0
- package/src/common/hash.ts +5 -0
- package/src/common/http.ts +18 -4
- package/src/common/io.ts +4 -0
- package/src/common/npm.test.ts +14 -14
- package/src/common/npm.ts +21 -2
- package/src/common/package.ts +120 -9
- package/src/helpers.ts +2 -2
- package/src/injectors/pilet.ts +82 -22
- package/src/injectors/piral.test.ts +6 -5
- package/src/injectors/piral.ts +21 -2
- package/src/messages.ts +23 -15
- package/src/types/common.ts +9 -0
- package/src/types/public.ts +71 -20
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const common_1 = require("../common");
|
|
13
|
+
let handler;
|
|
14
|
+
function run(root, piral, emulator, sourceMaps, contentHash, minify, externals, publicUrl, outFile, outDir, entryFiles, logLevel, args) {
|
|
15
|
+
(0, common_1.setStandardEnvs)({
|
|
16
|
+
production: !emulator,
|
|
17
|
+
root,
|
|
18
|
+
debugPiral: emulator,
|
|
19
|
+
debugPilet: emulator,
|
|
20
|
+
piral,
|
|
21
|
+
dependencies: externals,
|
|
22
|
+
});
|
|
23
|
+
return handler.create({
|
|
24
|
+
root,
|
|
25
|
+
entryFiles,
|
|
26
|
+
outFile,
|
|
27
|
+
outDir,
|
|
28
|
+
externals,
|
|
29
|
+
emulator,
|
|
30
|
+
sourceMaps,
|
|
31
|
+
contentHash,
|
|
32
|
+
minify,
|
|
33
|
+
publicUrl,
|
|
34
|
+
hmr: false,
|
|
35
|
+
logLevel,
|
|
36
|
+
watch: false,
|
|
37
|
+
args,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
process.on('message', (msg) => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
|
+
try {
|
|
42
|
+
switch (msg.type) {
|
|
43
|
+
case 'init':
|
|
44
|
+
handler = require(msg.path);
|
|
45
|
+
break;
|
|
46
|
+
case 'start':
|
|
47
|
+
const bundler = yield run(process.cwd(), msg.piral, msg.emulator, msg.sourceMaps, msg.contentHash, msg.minify, msg.externals, msg.publicUrl, msg.outFile, msg.outDir, msg.entryFiles, msg.logLevel, msg);
|
|
48
|
+
const result = yield bundler.bundle();
|
|
49
|
+
if (result) {
|
|
50
|
+
process.send({
|
|
51
|
+
type: 'done',
|
|
52
|
+
outDir: result.outDir,
|
|
53
|
+
outFile: result.outFile,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
process.send({
|
|
61
|
+
type: 'fail',
|
|
62
|
+
error: error === null || error === void 0 ? void 0 : error.message,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}));
|
|
66
|
+
//# sourceMappingURL=run-build-piral.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-build-piral.js","sourceRoot":"","sources":["../../src/build/run-build-piral.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,sCAA4C;AAE5C,IAAI,OAA0B,CAAC;AAE/B,SAAS,GAAG,CACV,IAAY,EACZ,KAAa,EACb,QAAiB,EACjB,UAAmB,EACnB,WAAoB,EACpB,MAAe,EACf,SAAwB,EACxB,SAAiB,EACjB,OAAe,EACf,MAAc,EACd,UAAkB,EAClB,QAAmB,EACnB,IA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ED,MAAM;SACT;KACF;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO;SACtB,CAAC,CAAC;KACJ;AACH,CAAC,CAAA,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const common_1 = require("../common");
|
|
13
|
+
const path_1 = require("path");
|
|
14
|
+
let handler;
|
|
15
|
+
function run(root, outFile, outDir, piral, hmr, externals, entryFiles, logLevel, args) {
|
|
16
|
+
(0, common_1.progress)(`Preparing supplied Piral instance ...`);
|
|
17
|
+
(0, common_1.setStandardEnvs)({
|
|
18
|
+
piral,
|
|
19
|
+
dependencies: externals,
|
|
20
|
+
production: false,
|
|
21
|
+
debugPiral: true,
|
|
22
|
+
debugPilet: true,
|
|
23
|
+
root,
|
|
24
|
+
});
|
|
25
|
+
return handler.create({
|
|
26
|
+
root,
|
|
27
|
+
entryFiles,
|
|
28
|
+
outFile,
|
|
29
|
+
outDir,
|
|
30
|
+
externals,
|
|
31
|
+
emulator: true,
|
|
32
|
+
sourceMaps: true,
|
|
33
|
+
contentHash: false,
|
|
34
|
+
minify: false,
|
|
35
|
+
publicUrl: undefined,
|
|
36
|
+
hmr,
|
|
37
|
+
logLevel,
|
|
38
|
+
watch: true,
|
|
39
|
+
args,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
process.on('message', (msg) => __awaiter(void 0, void 0, void 0, function* () {
|
|
43
|
+
try {
|
|
44
|
+
switch (msg.type) {
|
|
45
|
+
case 'init':
|
|
46
|
+
handler = require(msg.path);
|
|
47
|
+
break;
|
|
48
|
+
case 'start':
|
|
49
|
+
const root = process.cwd();
|
|
50
|
+
const outDir = (0, path_1.resolve)(root, 'dist', 'app');
|
|
51
|
+
const bundler = yield run(root, msg.outFile, outDir, msg.piral, true, msg.externals, msg.entryFiles, msg.logLevel, msg);
|
|
52
|
+
const result = yield bundler.bundle();
|
|
53
|
+
(0, common_1.logReset)();
|
|
54
|
+
if (result) {
|
|
55
|
+
process.send({
|
|
56
|
+
type: 'done',
|
|
57
|
+
outDir: result.outDir,
|
|
58
|
+
outFile: result.outFile,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
process.send({
|
|
66
|
+
type: 'fail',
|
|
67
|
+
error: error === null || error === void 0 ? void 0 : error.message,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}));
|
|
71
|
+
//# sourceMappingURL=run-debug-mono-piral.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-debug-mono-piral.js","sourceRoot":"","sources":["../../src/build/run-debug-mono-piral.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,sCAAgE;AAChE,+BAA+B;AAE/B,IAAI,OAA0B,CAAC;AAE/B,SAAS,GAAG,CACV,IAAY,EACZ,OAAe,EACf,MAAc,EACd,KAAa,EACb,GAAY,EACZ,SAAwB,EACxB,UAAkB,EAClB,QAAmB,EACnB,I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C;wBACX,IAAI,EAAE,MAAM;wBACZ,MAAM,EAAE,MAAM,CAAC,MAAM;wBACrB,OAAO,EAAE,MAAM,CAAC,OAAO;qBACxB,CAAC,CAAC;iBACJ;gBAED,MAAM;SACT;KACF;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO;SACtB,CAAC,CAAC;KACJ;AACH,CAAC,CAAA,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const common_1 = require("../common");
|
|
13
|
+
const path_1 = require("path");
|
|
14
|
+
let handler;
|
|
15
|
+
let bundler;
|
|
16
|
+
function run(root, targetDir, outDir, piral, externals, importmap, entryModule, version, logLevel, args) {
|
|
17
|
+
(0, common_1.setStandardEnvs)({
|
|
18
|
+
piral,
|
|
19
|
+
root,
|
|
20
|
+
});
|
|
21
|
+
return handler.create({
|
|
22
|
+
root,
|
|
23
|
+
piral,
|
|
24
|
+
entryModule,
|
|
25
|
+
targetDir,
|
|
26
|
+
outDir,
|
|
27
|
+
outFile: 'index.js',
|
|
28
|
+
externals,
|
|
29
|
+
importmap,
|
|
30
|
+
version,
|
|
31
|
+
develop: true,
|
|
32
|
+
sourceMaps: true,
|
|
33
|
+
contentHash: true,
|
|
34
|
+
minify: false,
|
|
35
|
+
logLevel,
|
|
36
|
+
watch: true,
|
|
37
|
+
args,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
process.on('message', (msg) => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
|
+
const root = process.cwd();
|
|
42
|
+
try {
|
|
43
|
+
switch (msg.type) {
|
|
44
|
+
case 'init':
|
|
45
|
+
handler = require(msg.path);
|
|
46
|
+
break;
|
|
47
|
+
case 'bundle':
|
|
48
|
+
if (bundler) {
|
|
49
|
+
yield bundler.bundle();
|
|
50
|
+
}
|
|
51
|
+
break;
|
|
52
|
+
case 'start':
|
|
53
|
+
const dist = (0, path_1.resolve)(root, 'dist');
|
|
54
|
+
bundler = yield run(root, msg.targetDir, dist, msg.piral, msg.externals, msg.importmap, msg.entryModule, msg.version, msg.logLevel, msg);
|
|
55
|
+
if (bundler) {
|
|
56
|
+
bundler.onStart(() => {
|
|
57
|
+
process.send({
|
|
58
|
+
type: 'pending',
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
bundler.onEnd((result) => {
|
|
62
|
+
if (msg.hmr) {
|
|
63
|
+
process.send({
|
|
64
|
+
type: 'update',
|
|
65
|
+
outHash: result.hash,
|
|
66
|
+
outName: result.name,
|
|
67
|
+
args: {
|
|
68
|
+
requireRef: result.requireRef,
|
|
69
|
+
version: msg.version,
|
|
70
|
+
root,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
process.send({
|
|
76
|
+
type: 'done',
|
|
77
|
+
outDir: dist,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
process.send({
|
|
85
|
+
type: 'fail',
|
|
86
|
+
error: error === null || error === void 0 ? void 0 : error.message,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}));
|
|
90
|
+
//# sourceMappingURL=run-debug-pilet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-debug-pilet.js","sourceRoot":"","sources":["../../src/build/run-debug-pilet.ts"],"names":[],"mappings":";;;;;;;;;;;AAOA,sCAA4C;AAC5C,+BAA+B;AAE/B,IAAI,OAA0B,CAAC;AAC/B,IAAI,OAA8B,CAAC;AAEnC,SAAS,GAAG,CACV,IAAY,EACZ,SAAiB,EACjB,MAAc,EACd,KAAa,EACb,SAAwB,EACxB,SAAkC,EAClC,WAAmB,EACnB,OAA2B,EAC3B,QAAmB,EACnB,IAAS;IAET,IAAA,wBAAe,EAAC;QACd,KAAK;QACL,IAAI;KACL,CAAC,CAAC;IACH,OAAO,OAAO,CAAC,MAAM,CAAC;QACpB,IAAI;QACJ,KAAK;QACL,WAAW;QACX,SAAS;QACT,MAAM;QACN,OAAO,EAAE,UAAU;QACnB,SAAS;QACT,SAAS;QACT,OAAO;QACP,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,IAAI;QACjB,MAAM,EAAE,KAAK;QACb,QAAQ;QACR,KAAK,EAAE,IAAI;QACX,IAAI;KACL,CAAC,CAAC;AACL,CAAC;AAED,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,CAAO,GAAG,EAAE,EAAE;IAClC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAE3B,IAAI;QACF,QAAQ,GAAG,CAAC,IAAI,EAAE;YAChB,KAAK,MAAM;gBACT,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAC5B,MAAM;YACR,KAAK,QAAQ;gBACX,IAAI,OAAO,EAAE;oBACX,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC;iBACxB;gBAED,MAAM;YAC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+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const common_1 = require("../common");
|
|
13
|
+
const path_1 = require("path");
|
|
14
|
+
let handler;
|
|
15
|
+
let bundler;
|
|
16
|
+
function run(root, outFile, outDir, piral, hmr, externals, publicUrl, entryFiles, logLevel, args) {
|
|
17
|
+
(0, common_1.setStandardEnvs)({
|
|
18
|
+
root,
|
|
19
|
+
debugPiral: true,
|
|
20
|
+
dependencies: externals,
|
|
21
|
+
piral,
|
|
22
|
+
});
|
|
23
|
+
return handler.create({
|
|
24
|
+
root,
|
|
25
|
+
entryFiles,
|
|
26
|
+
outFile,
|
|
27
|
+
outDir,
|
|
28
|
+
externals,
|
|
29
|
+
emulator: true,
|
|
30
|
+
sourceMaps: true,
|
|
31
|
+
contentHash: false,
|
|
32
|
+
minify: false,
|
|
33
|
+
publicUrl,
|
|
34
|
+
hmr,
|
|
35
|
+
logLevel,
|
|
36
|
+
watch: true,
|
|
37
|
+
args,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
process.on('message', (msg) => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
|
+
const root = process.cwd();
|
|
42
|
+
try {
|
|
43
|
+
switch (msg.type) {
|
|
44
|
+
case 'init':
|
|
45
|
+
handler = require(msg.path);
|
|
46
|
+
break;
|
|
47
|
+
case 'bundle':
|
|
48
|
+
if (bundler) {
|
|
49
|
+
yield bundler.bundle();
|
|
50
|
+
}
|
|
51
|
+
break;
|
|
52
|
+
case 'start':
|
|
53
|
+
const dist = (0, path_1.resolve)(root, 'dist');
|
|
54
|
+
bundler = yield run(root, msg.outFile, dist, msg.piral, msg.hmr, msg.externals, msg.publicUrl, msg.entryFiles, msg.logLevel, msg);
|
|
55
|
+
if (bundler) {
|
|
56
|
+
bundler.onStart(() => {
|
|
57
|
+
process.send({
|
|
58
|
+
type: 'pending',
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
bundler.onEnd((result) => {
|
|
62
|
+
process.send({
|
|
63
|
+
type: 'update',
|
|
64
|
+
outHash: result.hash,
|
|
65
|
+
outName: 'index.html',
|
|
66
|
+
args: {
|
|
67
|
+
root,
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
process.send({
|
|
72
|
+
type: 'done',
|
|
73
|
+
outDir: dist,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
process.send({
|
|
81
|
+
type: 'fail',
|
|
82
|
+
error: error === null || error === void 0 ? void 0 : error.message,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}));
|
|
86
|
+
//# sourceMappingURL=run-debug-piral.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-debug-piral.js","sourceRoot":"","sources":["../../src/build/run-debug-piral.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,sCAA4C;AAC5C,+BAA+B;AAE/B,IAAI,OAA0B,CAAC;AAC/B,IAAI,OAA8B,CAAC;AAEnC,SAAS,GAAG,CACV,IAAY,EACZ,OAAe,EACf,MAAc,EACd,KAAa,EACb,GAAY,EACZ,SAAwB,EACxB,SAAiB,EACj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AI,EAAE,SAAS;yBAChB,CAAC,CAAC;oBACL,CAAC,CAAC,CAAC;oBAEH,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE;wBACvB,OAAO,CAAC,IAAI,CAAC;4BACX,IAAI,EAAE,QAAQ;4BACd,OAAO,EAAE,MAAM,CAAC,IAAI;4BACpB,OAAO,EAAE,YAAY;4BACrB,IAAI,EAAE;gCACJ,IAAI;6BACL;yBACF,CAAC,CAAC;oBACL,CAAC,CAAC,CAAC;oBAEH,OAAO,CAAC,IAAI,CAAC;wBACX,IAAI,EAAE,MAAM;wBACZ,MAAM,EAAE,IAAI;qBACb,CAAC,CAAC;iBACJ;gBAED,MAAM;SACT;KACF;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO;SACtB,CAAC,CAAC;KACJ;AACH,CAAC,CAAA,CAAC,CAAC"}
|
package/lib/bundler.js
CHANGED
|
@@ -10,32 +10,33 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.callDebugPiralFromMonoRepo = exports.callPiletBuild = exports.callPiralBuild = exports.callPiletDebug = exports.callPiralDebug = exports.setBundler = void 0;
|
|
13
|
+
const bundler_calls_1 = require("./build/bundler-calls");
|
|
13
14
|
const helpers_1 = require("./helpers");
|
|
14
15
|
const common_1 = require("./common");
|
|
15
16
|
const bundlers = [];
|
|
16
17
|
function installDefaultBundler(root) {
|
|
17
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18
19
|
const selectedBundler = common_1.config.bundler || 'webpack';
|
|
19
|
-
common_1.log('generalDebug_0003', `Installation of default bundler for "${selectedBundler}".`);
|
|
20
|
+
(0, common_1.log)('generalDebug_0003', `Installation of default bundler for "${selectedBundler}".`);
|
|
20
21
|
const selectedPackage = `piral-cli-${selectedBundler}`;
|
|
21
|
-
common_1.log('generalDebug_0003', `Determining NPM client at "${root}" ...`);
|
|
22
|
-
const client = yield common_1.determineNpmClient(root);
|
|
23
|
-
common_1.log('generalDebug_0003', `Prepare to install ${selectedPackage}@${common_1.cliVersion} using "${client}" into "${root}".`);
|
|
24
|
-
common_1.progress(`Installing ${selectedPackage} ...`);
|
|
25
|
-
yield common_1.installPackage(client, `${selectedPackage}@${common_1.cliVersion}`, root, '--save-dev');
|
|
26
|
-
common_1.log('generalDebug_0003', `Installed bundler from "${selectedPackage}".`);
|
|
22
|
+
(0, common_1.log)('generalDebug_0003', `Determining NPM client at "${root}" ...`);
|
|
23
|
+
const client = yield (0, common_1.determineNpmClient)(root);
|
|
24
|
+
(0, common_1.log)('generalDebug_0003', `Prepare to install ${selectedPackage}@${common_1.cliVersion} using "${client}" into "${root}".`);
|
|
25
|
+
(0, common_1.progress)(`Installing ${selectedPackage} ...`);
|
|
26
|
+
yield (0, common_1.installPackage)(client, `${selectedPackage}@${common_1.cliVersion}`, root, '--save-dev');
|
|
27
|
+
(0, common_1.log)('generalDebug_0003', `Installed bundler from "${selectedPackage}".`);
|
|
27
28
|
require('./inject').inject(selectedPackage);
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
31
|
function checkDefaultBundler(bundler) {
|
|
31
32
|
if (!(bundler === null || bundler === void 0 ? void 0 : bundler.actions)) {
|
|
32
|
-
common_1.fail('defaultBundlerMissing_0173');
|
|
33
|
+
(0, common_1.fail)('defaultBundlerMissing_0173');
|
|
33
34
|
}
|
|
34
35
|
return bundler;
|
|
35
36
|
}
|
|
36
37
|
function checkCustomBundler(bundler, bundlerName) {
|
|
37
38
|
if (!(bundler === null || bundler === void 0 ? void 0 : bundler.actions)) {
|
|
38
|
-
common_1.fail('bundlerMissing_0172', bundlerName, helpers_1.availableBundlers);
|
|
39
|
+
(0, common_1.fail)('bundlerMissing_0172', bundlerName, helpers_1.availableBundlers);
|
|
39
40
|
}
|
|
40
41
|
return bundler;
|
|
41
42
|
}
|
|
@@ -52,18 +53,22 @@ function findBundler(root, bundlerName) {
|
|
|
52
53
|
return checkDefaultBundler(bundler);
|
|
53
54
|
}
|
|
54
55
|
else if (bundlers.length > 1) {
|
|
55
|
-
common_1.log('bundlerUnspecified_0175', helpers_1.availableBundlers);
|
|
56
|
+
(0, common_1.log)('bundlerUnspecified_0175', helpers_1.availableBundlers);
|
|
56
57
|
}
|
|
57
58
|
return defaultBundler;
|
|
58
59
|
});
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
+
function prepareArgs(bundler, args) {
|
|
61
62
|
return __awaiter(this, void 0, void 0, function* () {
|
|
62
63
|
if (args.optimizeModules) {
|
|
63
|
-
common_1.progress('Preparing modules ...');
|
|
64
|
-
yield common_1.patchModules(args.root, args.ignored);
|
|
65
|
-
common_1.logReset();
|
|
64
|
+
(0, common_1.progress)('Preparing modules ...');
|
|
65
|
+
yield (0, common_1.patchModules)(args.root, args.ignored);
|
|
66
|
+
(0, common_1.logReset)();
|
|
66
67
|
}
|
|
68
|
+
if (bundler.prepare) {
|
|
69
|
+
return yield bundler.prepare(args);
|
|
70
|
+
}
|
|
71
|
+
return args;
|
|
67
72
|
});
|
|
68
73
|
}
|
|
69
74
|
function setBundler(bundler) {
|
|
@@ -76,41 +81,73 @@ exports.setBundler = setBundler;
|
|
|
76
81
|
function callPiralDebug(args, bundlerName) {
|
|
77
82
|
return __awaiter(this, void 0, void 0, function* () {
|
|
78
83
|
const bundler = yield findBundler(args.root, bundlerName);
|
|
79
|
-
|
|
80
|
-
|
|
84
|
+
try {
|
|
85
|
+
const action = bundler.actions.debugPiral;
|
|
86
|
+
const params = yield prepareArgs(action, args);
|
|
87
|
+
return yield (0, bundler_calls_1.callDynamic)('debug-piral', action.path, params);
|
|
88
|
+
}
|
|
89
|
+
catch (err) {
|
|
90
|
+
(0, common_1.fail)('bundlingFailed_0174', err);
|
|
91
|
+
}
|
|
81
92
|
});
|
|
82
93
|
}
|
|
83
94
|
exports.callPiralDebug = callPiralDebug;
|
|
84
95
|
function callPiletDebug(args, bundlerName) {
|
|
85
96
|
return __awaiter(this, void 0, void 0, function* () {
|
|
86
97
|
const bundler = yield findBundler(args.root, bundlerName);
|
|
87
|
-
|
|
88
|
-
|
|
98
|
+
try {
|
|
99
|
+
const action = bundler.actions.debugPilet;
|
|
100
|
+
const params = yield prepareArgs(action, args);
|
|
101
|
+
return yield (0, bundler_calls_1.callDynamic)('debug-pilet', action.path, params);
|
|
102
|
+
}
|
|
103
|
+
catch (err) {
|
|
104
|
+
(0, common_1.fail)('bundlingFailed_0174', err);
|
|
105
|
+
}
|
|
89
106
|
});
|
|
90
107
|
}
|
|
91
108
|
exports.callPiletDebug = callPiletDebug;
|
|
92
109
|
function callPiralBuild(args, bundlerName) {
|
|
93
110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
94
111
|
const bundler = yield findBundler(args.root, bundlerName);
|
|
95
|
-
|
|
96
|
-
|
|
112
|
+
try {
|
|
113
|
+
const action = bundler.actions.buildPiral;
|
|
114
|
+
const params = yield prepareArgs(action, args);
|
|
115
|
+
const instance = yield (0, bundler_calls_1.callStatic)('build-piral', action.path, params);
|
|
116
|
+
return instance.bundle;
|
|
117
|
+
}
|
|
118
|
+
catch (err) {
|
|
119
|
+
(0, common_1.fail)('bundlingFailed_0174', err);
|
|
120
|
+
}
|
|
97
121
|
});
|
|
98
122
|
}
|
|
99
123
|
exports.callPiralBuild = callPiralBuild;
|
|
100
124
|
function callPiletBuild(args, bundlerName) {
|
|
101
125
|
return __awaiter(this, void 0, void 0, function* () {
|
|
102
126
|
const bundler = yield findBundler(args.root, bundlerName);
|
|
103
|
-
|
|
104
|
-
|
|
127
|
+
try {
|
|
128
|
+
const action = bundler.actions.buildPilet;
|
|
129
|
+
const params = yield prepareArgs(action, args);
|
|
130
|
+
const instance = yield (0, bundler_calls_1.callStatic)('build-pilet', action.path, params);
|
|
131
|
+
return instance.bundle;
|
|
132
|
+
}
|
|
133
|
+
catch (err) {
|
|
134
|
+
(0, common_1.fail)('bundlingFailed_0174', err);
|
|
135
|
+
}
|
|
105
136
|
});
|
|
106
137
|
}
|
|
107
138
|
exports.callPiletBuild = callPiletBuild;
|
|
108
139
|
function callDebugPiralFromMonoRepo(args, bundlerName) {
|
|
109
140
|
return __awaiter(this, void 0, void 0, function* () {
|
|
110
141
|
const bundler = yield findBundler(args.root, bundlerName);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
142
|
+
try {
|
|
143
|
+
const action = bundler.actions.watchPiral;
|
|
144
|
+
const params = yield prepareArgs(action, args);
|
|
145
|
+
const instance = yield (0, bundler_calls_1.callStatic)('debug-mono-piral', action.path, params);
|
|
146
|
+
return instance.bundle;
|
|
147
|
+
}
|
|
148
|
+
catch (err) {
|
|
149
|
+
(0, common_1.fail)('bundlingFailed_0174', err);
|
|
150
|
+
}
|
|
114
151
|
});
|
|
115
152
|
}
|
|
116
153
|
exports.callDebugPiralFromMonoRepo = callDebugPiralFromMonoRepo;
|
package/lib/bundler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundler.js","sourceRoot":"","sources":["../src/bundler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAA8C;AAC9C,qCAUkB;
|
|
1
|
+
{"version":3,"file":"bundler.js","sourceRoot":"","sources":["../src/bundler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAgE;AAChE,uCAA8C;AAC9C,qCAUkB;AAmBlB,MAAM,QAAQ,GAA4B,EAAE,CAAC;AAE7C,SAAe,qBAAqB,CAAC,IAAY;;QAC/C,MAAM,eAAe,GAAG,eAAM,CAAC,OAAO,IAAI,SAAS,CAAC;QACpD,IAAA,YAAG,EAAC,mBAAmB,EAAE,wCAAwC,eAAe,IAAI,CAAC,CAAC;QACtF,MAAM,eAAe,GAAG,aAAa,eAAe,EAAE,CAAC;QACvD,IAAA,YAAG,EAAC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,8 +28,8 @@ function setupCli(commands) {
|
|
|
28
28
|
}, (args) => {
|
|
29
29
|
const runCommand = () => {
|
|
30
30
|
if (command.survey) {
|
|
31
|
-
const result = yargs_parser_1.detailed(process.argv).argv;
|
|
32
|
-
return questionnaire_1.runQuestionnaireFor(command, result);
|
|
31
|
+
const result = (0, yargs_parser_1.detailed)(process.argv).argv;
|
|
32
|
+
return (0, questionnaire_1.runQuestionnaireFor)(command, result);
|
|
33
33
|
}
|
|
34
34
|
else {
|
|
35
35
|
return Promise.resolve(command.run(args));
|
package/lib/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,+CAAwC;AACxC,mDAAsD;AAGtD,IAAI,IAAI,GAAG,KAAK,CAAC;AAEjB,SAAS,YAAY,CAAI,OAAuB;IAC9C,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;QAChC,OAAO,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;KACzD;IAED,OAAO,OAAO,CAAC,IAAI,CAAC;AACtB,CAAC;AAED,SAAgB,QAAQ,CAAC,QAAiC;IACxD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;QAC9B,IAAI,GAAG,IAAI,CAAC,OAAO,CACjB,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,EACzC,OAAO,CAAC,WAAW,EACnB,CAAC,IAAI,EAAE,EAAE;YACP,IAAI,OAAO,CAAC,MAAM,EAAE;gBAClB,IAAI,GAAG,IAAI;qBACR,OAAO,CAAC,GAAG,CAAC;qBACZ,KAAK,CAAC,GAAG,EAAE,UAAU,CAAC;qBACtB,QAAQ,CAAC,GAAG,EAAE,yDAAyD,CAAC;qBACxE,OAAO,CAAC,GAAG,EA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,UAAU,EAAE;gBACvC,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;aAC5B;YACD,OAAO,IAAI,CAAC;QACd,CAAC,EACD,CAAC,IAAI,EAAE,EAAE;YACP,MAAM,UAAU,GAAG,GAAG,EAAE;gBACtB,IAAI,OAAO,CAAC,MAAM,EAAE;oBAClB,MAAM,MAAM,GAAG,IAAA,uBAAQ,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;oBAC3C,OAAO,IAAA,mCAAmB,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC;iBAC7C;qBAAM;oBACL,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;iBAC3C;YACH,CAAC,CAAC;YAEF,OAAO,UAAU,EAAE,CAAC,IAAI,CACtB,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EACrB,CAAC,GAAG,EAAE,EAAE;gBACN,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBACjD,OAAO,CAAC,GAAG,CAAC,oDAAoD,CAAC,CAAC;gBAClE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC,CACF,CAAC;QACJ,CAAC,CACF,CAAC;KACH;IAED,IAAI,CAAC,MAAM,CAAC,6EAA6E,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC;AAClH,CAAC;AA1CD,4BA0CC"}
|
package/lib/commands.js
CHANGED
|
@@ -195,7 +195,7 @@ const allCommands = [
|
|
|
195
195
|
.default('log-level', apps.declarationPiralDefaults.logLevel)
|
|
196
196
|
.choices('force-overwrite', helpers_1.forceOverwriteKeys)
|
|
197
197
|
.describe('force-overwrite', 'Determines if files should be overwritten by the command.')
|
|
198
|
-
.default('force-overwrite', helpers_1.keyOfForceOverwrite(apps.declarationPiralDefaults.forceOverwrite))
|
|
198
|
+
.default('force-overwrite', (0, helpers_1.keyOfForceOverwrite)(apps.declarationPiralDefaults.forceOverwrite))
|
|
199
199
|
.string('base')
|
|
200
200
|
.default('base', process.cwd())
|
|
201
201
|
.describe('base', 'Sets the base directory. By default the current directory is used.');
|
|
@@ -204,7 +204,7 @@ const allCommands = [
|
|
|
204
204
|
return apps.declarationPiral(args.base, {
|
|
205
205
|
entry: args.source,
|
|
206
206
|
target: args.target,
|
|
207
|
-
forceOverwrite: helpers_1.valueOfForceOverwrite(args['force-overwrite']),
|
|
207
|
+
forceOverwrite: (0, helpers_1.valueOfForceOverwrite)(args['force-overwrite']),
|
|
208
208
|
logLevel: args['log-level'],
|
|
209
209
|
});
|
|
210
210
|
},
|
|
@@ -242,10 +242,10 @@ const allCommands = [
|
|
|
242
242
|
.default('tag', apps.newPiralDefaults.version)
|
|
243
243
|
.choices('force-overwrite', helpers_1.forceOverwriteKeys)
|
|
244
244
|
.describe('force-overwrite', 'Determines if files should be overwritten by the installation.')
|
|
245
|
-
.default('force-overwrite', helpers_1.keyOfForceOverwrite(apps.newPiralDefaults.forceOverwrite))
|
|
245
|
+
.default('force-overwrite', (0, helpers_1.keyOfForceOverwrite)(apps.newPiralDefaults.forceOverwrite))
|
|
246
246
|
.choices('language', helpers_1.piletLanguageKeys)
|
|
247
247
|
.describe('language', 'Determines the programming language for the new Piral instance.')
|
|
248
|
-
.default('language', helpers_1.keyOfPiletLanguage(apps.newPiralDefaults.language))
|
|
248
|
+
.default('language', (0, helpers_1.keyOfPiletLanguage)(apps.newPiralDefaults.language))
|
|
249
249
|
.string('template')
|
|
250
250
|
.describe('template', 'Sets the boilerplate template package to be used when scaffolding.')
|
|
251
251
|
.default('template', apps.newPiralDefaults.template)
|
|
@@ -269,8 +269,8 @@ const allCommands = [
|
|
|
269
269
|
framework: args.framework,
|
|
270
270
|
version: args.tag,
|
|
271
271
|
registry: args.registry,
|
|
272
|
-
forceOverwrite: helpers_1.valueOfForceOverwrite(args['force-overwrite']),
|
|
273
|
-
language: helpers_1.valueOfPiletLanguage(args.language),
|
|
272
|
+
forceOverwrite: (0, helpers_1.valueOfForceOverwrite)(args['force-overwrite']),
|
|
273
|
+
language: (0, helpers_1.valueOfPiletLanguage)(args.language),
|
|
274
274
|
install: args.install,
|
|
275
275
|
template: args.template,
|
|
276
276
|
logLevel: args['log-level'],
|
|
@@ -578,13 +578,13 @@ const allCommands = [
|
|
|
578
578
|
.default('install', apps.newPiletDefaults.install)
|
|
579
579
|
.choices('force-overwrite', helpers_1.forceOverwriteKeys)
|
|
580
580
|
.describe('force-overwrite', 'Determines if files should be overwritten by the scaffolding.')
|
|
581
|
-
.default('force-overwrite', helpers_1.keyOfForceOverwrite(apps.newPiletDefaults.forceOverwrite))
|
|
581
|
+
.default('force-overwrite', (0, helpers_1.keyOfForceOverwrite)(apps.newPiletDefaults.forceOverwrite))
|
|
582
582
|
.number('log-level')
|
|
583
583
|
.describe('log-level', 'Sets the log level to use (1-5).')
|
|
584
584
|
.default('log-level', apps.newPiletDefaults.logLevel)
|
|
585
585
|
.choices('language', helpers_1.piletLanguageKeys)
|
|
586
586
|
.describe('language', 'Determines the programming language for the new pilet.')
|
|
587
|
-
.default('language', helpers_1.keyOfPiletLanguage(apps.newPiletDefaults.language))
|
|
587
|
+
.default('language', (0, helpers_1.keyOfPiletLanguage)(apps.newPiletDefaults.language))
|
|
588
588
|
.string('template')
|
|
589
589
|
.describe('template', 'Sets the boilerplate template package to be used when scaffolding.')
|
|
590
590
|
.default('template', apps.newPiletDefaults.template)
|
|
@@ -606,8 +606,8 @@ const allCommands = [
|
|
|
606
606
|
target: args.target,
|
|
607
607
|
source: args.source,
|
|
608
608
|
registry: args.registry,
|
|
609
|
-
forceOverwrite: helpers_1.valueOfForceOverwrite(args['force-overwrite']),
|
|
610
|
-
language: helpers_1.valueOfPiletLanguage(args.language),
|
|
609
|
+
forceOverwrite: (0, helpers_1.valueOfForceOverwrite)(args['force-overwrite']),
|
|
610
|
+
language: (0, helpers_1.valueOfPiletLanguage)(args.language),
|
|
611
611
|
logLevel: args['log-level'],
|
|
612
612
|
install: args.install,
|
|
613
613
|
template: args.template,
|
|
@@ -640,7 +640,7 @@ const allCommands = [
|
|
|
640
640
|
.default('install', apps.upgradePiletDefaults.install)
|
|
641
641
|
.choices('force-overwrite', helpers_1.forceOverwriteKeys)
|
|
642
642
|
.describe('force-overwrite', 'Determines if files should be overwritten by the upgrading process.')
|
|
643
|
-
.default('force-overwrite', helpers_1.keyOfForceOverwrite(apps.upgradePiletDefaults.forceOverwrite))
|
|
643
|
+
.default('force-overwrite', (0, helpers_1.keyOfForceOverwrite)(apps.upgradePiletDefaults.forceOverwrite))
|
|
644
644
|
.choices('npm-client', helpers_1.clientTypeKeys)
|
|
645
645
|
.describe('npm-client', 'Sets the NPM client to be used when upgrading.')
|
|
646
646
|
.default('npm-client', apps.upgradePiletDefaults.npmClient)
|
|
@@ -653,7 +653,7 @@ const allCommands = [
|
|
|
653
653
|
target: args.target,
|
|
654
654
|
version: args['target-version'],
|
|
655
655
|
logLevel: args['log-level'],
|
|
656
|
-
forceOverwrite: helpers_1.valueOfForceOverwrite(args['force-overwrite']),
|
|
656
|
+
forceOverwrite: (0, helpers_1.valueOfForceOverwrite)(args['force-overwrite']),
|
|
657
657
|
install: args.install,
|
|
658
658
|
npmClient: args['npm-client'],
|
|
659
659
|
});
|