@wix/himalaya-cli 0.1052.0 → 0.1054.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/dev-server/src/app-module.d.ts +10 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/wix-member-login.d.ts +5 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +8 -0
- package/dist/cli.mjs +495 -350
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/headless-loop.md +4 -1
- package/guides/wix-business-context.md +7 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AppConfigLike } from "@wix/himalaya/core";
|
|
1
|
+
import type { AppConfig, AppConfigLike, FunctionsAppConfig } from "@wix/himalaya/core";
|
|
2
2
|
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
3
3
|
import type { ActionHandler } from "./actions/types.js";
|
|
4
4
|
import type { ScreenDescriptor } from "./builder.js";
|
|
@@ -121,6 +121,15 @@ export type DataRouteHandler = (req: IncomingMessage, res: ServerResponse, ctx:
|
|
|
121
121
|
store: AppStore;
|
|
122
122
|
serverBaseUrl: string;
|
|
123
123
|
}) => void | Promise<void>;
|
|
124
|
+
/** A functions-only app (`defineApp({ kind: "functions", … })`): no screens, and none of a UI
|
|
125
|
+
* app's config. The same test `defineApp` itself applies. */
|
|
126
|
+
export declare function isFunctionsOnlyConfig(config: AppConfigLike): config is FunctionsAppConfig;
|
|
127
|
+
/** An app's config seen as a UI app's, every field optional. `FunctionsAppConfig` declares none
|
|
128
|
+
* of `AppConfig`'s UI fields, so on a functions-only app each one reads as absent, which is what
|
|
129
|
+
* the `?.` / `??` at every call site already assumes. For code that handles both kinds; code
|
|
130
|
+
* past an `isFunctionsOnlyConfig` return should narrow instead. No app at all reads the same way,
|
|
131
|
+
* as `state.app?.module.config.x` did. */
|
|
132
|
+
export declare function uiConfig(config: AppConfigLike | undefined): Partial<AppConfig>;
|
|
124
133
|
/** The complete contract an app package exports for the dev-server to serve. */
|
|
125
134
|
export interface AppDevModule {
|
|
126
135
|
/** The `defineApp()` result from the app's config.ts — single source of identity. */
|
|
@@ -15,3 +15,8 @@ export declare function webWixCall(method: string, path: string, body: string |
|
|
|
15
15
|
status: number;
|
|
16
16
|
body: string;
|
|
17
17
|
}>;
|
|
18
|
+
/** The signed-in member's Wix id, or null when the profile read fails (the identity route then
|
|
19
|
+
* falls back to the login email). The token belongs in `webWixCall`'s TOKEN slot: the identity
|
|
20
|
+
* route used to pass it third, where it became the GET's ignored body, so the read went out as
|
|
21
|
+
* `Authorization: undefined`, always failed, and every member's id was reported as their email. */
|
|
22
|
+
export declare function readMemberId(memberToken: string): Promise<string | null>;
|
|
@@ -8549,6 +8549,12 @@ function agendaList(props, opts) {
|
|
|
8549
8549
|
}
|
|
8550
8550
|
|
|
8551
8551
|
// ../../core/dev-server/src/app-module.ts
|
|
8552
|
+
function isFunctionsOnlyConfig(config) {
|
|
8553
|
+
return config.kind === "functions";
|
|
8554
|
+
}
|
|
8555
|
+
function uiConfig(config) {
|
|
8556
|
+
return config ?? {};
|
|
8557
|
+
}
|
|
8552
8558
|
function deriveAppMeta(name, m, platforms = {}) {
|
|
8553
8559
|
const config = m.config;
|
|
8554
8560
|
return {
|
|
@@ -8658,6 +8664,7 @@ export {
|
|
|
8658
8664
|
icon,
|
|
8659
8665
|
iconButton,
|
|
8660
8666
|
image,
|
|
8667
|
+
isFunctionsOnlyConfig,
|
|
8661
8668
|
label,
|
|
8662
8669
|
labeledContent,
|
|
8663
8670
|
lazyList,
|
|
@@ -8703,6 +8710,7 @@ export {
|
|
|
8703
8710
|
timeline,
|
|
8704
8711
|
toggle,
|
|
8705
8712
|
tooltip,
|
|
8713
|
+
uiConfig,
|
|
8706
8714
|
video,
|
|
8707
8715
|
voiceNote,
|
|
8708
8716
|
vstack,
|