piral-cli 1.4.0-beta.6224 → 1.4.0-beta.6243
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/lib/apps/build-piral.js +17 -9
- package/lib/apps/build-piral.js.map +1 -1
- package/lib/common/emulator.d.ts +1 -0
- package/lib/common/emulator.js +74 -9
- package/lib/common/emulator.js.map +1 -1
- package/lib/common/template.d.ts +5 -1
- package/lib/common/template.js +1 -1
- package/lib/common/template.js.map +1 -1
- package/lib/helpers.js +7 -1
- package/lib/helpers.js.map +1 -1
- package/lib/types/public.d.ts +1 -1
- package/package.json +2 -2
- package/src/apps/build-piral.ts +17 -9
- package/src/common/emulator.ts +98 -14
- package/src/common/template.ts +8 -3
- package/src/helpers.ts +7 -1
- package/src/types/public.ts +1 -1
package/lib/apps/build-piral.js
CHANGED
|
@@ -14,9 +14,11 @@ const path_1 = require("path");
|
|
|
14
14
|
const bundler_1 = require("../bundler");
|
|
15
15
|
const types_1 = require("../types");
|
|
16
16
|
const common_1 = require("../common");
|
|
17
|
+
const allName = 'all';
|
|
17
18
|
const releaseName = 'release';
|
|
18
19
|
const emulatorName = 'emulator';
|
|
19
20
|
const emulatorSourcesName = 'emulator-sources';
|
|
21
|
+
const emulatorWebsiteName = 'emulator-website';
|
|
20
22
|
exports.buildPiralDefaults = {
|
|
21
23
|
entry: './',
|
|
22
24
|
target: './dist',
|
|
@@ -24,7 +26,7 @@ exports.buildPiralDefaults = {
|
|
|
24
26
|
logLevel: types_1.LogLevels.info,
|
|
25
27
|
fresh: false,
|
|
26
28
|
minify: true,
|
|
27
|
-
type:
|
|
29
|
+
type: allName,
|
|
28
30
|
subdir: true,
|
|
29
31
|
sourceMaps: true,
|
|
30
32
|
watch: false,
|
|
@@ -64,10 +66,11 @@ function buildPiral(baseDir = process.cwd(), options = {}) {
|
|
|
64
66
|
(0, common_1.progress)('Removing output directory ...');
|
|
65
67
|
yield (0, common_1.removeDirectory)(dest.outDir);
|
|
66
68
|
}
|
|
67
|
-
//
|
|
68
|
-
if (type
|
|
69
|
+
// either 'emulator-*' or 'all'
|
|
70
|
+
if (type === emulatorName || type === emulatorSourcesName || type === emulatorWebsiteName || type === allName) {
|
|
69
71
|
const emulatorPublicUrl = '/';
|
|
70
72
|
const targetDir = useSubdir ? (0, path_1.join)(dest.outDir, emulatorName) : dest.outDir;
|
|
73
|
+
const appDir = type !== emulatorWebsiteName ? (0, path_1.join)(targetDir, 'app') : targetDir;
|
|
71
74
|
(0, common_1.progress)('Starting emulator build ...');
|
|
72
75
|
// since we create this anyway let's just pretend we want to have it clean!
|
|
73
76
|
yield (0, common_1.removeDirectory)(targetDir);
|
|
@@ -88,7 +91,7 @@ function buildPiral(baseDir = process.cwd(), options = {}) {
|
|
|
88
91
|
entryFiles,
|
|
89
92
|
logLevel,
|
|
90
93
|
ignored,
|
|
91
|
-
outDir:
|
|
94
|
+
outDir: appDir,
|
|
92
95
|
outFile: dest.outFile,
|
|
93
96
|
_,
|
|
94
97
|
}, bundlerName);
|
|
@@ -106,21 +109,26 @@ function buildPiral(baseDir = process.cwd(), options = {}) {
|
|
|
106
109
|
yield runLifecycle(root, scripts, 'piral:postbuild');
|
|
107
110
|
yield runLifecycle(root, scripts, `piral:postbuild-${emulatorName}`);
|
|
108
111
|
yield ((_d = hooks.beforeEmulator) === null || _d === void 0 ? void 0 : _d.call(hooks, { root, externals, targetDir, outDir }));
|
|
109
|
-
const rootDir = yield (
|
|
112
|
+
const rootDir = yield (type !== emulatorWebsiteName
|
|
113
|
+
? (0, common_1.createEmulatorSources)(root, externals, outDir, outFile, logLevel)
|
|
114
|
+
: (0, common_1.createEmulatorWebsite)(root, externals, outDir, outFile, logLevel));
|
|
110
115
|
yield ((_e = hooks.afterEmulator) === null || _e === void 0 ? void 0 : _e.call(hooks, { root, externals, targetDir, outDir, rootDir }));
|
|
111
|
-
if (type
|
|
116
|
+
if (type === allName || type === emulatorName) {
|
|
112
117
|
yield ((_f = hooks.beforePackage) === null || _f === void 0 ? void 0 : _f.call(hooks, { root, externals, targetDir, outDir, rootDir }));
|
|
113
118
|
yield (0, common_1.packageEmulator)(rootDir);
|
|
114
119
|
yield ((_g = hooks.afterPackage) === null || _g === void 0 ? void 0 : _g.call(hooks, { root, externals, targetDir, outDir, rootDir }));
|
|
115
120
|
(0, common_1.logDone)(`Emulator package available in "${rootDir}".`);
|
|
116
121
|
}
|
|
117
|
-
else {
|
|
122
|
+
else if (type === emulatorSourcesName) {
|
|
118
123
|
(0, common_1.logDone)(`Emulator sources available in "${rootDir}".`);
|
|
119
124
|
}
|
|
125
|
+
else if (type === emulatorWebsiteName) {
|
|
126
|
+
(0, common_1.logDone)(`Emulator website available in "${rootDir}".`);
|
|
127
|
+
}
|
|
120
128
|
(0, common_1.logReset)();
|
|
121
129
|
}
|
|
122
|
-
//
|
|
123
|
-
if (type
|
|
130
|
+
// either 'release' or 'all'
|
|
131
|
+
if (type === releaseName || type === allName) {
|
|
124
132
|
const targetDir = useSubdir ? (0, path_1.join)(dest.outDir, releaseName) : dest.outDir;
|
|
125
133
|
(0, common_1.progress)('Starting release build ...');
|
|
126
134
|
// since we create this anyway let's just pretend we want to have it clean!
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-piral.js","sourceRoot":"","sources":["../../src/apps/build-piral.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+BAAqC;AACrC,wCAA4C;AAC5C,oCAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"build-piral.js","sourceRoot":"","sources":["../../src/apps/build-piral.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+BAAqC;AACrC,wCAA4C;AAC5C,oCAAqD;AACrD,sCAmBmB;AAEnB,MAAM,OAAO,GAAG,KAAK,CAAC;AACtB,MAAM,WAAW,GAAG,SAAS,CAAC;AAC9B,MAAM,YAAY,GAAG,UAAU,CAAC;AAChC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAC/C,MAAM,mBAAmB,G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AAC,SAAS,CAAC;gBACtC,SAAS;gBACT,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,MAAM,EAAE,SAAS;gBACjB,UAAU;gBACV,QAAQ;gBACR,OAAO;gBACP,CAAC;aACF,EACD,WAAW,CACZ,CAAC;YAEF,MAAM,CAAA,MAAA,KAAK,CAAC,UAAU,sDAAG;gBACvB,IAAI;gBACJ,SAAS;gBACT,SAAS;gBACT,UAAU;gBACV,SAAS;gBACT,cAAc;gBACd,MAAM;gBACN,OAAO;gBACP,IAAI;aACL,CAAC,CAAA,CAAC;YAEH,MAAM,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC;YACrD,MAAM,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,mBAAmB,WAAW,EAAE,CAAC,CAAC;YAEpE,IAAA,gBAAO,EAAC,uCAAuC,MAAM,IAAI,CAAC,CAAC;YAC3D,IAAA,iBAAQ,GAAE,CAAC;SACZ;QAED,MAAM,CAAA,MAAA,KAAK,CAAC,KAAK,sDAAG,EAAE,IAAI,EAAE,CAAC,CAAA,CAAC;;CAC/B;AA/KD,gCA+KC"}
|
package/lib/common/emulator.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { LogLevels, SharedDependency } from '../types';
|
|
2
2
|
export declare function createEmulatorSources(sourceDir: string, externals: Array<SharedDependency>, targetDir: string, targetFile: string, logLevel: LogLevels): Promise<string>;
|
|
3
|
+
export declare function createEmulatorWebsite(sourceDir: string, externals: Array<SharedDependency>, targetDir: string, targetFile: string, logLevel: LogLevels): Promise<string>;
|
|
3
4
|
export declare function packageEmulator(rootDir: string): Promise<void>;
|
package/lib/common/emulator.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.packageEmulator = exports.createEmulatorSources = void 0;
|
|
12
|
+
exports.packageEmulator = exports.createEmulatorWebsite = exports.createEmulatorSources = void 0;
|
|
13
13
|
const path_1 = require("path");
|
|
14
14
|
const package_1 = require("./package");
|
|
15
15
|
const template_1 = require("./template");
|
|
@@ -20,11 +20,12 @@ const declaration_1 = require("./declaration");
|
|
|
20
20
|
const enums_1 = require("./enums");
|
|
21
21
|
const archive_1 = require("./archive");
|
|
22
22
|
const io_1 = require("./io");
|
|
23
|
+
const io_2 = require("./io");
|
|
23
24
|
function createEmulatorSources(sourceDir, externals, targetDir, targetFile, logLevel) {
|
|
24
25
|
var _a, _b, _c;
|
|
25
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
const piralPkg = yield (0,
|
|
27
|
-
const piralJsonPkg = yield (0,
|
|
27
|
+
const piralPkg = yield (0, io_2.readJson)(sourceDir, constants_1.packageJson);
|
|
28
|
+
const piralJsonPkg = yield (0, io_2.readJson)(sourceDir, constants_1.piralJson);
|
|
28
29
|
const pilets = Object.assign(Object.assign({}, piralPkg.pilets), piralJsonPkg.pilets);
|
|
29
30
|
const files = (_a = pilets.files) !== null && _a !== void 0 ? _a : [];
|
|
30
31
|
const allDeps = Object.assign(Object.assign({}, piralPkg.devDependencies), piralPkg.dependencies);
|
|
@@ -65,9 +66,9 @@ function createEmulatorSources(sourceDir, externals, targetDir, targetFile, logL
|
|
|
65
66
|
.filter((file) => typeof file.to === 'string' && typeof file.from === 'string')
|
|
66
67
|
.map((file) => (Object.assign(Object.assign({}, file), { to: file.to.replace(/\\/g, '/'), from: (0, path_1.join)('files', file.to).replace(/\\/g, '/') })));
|
|
67
68
|
// do not modify an existing JSON
|
|
68
|
-
yield (0,
|
|
69
|
+
yield (0, io_2.createFileIfNotExists)(rootDir, constants_1.packageJson, '{}');
|
|
69
70
|
// patch the JSON relevant for the project
|
|
70
|
-
yield (0,
|
|
71
|
+
yield (0, io_2.updateExistingJson)(rootDir, constants_1.packageJson, {
|
|
71
72
|
name: piralPkg.name,
|
|
72
73
|
description: piralPkg.description,
|
|
73
74
|
version: piralPkg.version,
|
|
@@ -82,9 +83,9 @@ function createEmulatorSources(sourceDir, externals, targetDir, targetFile, logL
|
|
|
82
83
|
version: info_1.cliVersion,
|
|
83
84
|
generated: true,
|
|
84
85
|
},
|
|
85
|
-
main: `./${appDir
|
|
86
|
-
typings: `./${appDir
|
|
87
|
-
app: `./${appDir
|
|
86
|
+
main: `./${(0, path_1.join)(appDir, 'index.js')}`,
|
|
87
|
+
typings: `./${(0, path_1.join)(appDir, 'index.d.ts')}`,
|
|
88
|
+
app: `./${(0, path_1.join)(appDir, '/index.html')}`,
|
|
88
89
|
peerDependencies: {},
|
|
89
90
|
optionalDependencies,
|
|
90
91
|
devDependencies: Object.assign(Object.assign({}, allDeps), externalDependencies),
|
|
@@ -107,7 +108,7 @@ function createEmulatorSources(sourceDir, externals, targetDir, targetFile, logL
|
|
|
107
108
|
// actually including this one hints that the app shell should have been included - which is forbidden
|
|
108
109
|
yield (0, template_1.createPiralStubIndexIfNotExists)(targetDir, 'index.js', enums_1.ForceOverwrite.yes, {
|
|
109
110
|
name: piralPkg.name,
|
|
110
|
-
outFile: targetFile,
|
|
111
|
+
outFile: (0, path_1.basename)(targetFile),
|
|
111
112
|
});
|
|
112
113
|
// generate the associated index.d.ts
|
|
113
114
|
yield (0, declaration_1.createPiralDeclaration)(sourceDir, (_c = piralPkg.app) !== null && _c !== void 0 ? _c : `./src/index.html`, targetDir, enums_1.ForceOverwrite.yes, logLevel);
|
|
@@ -122,6 +123,70 @@ function createEmulatorSources(sourceDir, externals, targetDir, targetFile, logL
|
|
|
122
123
|
});
|
|
123
124
|
}
|
|
124
125
|
exports.createEmulatorSources = createEmulatorSources;
|
|
126
|
+
function createEmulatorWebsite(sourceDir, externals, targetDir, targetFile, logLevel) {
|
|
127
|
+
var _a;
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
const piralPkg = yield (0, io_2.readJson)(sourceDir, constants_1.packageJson);
|
|
130
|
+
const piralJsonPkg = yield (0, io_2.readJson)(sourceDir, constants_1.piralJson);
|
|
131
|
+
const pilets = Object.assign(Object.assign({}, piralPkg.pilets), piralJsonPkg.pilets);
|
|
132
|
+
const allDeps = Object.assign(Object.assign({}, piralPkg.devDependencies), piralPkg.dependencies);
|
|
133
|
+
const externalPackages = yield Promise.all(externals
|
|
134
|
+
.filter((ext) => ext.type === 'local' && (0, package_1.isValidDependency)(ext.name))
|
|
135
|
+
.map((external) => __awaiter(this, void 0, void 0, function* () {
|
|
136
|
+
return ({
|
|
137
|
+
name: external.name,
|
|
138
|
+
version: yield (0, package_1.findDependencyVersion)(piralPkg, sourceDir, external),
|
|
139
|
+
optional: external.isAsync,
|
|
140
|
+
});
|
|
141
|
+
})));
|
|
142
|
+
const externalDependencies = externalPackages.reduce((deps, dep) => {
|
|
143
|
+
if (!dep.optional) {
|
|
144
|
+
deps[dep.name] = dep.version;
|
|
145
|
+
}
|
|
146
|
+
return deps;
|
|
147
|
+
}, {});
|
|
148
|
+
const importmapEntries = externalPackages.reduce((deps, dep) => {
|
|
149
|
+
if (!dep.optional) {
|
|
150
|
+
deps[dep.name] = dep.name;
|
|
151
|
+
}
|
|
152
|
+
return deps;
|
|
153
|
+
}, {});
|
|
154
|
+
const optionalDependencies = externalPackages.reduce((deps, dep) => {
|
|
155
|
+
if (dep.optional) {
|
|
156
|
+
deps[dep.name] = dep.name;
|
|
157
|
+
}
|
|
158
|
+
return deps;
|
|
159
|
+
}, {});
|
|
160
|
+
const allFiles = yield (0, io_1.matchFiles)(targetDir, '*');
|
|
161
|
+
yield (0, io_2.writeJson)(targetDir, 'emulator.json', {
|
|
162
|
+
name: piralPkg.name,
|
|
163
|
+
description: piralPkg.description,
|
|
164
|
+
version: piralPkg.version,
|
|
165
|
+
timestamp: new Date().toISOString(),
|
|
166
|
+
scaffolding: {
|
|
167
|
+
pilets,
|
|
168
|
+
cli: info_1.cliVersion,
|
|
169
|
+
},
|
|
170
|
+
files: {
|
|
171
|
+
typings: 'index.d.ts',
|
|
172
|
+
main: (0, path_1.basename)(targetFile),
|
|
173
|
+
app: 'index.html',
|
|
174
|
+
assets: allFiles.map(file => (0, path_1.relative)(targetDir, file)),
|
|
175
|
+
},
|
|
176
|
+
importmap: {
|
|
177
|
+
imports: importmapEntries,
|
|
178
|
+
},
|
|
179
|
+
dependencies: {
|
|
180
|
+
optional: optionalDependencies,
|
|
181
|
+
included: Object.assign(Object.assign({}, allDeps), externalDependencies),
|
|
182
|
+
},
|
|
183
|
+
}, true);
|
|
184
|
+
// generate the associated index.d.ts
|
|
185
|
+
yield (0, declaration_1.createPiralDeclaration)(sourceDir, (_a = piralPkg.app) !== null && _a !== void 0 ? _a : `./src/index.html`, targetDir, enums_1.ForceOverwrite.yes, logLevel);
|
|
186
|
+
return targetDir;
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
exports.createEmulatorWebsite = createEmulatorWebsite;
|
|
125
190
|
function packageEmulator(rootDir) {
|
|
126
191
|
return __awaiter(this, void 0, void 0, function* () {
|
|
127
192
|
// finally package everything up
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emulator.js","sourceRoot":"","sources":["../../src/common/emulator.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+
|
|
1
|
+
{"version":3,"file":"emulator.js","sourceRoot":"","sources":["../../src/common/emulator.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+BAAyD;AACzD,uCAA6G;AAC7G,yCAA6D;AAC7D,2CAA6E;AAC7E,iCAAoC;AACpC,+BAAyC;AACzC,+CAAuD;AACvD,mCAAyC;AACzC,uCAA0C;AAC1C,6BAA6F;AAC7F,6BAAsF;AAGtF,SAAsB,qBAAqB,CACzC,SAAiB,EACjB,SAAkC,EAClC,SAAiB,EACjB,UAAkB,EAClB,QAAmB;;;QAEnB,MAAM,QAAQ,GAAG,MAAM,IAAA,aAAQ,EAAC,SAAS,EAAE,uBAAW,CAAC,CAAC;QACxD,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ubFileTemplateData {
|
|
3
|
+
outFile: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function createPiralStubIndexIfNotExists(targetDir: string, fileName: string, forceOverwrite: ForceOverwrite, data: PiralStubFileTemplateData): Promise<void>;
|
package/lib/common/template.js
CHANGED
|
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.createPiralStubIndexIfNotExists = void 0;
|
|
13
13
|
const io_1 = require("./io");
|
|
14
|
-
function fillTemplate(data
|
|
14
|
+
function fillTemplate(data) {
|
|
15
15
|
return `if (process.env.NODE_ENV === 'test') {
|
|
16
16
|
// behavior for the test environment, we'll try to make it work
|
|
17
17
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../src/common/template.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,6BAA6C;
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../src/common/template.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,6BAA6C;AAO7C,SAAS,YAAY,CAAC,IAA+B;IACnD,OAAO;;;;iBAIQ,IAAI,CAAC,OAAO;;;qCAGQ,IAAI,CAAC,IAAI;;;;;;;;;CAS7C,CAAC;AACF,CAAC;AAED,SAAsB,+BAA+B,CACnD,SAAiB,EACjB,QAAgB,EAChB,cAA8B,EAC9B,IAA+B;;QAE/B,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;QACnC,MAAM,IAAA,0BAAqB,EAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;IAC5E,CAAC;CAAA;AARD,0EAQC"}
|
package/lib/helpers.js
CHANGED
|
@@ -6,7 +6,13 @@ const constants_1 = require("./common/constants");
|
|
|
6
6
|
exports.schemaKeys = ['v0', 'v1', 'v2', 'v3', 'none'];
|
|
7
7
|
exports.publishModeKeys = ['none', 'basic', 'bearer', 'digest'];
|
|
8
8
|
exports.fromKeys = ['local', 'remote', 'npm'];
|
|
9
|
-
exports.piralBuildTypeKeys = [
|
|
9
|
+
exports.piralBuildTypeKeys = [
|
|
10
|
+
'all',
|
|
11
|
+
'release',
|
|
12
|
+
'emulator',
|
|
13
|
+
'emulator-sources',
|
|
14
|
+
'emulator-website',
|
|
15
|
+
];
|
|
10
16
|
exports.piletBuildTypeKeys = ['default', 'standalone', 'manifest'];
|
|
11
17
|
exports.clientTypeKeys = ['npm', 'pnpm', 'pnp', 'yarn', 'lerna', 'rush', 'bun'];
|
|
12
18
|
exports.sourceLanguageKeys = ['ts', 'js'];
|
package/lib/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;;AAAA,0CAAgD;AAChD,kDAAiE;AAYpD,QAAA,UAAU,GAA8B,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACzE,QAAA,eAAe,GAA8B,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACnF,QAAA,QAAQ,GAA8B,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AACjE,QAAA,kBAAkB,GAA0B,
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;;AAAA,0CAAgD;AAChD,kDAAiE;AAYpD,QAAA,UAAU,GAA8B,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACzE,QAAA,eAAe,GAA8B,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACnF,QAAA,QAAQ,GAA8B,CAAC,OAAO,EAAE,QAAQ,EAAE,KA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,kDAQC"}
|
package/lib/types/public.d.ts
CHANGED
|
@@ -197,7 +197,7 @@ export type PiletSchemaVersion = 'none' | 'v0' | 'v1' | 'v2' | 'v3';
|
|
|
197
197
|
export type SourceLanguage = 'js' | 'ts';
|
|
198
198
|
export type PiletPublishScheme = 'none' | 'digest' | 'bearer' | 'basic';
|
|
199
199
|
export type PiletPublishSource = 'local' | 'npm' | 'remote';
|
|
200
|
-
export type PiralBuildType = 'all' | 'release' | 'emulator' | 'emulator-sources';
|
|
200
|
+
export type PiralBuildType = 'all' | 'release' | 'emulator' | 'emulator-sources' | 'emulator-website';
|
|
201
201
|
export type PiletBuildType = 'default' | 'standalone' | 'manifest';
|
|
202
202
|
export type PackageType = 'registry' | 'file' | 'git';
|
|
203
203
|
export type NpmClientType = 'npm' | 'yarn' | 'pnp' | 'pnpm' | 'lerna' | 'rush' | 'bun';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "piral-cli",
|
|
3
|
-
"version": "1.4.0-beta.
|
|
3
|
+
"version": "1.4.0-beta.6243",
|
|
4
4
|
"description": "The standard CLI for creating and building a Piral instance or a Pilet.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"portal",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"typescript": "^5.0.0",
|
|
82
82
|
"yargs": "^15.0.0"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "98d8d0d92af0b86cfeecbec755163ff52e48c4b7"
|
|
85
85
|
}
|
package/src/apps/build-piral.ts
CHANGED
|
@@ -19,11 +19,14 @@ import {
|
|
|
19
19
|
getDestination,
|
|
20
20
|
validateSharedDependencies,
|
|
21
21
|
flattenExternals,
|
|
22
|
+
createEmulatorWebsite,
|
|
22
23
|
} from '../common';
|
|
23
24
|
|
|
25
|
+
const allName = 'all';
|
|
24
26
|
const releaseName = 'release';
|
|
25
27
|
const emulatorName = 'emulator';
|
|
26
28
|
const emulatorSourcesName = 'emulator-sources';
|
|
29
|
+
const emulatorWebsiteName = 'emulator-website';
|
|
27
30
|
|
|
28
31
|
export interface BuildPiralOptions {
|
|
29
32
|
/**
|
|
@@ -118,7 +121,7 @@ export const buildPiralDefaults: BuildPiralOptions = {
|
|
|
118
121
|
logLevel: LogLevels.info,
|
|
119
122
|
fresh: false,
|
|
120
123
|
minify: true,
|
|
121
|
-
type:
|
|
124
|
+
type: allName,
|
|
122
125
|
subdir: true,
|
|
123
126
|
sourceMaps: true,
|
|
124
127
|
watch: false,
|
|
@@ -177,10 +180,11 @@ export async function buildPiral(baseDir = process.cwd(), options: BuildPiralOpt
|
|
|
177
180
|
await removeDirectory(dest.outDir);
|
|
178
181
|
}
|
|
179
182
|
|
|
180
|
-
//
|
|
181
|
-
if (type
|
|
183
|
+
// either 'emulator-*' or 'all'
|
|
184
|
+
if (type === emulatorName || type === emulatorSourcesName || type === emulatorWebsiteName || type === allName) {
|
|
182
185
|
const emulatorPublicUrl = '/';
|
|
183
186
|
const targetDir = useSubdir ? join(dest.outDir, emulatorName) : dest.outDir;
|
|
187
|
+
const appDir = type !== emulatorWebsiteName ? join(targetDir, 'app') : targetDir;
|
|
184
188
|
progress('Starting emulator build ...');
|
|
185
189
|
|
|
186
190
|
// since we create this anyway let's just pretend we want to have it clean!
|
|
@@ -209,7 +213,7 @@ export async function buildPiral(baseDir = process.cwd(), options: BuildPiralOpt
|
|
|
209
213
|
entryFiles,
|
|
210
214
|
logLevel,
|
|
211
215
|
ignored,
|
|
212
|
-
outDir:
|
|
216
|
+
outDir: appDir,
|
|
213
217
|
outFile: dest.outFile,
|
|
214
218
|
_,
|
|
215
219
|
},
|
|
@@ -233,24 +237,28 @@ export async function buildPiral(baseDir = process.cwd(), options: BuildPiralOpt
|
|
|
233
237
|
|
|
234
238
|
await hooks.beforeEmulator?.({ root, externals, targetDir, outDir });
|
|
235
239
|
|
|
236
|
-
const rootDir = await
|
|
240
|
+
const rootDir = await (type !== emulatorWebsiteName
|
|
241
|
+
? createEmulatorSources(root, externals, outDir, outFile, logLevel)
|
|
242
|
+
: createEmulatorWebsite(root, externals, outDir, outFile, logLevel));
|
|
237
243
|
|
|
238
244
|
await hooks.afterEmulator?.({ root, externals, targetDir, outDir, rootDir });
|
|
239
245
|
|
|
240
|
-
if (type
|
|
246
|
+
if (type === allName || type === emulatorName) {
|
|
241
247
|
await hooks.beforePackage?.({ root, externals, targetDir, outDir, rootDir });
|
|
242
248
|
await packageEmulator(rootDir);
|
|
243
249
|
await hooks.afterPackage?.({ root, externals, targetDir, outDir, rootDir });
|
|
244
250
|
logDone(`Emulator package available in "${rootDir}".`);
|
|
245
|
-
} else {
|
|
251
|
+
} else if (type === emulatorSourcesName) {
|
|
246
252
|
logDone(`Emulator sources available in "${rootDir}".`);
|
|
253
|
+
} else if (type === emulatorWebsiteName) {
|
|
254
|
+
logDone(`Emulator website available in "${rootDir}".`);
|
|
247
255
|
}
|
|
248
256
|
|
|
249
257
|
logReset();
|
|
250
258
|
}
|
|
251
259
|
|
|
252
|
-
//
|
|
253
|
-
if (type
|
|
260
|
+
// either 'release' or 'all'
|
|
261
|
+
if (type === releaseName || type === allName) {
|
|
254
262
|
const targetDir = useSubdir ? join(dest.outDir, releaseName) : dest.outDir;
|
|
255
263
|
progress('Starting release build ...');
|
|
256
264
|
|
package/src/common/emulator.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { join, resolve, relative } from 'path';
|
|
1
|
+
import { join, resolve, relative, basename } from 'path';
|
|
2
2
|
import { findDependencyVersion, copyScaffoldingFiles, isValidDependency, flattenExternals } from './package';
|
|
3
3
|
import { createPiralStubIndexIfNotExists } from './template';
|
|
4
4
|
import { filesTar, filesOnceTar, packageJson, piralJson } from './constants';
|
|
@@ -7,16 +7,9 @@ import { createNpmPackage } from './npm';
|
|
|
7
7
|
import { createPiralDeclaration } from './declaration';
|
|
8
8
|
import { ForceOverwrite } from './enums';
|
|
9
9
|
import { createTarball } from './archive';
|
|
10
|
+
import { createDirectory, removeDirectory, matchFiles, removeAny, getFileNames } from './io';
|
|
11
|
+
import { updateExistingJson, readJson, writeJson, createFileIfNotExists } from './io';
|
|
10
12
|
import { LogLevels, SharedDependency, PiletsInfo, TemplateFileLocation } from '../types';
|
|
11
|
-
import {
|
|
12
|
-
createDirectory,
|
|
13
|
-
removeDirectory,
|
|
14
|
-
createFileIfNotExists,
|
|
15
|
-
updateExistingJson,
|
|
16
|
-
getFileNames,
|
|
17
|
-
removeAny,
|
|
18
|
-
readJson,
|
|
19
|
-
} from './io';
|
|
20
13
|
|
|
21
14
|
export async function createEmulatorSources(
|
|
22
15
|
sourceDir: string,
|
|
@@ -107,9 +100,9 @@ export async function createEmulatorSources(
|
|
|
107
100
|
version: cliVersion,
|
|
108
101
|
generated: true,
|
|
109
102
|
},
|
|
110
|
-
main: `./${appDir
|
|
111
|
-
typings: `./${appDir
|
|
112
|
-
app: `./${appDir
|
|
103
|
+
main: `./${join(appDir, 'index.js')}`,
|
|
104
|
+
typings: `./${join(appDir, 'index.d.ts')}`,
|
|
105
|
+
app: `./${join(appDir, '/index.html')}`,
|
|
113
106
|
peerDependencies: {},
|
|
114
107
|
optionalDependencies,
|
|
115
108
|
devDependencies: {
|
|
@@ -148,7 +141,7 @@ export async function createEmulatorSources(
|
|
|
148
141
|
// actually including this one hints that the app shell should have been included - which is forbidden
|
|
149
142
|
await createPiralStubIndexIfNotExists(targetDir, 'index.js', ForceOverwrite.yes, {
|
|
150
143
|
name: piralPkg.name,
|
|
151
|
-
outFile: targetFile,
|
|
144
|
+
outFile: basename(targetFile),
|
|
152
145
|
});
|
|
153
146
|
|
|
154
147
|
// generate the associated index.d.ts
|
|
@@ -166,6 +159,97 @@ export async function createEmulatorSources(
|
|
|
166
159
|
return rootDir;
|
|
167
160
|
}
|
|
168
161
|
|
|
162
|
+
export async function createEmulatorWebsite(
|
|
163
|
+
sourceDir: string,
|
|
164
|
+
externals: Array<SharedDependency>,
|
|
165
|
+
targetDir: string,
|
|
166
|
+
targetFile: string,
|
|
167
|
+
logLevel: LogLevels,
|
|
168
|
+
) {
|
|
169
|
+
const piralPkg = await readJson(sourceDir, packageJson);
|
|
170
|
+
const piralJsonPkg = await readJson(sourceDir, piralJson);
|
|
171
|
+
const pilets: PiletsInfo = {
|
|
172
|
+
...piralPkg.pilets,
|
|
173
|
+
...piralJsonPkg.pilets,
|
|
174
|
+
};
|
|
175
|
+
const allDeps = {
|
|
176
|
+
...piralPkg.devDependencies,
|
|
177
|
+
...piralPkg.dependencies,
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
const externalPackages = await Promise.all(
|
|
181
|
+
externals
|
|
182
|
+
.filter((ext) => ext.type === 'local' && isValidDependency(ext.name))
|
|
183
|
+
.map(async (external) => ({
|
|
184
|
+
name: external.name,
|
|
185
|
+
version: await findDependencyVersion(piralPkg, sourceDir, external),
|
|
186
|
+
optional: external.isAsync,
|
|
187
|
+
})),
|
|
188
|
+
);
|
|
189
|
+
const externalDependencies = externalPackages.reduce((deps, dep) => {
|
|
190
|
+
if (!dep.optional) {
|
|
191
|
+
deps[dep.name] = dep.version;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return deps;
|
|
195
|
+
}, {} as Record<string, string>);
|
|
196
|
+
|
|
197
|
+
const importmapEntries = externalPackages.reduce((deps, dep) => {
|
|
198
|
+
if (!dep.optional) {
|
|
199
|
+
deps[dep.name] = dep.name;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
return deps;
|
|
203
|
+
}, {} as Record<string, string>);
|
|
204
|
+
|
|
205
|
+
const optionalDependencies = externalPackages.reduce((deps, dep) => {
|
|
206
|
+
if (dep.optional) {
|
|
207
|
+
deps[dep.name] = dep.name;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return deps;
|
|
211
|
+
}, {} as Record<string, string>);
|
|
212
|
+
|
|
213
|
+
const allFiles = await matchFiles(targetDir, '*');
|
|
214
|
+
|
|
215
|
+
await writeJson(
|
|
216
|
+
targetDir,
|
|
217
|
+
'emulator.json',
|
|
218
|
+
{
|
|
219
|
+
name: piralPkg.name,
|
|
220
|
+
description: piralPkg.description,
|
|
221
|
+
version: piralPkg.version,
|
|
222
|
+
timestamp: new Date().toISOString(),
|
|
223
|
+
scaffolding: {
|
|
224
|
+
pilets,
|
|
225
|
+
cli: cliVersion,
|
|
226
|
+
},
|
|
227
|
+
files: {
|
|
228
|
+
typings: 'index.d.ts',
|
|
229
|
+
main: basename(targetFile),
|
|
230
|
+
app: 'index.html',
|
|
231
|
+
assets: allFiles.map(file => relative(targetDir, file)),
|
|
232
|
+
},
|
|
233
|
+
importmap: {
|
|
234
|
+
imports: importmapEntries,
|
|
235
|
+
},
|
|
236
|
+
dependencies: {
|
|
237
|
+
optional: optionalDependencies,
|
|
238
|
+
included: {
|
|
239
|
+
...allDeps,
|
|
240
|
+
...externalDependencies,
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
true,
|
|
245
|
+
);
|
|
246
|
+
|
|
247
|
+
// generate the associated index.d.ts
|
|
248
|
+
await createPiralDeclaration(sourceDir, piralPkg.app ?? `./src/index.html`, targetDir, ForceOverwrite.yes, logLevel);
|
|
249
|
+
|
|
250
|
+
return targetDir;
|
|
251
|
+
}
|
|
252
|
+
|
|
169
253
|
export async function packageEmulator(rootDir: string) {
|
|
170
254
|
// finally package everything up
|
|
171
255
|
await createNpmPackage(rootDir);
|
package/src/common/template.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { ForceOverwrite } from './enums';
|
|
2
2
|
import { createFileIfNotExists } from './io';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
export interface PiralStubFileTemplateData {
|
|
5
|
+
outFile: string;
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function fillTemplate(data: PiralStubFileTemplateData) {
|
|
5
10
|
return `if (process.env.NODE_ENV === 'test') {
|
|
6
11
|
// behavior for the test environment, we'll try to make it work
|
|
7
12
|
|
|
@@ -24,8 +29,8 @@ function fillTemplate(data: any = {}) {
|
|
|
24
29
|
export async function createPiralStubIndexIfNotExists(
|
|
25
30
|
targetDir: string,
|
|
26
31
|
fileName: string,
|
|
27
|
-
forceOverwrite
|
|
28
|
-
data
|
|
32
|
+
forceOverwrite: ForceOverwrite,
|
|
33
|
+
data: PiralStubFileTemplateData,
|
|
29
34
|
) {
|
|
30
35
|
const content = fillTemplate(data);
|
|
31
36
|
await createFileIfNotExists(targetDir, fileName, content, forceOverwrite);
|
package/src/helpers.ts
CHANGED
|
@@ -14,7 +14,13 @@ import type {
|
|
|
14
14
|
export const schemaKeys: Array<PiletSchemaVersion> = ['v0', 'v1', 'v2', 'v3', 'none'];
|
|
15
15
|
export const publishModeKeys: Array<PiletPublishScheme> = ['none', 'basic', 'bearer', 'digest'];
|
|
16
16
|
export const fromKeys: Array<PiletPublishSource> = ['local', 'remote', 'npm'];
|
|
17
|
-
export const piralBuildTypeKeys: Array<PiralBuildType> = [
|
|
17
|
+
export const piralBuildTypeKeys: Array<PiralBuildType> = [
|
|
18
|
+
'all',
|
|
19
|
+
'release',
|
|
20
|
+
'emulator',
|
|
21
|
+
'emulator-sources',
|
|
22
|
+
'emulator-website',
|
|
23
|
+
];
|
|
18
24
|
export const piletBuildTypeKeys: Array<PiletBuildType> = ['default', 'standalone', 'manifest'];
|
|
19
25
|
export const clientTypeKeys: Array<NpmClientType> = ['npm', 'pnpm', 'pnp', 'yarn', 'lerna', 'rush', 'bun'];
|
|
20
26
|
export const sourceLanguageKeys: Array<SourceLanguage> = ['ts', 'js'];
|
package/src/types/public.ts
CHANGED
|
@@ -231,7 +231,7 @@ export type PiletPublishScheme = 'none' | 'digest' | 'bearer' | 'basic';
|
|
|
231
231
|
|
|
232
232
|
export type PiletPublishSource = 'local' | 'npm' | 'remote';
|
|
233
233
|
|
|
234
|
-
export type PiralBuildType = 'all' | 'release' | 'emulator' | 'emulator-sources';
|
|
234
|
+
export type PiralBuildType = 'all' | 'release' | 'emulator' | 'emulator-sources' | 'emulator-website';
|
|
235
235
|
|
|
236
236
|
export type PiletBuildType = 'default' | 'standalone' | 'manifest';
|
|
237
237
|
|