@wix/himalaya-cli 0.1224.0 → 0.1226.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/app-registry-client.d.ts +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/registry-app-normalize.d.ts +9 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +21 -6
- package/dist/cli.mjs +10 -0
- package/package.json +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { RegistryStatus } from "./app-identity.js";
|
|
2
|
+
export { isPlayerRequirements, normalizeServeApp, PLAYER_REQUIREMENT_KINDS } from "./registry-app-normalize.js";
|
|
2
3
|
export type RegistryKind = "serve" | "control";
|
|
3
4
|
/** The normalized registry entry the picker + validator consume. */
|
|
4
5
|
export interface RegistryApp {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RegistryApp } from "./app-registry-client.js";
|
|
2
|
+
/** The id lists a release's `playerRequirements` carries, and a Player's compiled claims too. */
|
|
3
|
+
export declare const PLAYER_REQUIREMENT_KINDS: readonly ["capabilities", "nativeComponents", "authProviders"];
|
|
4
|
+
/** A well-formed `playerRequirements` (or claims) value: every kind is a list of string ids. */
|
|
5
|
+
export declare function isPlayerRequirements(v: unknown): v is NonNullable<RegistryApp["playerRequirements"]>;
|
|
6
|
+
/** One `/v1/apps` (serve) entry, normalized: null without a non-empty string id, each field coerced to its type
|
|
7
|
+
* or dropped, and `playerRequirements` kept only when well-formed. Pure, so the Player picker's
|
|
8
|
+
* worker, which parses the registry body itself, normalizes entries exactly as this client does. */
|
|
9
|
+
export declare function normalizeServeApp(a: any): RegistryApp | null;
|
|
@@ -13042,10 +13042,16 @@ function decideSwitch(ctx) {
|
|
|
13042
13042
|
return ctx.activeHasDirtyState ? { action: "prompt", toAppId: ctx.incomingAppId } : { action: "switch", toAppId: ctx.incomingAppId };
|
|
13043
13043
|
}
|
|
13044
13044
|
|
|
13045
|
-
// ../../core/ts/src/app-
|
|
13046
|
-
|
|
13047
|
-
|
|
13048
|
-
|
|
13045
|
+
// ../../core/ts/src/registry-app-normalize.ts
|
|
13046
|
+
var PLAYER_REQUIREMENT_KINDS = ["capabilities", "nativeComponents", "authProviders"];
|
|
13047
|
+
function isPlayerRequirements(v) {
|
|
13048
|
+
if (!v || typeof v !== "object") return false;
|
|
13049
|
+
const r = v;
|
|
13050
|
+
return PLAYER_REQUIREMENT_KINDS.every((kind) => Array.isArray(r[kind]) && r[kind].every((id) => typeof id === "string"));
|
|
13051
|
+
}
|
|
13052
|
+
function normalizeServeApp(a) {
|
|
13053
|
+
if (typeof a?.id !== "string" || !a.id) return null;
|
|
13054
|
+
return {
|
|
13049
13055
|
id: a.id,
|
|
13050
13056
|
name: typeof a.name === "string" ? a.name : a.id,
|
|
13051
13057
|
environment: typeof a.environment === "string" ? a.environment : void 0,
|
|
@@ -13056,8 +13062,14 @@ function parseServe(body) {
|
|
|
13056
13062
|
...typeof a.minBinaryVersion === "string" || a.minBinaryVersion === null ? { minBinaryVersion: a.minBinaryVersion } : {},
|
|
13057
13063
|
...typeof a.publishedAt === "string" ? { publishedAt: a.publishedAt } : {},
|
|
13058
13064
|
...a.publicationKind === "build" || a.publicationKind === "patch" || a.publicationKind === "draft" ? { publicationKind: a.publicationKind } : {},
|
|
13059
|
-
...
|
|
13060
|
-
}
|
|
13065
|
+
...isPlayerRequirements(a.playerRequirements) ? { playerRequirements: a.playerRequirements } : {}
|
|
13066
|
+
};
|
|
13067
|
+
}
|
|
13068
|
+
|
|
13069
|
+
// ../../core/ts/src/app-registry-client.ts
|
|
13070
|
+
function parseServe(body) {
|
|
13071
|
+
const apps = Array.isArray(body?.apps) ? body.apps : [];
|
|
13072
|
+
return apps.map(normalizeServeApp).filter((a) => a !== null);
|
|
13061
13073
|
}
|
|
13062
13074
|
function parseControl(body) {
|
|
13063
13075
|
const apps = Array.isArray(body?.apps) ? body.apps : [];
|
|
@@ -13416,6 +13428,7 @@ export {
|
|
|
13416
13428
|
ORIGIN_PARAM_KEYS,
|
|
13417
13429
|
PACKAGE_SHARE_ID_PATTERN,
|
|
13418
13430
|
PLAYER_PREVIEW_SEGMENT_PATTERN,
|
|
13431
|
+
PLAYER_REQUIREMENT_KINDS,
|
|
13419
13432
|
PREVIEW_EXEMPT_PLATFORM_KEYS,
|
|
13420
13433
|
PREVIEW_SURFACES,
|
|
13421
13434
|
PROJECTION_SNAPSHOT_SIZE,
|
|
@@ -13476,6 +13489,7 @@ export {
|
|
|
13476
13489
|
impliedKeyboard,
|
|
13477
13490
|
isComponentAllowed,
|
|
13478
13491
|
isComponentAllowedForFamily,
|
|
13492
|
+
isPlayerRequirements,
|
|
13479
13493
|
isRTL,
|
|
13480
13494
|
isSupportedLocale,
|
|
13481
13495
|
isTargeted,
|
|
@@ -13486,6 +13500,7 @@ export {
|
|
|
13486
13500
|
isWidgetFamilySurface,
|
|
13487
13501
|
layoutDirection,
|
|
13488
13502
|
mergeIdiomOverlay,
|
|
13503
|
+
normalizeServeApp,
|
|
13489
13504
|
normalizeSiteOrigin,
|
|
13490
13505
|
parseNumeric,
|
|
13491
13506
|
primarySubtag,
|
package/dist/cli.mjs
CHANGED
|
@@ -25402,6 +25402,7 @@ function shouldRevealError(args) {
|
|
|
25402
25402
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
|
|
25403
25403
|
var init_validation = __esm({
|
|
25404
25404
|
"../../core/ts/src/validation.ts"() {
|
|
25405
|
+
"use strict";
|
|
25405
25406
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
25406
25407
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
25407
25408
|
INTEGER_RE = /^[+-]?[0-9]+$/;
|
|
@@ -26061,6 +26062,7 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
|
|
|
26061
26062
|
var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
|
|
26062
26063
|
var init_worker_subtree = __esm({
|
|
26063
26064
|
"../../core/ts/src/worker-subtree.ts"() {
|
|
26065
|
+
"use strict";
|
|
26064
26066
|
init_worker_subtree_safe_types_generated();
|
|
26065
26067
|
WORKER_SUBTREE_CEILINGS = Object.freeze({
|
|
26066
26068
|
maxEncodedBytes: 65536,
|
|
@@ -28370,9 +28372,17 @@ var init_app_identity = __esm({
|
|
|
28370
28372
|
}
|
|
28371
28373
|
});
|
|
28372
28374
|
|
|
28375
|
+
// ../../core/ts/src/registry-app-normalize.ts
|
|
28376
|
+
var init_registry_app_normalize = __esm({
|
|
28377
|
+
"../../core/ts/src/registry-app-normalize.ts"() {
|
|
28378
|
+
}
|
|
28379
|
+
});
|
|
28380
|
+
|
|
28373
28381
|
// ../../core/ts/src/app-registry-client.ts
|
|
28374
28382
|
var init_app_registry_client = __esm({
|
|
28375
28383
|
"../../core/ts/src/app-registry-client.ts"() {
|
|
28384
|
+
init_registry_app_normalize();
|
|
28385
|
+
init_registry_app_normalize();
|
|
28376
28386
|
}
|
|
28377
28387
|
});
|
|
28378
28388
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1226.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
|
|
6
6
|
"keywords": [
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"artifactId": "himalaya-cli"
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
|
-
"falconPackageHash": "
|
|
70
|
+
"falconPackageHash": "225f1ca5353e3a29fa825ab0fd006a0e47e0d107fb44e09b2e4fe833"
|
|
71
71
|
}
|