@wix/himalaya-cli 0.1665.0 → 0.1667.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/legacy-import.d.ts +15 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +21 -2
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{7700021a25a8d932331f2abf6ba6c2f13b2a18cabfc4ce8b02aa0ed1ae973ffc.bin → 6eb8e06efae709dec91b845b9df5a93594d4a91d157b435e053cc7789d005253.bin} +1 -1
- package/dist/browser-plane/sw.js +9 -9
- package/dist/cli.mjs +193 -50
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +1 -1
- package/guides/component-reference.md +2 -1
- package/package.json +2 -2
- package/templates/beauty-salon/l10n/en.json +1 -1
- package/templates/beauty-salon/l10n/he.json +4 -0
- package/templates/branded-lite/dev/index.ts +950 -170
- package/templates/branded-lite/l10n/en.json +36 -1
- package/templates/branded-lite/l10n/he.json +33 -0
- package/templates/branded-lite/tier5-src/wix-spaces-members/index.ts +50 -19
- package/templates/community-club/l10n/en.json +1 -1
- package/templates/community-club/l10n/he.json +4 -0
- package/templates/events-meetups/l10n/en.json +1 -1
- package/templates/events-meetups/l10n/he.json +4 -0
- package/templates/gym-fitness/l10n/en.json +1 -1
- package/templates/gym-fitness/l10n/he.json +4 -0
- package/templates/nonprofit-cause/l10n/en.json +1 -1
- package/templates/nonprofit-cause/l10n/he.json +4 -0
- package/templates/podcast-creator/l10n/en.json +1 -1
- package/templates/podcast-creator/l10n/he.json +4 -0
- package/templates/portfolio-creative/l10n/en.json +1 -1
- package/templates/portfolio-creative/l10n/he.json +4 -0
- package/templates/restaurant/l10n/en.json +1 -1
- package/templates/restaurant/l10n/he.json +4 -0
- package/templates/retail-store/l10n/en.json +1 -1
- package/templates/retail-store/l10n/he.json +4 -0
- package/templates/yoga-studio/l10n/en.json +1 -1
- package/templates/yoga-studio/l10n/he.json +4 -0
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/legacy-import.d.ts
CHANGED
|
@@ -6,15 +6,25 @@ export type LegacyImportSourceKind = (typeof LEGACY_IMPORT_SOURCE_KINDS)[number]
|
|
|
6
6
|
export declare const LEGACY_IMPORT_SINKS: readonly ["localDatabase", "state", "files", "report", "installationId", "drop"];
|
|
7
7
|
export type LegacyImportSinkName = (typeof LEGACY_IMPORT_SINKS)[number];
|
|
8
8
|
/** The container roots a `files` source may read under (the OLD app's container, which an
|
|
9
|
-
* update shares).
|
|
10
|
-
|
|
9
|
+
* update shares). iOS: `documents`, `library`, `caches`. Android (#4654): `files` (filesDir),
|
|
10
|
+
* `noBackup` (noBackupFilesDir), `cache` (cacheDir), `external` (the app-specific
|
|
11
|
+
* getExternalFilesDir(null), never shared storage). A source rooted at the other platform's name
|
|
12
|
+
* resolves to nothing there and is reported `invalid_options` — never read, never a crash. */
|
|
13
|
+
export declare const LEGACY_IMPORT_FILE_ROOTS: readonly ["documents", "library", "caches", "files", "noBackup", "cache", "external"];
|
|
11
14
|
export type LegacyImportFileRoot = (typeof LEGACY_IMPORT_FILE_ROOTS)[number];
|
|
15
|
+
export declare const LEGACY_IMPORT_ANDROID_FILE_ROOTS: readonly ["files", "noBackup", "cache", "external"];
|
|
16
|
+
export type LegacyImportAndroidFileRoot = (typeof LEGACY_IMPORT_ANDROID_FILE_ROOTS)[number];
|
|
12
17
|
/** Every file under `<root>/<path>`. An item's key is its path relative to that directory,
|
|
13
18
|
* with `/` separators (e.g. `notes/a.json`); its value is the file. */
|
|
14
19
|
export interface LegacyImportFilesSource {
|
|
15
20
|
id: string;
|
|
16
21
|
kind: "files";
|
|
17
22
|
root: LegacyImportFileRoot;
|
|
23
|
+
/** #4654 — the root an Android binary reads instead of `root` (`files`, `noBackup`, `cache` or
|
|
24
|
+
* `external`), for a source whose old app kept the same tree in a different container folder on
|
|
25
|
+
* each platform. One source id, so its `map` rules and `principal` serve both platforms; iOS
|
|
26
|
+
* reads `root` and ignores this. */
|
|
27
|
+
androidRoot?: LegacyImportAndroidFileRoot;
|
|
18
28
|
/** Relative directory under `root` — no leading `/`, no `..`. */
|
|
19
29
|
path: string;
|
|
20
30
|
}
|
|
@@ -118,7 +128,9 @@ export declare const LEGACY_IMPORT_RESERVED_IDS: readonly string[];
|
|
|
118
128
|
* (WebKit, Preferences, Caches, …), so a source there is a folder of the old app's under
|
|
119
129
|
* `Application Support`; that folder, and a `caches` source's first folder, is never a Himi-owned
|
|
120
130
|
* one, never bundle-id shaped (`Caches/<bundleId>` is this bundle's URL cache), and never a system
|
|
121
|
-
* cache folder.
|
|
131
|
+
* cache folder. Every Android root holds Himi's and the system's own stores too, so an Android
|
|
132
|
+
* source's FIRST folder is the old app's: never Himi-owned, never package-name shaped (no `.`) and
|
|
133
|
+
* never WebView / pdf-share. Mirror of `FilesLegacyImportSource.mayRead` on iOS and Android. */
|
|
122
134
|
export declare function mayReadLegacyFiles(root: string, path: string): boolean;
|
|
123
135
|
/** Every problem with a `legacyImport` block, each prefixed with its field path. Empty ⇒ valid. */
|
|
124
136
|
export declare function legacyImportProblems(cfg: unknown, at?: string): string[];
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts
CHANGED
|
@@ -420,7 +420,8 @@ export interface Modifiers {
|
|
|
420
420
|
* unresolved or non-numeric value falls back to that sibling (or identity). A change animates
|
|
421
421
|
* with the node's `motion` token; reduced motion jumps. Render-only: transforms never affect
|
|
422
422
|
* layout, the origin is the centre, and hit-testing follows the transformed frame. `$env:` is
|
|
423
|
-
* rejected.
|
|
423
|
+
* rejected. Drawn on iOS, macOS, Android and web. A literal number is drawn as a fixed value
|
|
424
|
+
* (a bound row's substituted `$item.` reads the same way), but belongs in the static sibling. */
|
|
424
425
|
scalePath?: string;
|
|
425
426
|
/** Bound `rotation`, in DEGREES. See `scalePath`. */
|
|
426
427
|
rotationPath?: string;
|
|
@@ -7446,7 +7446,8 @@ function gateScreenIdShapeProblem(id) {
|
|
|
7446
7446
|
// ../../core/ts/src/legacy-import.ts
|
|
7447
7447
|
var LEGACY_IMPORT_SOURCE_KINDS = ["files"];
|
|
7448
7448
|
var LEGACY_IMPORT_SINKS = ["localDatabase", "state", "files", "report", "installationId", "drop"];
|
|
7449
|
-
var LEGACY_IMPORT_FILE_ROOTS = ["documents", "library", "caches"];
|
|
7449
|
+
var LEGACY_IMPORT_FILE_ROOTS = ["documents", "library", "caches", "files", "noBackup", "cache", "external"];
|
|
7450
|
+
var LEGACY_IMPORT_ANDROID_FILE_ROOTS = ["files", "noBackup", "cache", "external"];
|
|
7450
7451
|
var LEGACY_IMPORT_DEFAULT_RETAIN_DAYS = 30;
|
|
7451
7452
|
var LEGACY_IMPORT_BUDGET_MS = 3e3;
|
|
7452
7453
|
var LEGACY_IMPORT_MAX_ATTEMPTS = 3;
|
|
@@ -7464,13 +7465,24 @@ var nonEmpty = (v) => typeof v === "string" && v.trim().length > 0;
|
|
|
7464
7465
|
var LEGACY_IMPORT_RESERVED_IDS = ["state-seeds", "installation-id"];
|
|
7465
7466
|
var isHimiOwned = (segment) => /^(himalaya|himi|io\.himalaya)/i.test(segment);
|
|
7466
7467
|
var SYSTEM_CACHE_FOLDERS = /* @__PURE__ */ new Set(["WebKit", "Snapshots", "fsCachedData"]);
|
|
7468
|
+
var ANDROID_RUNTIME_FOLDERS = /* @__PURE__ */ new Set(["WebView", "pdf-share"]);
|
|
7469
|
+
var ANDROID_FILE_ROOTS = /* @__PURE__ */ new Set(["files", "noBackup", "cache", "external"]);
|
|
7467
7470
|
function mayReadLegacyFiles(root, path) {
|
|
7468
7471
|
const segs = path.split("/");
|
|
7469
7472
|
const appFolder = (s) => !isHimiOwned(s) && !s.includes(".") && !SYSTEM_CACHE_FOLDERS.has(s);
|
|
7470
7473
|
if (root === "library") return segs.length >= 2 && segs[0] === "Application Support" && appFolder(segs[1]);
|
|
7471
7474
|
if (root === "caches") return appFolder(segs[0]);
|
|
7475
|
+
if (ANDROID_FILE_ROOTS.has(root)) {
|
|
7476
|
+
return !isHimiOwned(segs[0]) && !segs[0].includes(".") && !ANDROID_RUNTIME_FOLDERS.has(segs[0]) && !isHimiAccountTree(segs);
|
|
7477
|
+
}
|
|
7472
7478
|
return true;
|
|
7473
7479
|
}
|
|
7480
|
+
function isHimiAccountTree(segs) {
|
|
7481
|
+
for (const i of [1, 2]) {
|
|
7482
|
+
if (segs.length > i + 1 && segs[i] === "files" && (segs[i + 1] === "bundle_docs" || segs[i + 1] === "worker_state")) return true;
|
|
7483
|
+
}
|
|
7484
|
+
return false;
|
|
7485
|
+
}
|
|
7474
7486
|
function legacyImportProblems(cfg, at = "legacyImport") {
|
|
7475
7487
|
const out = [];
|
|
7476
7488
|
if (!isObj(cfg)) return [`${at}: must be an object`];
|
|
@@ -7497,9 +7509,16 @@ function legacyImportProblems(cfg, at = "legacyImport") {
|
|
|
7497
7509
|
if (!LEGACY_IMPORT_FILE_ROOTS.includes(s.root)) {
|
|
7498
7510
|
out.push(`${p}.root: must be one of ${LEGACY_IMPORT_FILE_ROOTS.join(", ")} (got ${JSON.stringify(s.root)})`);
|
|
7499
7511
|
}
|
|
7512
|
+
if (s.androidRoot !== void 0) {
|
|
7513
|
+
if (!LEGACY_IMPORT_ANDROID_FILE_ROOTS.includes(s.androidRoot)) {
|
|
7514
|
+
out.push(`${p}.androidRoot: must be one of ${LEGACY_IMPORT_ANDROID_FILE_ROOTS.join(", ")} (got ${JSON.stringify(s.androidRoot)})`);
|
|
7515
|
+
} else if (isSafeRelativePath(s.path) && !mayReadLegacyFiles(s.androidRoot, s.path)) {
|
|
7516
|
+
out.push(`${p}.path: ${JSON.stringify(s.path)} could cover Himi's own storage under ${JSON.stringify(s.androidRoot)} \u2014 an Android root's first folder may not be a himalaya/himi folder, contain a "." (a package name's) or be WebView / pdf-share`);
|
|
7517
|
+
}
|
|
7518
|
+
}
|
|
7500
7519
|
if (!isSafeRelativePath(s.path)) out.push(`${p}.path: must be a relative path with no "..", "." or empty segment (got ${JSON.stringify(s.path)})`);
|
|
7501
7520
|
else if (!mayReadLegacyFiles(s.root, s.path)) {
|
|
7502
|
-
out.push(`${p}.path: ${JSON.stringify(s.path)} could cover Himi's own storage under ${JSON.stringify(s.root)} \u2014 under "library" name the old app's folder under "Application Support" (e.g. "Application Support/OldApp"); that folder, and a "caches" source's first folder, may not be a himalaya/himi folder, contain a "." (a bundle id's) or be WebKit / Snapshots / fsCachedData`);
|
|
7521
|
+
out.push(`${p}.path: ${JSON.stringify(s.path)} could cover Himi's own storage under ${JSON.stringify(s.root)} \u2014 under "library" name the old app's folder under "Application Support" (e.g. "Application Support/OldApp"); that folder, and a "caches" source's first folder, may not be a himalaya/himi folder, contain a "." (a bundle id's) or be WebKit / Snapshots / fsCachedData; an Android root's first folder may not be a himalaya/himi folder, contain a "." (a package name's) or be WebView / pdf-share`);
|
|
7503
7522
|
}
|
|
7504
7523
|
}
|
|
7505
7524
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"files": [
|
|
3
3
|
{
|
|
4
4
|
"name": "sw.js",
|
|
5
|
-
"bytes":
|
|
5
|
+
"bytes": 2514162
|
|
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/6eb8e06efae709dec91b845b9df5a93594d4a91d157b435e053cc7789d005253.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-DyeKpiem.js",
|
|
83
83
|
"contentType": "application/javascript; charset=utf-8",
|
|
84
|
-
"sha256": "
|
|
85
|
-
"file": "preview-deferred/
|
|
84
|
+
"sha256": "6eb8e06efae709dec91b845b9df5a93594d4a91d157b435e053cc7789d005253",
|
|
85
|
+
"file": "preview-deferred/6eb8e06efae709dec91b845b9df5a93594d4a91d157b435e053cc7789d005253.bin"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"key": "assets/pdf.worker.min-BGnVRhRG.js",
|