@wix/himalaya-cli 0.1225.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 +11 -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
|
@@ -6869,6 +6869,7 @@ function resolveTranslation(value, catalog, sourceCatalog) {
|
|
|
6869
6869
|
var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
|
|
6870
6870
|
var init_bindings = __esm({
|
|
6871
6871
|
"../../core/ts/src/bindings.ts"() {
|
|
6872
|
+
"use strict";
|
|
6872
6873
|
BINDING_SIGILS = ["service", "flag", "item", "t"];
|
|
6873
6874
|
BINDING_SIGIL_RE = new RegExp(
|
|
6874
6875
|
`^\\$(?:${BINDING_SIGILS.filter((s2) => s2 !== "t").join("|")})\\b|^\\$t:`
|
|
@@ -25401,6 +25402,7 @@ function shouldRevealError(args) {
|
|
|
25401
25402
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
|
|
25402
25403
|
var init_validation = __esm({
|
|
25403
25404
|
"../../core/ts/src/validation.ts"() {
|
|
25405
|
+
"use strict";
|
|
25404
25406
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
25405
25407
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
25406
25408
|
INTEGER_RE = /^[+-]?[0-9]+$/;
|
|
@@ -26060,6 +26062,7 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
|
|
|
26060
26062
|
var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
|
|
26061
26063
|
var init_worker_subtree = __esm({
|
|
26062
26064
|
"../../core/ts/src/worker-subtree.ts"() {
|
|
26065
|
+
"use strict";
|
|
26063
26066
|
init_worker_subtree_safe_types_generated();
|
|
26064
26067
|
WORKER_SUBTREE_CEILINGS = Object.freeze({
|
|
26065
26068
|
maxEncodedBytes: 65536,
|
|
@@ -28369,9 +28372,17 @@ var init_app_identity = __esm({
|
|
|
28369
28372
|
}
|
|
28370
28373
|
});
|
|
28371
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
|
+
|
|
28372
28381
|
// ../../core/ts/src/app-registry-client.ts
|
|
28373
28382
|
var init_app_registry_client = __esm({
|
|
28374
28383
|
"../../core/ts/src/app-registry-client.ts"() {
|
|
28384
|
+
init_registry_app_normalize();
|
|
28385
|
+
init_registry_app_normalize();
|
|
28375
28386
|
}
|
|
28376
28387
|
});
|
|
28377
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
|
}
|