piral-cli 1.5.0-beta.6658 → 1.5.0-beta.6685
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/api.d.ts +1 -2
- package/lib/api.js +1 -18
- package/lib/api.js.map +1 -1
- package/lib/apps/build-pilet.js +14 -37
- package/lib/apps/build-pilet.js.map +1 -1
- package/lib/apps/build-piral.js +29 -104
- package/lib/apps/build-piral.js.map +1 -1
- package/lib/apps/debug-pilet.js +8 -2
- package/lib/apps/debug-pilet.js.map +1 -1
- package/lib/apps/debug-piral.js +5 -1
- package/lib/apps/debug-piral.js.map +1 -1
- package/lib/apps/publish-pilet.d.ts +11 -2
- package/lib/apps/publish-pilet.js +16 -43
- package/lib/apps/publish-pilet.js.map +1 -1
- package/lib/apps/publish-piral.d.ts +37 -7
- package/lib/apps/publish-piral.js +62 -47
- package/lib/apps/publish-piral.js.map +1 -1
- package/lib/build/bundler-calls.js +4 -1
- package/lib/build/bundler-calls.js.map +1 -1
- package/lib/commands.js +31 -12
- package/lib/commands.js.map +1 -1
- package/lib/common/constants.d.ts +7 -0
- package/lib/common/constants.js +8 -1
- package/lib/common/constants.js.map +1 -1
- package/lib/common/emulator.js +1 -1
- package/lib/common/emulator.js.map +1 -1
- package/lib/common/http.d.ts +3 -3
- package/lib/common/http.js.map +1 -1
- package/lib/common/index.d.ts +3 -0
- package/lib/common/index.js +3 -0
- package/lib/common/index.js.map +1 -1
- package/lib/common/interactive.d.ts +2 -2
- package/lib/common/pilet.d.ts +31 -0
- package/lib/common/pilet.js +79 -0
- package/lib/common/pilet.js.map +1 -0
- package/lib/common/piral.d.ts +35 -0
- package/lib/common/piral.js +125 -0
- package/lib/common/piral.js.map +1 -0
- package/lib/common/release.d.ts +4 -0
- package/lib/common/release.js +43 -0
- package/lib/common/release.js.map +1 -0
- package/lib/helpers.d.ts +2 -2
- package/lib/helpers.js.map +1 -1
- package/lib/messages.d.ts +19 -0
- package/lib/messages.js +23 -1
- package/lib/messages.js.map +1 -1
- package/lib/platforms/web.js +20 -7
- package/lib/platforms/web.js.map +1 -1
- package/lib/types/common.d.ts +8 -4
- package/lib/types/public.d.ts +2 -3
- package/package.json +2 -2
- package/src/api.ts +0 -17
- package/src/apps/build-pilet.ts +17 -59
- package/src/apps/build-piral.ts +37 -140
- package/src/apps/debug-pilet.ts +10 -3
- package/src/apps/debug-piral.ts +6 -2
- package/src/apps/publish-pilet.ts +35 -62
- package/src/apps/publish-piral.ts +150 -80
- package/src/build/bundler-calls.ts +4 -1
- package/src/commands.ts +34 -15
- package/src/common/constants.ts +7 -0
- package/src/common/emulator.ts +2 -2
- package/src/common/http.ts +3 -3
- package/src/common/index.ts +3 -0
- package/src/common/interactive.ts +2 -2
- package/src/common/pilet.ts +140 -0
- package/src/common/piral.ts +227 -0
- package/src/common/release.ts +62 -0
- package/src/helpers.ts +2 -2
- package/src/messages.ts +22 -0
- package/src/platforms/web.ts +25 -8
- package/src/types/common.ts +9 -4
- package/src/types/public.ts +2 -3
- package/lib/release.d.ts +0 -7
- package/lib/release.js +0 -67
- package/lib/release.js.map +0 -1
- package/src/release.ts +0 -91
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emulator.js","sourceRoot":"","sources":["../../src/common/emulator.ts"],"names":[],"mappings":";;;AAAA,+BAAyD;AACzD,uCAA6G;AAC7G,yCAA6D;AAC7D,
|
|
1
|
+
{"version":3,"file":"emulator.js","sourceRoot":"","sources":["../../src/common/emulator.ts"],"names":[],"mappings":";;;AAAA,+BAAyD;AACzD,uCAA6G;AAC7G,yCAA6D;AAC7D,2CAA2F;AAC3F,iCAAoC;AACpC,+BAAyC;AACzC,+CAAuD;AACvD,mCAAyC;AACzC,uCAA0C;AAC1C,6BAA6F;AAC7F,6BAAsF;AAG/E,KAAK,UAAU,qBAAqB,CACzC,SAAiB,EACjB,SAAkC,EAClC,SAAiB,EACjB,UAAkB,EAClB,QAAmB;IAEnB,MAAM,QAAQ,GAAG,M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EAAC,IAAI,CAAC,CAAC,CAClC,CAAC;AACJ,CAAC;AAdD,0CAcC"}
|
package/lib/common/http.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import {
|
|
2
|
+
import { PublishScheme } from '../types';
|
|
3
3
|
export declare function downloadFile(target: string, ca?: Buffer): Promise<Array<string>>;
|
|
4
4
|
export interface PostFormResult {
|
|
5
5
|
status: number;
|
|
@@ -7,5 +7,5 @@ export interface PostFormResult {
|
|
|
7
7
|
response?: object;
|
|
8
8
|
}
|
|
9
9
|
export type FormDataObj = Record<string, string | number | boolean | [Buffer, string]>;
|
|
10
|
-
export declare function postForm(target: string, scheme:
|
|
11
|
-
export declare function postFile(target: string, scheme:
|
|
10
|
+
export declare function postForm(target: string, scheme: PublishScheme, key: string, formData: FormDataObj, customHeaders?: Record<string, string>, ca?: Buffer, interactive?: boolean): Promise<PostFormResult>;
|
|
11
|
+
export declare function postFile(target: string, scheme: PublishScheme, key: string, file: Buffer, customFields?: Record<string, string>, customHeaders?: Record<string, string>, ca?: Buffer, interactive?: boolean): Promise<PostFormResult>;
|
package/lib/common/http.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/common/http.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAC5B,iCAA8B;AAE9B,2BAA4B;AAC5B,2BAAuC;AACvC,+BAA4B;AAC5B,iCAAyC;AACzC,+CAAsD;AACtD,0CAA8C;AAG9C,SAAS,UAAU,CAAC,IAAmC;IACrD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,IAAI;YACF,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACjC,OAAO,OAAO,CAAC,OAAO,CAAC;SACxB;QAAC,OAAO,EAAE,EAAE;YACX,OAAO,IAAI,CAAC;SACb;KACF;SAAM,IAAI,IAAI,IAAI,OAAO,I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,EAAE,GAAG,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,WAAW,CAAC,CAAC;AAC7E,CAAC;AAZD,4BAYC"}
|
package/lib/common/index.d.ts
CHANGED
|
@@ -25,8 +25,11 @@ export * from './package';
|
|
|
25
25
|
export * from './parallel';
|
|
26
26
|
export * from './patcher';
|
|
27
27
|
export * from './patches';
|
|
28
|
+
export * from './pilet';
|
|
29
|
+
export * from './piral';
|
|
28
30
|
export * from './platform';
|
|
29
31
|
export * from './port';
|
|
32
|
+
export * from './release';
|
|
30
33
|
export * from './rules';
|
|
31
34
|
export * from './scaffold';
|
|
32
35
|
export * from './scripts';
|
package/lib/common/index.js
CHANGED
|
@@ -41,8 +41,11 @@ __exportStar(require("./package"), exports);
|
|
|
41
41
|
__exportStar(require("./parallel"), exports);
|
|
42
42
|
__exportStar(require("./patcher"), exports);
|
|
43
43
|
__exportStar(require("./patches"), exports);
|
|
44
|
+
__exportStar(require("./pilet"), exports);
|
|
45
|
+
__exportStar(require("./piral"), exports);
|
|
44
46
|
__exportStar(require("./platform"), exports);
|
|
45
47
|
__exportStar(require("./port"), exports);
|
|
48
|
+
__exportStar(require("./release"), exports);
|
|
46
49
|
__exportStar(require("./rules"), exports);
|
|
47
50
|
__exportStar(require("./scaffold"), exports);
|
|
48
51
|
__exportStar(require("./scripts"), exports);
|
package/lib/common/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,4CAA0B;AAC1B,kDAAgC;AAChC,2CAAyB;AACzB,8CAA4B;AAC5B,gDAA8B;AAC9B,6CAA2B;AAC3B,0CAAwB;AACxB,0CAAwB;AACxB,yCAAuB;AACvB,yCAAuB;AACvB,yCAAuB;AACvB,8CAA4B;AAC5B,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,gDAA8B;AAC9B,uCAAqB;AACrB,6CAA2B;AAC3B,wCAAsB;AACtB,0CAAwB;AACxB,wCAAsB;AACtB,yCAAuB;AACvB,4CAA0B;AAC1B,6CAA2B;AAC3B,4CAA0B;AAC1B,4CAA0B;AAC1B,6CAA2B;AAC3B,yCAAuB;AACvB,0CAAwB;AACxB,6CAA2B;AAC3B,4CAA0B;AAC1B,0CAAwB;AACxB,yCAAuB;AACvB,6CAA2B;AAC3B,wCAAsB;AACtB,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,4CAA0B;AAC1B,kDAAgC;AAChC,2CAAyB;AACzB,8CAA4B;AAC5B,gDAA8B;AAC9B,6CAA2B;AAC3B,0CAAwB;AACxB,0CAAwB;AACxB,yCAAuB;AACvB,yCAAuB;AACvB,yCAAuB;AACvB,8CAA4B;AAC5B,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,gDAA8B;AAC9B,uCAAqB;AACrB,6CAA2B;AAC3B,wCAAsB;AACtB,0CAAwB;AACxB,wCAAsB;AACtB,yCAAuB;AACvB,4CAA0B;AAC1B,6CAA2B;AAC3B,4CAA0B;AAC1B,4CAA0B;AAC1B,0CAAwB;AACxB,0CAAwB;AACxB,6CAA2B;AAC3B,yCAAuB;AACvB,4CAA0B;AAC1B,0CAAwB;AACxB,6CAA2B;AAC3B,4CAA0B;AAC1B,0CAAwB;AACxB,yCAAuB;AACvB,6CAA2B;AAC3B,wCAAsB;AACtB,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Agent } from 'https';
|
|
3
|
-
import {
|
|
3
|
+
import { PublishScheme } from '../types';
|
|
4
4
|
export declare function promptSelect(message: string, values: Array<string>, defaultValue: string): Promise<string>;
|
|
5
5
|
export declare function promptConfirm(message: string, defaultValue: boolean): Promise<boolean>;
|
|
6
6
|
type TokenResult = Promise<{
|
|
7
|
-
mode:
|
|
7
|
+
mode: PublishScheme;
|
|
8
8
|
token: string;
|
|
9
9
|
}>;
|
|
10
10
|
export declare function getTokenInteractively(url: string, httpsAgent: Agent): TokenResult;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LogLevels, PiletSchemaVersion } from '../types';
|
|
2
|
+
export interface BuildPiletOptions {
|
|
3
|
+
entryModule: string;
|
|
4
|
+
app?: string;
|
|
5
|
+
originalSchemaVersion: PiletSchemaVersion;
|
|
6
|
+
target?: string;
|
|
7
|
+
fresh: boolean;
|
|
8
|
+
logLevel: LogLevels;
|
|
9
|
+
bundlerName: string;
|
|
10
|
+
optimizeModules: boolean;
|
|
11
|
+
sourceMaps: boolean;
|
|
12
|
+
watch: boolean;
|
|
13
|
+
contentHash: boolean;
|
|
14
|
+
minify: boolean;
|
|
15
|
+
declaration: boolean;
|
|
16
|
+
hooks?: {
|
|
17
|
+
beforeBuild?(e: any): Promise<void>;
|
|
18
|
+
afterBuild?(e: any): Promise<void>;
|
|
19
|
+
beforeDeclaration?(e: any): Promise<void>;
|
|
20
|
+
afterDeclaration?(e: any): Promise<void>;
|
|
21
|
+
};
|
|
22
|
+
_: Record<string, any>;
|
|
23
|
+
}
|
|
24
|
+
export declare function triggerBuildPilet({ target, app, originalSchemaVersion, fresh, entryModule, logLevel, optimizeModules, sourceMaps, watch, contentHash, declaration, minify, hooks, bundlerName, _, }: BuildPiletOptions): Promise<{
|
|
25
|
+
piletPackage: any;
|
|
26
|
+
root: string;
|
|
27
|
+
outDir: string;
|
|
28
|
+
apps: import("../types").AppDefinition[];
|
|
29
|
+
outFile: string;
|
|
30
|
+
dest: string;
|
|
31
|
+
}>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.triggerBuildPilet = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
5
|
+
const config_1 = require("./config");
|
|
6
|
+
const io_1 = require("./io");
|
|
7
|
+
const enums_1 = require("./enums");
|
|
8
|
+
const log_1 = require("./log");
|
|
9
|
+
const bundler_1 = require("../bundler");
|
|
10
|
+
const constants_1 = require("./constants");
|
|
11
|
+
const declaration_1 = require("./declaration");
|
|
12
|
+
const package_1 = require("./package");
|
|
13
|
+
const defaultOutput = 'dist/index.js';
|
|
14
|
+
function isSubDir(parent, dir) {
|
|
15
|
+
const rel = (0, path_1.relative)(parent, dir);
|
|
16
|
+
return rel && !rel.startsWith('..') && !(0, path_1.isAbsolute)(rel);
|
|
17
|
+
}
|
|
18
|
+
function getTarget(root, main, source, target) {
|
|
19
|
+
if (typeof target === 'undefined') {
|
|
20
|
+
const propDest = (0, path_1.resolve)(root, main);
|
|
21
|
+
const propDestDir = (0, path_1.dirname)(propDest);
|
|
22
|
+
const usePropDest = propDestDir !== root && propDestDir !== source && isSubDir(root, propDest);
|
|
23
|
+
return usePropDest ? propDest : (0, path_1.resolve)(root, defaultOutput);
|
|
24
|
+
}
|
|
25
|
+
return (0, path_1.resolve)(root, target);
|
|
26
|
+
}
|
|
27
|
+
async function triggerBuildPilet({ target, app, originalSchemaVersion, fresh, entryModule, logLevel, optimizeModules, sourceMaps, watch, contentHash, declaration, minify, hooks, bundlerName, _, }) {
|
|
28
|
+
const targetDir = (0, path_1.dirname)(entryModule);
|
|
29
|
+
const { peerDependencies, peerModules, root, apps, piletPackage, ignored, importmap, schema } = await (0, package_1.retrievePiletData)(targetDir, app);
|
|
30
|
+
const schemaVersion = originalSchemaVersion || schema || config_1.config.schemaVersion || constants_1.defaultSchemaVersion;
|
|
31
|
+
const piralInstances = apps.map((m) => m.appPackage.name);
|
|
32
|
+
const externals = (0, package_1.combinePiletExternals)(piralInstances, peerDependencies, peerModules, importmap);
|
|
33
|
+
const { main = defaultOutput, name = 'pilet' } = piletPackage;
|
|
34
|
+
const dest = getTarget(root, main, targetDir, target);
|
|
35
|
+
const outDir = (0, path_1.dirname)(dest);
|
|
36
|
+
const outFile = (0, path_1.basename)(dest);
|
|
37
|
+
(0, package_1.validateSharedDependencies)(importmap);
|
|
38
|
+
if (fresh) {
|
|
39
|
+
(0, log_1.progress)('Removing output directory ...');
|
|
40
|
+
await (0, io_1.removeDirectory)(outDir);
|
|
41
|
+
}
|
|
42
|
+
(0, log_1.logInfo)('Bundle pilet ...');
|
|
43
|
+
await hooks.beforeBuild?.({ root, outDir, importmap, entryModule, schemaVersion, piletPackage });
|
|
44
|
+
await (0, bundler_1.callPiletBuild)({
|
|
45
|
+
root,
|
|
46
|
+
piralInstances,
|
|
47
|
+
optimizeModules,
|
|
48
|
+
sourceMaps,
|
|
49
|
+
watch,
|
|
50
|
+
contentHash,
|
|
51
|
+
minify,
|
|
52
|
+
externals,
|
|
53
|
+
targetDir,
|
|
54
|
+
importmap,
|
|
55
|
+
outFile,
|
|
56
|
+
outDir,
|
|
57
|
+
entryModule: `./${(0, path_1.relative)(root, entryModule)}`,
|
|
58
|
+
logLevel,
|
|
59
|
+
version: schemaVersion,
|
|
60
|
+
ignored,
|
|
61
|
+
_,
|
|
62
|
+
}, bundlerName);
|
|
63
|
+
await hooks.afterBuild?.({ root, outDir, importmap, entryModule, schemaVersion, piletPackage });
|
|
64
|
+
if (declaration) {
|
|
65
|
+
await hooks.beforeDeclaration?.({ root, outDir, entryModule, piletPackage });
|
|
66
|
+
await (0, declaration_1.createPiletDeclaration)(name, piralInstances, root, entryModule, externals, outDir, enums_1.ForceOverwrite.yes, logLevel);
|
|
67
|
+
await hooks.afterDeclaration?.({ root, outDir, entryModule, piletPackage });
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
piletPackage,
|
|
71
|
+
root,
|
|
72
|
+
outDir,
|
|
73
|
+
apps,
|
|
74
|
+
outFile,
|
|
75
|
+
dest,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
exports.tri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AE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC,CAAC;IAEjG,MAAM,IAAA,wBAAc,EAClB;QACE,IAAI;QACJ,cAAc;QACd,eAAe;QACf,UAAU;QACV,KAAK;QACL,WAAW;QACX,MAAM;QACN,SAAS;QACT,SAAS;QACT,SAAS;QACT,OAAO;QACP,MAAM;QACN,WAAW,EAAE,KAAK,IAAA,eAAQ,EAAC,IAAI,EAAE,WAAW,CAAC,EAAE;QAC/C,QAAQ;QACR,OAAO,EAAE,aAAa;QACtB,OAAO;QACP,CAAC;KACF,EACD,WAAW,CACZ,CAAC;IAEF,MAAM,KAAK,CAAC,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC,CAAC;IAEhG,IAAI,WAAW,EAAE;QACf,MAAM,KAAK,CAAC,iBAAiB,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC;QAC7E,MAAM,IAAA,oCAAsB,EAC1B,IAAI,EACJ,cAAc,EACd,IAAI,EACJ,WAAW,EACX,SAAS,EACT,MAAM,EACN,sBAAc,CAAC,GAAG,EAClB,QAAQ,CACT,CAAC;QACF,MAAM,KAAK,CAAC,gBAAgB,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC;KAC7E;IAED,OAAO;QACL,YAAY;QACZ,IAAI;QACJ,MAAM;QACN,IAAI;QACJ,OAAO;QACP,IAAI;KACL,CAAC;AACJ,CAAC;AAvFD,8CAuFC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { LogLevels, SharedDependency } from '../types';
|
|
2
|
+
export interface BaseBuildPiralOptions {
|
|
3
|
+
root: string;
|
|
4
|
+
targetDir: string;
|
|
5
|
+
logLevel: LogLevels;
|
|
6
|
+
bundlerName: string;
|
|
7
|
+
externals: Array<SharedDependency>;
|
|
8
|
+
ignored: Array<string>;
|
|
9
|
+
outFile: string;
|
|
10
|
+
entryFiles: string;
|
|
11
|
+
optimizeModules: boolean;
|
|
12
|
+
sourceMaps: boolean;
|
|
13
|
+
watch: boolean;
|
|
14
|
+
contentHash: boolean;
|
|
15
|
+
piralInstances: Array<string>;
|
|
16
|
+
scripts?: Record<string, string>;
|
|
17
|
+
hooks?: {
|
|
18
|
+
beforeBuild?(e: any): Promise<void>;
|
|
19
|
+
afterBuild?(e: any): Promise<void>;
|
|
20
|
+
beforeEmulator?(e: any): Promise<void>;
|
|
21
|
+
afterEmulator?(e: any): Promise<void>;
|
|
22
|
+
beforePackage?(e: any): Promise<void>;
|
|
23
|
+
afterPackage?(e: any): Promise<void>;
|
|
24
|
+
};
|
|
25
|
+
_: Record<string, any>;
|
|
26
|
+
}
|
|
27
|
+
export interface BuildEmulatorOptions extends BaseBuildPiralOptions {
|
|
28
|
+
emulatorType: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function triggerBuildEmulator({ root, logLevel, externals, emulatorType, bundlerName, optimizeModules, sourceMaps, watch, ignored, contentHash, targetDir, outFile, scripts, entryFiles, piralInstances, hooks, _, }: BuildEmulatorOptions): Promise<void>;
|
|
31
|
+
export interface BuildShellOptions extends BaseBuildPiralOptions {
|
|
32
|
+
minify: boolean;
|
|
33
|
+
publicUrl: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function triggerBuildShell({ root, targetDir, bundlerName, minify, optimizeModules, entryFiles, piralInstances, sourceMaps, logLevel, ignored, watch, outFile, publicUrl, contentHash, externals, hooks, scripts, _, }: BuildShellOptions): Promise<void>;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.triggerBuildShell = exports.triggerBuildEmulator = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
5
|
+
const scripts_1 = require("./scripts");
|
|
6
|
+
const io_1 = require("./io");
|
|
7
|
+
const package_1 = require("./package");
|
|
8
|
+
const log_1 = require("./log");
|
|
9
|
+
const emulator_1 = require("./emulator");
|
|
10
|
+
const constants_1 = require("./constants");
|
|
11
|
+
const bundler_1 = require("../bundler");
|
|
12
|
+
async function runLifecycle(root, scripts, type) {
|
|
13
|
+
const script = scripts?.[type];
|
|
14
|
+
if (script) {
|
|
15
|
+
(0, log_1.log)('generalDebug_0003', `Running "${type}" ("${script}") ...`);
|
|
16
|
+
await (0, scripts_1.runScript)(script, root);
|
|
17
|
+
(0, log_1.log)('generalDebug_0003', `Finished running "${type}".`);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
(0, log_1.log)('generalDebug_0003', `No script for "${type}" found ...`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async function triggerBuildEmulator({ root, logLevel, externals, emulatorType, bundlerName, optimizeModules, sourceMaps, watch, ignored, contentHash, targetDir, outFile, scripts, entryFiles, piralInstances, hooks, _, }) {
|
|
24
|
+
(0, log_1.progress)('Starting emulator build ...');
|
|
25
|
+
const emulatorPublicUrl = '/';
|
|
26
|
+
const appDir = emulatorType !== constants_1.emulatorWebsiteName ? (0, path_1.join)(targetDir, 'app') : targetDir;
|
|
27
|
+
// since we create this anyway let's just pretend we want to have it clean!
|
|
28
|
+
await (0, io_1.removeDirectory)(targetDir);
|
|
29
|
+
await hooks.beforeBuild?.({ root, publicUrl: emulatorPublicUrl, externals, entryFiles, targetDir, piralInstances });
|
|
30
|
+
(0, log_1.logInfo)(`Bundle ${constants_1.emulatorName} ...`);
|
|
31
|
+
const { dir: outDir, name, hash, } = await (0, bundler_1.callPiralBuild)({
|
|
32
|
+
root,
|
|
33
|
+
piralInstances,
|
|
34
|
+
emulator: true,
|
|
35
|
+
standalone: false,
|
|
36
|
+
optimizeModules,
|
|
37
|
+
sourceMaps,
|
|
38
|
+
watch,
|
|
39
|
+
contentHash,
|
|
40
|
+
minify: false,
|
|
41
|
+
externals: (0, package_1.flattenExternals)(externals),
|
|
42
|
+
publicUrl: emulatorPublicUrl,
|
|
43
|
+
entryFiles,
|
|
44
|
+
logLevel,
|
|
45
|
+
ignored,
|
|
46
|
+
outDir: appDir,
|
|
47
|
+
outFile,
|
|
48
|
+
_,
|
|
49
|
+
}, bundlerName);
|
|
50
|
+
await hooks.afterBuild?.({
|
|
51
|
+
root,
|
|
52
|
+
publicUrl: emulatorPublicUrl,
|
|
53
|
+
externals,
|
|
54
|
+
entryFiles,
|
|
55
|
+
targetDir,
|
|
56
|
+
piralInstances,
|
|
57
|
+
hash,
|
|
58
|
+
outDir,
|
|
59
|
+
outFile: name,
|
|
60
|
+
});
|
|
61
|
+
await runLifecycle(root, scripts, 'piral:postbuild');
|
|
62
|
+
await runLifecycle(root, scripts, `piral:postbuild-${constants_1.emulatorName}`);
|
|
63
|
+
await hooks.beforeEmulator?.({ root, externals, targetDir, outDir });
|
|
64
|
+
let rootDir = root;
|
|
65
|
+
switch (emulatorType) {
|
|
66
|
+
case constants_1.emulatorPackageName:
|
|
67
|
+
rootDir = await (0, emulator_1.createEmulatorSources)(root, externals, outDir, outFile, logLevel);
|
|
68
|
+
await hooks.beforePackage?.({ root, externals, targetDir, outDir, rootDir });
|
|
69
|
+
await (0, emulator_1.packageEmulator)(rootDir);
|
|
70
|
+
await hooks.afterPackage?.({ root, externals, targetDir, outDir, rootDir });
|
|
71
|
+
break;
|
|
72
|
+
case constants_1.emulatorSourcesName:
|
|
73
|
+
rootDir = await (0, emulator_1.createEmulatorSources)(root, externals, outDir, outFile, logLevel);
|
|
74
|
+
(0, log_1.logDone)(`Emulator package sources available in "${rootDir}".`);
|
|
75
|
+
break;
|
|
76
|
+
case constants_1.emulatorWebsiteName:
|
|
77
|
+
rootDir = await (0, emulator_1.createEmulatorWebsite)(root, externals, outDir, outFile, logLevel);
|
|
78
|
+
(0, log_1.logDone)(`Emulator website available in "${rootDir}".`);
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
await hooks.afterEmulator?.({ root, externals, targetDir, outDir, rootDir });
|
|
82
|
+
}
|
|
83
|
+
exports.triggerBuildEmulator = triggerBuildEmulator;
|
|
84
|
+
async function triggerBuildShell({ root, targetDir, bundlerName, minify, optimizeModules, entryFiles, piralInstances, sourceMaps, logLevel, ignored, watch, outFile, publicUrl, contentHash, externals, hooks, scripts, _, }) {
|
|
85
|
+
(0, log_1.progress)('Starting release build ...');
|
|
86
|
+
// since we create this anyway let's just pretend we want to have it clean!
|
|
87
|
+
await (0, io_1.removeDirectory)(targetDir);
|
|
88
|
+
(0, log_1.logInfo)(`Bundle ${constants_1.releaseName} ...`);
|
|
89
|
+
await hooks.beforeBuild?.({ root, publicUrl, externals, entryFiles, targetDir, piralInstances });
|
|
90
|
+
const { dir: outDir, name, hash, } = await (0, bundler_1.callPiralBuild)({
|
|
91
|
+
root,
|
|
92
|
+
piralInstances,
|
|
93
|
+
emulator: false,
|
|
94
|
+
standalone: false,
|
|
95
|
+
optimizeModules,
|
|
96
|
+
sourceMaps,
|
|
97
|
+
watch,
|
|
98
|
+
contentHash,
|
|
99
|
+
minify,
|
|
100
|
+
externals: (0, package_1.flattenExternals)(externals),
|
|
101
|
+
publicUrl,
|
|
102
|
+
outFile,
|
|
103
|
+
outDir: targetDir,
|
|
104
|
+
entryFiles,
|
|
105
|
+
logLevel,
|
|
106
|
+
ignored,
|
|
107
|
+
_,
|
|
108
|
+
}, bundlerName);
|
|
109
|
+
await hooks.afterBuild?.({
|
|
110
|
+
root,
|
|
111
|
+
publicUrl,
|
|
112
|
+
externals,
|
|
113
|
+
entryFiles,
|
|
114
|
+
targetDir,
|
|
115
|
+
piralInstances,
|
|
116
|
+
outDir,
|
|
117
|
+
outFile: name,
|
|
118
|
+
hash,
|
|
119
|
+
});
|
|
120
|
+
await runLifecycle(root, scripts, 'piral:postbuild');
|
|
121
|
+
await runLifecycle(root, scripts, `piral:postbuild-${constants_1.releaseName}`);
|
|
122
|
+
(0, log_1.logDone)(`Files for publication available in "${outDir}".`);
|
|
123
|
+
}
|
|
124
|
+
exports.triggerBuildShell = triggerBuildShell;
|
|
125
|
+
//# sourceMappingURL=piral.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"piral.js","sourceRoot":"","sources":["../../src/common/piral.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAC5B,uCAAsC;AACtC,6BAAuC;AACvC,uCAA6C;AAC7C,+BAAwD;AACxD,yCAA2F;AAC3F,2CAAuH;AACvH,wCAA4C;AAG5C,KAAK,UAAU,YAAY,CAAC,IAAY,EAAE,OAA+B,EAAE,IAAY;IACrF,MAAM,MAAM,GAAG,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;IAE/B,IAAI,MAAM,EAAE;QACV,IAAA,SAAG,EAAC,mBAAmB,EAAE,YAAY,IAAI,OAAO,MAAM,QAAQ,CAAC,CAAC;QAChE,MAAM,IAAA,mBAAS,EAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC9B,IAAA,SAAG,EAAC,mBAAmB,EAAE,qBAAqB,IAAI,IAAI,CAAC,CAAC;KACzD;SAAM;QACL,IAAA,SAAG,EAAC,mBAAmB,EAAE,kBAAkB,IAAI,aAAa,CAAC,CAAC;KAC/D;AACH,CAAC;AAgCM,KAAK,UAAU,oBAAoB,CAAC,EACzC,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,WAAW,EACX,eAAe,EACf,UAAU,EACV,KAAK,EACL,OAAO,EACP,WAAW,EACX,SAAS,EACT,OAAO,EACP,OAAO,EACP,UAAU,EACV,cAAc,EACd,KAAK,EACL,CAAC,GACoB;IACrB,IAAA,cAAQ,EAAC,6BAA6B,CAAC,CAAC;IAExC,MAAM,iBAAiB,GAAG,GAAG,CAAC;IAC9B,MAAM,MAAM,GAAG,YAAY,KAAK,+BAAmB,CAAC,CAAC,CAAC,IAAA,WAAI,EAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SA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AA4B,CAAC,CAAC;IAEvC,2EAA2E;IAC3E,MAAM,IAAA,oBAAe,EAAC,SAAS,CAAC,CAAC;IAEjC,IAAA,aAAO,EAAC,UAAU,uBAAW,MAAM,CAAC,CAAC;IAErC,MAAM,KAAK,CAAC,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,CAAC;IAEjG,MAAM,EACJ,GAAG,EAAE,MAAM,EACX,IAAI,EACJ,IAAI,GACL,GAAG,MAAM,IAAA,wBAAc,EACtB;QACE,IAAI;QACJ,cAAc;QACd,QAAQ,EAAE,KAAK;QACf,UAAU,EAAE,KAAK;QACjB,eAAe;QACf,UAAU;QACV,KAAK;QACL,WAAW;QACX,MAAM;QACN,SAAS,EAAE,IAAA,0BAAgB,EAAC,SAAS,CAAC;QACtC,SAAS;QACT,OAAO;QACP,MAAM,EAAE,SAAS;QACjB,UAAU;QACV,QAAQ;QACR,OAAO;QACP,CAAC;KACF,EACD,WAAW,CACZ,CAAC;IAEF,MAAM,KAAK,CAAC,UAAU,EAAE,CAAC;QACvB,IAAI;QACJ,SAAS;QACT,SAAS;QACT,UAAU;QACV,SAAS;QACT,cAAc;QACd,MAAM;QACN,OAAO,EAAE,IAAI;QACb,IAAI;KACL,CAAC,CAAC;IAEH,MAAM,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC;IACrD,MAAM,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,mBAAmB,uBAAW,EAAE,CAAC,CAAC;IAEpE,IAAA,aAAO,EAAC,uCAAuC,MAAM,IAAI,CAAC,CAAC;AAC7D,CAAC;AAxED,8CAwEC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { PublishScheme } from '../types';
|
|
3
|
+
export declare function publishPackageEmulator(baseDir: string, source: string, args?: Record<string, string>, interactive?: boolean): Promise<void>;
|
|
4
|
+
export declare function publishWebsiteEmulator(version: string, url: string, apiKey: string, mode: PublishScheme, directory: string, files: Array<string>, interactive: boolean, headers?: Record<string, string>, ca?: Buffer): Promise<import("./http").PostFormResult>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.publishWebsiteEmulator = exports.publishPackageEmulator = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
5
|
+
const log_1 = require("./log");
|
|
6
|
+
const npm_1 = require("./npm");
|
|
7
|
+
const http_1 = require("./http");
|
|
8
|
+
const io_1 = require("./io");
|
|
9
|
+
async function publishPackageEmulator(baseDir, source, args = {}, interactive = false) {
|
|
10
|
+
const type = 'emulator';
|
|
11
|
+
const directory = (0, path_1.resolve)(baseDir, source, type);
|
|
12
|
+
const exists = await (0, io_1.checkExists)(directory);
|
|
13
|
+
if (!exists) {
|
|
14
|
+
(0, log_1.fail)('publishDirectoryMissing_0110', directory);
|
|
15
|
+
}
|
|
16
|
+
const files = await (0, io_1.matchFiles)(directory, '*.tgz');
|
|
17
|
+
(0, log_1.log)('generalDebug_0003', `Found ${files.length} in "${directory}": ${files.join(', ')}`);
|
|
18
|
+
if (files.length !== 1) {
|
|
19
|
+
(0, log_1.fail)('publishEmulatorFilesUnexpected_0111', directory);
|
|
20
|
+
}
|
|
21
|
+
const [file] = files;
|
|
22
|
+
const flags = Object.keys(args).reduce((p, c) => {
|
|
23
|
+
p.push(`--${c}`, args[c]);
|
|
24
|
+
return p;
|
|
25
|
+
}, []);
|
|
26
|
+
await (0, npm_1.publishNpmPackage)(directory, file, flags, interactive);
|
|
27
|
+
}
|
|
28
|
+
exports.publishPackageEmulator = publishPackageEmulator;
|
|
29
|
+
async function publishWebsiteEmulator(version, url, apiKey, mode, directory, files, interactive, headers, ca) {
|
|
30
|
+
const data = {
|
|
31
|
+
version,
|
|
32
|
+
type: 'custom',
|
|
33
|
+
};
|
|
34
|
+
for (const file of files) {
|
|
35
|
+
const relPath = (0, path_1.relative)(directory, file);
|
|
36
|
+
const fileName = (0, path_1.basename)(file);
|
|
37
|
+
const content = await (0, io_1.readBinary)((0, path_1.dirname)(file), fileName);
|
|
38
|
+
data[relPath] = [content, fileName];
|
|
39
|
+
}
|
|
40
|
+
return await (0, http_1.postForm)(url, mode, apiKey, data, headers, ca, interactive);
|
|
41
|
+
}
|
|
42
|
+
exports.publishWebsiteEmulator = publishWebsiteEmulator;
|
|
43
|
+
//# sourceMappingURL=release.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release.js","sourceRoot":"","sources":["../../src/common/release.ts"],"names":[],"mappings":";;;AAAA,+BAA4D;AAC5D,+BAAkC;AAClC,+BAA0C;AAC1C,iCAA+C;AAC/C,6BAA2D;AAGpD,KAAK,UAAU,sBAAsB,CAC1C,OAAe,EACf,MAAc,EACd,OAA+B,EAAE,EACjC,WAAW,GAAG,KAAK;IAEnB,MAAM,IAAI,GAAG,UAAU,CAAC;IACxB,MAAM,SAAS,GAAG,IAAA,cAAO,EAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,MAAM,IAAA,gBAAW,EAAC,SAAS,CAAC,CAAC;IAE5C,IAAI,CAAC,MAAM,EAAE;QACX,IAAA,UAAI,EAAC,8BAA8B,EAAE,SAAS,CAAC,CAAC;KACjD;IAED,MAAM,KAAK,GAAG,MAAM,IAAA,eAAU,EAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnD,IAAA,SAAG,EAAC,mBAAmB,EAAE,SAAS,KAAK,CAAC,MAAM,QAAQ,SAAS,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEzF,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,IAAA,UAAI,EAAC,qCAAqC,EAAE,SAAS,CAAC,CAAC;KACxD;IAED,MAAM,CAAC,IAAI,C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-
import type { Framework, NpmClientType, PiletSchemaVersion, PiletPublishSource, PiralBuildType, PiletBuildType,
|
|
2
|
+
import type { Framework, NpmClientType, PiletSchemaVersion, PiletPublishSource, PiralBuildType, PiletBuildType, PublishScheme, SourceLanguage } from './types';
|
|
3
3
|
export declare const schemaKeys: Array<PiletSchemaVersion>;
|
|
4
|
-
export declare const publishModeKeys: Array<
|
|
4
|
+
export declare const publishModeKeys: Array<PublishScheme>;
|
|
5
5
|
export declare const fromKeys: Array<PiletPublishSource>;
|
|
6
6
|
export declare const piralBuildTypeKeys: Array<PiralBuildType>;
|
|
7
7
|
export declare const piletBuildTypeKeys: Array<PiletBuildType>;
|
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,IAAI,EAAE,MAAM,CAAC,CAAC;AAC/E,QAAA,eAAe,
|
|
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,IAAI,EAAE,MAAM,CAAC,CAAC;AAC/E,QAAA,eAAe,GAAyB,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC9E,QAAA,QAAQ,GAA8B,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AACjE,QAAA,kBAAkB,GAA0B;IACvD,KAAK;IACL,SAAS;IACT,UAAU;IACV,kBAAkB;IAClB,kBAAkB;IAClB,kBAAkB;CACnB,CAAC;AACW,QAAA,kBAAkB,GAA0B,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAClF,QAAA,cAAc,GAAyB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC9F,QAAA,kBAAkB,GAA0B,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACzD,QAAA,WAAW,GAAkB,CAAC,MAAM,EAAE,GAAG,wBAAY,CAAC,CAAC;AACvD,QAAA,iBAAiB,GAAkB,EAAE,CAAC;AACtC,QAAA,yBAAyB,GAAkB,EAAE,CAAC;AAC9C,QAAA,aAAa,GAAqB,CAAC,GAAG,yBAAa,CAAC,CAAC;AACrD,QAAA,kBAAkB,GAAG,MAAM,CAAC,IAAI,CAAC,sBAAc,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,sBAAc,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC;AAEnH,SAAgB,qBAAqB,CAAC,GAAW;IAC/C,KAAK,MAAM,iBAAiB,IAAI,0BAAkB,EAAE;QAClD,IAAI,iBAAiB,KAAK,GAAG,EAAE;YAC7B,OAAO,sBAAc,CAAC,iBAAiB,CAAC,CAAC;SAC1C;KACF;IAED,OAAO,sBAAc,CAAC,EAAE,CAAC;AAC3B,CAAC;AARD,sDAQC;AAED,SAAgB,mBAAmB,CAAC,KAAqB;IACvD,KAAK,MAAM,iBAAiB,IAAI,0BAAkB,EAAE;QAClD,IAAI,sBAAc,CAAC,iBAAiB,CAAC,KAAK,KAAK,EAAE;YAC/C,OAAO,iBAAiB,CAAC;SAC1B;KACF;IAED,OAAO,0BAAkB,CAAC,CAAC,CAAC,CAAC;AAC/B,CAAC;AARD,kDAQC"}
|
package/lib/messages.d.ts
CHANGED
|
@@ -2318,6 +2318,25 @@ export declare function optionalEmulatorAssetUpdateSkipped_0122(url: string): Qu
|
|
|
2318
2318
|
* - [Firefox proxy settings](https://support.mozilla.org/en-US/kb/connection-settings-firefox)
|
|
2319
2319
|
*/
|
|
2320
2320
|
export declare function requiredEmulatorAssetDownloadSkipped_0123(url: string): QuickMessage;
|
|
2321
|
+
/**
|
|
2322
|
+
* @kind Error
|
|
2323
|
+
*
|
|
2324
|
+
* @summary
|
|
2325
|
+
* The emulator.json and associated files could not be found in the source directory.
|
|
2326
|
+
*
|
|
2327
|
+
* @abstract
|
|
2328
|
+
* Only an emulator website can be published using `piral publish`. Other artifacts such as
|
|
2329
|
+
* standard release artifacts or the package emulator (tgz) need to be published using other
|
|
2330
|
+
* mechanisms such as `npm publish`.
|
|
2331
|
+
*
|
|
2332
|
+
* If no emulator website exists you can either build one using the `--fresh` flag with
|
|
2333
|
+
* `piral publish` (i.e., `piral publish --fresh`) or preparing the build using `piral build`
|
|
2334
|
+
* with the `--type emulator-website` flag.
|
|
2335
|
+
*
|
|
2336
|
+
* @see
|
|
2337
|
+
* - [Emulator](https://docs.piral.io/concepts/T01-emulator)
|
|
2338
|
+
*/
|
|
2339
|
+
export declare function missingEmulatorWebsite_0130(path: string): QuickMessage;
|
|
2321
2340
|
/**
|
|
2322
2341
|
* @kind Warning
|
|
2323
2342
|
*
|
package/lib/messages.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.entryPointDoesNotExist_0073 = exports.expectedArray_0072 = exports.entryPointMissing_0071 = exports.entryPointMissing_0070 = exports.failedToUploadSize_0163 = exports.failedToUploadVersion_0162 = exports.failedToUploadPayment_0161 = exports.failedHttpGet_0068 = exports.httpPostResponse_0067 = exports.unsuccessfulHttpPost_0066 = exports.failedHttpPost_0065 = exports.failedUploading_0064 = exports.failedToRead_0063 = exports.failedToUpload_0062 = exports.missingPiletTarball_0061 = exports.missingPiletFeedUrl_0060 = exports.skipUnresolvedDependency_0054 = exports.cannotResolveDependency_0053 = exports.cannotResolveVersion_0052 = exports.gitLatestForUpgradeMissing_0051 = exports.localeFileForUpgradeMissing_0050 = exports.portNotFree_0047 = exports.cannotFindFile_0046 = exports.didNotOverWriteFile_0045 = exports.cannotCreateDirectory_0044 = exports.invalidPiralReference_0043 = exports.invalidPiletPackage_0042 = exports.invalidPiletPackage_0041 = exports.invalidPiletTarget_0040 = exports.projectReferenceNotSupported_0032 = exports.upgradePathDoesNotExist_0031 = exports.scaffoldPathDoesNotExist_0030 = exports.invalidSharedDependency_0029 = exports.importMapFileNotFound_0028 = exports.importMapReferenceNotFound_0027 = exports.importMapVersionSpecInvalid_0026 = exports.importMapVersionSpecNotSatisfied_0025 = exports.packageVersionInvalid_0024 = exports.packageNotInstalled_0023 = exports.packageJsonMissingVersion_0022 = exports.packageJsonMissingName_0021 = exports.packageJsonNotFound_0020 = exports.appInstancesNotGiven_0012 = exports.appInstanceInvalid_0011 = exports.appInstanceNotFound_0010 = exports.generalVerbose_0004 = exports.generalDebug_0003 = exports.generalError_0002 = exports.generalWarning_0001 = exports.generalInfo_0000 = void 0;
|
|
4
|
-
exports.piletMultiDebugExternalsDifferent_0303 = exports.piletMultiDebugAppShellVersions_0302 = exports.piletMultiDebugAppShellDifferent_0301 = exports.apiReleaseProviderInvalid_0207 = exports.apiBundlerInvalid_0206 = exports.pluginCouldNotBeLoaded_0205 = exports.apiPatchInvalid_0204 = exports.apiValidateRunInvalid_0203 = exports.apiValidateNameInvalid_0202 = exports.apiArgumentInvalid_0201 = exports.apiCommandNameInvalid_0200 = exports.platformNotSupported_0190 = exports.piletJsonNotAvailable_0180 = exports.bundlerNotInstalled_0176 = exports.bundlerUnspecified_0175 = exports.bundlingFailed_0174 = exports.defaultBundlerMissing_0173 = exports.bundlerMissing_0172 = exports.invalidSchemaVersion_0171 = exports.failedToOpenBrowser_0170 = exports.requiredEmulatorAssetDownloadSkipped_0123 = exports.optionalEmulatorAssetUpdateSkipped_0122 = exports.remoteEmulatorNameChanged_0121 = exports.skipEmulatorUpdate_0120 = exports.publishFeedMissingVersion_0116 = exports.publishFeedMissingUrl_0115 = exports.publishEmulatorSourcesInvalid_0114 = exports.publishProviderMissing_0113 = exports.publishXcopyMissingTarget_0112 = exports.publishEmulatorFilesUnexpected_0111 = exports.publishDirectoryMissing_0110 = exports.appShellMaybeIncompatible_0102 = exports.toolingIncompatible_0101 = exports.appShellIncompatible_0100 = exports.validationWarned_0081 = exports.validationFailed_0080 = exports.frameworkLibMissing_0078 = exports.entryFileMissing_0077 = exports.declarationCouldNotBeGenerated_0076 = exports.packageJsonMissing_0075 = exports.packageJsonMissing_0074 = void 0;
|
|
4
|
+
exports.piletMultiDebugExternalsDifferent_0303 = exports.piletMultiDebugAppShellVersions_0302 = exports.piletMultiDebugAppShellDifferent_0301 = exports.apiReleaseProviderInvalid_0207 = exports.apiBundlerInvalid_0206 = exports.pluginCouldNotBeLoaded_0205 = exports.apiPatchInvalid_0204 = exports.apiValidateRunInvalid_0203 = exports.apiValidateNameInvalid_0202 = exports.apiArgumentInvalid_0201 = exports.apiCommandNameInvalid_0200 = exports.platformNotSupported_0190 = exports.piletJsonNotAvailable_0180 = exports.bundlerNotInstalled_0176 = exports.bundlerUnspecified_0175 = exports.bundlingFailed_0174 = exports.defaultBundlerMissing_0173 = exports.bundlerMissing_0172 = exports.invalidSchemaVersion_0171 = exports.failedToOpenBrowser_0170 = exports.missingEmulatorWebsite_0130 = exports.requiredEmulatorAssetDownloadSkipped_0123 = exports.optionalEmulatorAssetUpdateSkipped_0122 = exports.remoteEmulatorNameChanged_0121 = exports.skipEmulatorUpdate_0120 = exports.publishFeedMissingVersion_0116 = exports.publishFeedMissingUrl_0115 = exports.publishEmulatorSourcesInvalid_0114 = exports.publishProviderMissing_0113 = exports.publishXcopyMissingTarget_0112 = exports.publishEmulatorFilesUnexpected_0111 = exports.publishDirectoryMissing_0110 = exports.appShellMaybeIncompatible_0102 = exports.toolingIncompatible_0101 = exports.appShellIncompatible_0100 = exports.validationWarned_0081 = exports.validationFailed_0080 = exports.frameworkLibMissing_0078 = exports.entryFileMissing_0077 = exports.declarationCouldNotBeGenerated_0076 = exports.packageJsonMissing_0075 = exports.packageJsonMissing_0074 = void 0;
|
|
5
5
|
const types_1 = require("./types");
|
|
6
6
|
/**
|
|
7
7
|
* @kind Info
|
|
@@ -2584,6 +2584,28 @@ function requiredEmulatorAssetDownloadSkipped_0123(url) {
|
|
|
2584
2584
|
return [types_1.LogLevels.warning, '0123', `Could not download asset file at "${url}".`];
|
|
2585
2585
|
}
|
|
2586
2586
|
exports.requiredEmulatorAssetDownloadSkipped_0123 = requiredEmulatorAssetDownloadSkipped_0123;
|
|
2587
|
+
/**
|
|
2588
|
+
* @kind Error
|
|
2589
|
+
*
|
|
2590
|
+
* @summary
|
|
2591
|
+
* The emulator.json and associated files could not be found in the source directory.
|
|
2592
|
+
*
|
|
2593
|
+
* @abstract
|
|
2594
|
+
* Only an emulator website can be published using `piral publish`. Other artifacts such as
|
|
2595
|
+
* standard release artifacts or the package emulator (tgz) need to be published using other
|
|
2596
|
+
* mechanisms such as `npm publish`.
|
|
2597
|
+
*
|
|
2598
|
+
* If no emulator website exists you can either build one using the `--fresh` flag with
|
|
2599
|
+
* `piral publish` (i.e., `piral publish --fresh`) or preparing the build using `piral build`
|
|
2600
|
+
* with the `--type emulator-website` flag.
|
|
2601
|
+
*
|
|
2602
|
+
* @see
|
|
2603
|
+
* - [Emulator](https://docs.piral.io/concepts/T01-emulator)
|
|
2604
|
+
*/
|
|
2605
|
+
function missingEmulatorWebsite_0130(path) {
|
|
2606
|
+
return [types_1.LogLevels.error, '0130', `Could not find the files for an emulator website at "${path}".`];
|
|
2607
|
+
}
|
|
2608
|
+
exports.missingEmulatorWebsite_0130 = missingEmulatorWebsite_0130;
|
|
2587
2609
|
/**
|
|
2588
2610
|
* @kind Warning
|
|
2589
2611
|
*
|