@wix/himalaya-cli 0.1811.0 → 0.1813.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/sdk/base44/src/index.d.ts +12 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/state/src/index.d.ts +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/base44.mjs +6 -1
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{35916cad4faec46ac3f7d6cb11b049d75faef382fcbc2c8697128937d73732cc.bin → b01b55d664ce9b920b5074a3f660141e38190a446fb008677740736d22b5d759.bin} +1 -1
- package/dist/browser-plane/sw.js +1 -1
- package/dist/cli.mjs +111 -120
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/sdk-reference.json +9 -2
- package/package.json +2 -2
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/base44/src/index.d.ts
CHANGED
|
@@ -22,9 +22,21 @@ export interface ListOptions {
|
|
|
22
22
|
skip?: number;
|
|
23
23
|
fields?: string[];
|
|
24
24
|
}
|
|
25
|
+
/** The Wix member a signed-in Base44 user maps to (native hosts only). Ids, never tokens. */
|
|
26
|
+
export interface WixMember {
|
|
27
|
+
memberId: string;
|
|
28
|
+
siteId: string;
|
|
29
|
+
}
|
|
25
30
|
export interface AuthStatus {
|
|
26
31
|
signedIn: boolean;
|
|
27
32
|
user: Base44User | null;
|
|
33
|
+
/**
|
|
34
|
+
* The Wix member session native minted for this user (the Branded44 shell's
|
|
35
|
+
* `wix-member-session` exchange), or null: signed out, the web host (which has no exchange),
|
|
36
|
+
* an app with no Wix member behind it, or the exchange has not succeeded. The Wix tokens stay
|
|
37
|
+
* native; push registration and the native Wix client use them.
|
|
38
|
+
*/
|
|
39
|
+
wixMember: WixMember | null;
|
|
28
40
|
}
|
|
29
41
|
export interface LoginResult {
|
|
30
42
|
user: Base44User;
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/state/src/index.d.ts
CHANGED
|
@@ -288,7 +288,8 @@ export type AppServiceErrorCode = "not_booted" | "unavailable" | "no_service" |
|
|
|
288
288
|
/**
|
|
289
289
|
* The rejection `app.read` / `app.dispatch` produce: an `Error` named `AppServiceError` with a
|
|
290
290
|
* `code`. Never a null result — "nothing ran" always rejects. A plain `Error` rather than a
|
|
291
|
-
* subclass,
|
|
291
|
+
* subclass, so a bundle that opts into the Hermes-safe profile (`HERMES_SAFE_BUNDLES`, build-lib.mjs:
|
|
292
|
+
* no `class` syntax) can still import the SDK.
|
|
292
293
|
*/
|
|
293
294
|
export type AppServiceError = Error & {
|
|
294
295
|
readonly code: AppServiceErrorCode;
|
|
@@ -56,6 +56,11 @@ function unwrap(reply) {
|
|
|
56
56
|
return env.data ?? null;
|
|
57
57
|
}
|
|
58
58
|
var json = (value) => JSON.stringify(value ?? {});
|
|
59
|
+
function wixMember(raw) {
|
|
60
|
+
if (!raw || typeof raw !== "object") return null;
|
|
61
|
+
const { memberId, siteId } = raw;
|
|
62
|
+
return typeof memberId === "string" && memberId && typeof siteId === "string" && siteId ? { memberId, siteId } : null;
|
|
63
|
+
}
|
|
59
64
|
function listParams(entity, opts) {
|
|
60
65
|
if (!entity) throw new Error("@himalaya/base44: entity name is required");
|
|
61
66
|
return { entity, opts: json(opts ?? {}) };
|
|
@@ -103,7 +108,7 @@ var auth = {
|
|
|
103
108
|
/** Whether a user is signed in, and who. Never rejects for a signed-out user. */
|
|
104
109
|
async status() {
|
|
105
110
|
const s = unwrap(await dispatch2("capability.base44.authStatus"));
|
|
106
|
-
return { signedIn: s?.signedIn === true, user: s?.user ?? null };
|
|
111
|
+
return { signedIn: s?.signedIn === true, user: s?.user ?? null, wixMember: wixMember(s?.wixMember) };
|
|
107
112
|
},
|
|
108
113
|
/** Drop the stored token. Later entity calls run anonymously (public data only). */
|
|
109
114
|
async logout() {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"files": [
|
|
3
3
|
{
|
|
4
4
|
"name": "sw.js",
|
|
5
|
-
"bytes":
|
|
5
|
+
"bytes": 2611116
|
|
6
6
|
},
|
|
7
7
|
{
|
|
8
8
|
"name": "host.html",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"bytes": 24320
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"name": "preview-deferred/
|
|
24
|
+
"name": "preview-deferred/b01b55d664ce9b920b5074a3f660141e38190a446fb008677740736d22b5d759.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-DTjvN06u.js",
|
|
83
83
|
"contentType": "application/javascript; charset=utf-8",
|
|
84
|
-
"sha256": "
|
|
85
|
-
"file": "preview-deferred/
|
|
84
|
+
"sha256": "b01b55d664ce9b920b5074a3f660141e38190a446fb008677740736d22b5d759",
|
|
85
|
+
"file": "preview-deferred/b01b55d664ce9b920b5074a3f660141e38190a446fb008677740736d22b5d759.bin"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"key": "assets/pdf.worker.min-BGnVRhRG.js",
|