@wix/himalaya-cli 0.1702.0 → 0.1703.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +7 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +14 -0
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{8155555b873d0194a45cb1fdbd06855900b3943c888ffa129ed48a373a32eb46.bin → df0422934aaa38861fe3fc040a30a521cc958ddcc9fee01e9202b3c6c5dbf4d6.bin} +1 -1
- package/dist/browser-plane/sw.js +7 -7
- package/dist/cli.mjs +4209 -3080
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/himi-json-output.md +24 -0
- package/package.json +2 -2
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts
CHANGED
|
@@ -241,6 +241,13 @@ export interface AppConfig {
|
|
|
241
241
|
* (`distAddRefusal`). A local build of the shell still uses `capabilities`.
|
|
242
242
|
*/
|
|
243
243
|
capabilityBase?: Capability[];
|
|
244
|
+
/**
|
|
245
|
+
* RFC 0080 — the app's own native extensions (`extensions/<name>/`, Swift + Kotlin action handlers),
|
|
246
|
+
* written by `himi ext create`. A `himi dist` build compiles each into the binary; a worker reaches
|
|
247
|
+
* one through `@ext/<name>`, and only from a screen whose `logicBundle.declaredCapabilities` lists
|
|
248
|
+
* `ext:<name with - as _>`. Names are lowercase letters, digits and single hyphens.
|
|
249
|
+
*/
|
|
250
|
+
extensions?: string[];
|
|
244
251
|
/**
|
|
245
252
|
* Per-capability permission prompt copy — the sentence the OS shows when the app asks for
|
|
246
253
|
* camera, location, photos, … (iOS usage strings). Served on app-config, so `himi dist` bakes
|
|
@@ -8221,6 +8221,19 @@ function validateBase44Config(config) {
|
|
|
8221
8221
|
const dup = sameKindBase44Duplicate(b.entities);
|
|
8222
8222
|
if (dup) throw new Error(`defineApp: base44.entities: "${dup}": duplicate entity "${dup}" (entity-duplicate)`);
|
|
8223
8223
|
}
|
|
8224
|
+
function validateExtensions(extensions) {
|
|
8225
|
+
if (extensions === void 0) return;
|
|
8226
|
+
if (!Array.isArray(extensions)) throw new Error("defineApp: extensions must be an array of extension names.");
|
|
8227
|
+
const seen = /* @__PURE__ */ new Set();
|
|
8228
|
+
for (const [i, name] of extensions.entries()) {
|
|
8229
|
+
if (typeof name !== "string" || !/^[a-z](?:[a-z0-9]|-(?=[a-z0-9])){1,39}$/.test(name)) {
|
|
8230
|
+
throw new Error(`defineApp: extensions[${i}] must be 2\u201340 lowercase letters, digits and single hyphens; got ${JSON.stringify(name)}.`);
|
|
8231
|
+
}
|
|
8232
|
+
if (seen.has(name)) throw new Error(`defineApp: extensions[${i}] repeats "${name}".`);
|
|
8233
|
+
seen.add(name);
|
|
8234
|
+
}
|
|
8235
|
+
if (extensions.length > 16) throw new Error("defineApp: an app may declare at most 16 extensions.");
|
|
8236
|
+
}
|
|
8224
8237
|
function validateConfigShape(config) {
|
|
8225
8238
|
if (!config.id || !/^[a-z0-9.]+$/.test(config.id)) {
|
|
8226
8239
|
throw new Error(
|
|
@@ -8240,6 +8253,7 @@ function validateConfigShape(config) {
|
|
|
8240
8253
|
if (config.distribution) {
|
|
8241
8254
|
validateDistribution(config.distribution, "defineApp: distribution");
|
|
8242
8255
|
}
|
|
8256
|
+
validateExtensions(config.extensions);
|
|
8243
8257
|
adoptedIdentity(config);
|
|
8244
8258
|
validateLadderConfig(config);
|
|
8245
8259
|
validateAuthGateScreen(config.auth);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"files": [
|
|
3
3
|
{
|
|
4
4
|
"name": "sw.js",
|
|
5
|
-
"bytes":
|
|
5
|
+
"bytes": 2540494
|
|
6
6
|
},
|
|
7
7
|
{
|
|
8
8
|
"name": "host.html",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"bytes": 23064
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"name": "preview-deferred/
|
|
24
|
+
"name": "preview-deferred/df0422934aaa38861fe3fc040a30a521cc958ddcc9fee01e9202b3c6c5dbf4d6.bin",
|
|
25
25
|
"bytes": 488215
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -79,10 +79,10 @@
|
|
|
79
79
|
],
|
|
80
80
|
"deferred": [
|
|
81
81
|
{
|
|
82
|
-
"key": "assets/pdf-
|
|
82
|
+
"key": "assets/pdf-C_t7UQ95.js",
|
|
83
83
|
"contentType": "application/javascript; charset=utf-8",
|
|
84
|
-
"sha256": "
|
|
85
|
-
"file": "preview-deferred/
|
|
84
|
+
"sha256": "df0422934aaa38861fe3fc040a30a521cc958ddcc9fee01e9202b3c6c5dbf4d6",
|
|
85
|
+
"file": "preview-deferred/df0422934aaa38861fe3fc040a30a521cc958ddcc9fee01e9202b3c6c5dbf4d6.bin"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"key": "assets/pdf.worker.min-BGnVRhRG.js",
|