@zitadel/cli 0.1.0-alpha.18 → 0.1.0-alpha.19
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/README.md +81 -33
- package/SKILLS.md +74 -8
- package/dist/{branding-BXj028-W.mjs → branding-cygSBPkV.mjs} +2 -2
- package/dist/{branding-BXj028-W.mjs.map → branding-cygSBPkV.mjs.map} +1 -1
- package/dist/{claim-state-BTGInAaN.mjs → claim-state-DlfD6Res.mjs} +2 -2
- package/dist/{claim-state-BTGInAaN.mjs.map → claim-state-DlfD6Res.mjs.map} +1 -1
- package/dist/commands/apply.mjs +4 -4
- package/dist/commands/branding/eject.mjs +11 -32
- package/dist/commands/branding/eject.mjs.map +1 -1
- package/dist/commands/claim.mjs +3 -3
- package/dist/commands/doctor.mjs +41 -18
- package/dist/commands/doctor.mjs.map +1 -1
- package/dist/commands/eject.mjs +4 -4
- package/dist/commands/eject.mjs.map +1 -1
- package/dist/commands/logs.mjs +2 -2
- package/dist/commands/plan.mjs +4 -4
- package/dist/commands/reset.mjs +2 -2
- package/dist/commands/schemas/list.mjs +6 -6
- package/dist/commands/schemas/list.mjs.map +1 -1
- package/dist/commands/setup.mjs +101 -143
- package/dist/commands/setup.mjs.map +1 -1
- package/dist/commands/start.mjs +3 -3
- package/dist/commands/status.mjs +5 -5
- package/dist/commands/stop.mjs +3 -3
- package/dist/designs-Ckz18Dpo.mjs +38 -0
- package/dist/designs-Ckz18Dpo.mjs.map +1 -0
- package/dist/{docker-Ciz9N6uI.mjs → docker-DcRGTOJa.mjs} +4 -3
- package/dist/docker-DcRGTOJa.mjs.map +1 -0
- package/dist/{environment-CuHKxtIO.mjs → environment-rjRVkJjW.mjs} +1 -1
- package/dist/{environment-CuHKxtIO.mjs.map → environment-rjRVkJjW.mjs.map} +1 -1
- package/dist/{journey-guidance-CtQUfWar.mjs → journey-guidance-BGrOX_gT.mjs} +2 -2
- package/dist/{journey-guidance-CtQUfWar.mjs.map → journey-guidance-BGrOX_gT.mjs.map} +1 -1
- package/dist/{oclif-CL6-M13m.mjs → oclif-CanO3zdt.mjs} +48 -2
- package/dist/oclif-CanO3zdt.mjs.map +1 -0
- package/dist/{orca-BWB4zOdw.mjs → orca-Cu0iW1mv.mjs} +167 -26
- package/dist/orca-Cu0iW1mv.mjs.map +1 -0
- package/dist/package-manager-DFdLcDx1.mjs +194 -0
- package/dist/package-manager-DFdLcDx1.mjs.map +1 -0
- package/dist/{ports-Cu2Y7aXQ.mjs → ports-BM20XIZb.mjs} +2 -2
- package/dist/{ports-Cu2Y7aXQ.mjs.map → ports-BM20XIZb.mjs.map} +1 -1
- package/dist/{processes-Bn2WngOi.mjs → processes-DKHPkU8O.mjs} +1 -1
- package/dist/{processes-Bn2WngOi.mjs.map → processes-DKHPkU8O.mjs.map} +1 -1
- package/dist/{project-yejJSfdJ.mjs → project-CHhot85s.mjs} +2 -2
- package/dist/{project-yejJSfdJ.mjs.map → project-CHhot85s.mjs.map} +1 -1
- package/dist/{sync-Cx2_4rXW.mjs → sync-Bd6vASgg.mjs} +456 -31
- package/dist/sync-Bd6vASgg.mjs.map +1 -0
- package/dist/{user-schema-W1OsXdpc.mjs → user-schema-DTuOsdKE.mjs} +1 -1
- package/dist/{user-schema-W1OsXdpc.mjs.map → user-schema-DTuOsdKE.mjs.map} +1 -1
- package/oclif.manifest.json +2 -2
- package/package.json +6 -5
- package/dist/docker-Ciz9N6uI.mjs.map +0 -1
- package/dist/oclif-CL6-M13m.mjs.map +0 -1
- package/dist/orca-BWB4zOdw.mjs.map +0 -1
- package/dist/scaffold-manifest-CKNFLX9T.mjs +0 -81
- package/dist/scaffold-manifest-CKNFLX9T.mjs.map +0 -1
- package/dist/sync-Cx2_4rXW.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as parseJsonObject, E as ZitadelError, O as
|
|
1
|
+
import { A as npmDistTagForCliVersion, C as parseJsonObject, E as ZitadelError, O as normalizePublicCliJson, S as isObject, T as stableStringify, b as MANAGED_MARKER, j as publicCliCommand, n as DEFAULT_SERVER, w as setTopLevelJsonKey } from "./oclif-CanO3zdt.mjs";
|
|
2
2
|
import { access, chmod, mkdir, readFile, readdir, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
3
3
|
import { basename, dirname, join } from "node:path";
|
|
4
4
|
import semver from "semver";
|
|
@@ -94,12 +94,62 @@ function extractPort(script) {
|
|
|
94
94
|
if (rawEnvPort) return Number.parseInt(rawEnvPort, 10);
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
|
+
* Rewrites a `dev` script so it explicitly runs on `port`.
|
|
98
|
+
*
|
|
99
|
+
* Setup registers `http://localhost:<port>` as the project's only allowed
|
|
100
|
+
* origin, so the dev server has to land on exactly that port — a bare
|
|
101
|
+
* `next dev` does not: it defaults to 3000 and, when 3000 is taken, silently
|
|
102
|
+
* falls back to 3001. Either way the flow API then rejects the app's origin
|
|
103
|
+
* mid-login. An explicit `--port` removes both failure modes: the port
|
|
104
|
+
* matches what setup registered, and a busy port fails loudly with
|
|
105
|
+
* `EADDRINUSE` instead of drifting to one the project does not allow.
|
|
106
|
+
*
|
|
107
|
+
* `--port <n>` is the one spelling every framework this CLI scaffolds
|
|
108
|
+
* accepts (`next dev`, `nuxt dev`, `vite`, `vinxi dev`, `ng serve`), so an
|
|
109
|
+
* appended declaration stays framework-agnostic. An existing declaration is
|
|
110
|
+
* rewritten in its own form instead — a `PORT=` env assignment keeps the
|
|
111
|
+
* `PORT=` form — so the script keeps whichever mechanism its author chose and
|
|
112
|
+
* only the number changes.
|
|
113
|
+
*/
|
|
114
|
+
function withDevPort(script, port) {
|
|
115
|
+
const flagPattern = /(-p\s+|--port[=\s]+)\d+/;
|
|
116
|
+
if (flagPattern.test(script)) return script.replace(flagPattern, (_match, prefix) => `${prefix}${String(port)}`);
|
|
117
|
+
const envPattern = /((?:^|\s)PORT=)\d+/;
|
|
118
|
+
if (envPattern.test(script)) return script.replace(envPattern, (_match, prefix) => `${prefix}${String(port)}`);
|
|
119
|
+
return `${script.trimEnd()} --port ${String(port)}`;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
97
122
|
* Builds the local OIDC issuer URL for a given dev port. Centralized so the
|
|
98
123
|
* `localhost` origin convention is defined in exactly one place.
|
|
99
124
|
*/
|
|
100
125
|
function issuerFromPort(port) {
|
|
101
126
|
return `http://localhost:${port}`;
|
|
102
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* The port an issuer URL names, or `undefined` when it names none.
|
|
130
|
+
*
|
|
131
|
+
* The inverse of {@link issuerFromPort}, and the authoritative way to learn
|
|
132
|
+
* which port a project *registered* — as opposed to {@link detectDevPort},
|
|
133
|
+
* which reports the port the app would start on right now. The two agree
|
|
134
|
+
* during setup and diverge afterwards, which is exactly when it matters: a
|
|
135
|
+
* dev script edited to another port must be read as a mismatch against the
|
|
136
|
+
* registered origin, not as the new truth.
|
|
137
|
+
*/
|
|
138
|
+
function portFromIssuer(issuer) {
|
|
139
|
+
try {
|
|
140
|
+
new URL(issuer);
|
|
141
|
+
} catch {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
let probe;
|
|
145
|
+
try {
|
|
146
|
+
probe = new URL(issuer.replace(/^[a-zA-Z][a-zA-Z0-9+.-]*:/, "zl-issuer-probe:"));
|
|
147
|
+
} catch {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const port = Number.parseInt(probe.port, 10);
|
|
151
|
+
return Number.isFinite(port) && port > 0 ? port : void 0;
|
|
152
|
+
}
|
|
103
153
|
//#endregion
|
|
104
154
|
//#region src/lib/orca/detectors/angular.ts
|
|
105
155
|
/** The lowest Angular major the generated templates compile on. */
|
|
@@ -665,8 +715,9 @@ function agentsGuidanceSection(ctx) {
|
|
|
665
715
|
const apply = publicCliCommand("apply", ctx.cliVersion);
|
|
666
716
|
const passkeyVerifyNote = ctx.preset === "passkey-first" ? " Agents: automated browsers can't complete passkey ceremonies — verify the loop via the email/password fallback actions, or attach a CDP WebAuthn virtual authenticator." : "";
|
|
667
717
|
const jsxTypesNote = ctx.framework.id === "next" ? " React JSX types for the `<zitadel-*>` elements ship with the SDK — `custom-elements.d.ts` references `@zitadel/sdk-next/jsx`." : "";
|
|
668
|
-
const presentationParagraph = ctx.posture === "widget" ? "Presentation, by contrast, is edited in the generated pages: this app pre-dates setup, so they embed the sign-in widgets as `variant=\"widget\"` cards (with `theme=\"auto\"`) inside your existing layout; switch to `variant=\"page\"` for the widget's own full-page chrome, and set `theme` (`light` | `dark` | `auto`) to pick the color scheme." : "Presentation, by contrast, is edited in the generated pages: they pin the sign-in widgets to `variant=\"page\"` (full-page chrome); switch to `variant=\"widget\"` to embed a card inside your own layout, and set `theme` (`light` | `dark` | `auto`) to pick the color scheme.";
|
|
669
|
-
const
|
|
718
|
+
const presentationParagraph = ctx.posture === "widget" ? "Presentation, by contrast, is edited in the generated pages: this app pre-dates setup, so they embed the sign-in widgets as `variant=\"widget\"` cards (with `theme=\"auto\"`) inside your existing layout; switch to `variant=\"page\"` for the widget's own full-page chrome, and set `theme` (`light` | `dark` | `auto`) to pick the color scheme — `auto` follows the OS `prefers-color-scheme`, not this app's own theme, so pin `light` or `dark` when the app fixes its scheme." : "Presentation, by contrast, is edited in the generated pages: they pin the sign-in widgets to `variant=\"page\"` (full-page chrome); switch to `variant=\"widget\"` to embed a card inside your own layout, and set `theme` (`light` | `dark` | `auto`) to pick the color scheme — `auto` follows the OS `prefers-color-scheme`, not this app's own theme, so pin `light` or `dark` when the app fixes its scheme.";
|
|
719
|
+
const themingParagraph = "Theming the widgets from your app: `--zl-*` design-token custom properties set on the element in your own stylesheet pierce the widgets' shadow DOM. The bridge covers your fonts (`--zl-font-family-heading`, `--zl-font-family-sans`), radii (`--zl-radius-s`/`-m`/`-l`), the primary CTA pair (`--zl-primary` / `--zl-primary-foreground`), and the link color (`--zl-color-text-link`). When your page already carries the heading, set the `suppress-header` attribute on `<zitadel-login>` / `<zitadel-session>` (SDK wrappers: `suppressHeader`) to visually hide the widget's own heading block — it stays in the accessibility tree. Starter designs from `.zitadel/branding/` collapse their brand pane by container width, not viewport: an embedded card usually renders the compact brand mark instead (`logo_url`, else `hero_url`, from `branding.json`; the `hero` design falls back to editable text).";
|
|
720
|
+
const sessionStateParagraph = ctx.framework.id === "next" ? "Your app's own chrome (header navigation, account menus) reads session state with `getSession()` from `@zitadel/sdk-next/session` — a no-store client read of the same-origin `/__nextgen/sessions/me` that the session card itself uses. It returns identity only for 200 with a non-empty `user_id`, and signed-out only for the backend's canonical `401/auth.unauthorized` or `404/sess.not_found`; any other response is unknown/error, never signed-out. In Server Components on routes covered by the request-boundary `matcher`, `auth()` from `@zitadel/sdk-next/server` works too — extend the `matcher` in the request boundary to cover your public routes when you want server-rendered, flash-free session state in shared chrome (the trade: the middleware then runs on those routes). Sign-in and sign-out navigate (`post-sign-in-url` / `post-sign-out-url`), so chrome re-reads on the next page load without extra wiring." : ctx.framework.id === "nuxt" ? "Your app's own chrome (header navigation, account menus) reads session state with the auto-imported `useAuth()` composable — seeded from the server on every render by the scaffolded auth plugin. Sign-in and sign-out navigate (`post-sign-in-url` / `post-sign-out-url`), so the state is fresh on every page load." : "Your app's own chrome (header navigation, account menus) can read session state from the same-origin `/__nextgen/sessions/me` — the same server-answered read the session card performs. Fetch with `credentials: \"include\"`, `cache: \"no-store\"`, and `Accept: application/json`; treat 200 as signed-in only with a non-empty `user_id`, and signed-out only for the canonical error envelope `401/auth.unauthorized` or `404/sess.not_found`. Any other response is unknown/error, never signed-out. Sign-in and sign-out navigate (`post-sign-in-url` / `post-sign-out-url`), so chrome re-reads on the next page load.";
|
|
670
721
|
return `## Authentication (Zitadel)
|
|
671
722
|
|
|
672
723
|
This app's login is managed by Zitadel. Local config is the source of truth; never change auth behavior by editing generated route files.
|
|
@@ -685,6 +736,8 @@ The golden path:
|
|
|
685
736
|
|
|
686
737
|
${presentationParagraph}${jsxTypesNote}
|
|
687
738
|
|
|
739
|
+
${themingParagraph}
|
|
740
|
+
|
|
688
741
|
${sessionStateParagraph}
|
|
689
742
|
|
|
690
743
|
Machine-readable dialect (read these before authoring flow or schema edits):
|
|
@@ -1047,7 +1100,7 @@ var AbstractRulePatcher = class {
|
|
|
1047
1100
|
...metaSchemaFiles().map((file) => ({
|
|
1048
1101
|
kind: "write",
|
|
1049
1102
|
path: `${META_SCHEMA_DIR}/${file.name}`,
|
|
1050
|
-
contents: `${JSON.stringify(file.body, null, 2)}\n`
|
|
1103
|
+
contents: `${JSON.stringify(normalizePublicCliJson(file.body, ctx.cliVersion), null, 2)}\n`
|
|
1051
1104
|
})),
|
|
1052
1105
|
{
|
|
1053
1106
|
kind: "edit",
|
|
@@ -1606,6 +1659,73 @@ var AngularPatcher = class extends AbstractRulePatcher {
|
|
|
1606
1659
|
}
|
|
1607
1660
|
};
|
|
1608
1661
|
//#endregion
|
|
1662
|
+
//#region src/lib/orca/patchers/rule/dev-script-port.ts
|
|
1663
|
+
/**
|
|
1664
|
+
* Pins the `dev` script to the port setup registered as the project's origin.
|
|
1665
|
+
*
|
|
1666
|
+
* Setup allows exactly one origin, `http://localhost:<devPort>`, so the dev
|
|
1667
|
+
* server has to land on that port or the flow API rejects the app mid-login
|
|
1668
|
+
* (the first step renders, the first submit 400s with `origin ... is not
|
|
1669
|
+
* allowed for this project`). Every other framework this CLI patches already
|
|
1670
|
+
* guarantees that in its own dev-server config — Vite gets `server.port` plus
|
|
1671
|
+
* `strictPort`, Angular gets `serve.options.port` — but `next dev` and
|
|
1672
|
+
* `nuxt dev` take their port from the command line, so nothing held them to
|
|
1673
|
+
* it: they default to 3000 regardless of the port setup registered.
|
|
1674
|
+
*
|
|
1675
|
+
* For Next the flag also restores the guarantee `strictPort` gives Vite: bare
|
|
1676
|
+
* `next dev` silently serves 3001 when 3000 is taken (measured), while
|
|
1677
|
+
* `next dev --port N` exits with `EADDRINUSE` instead of drifting onto a port
|
|
1678
|
+
* the project does not allow.
|
|
1679
|
+
*
|
|
1680
|
+
* Non-destructive: a script already on the right port is returned unchanged
|
|
1681
|
+
* (so the op skips the file rather than reformatting a user's package.json),
|
|
1682
|
+
* and a project without a `dev` script is left alone because there is no
|
|
1683
|
+
* command to pin.
|
|
1684
|
+
*
|
|
1685
|
+
* Takes the project's registered `issuer` rather than a port, because the
|
|
1686
|
+
* expected value has to survive the app drifting away from it. `doctor`
|
|
1687
|
+
* rebuilds this plan from `loadPatchContext`, whose `framework.devPort` is
|
|
1688
|
+
* freshly *detected* from the current script — deriving the target from that
|
|
1689
|
+
* would make any edited script verify against itself (always "applied") and
|
|
1690
|
+
* would make `doctor --fix` write back the detected fallback instead of the
|
|
1691
|
+
* port the project actually allows. The issuer comes from `zitadel.json`
|
|
1692
|
+
* (falling back to the scaffold manifest), so it still says 3456 after
|
|
1693
|
+
* someone edits the script to 4000. An issuer that names no port yields no
|
|
1694
|
+
* expectation and the op becomes a no-op.
|
|
1695
|
+
*/
|
|
1696
|
+
function devScriptPortEdit(issuer) {
|
|
1697
|
+
return (source) => {
|
|
1698
|
+
if (source === void 0) throw new ZitadelError("E_VALIDATION", "package.json is required to pin the dev port", { hint: "Run setup from a project that has a package.json." });
|
|
1699
|
+
const devPort = portFromIssuer(issuer);
|
|
1700
|
+
if (devPort === void 0) return source;
|
|
1701
|
+
const pkg = parseJsonObject(source, "package.json");
|
|
1702
|
+
const scripts = isObject(pkg.scripts) ? pkg.scripts : void 0;
|
|
1703
|
+
const dev = scripts?.dev;
|
|
1704
|
+
if (typeof dev !== "string" || dev.trim() === "") return source;
|
|
1705
|
+
if (extractPort(dev) === devPort) return source;
|
|
1706
|
+
return setTopLevelJsonKey(source, "package.json", "scripts", {
|
|
1707
|
+
...scripts,
|
|
1708
|
+
dev: withDevPort(dev, devPort)
|
|
1709
|
+
});
|
|
1710
|
+
};
|
|
1711
|
+
}
|
|
1712
|
+
/**
|
|
1713
|
+
* The `package.json` op pinning the dev script's port. Marked as managed
|
|
1714
|
+
* wiring so `doctor` reports a dev script that drifted off the registered
|
|
1715
|
+
* origin — `convenience` (warn, not fail) because the script is only one of
|
|
1716
|
+
* the ways a dev server picks its port: `npm run dev -- --port 4000` still
|
|
1717
|
+
* moves it without touching the file, so a hard failure here would promise a
|
|
1718
|
+
* guarantee the check cannot make.
|
|
1719
|
+
*/
|
|
1720
|
+
function devScriptPortOp(issuer) {
|
|
1721
|
+
return {
|
|
1722
|
+
kind: "edit",
|
|
1723
|
+
path: "package.json",
|
|
1724
|
+
edit: devScriptPortEdit(issuer),
|
|
1725
|
+
wiring: "convenience"
|
|
1726
|
+
};
|
|
1727
|
+
}
|
|
1728
|
+
//#endregion
|
|
1609
1729
|
//#region src/lib/orca/patchers/rule/next/renderers/lit/index.ts
|
|
1610
1730
|
/**
|
|
1611
1731
|
* Placeholder renderer for the `<zitadel-flow>` Lit web component. Declared
|
|
@@ -1754,11 +1874,16 @@ const ${elementName} = dynamic(
|
|
|
1754
1874
|
);
|
|
1755
1875
|
|
|
1756
1876
|
export default function ${componentName}() {
|
|
1757
|
-
${widget ? ` // variant="widget" embeds the sign-in card in this app's existing layout
|
|
1758
|
-
//
|
|
1759
|
-
//
|
|
1760
|
-
//
|
|
1761
|
-
//
|
|
1877
|
+
${widget ? ` // variant="widget" embeds the sign-in card in this app's existing layout.
|
|
1878
|
+
// theme="auto" follows the OS light/dark preference (prefers-color-scheme),
|
|
1879
|
+
// not this app's own theme — set theme="light" or theme="dark" to match an
|
|
1880
|
+
// app that pins its scheme. The wrapper below only centers the card —
|
|
1881
|
+
// restyle or replace it freely. Switch to variant="page" for the widget's
|
|
1882
|
+
// own full-page chrome (viewport height, surface background from design
|
|
1883
|
+
// tokens).
|
|
1884
|
+
// If this page already carries its own heading, add suppress-header to the
|
|
1885
|
+
// element to visually hide the widget's heading block — it stays in the
|
|
1886
|
+
// accessibility tree, and the card keeps no blank header band.` : ` // variant="page" makes the widget paint the full-page chrome itself
|
|
1762
1887
|
// (viewport height, surface background) from design tokens; switch to
|
|
1763
1888
|
// variant="widget" to embed the sign-in card inside a layout you own.`}
|
|
1764
1889
|
return (
|
|
@@ -1803,11 +1928,16 @@ const ZitadelSession = dynamic(
|
|
|
1803
1928
|
);
|
|
1804
1929
|
|
|
1805
1930
|
export default function ProfilePage() {
|
|
1806
|
-
${widget ? ` // variant="widget" embeds the session card in this app's existing layout
|
|
1807
|
-
//
|
|
1808
|
-
//
|
|
1809
|
-
//
|
|
1810
|
-
//
|
|
1931
|
+
${widget ? ` // variant="widget" embeds the session card in this app's existing layout.
|
|
1932
|
+
// theme="auto" follows the OS light/dark preference (prefers-color-scheme),
|
|
1933
|
+
// not this app's own theme — set theme="light" or theme="dark" to match an
|
|
1934
|
+
// app that pins its scheme. The wrapper below only centers the card —
|
|
1935
|
+
// restyle or replace it freely. Switch to variant="page" for the card's
|
|
1936
|
+
// own full-page chrome (viewport height, surface background from design
|
|
1937
|
+
// tokens).
|
|
1938
|
+
// If this page already carries its own heading, add suppress-header to the
|
|
1939
|
+
// element to visually hide the widget's heading block — it stays in the
|
|
1940
|
+
// accessibility tree, and the card keeps no blank header band.` : ` // variant="page" makes the session card paint the full-page chrome itself
|
|
1811
1941
|
// (viewport height, surface background) from design tokens; switch to
|
|
1812
1942
|
// variant="widget" to embed the card inside a layout you own.`}
|
|
1813
1943
|
return (
|
|
@@ -1930,6 +2060,9 @@ var NextPatcher = class extends AbstractRulePatcher {
|
|
|
1930
2060
|
routeDeps(view) {
|
|
1931
2061
|
return [getRenderer(view.rendererId).dependency.name];
|
|
1932
2062
|
}
|
|
2063
|
+
routeConfigEdits(_view) {
|
|
2064
|
+
return ["package.json"];
|
|
2065
|
+
}
|
|
1933
2066
|
summary(ctx) {
|
|
1934
2067
|
return {
|
|
1935
2068
|
title: "Next.js integration",
|
|
@@ -2032,7 +2165,8 @@ function nextCodeOps(ctx, renderer) {
|
|
|
2032
2165
|
kind: "add-dep",
|
|
2033
2166
|
name: renderer.dependency.name,
|
|
2034
2167
|
version: dependencyVersionForCli(ctx.cliVersion, renderer.dependency.version)
|
|
2035
|
-
}
|
|
2168
|
+
},
|
|
2169
|
+
devScriptPortOp(ctx.issuer)
|
|
2036
2170
|
].filter((op) => op !== void 0);
|
|
2037
2171
|
}
|
|
2038
2172
|
function homePageTemplate() {
|
|
@@ -2211,9 +2345,12 @@ const project = useZitadelProject();
|
|
|
2211
2345
|
<template>
|
|
2212
2346
|
${widget ? "<div style=\"display: flex; justify-content: center; padding: 4rem 1rem\">" : "<main style=\"color-scheme: dark\">"}
|
|
2213
2347
|
<ClientOnly>
|
|
2214
|
-
${widget ? `<!-- variant="widget" embeds the card in this app's own layout
|
|
2215
|
-
theme="auto" follows
|
|
2216
|
-
|
|
2348
|
+
${widget ? `<!-- variant="widget" embeds the card in this app's own layout.
|
|
2349
|
+
theme="auto" follows the OS light/dark preference
|
|
2350
|
+
(prefers-color-scheme), not the app's own theme — set
|
|
2351
|
+
theme="light" or theme="dark" to match an app that pins its
|
|
2352
|
+
scheme. variant="page" would paint the widget's full-page
|
|
2353
|
+
chrome instead. -->` : `<!-- variant="page" paints the widget's full-page chrome from design
|
|
2217
2354
|
tokens; variant="widget" embeds the card inside a layout you own. -->`}
|
|
2218
2355
|
<zitadel-login
|
|
2219
2356
|
${widget ? "variant=\"widget\"\n theme=\"auto\"" : "variant=\"page\""}
|
|
@@ -2235,11 +2372,14 @@ function registerPageTemplate(ctx) {
|
|
|
2235
2372
|
function profilePageTemplate(ctx) {
|
|
2236
2373
|
const widget = ctx.posture === "widget";
|
|
2237
2374
|
const variantAttrs = widget ? "variant=\"widget\"\n theme=\"auto\"" : "variant=\"page\"";
|
|
2238
|
-
const postureComment = widget ? `<!-- variant="widget" embeds the session card in this app's own layout
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2375
|
+
const postureComment = widget ? `<!-- variant="widget" embeds the session card in this app's own layout.
|
|
2376
|
+
theme="auto" follows the OS light/dark preference
|
|
2377
|
+
(prefers-color-scheme), not the app's own theme — set
|
|
2378
|
+
theme="light" or theme="dark" to match an app that pins its
|
|
2379
|
+
scheme. variant="page" would paint the card's full-page chrome
|
|
2380
|
+
instead. Your own components (a header, an account menu) read
|
|
2381
|
+
the same session state with the auto-imported useAuth()
|
|
2382
|
+
composable. -->` : `<!-- variant="page" paints the session card's full-page chrome from design
|
|
2243
2383
|
tokens; variant="widget" embeds the card inside a layout you own.
|
|
2244
2384
|
Your own components (a header, an account menu) read the same session
|
|
2245
2385
|
state with the auto-imported useAuth() composable. -->`;
|
|
@@ -2381,7 +2521,8 @@ var NuxtPatcher = class extends AbstractRulePatcher {
|
|
|
2381
2521
|
kind: "add-dep",
|
|
2382
2522
|
name: SDK_DEPENDENCY$5,
|
|
2383
2523
|
version: npmDistTagForCliVersion(ctx.cliVersion)
|
|
2384
|
-
}
|
|
2524
|
+
},
|
|
2525
|
+
devScriptPortOp(ctx.issuer)
|
|
2385
2526
|
];
|
|
2386
2527
|
}
|
|
2387
2528
|
routeFiles(view) {
|
|
@@ -2408,7 +2549,7 @@ var NuxtPatcher = class extends AbstractRulePatcher {
|
|
|
2408
2549
|
return [SDK_DEPENDENCY$5];
|
|
2409
2550
|
}
|
|
2410
2551
|
routeConfigEdits(_view) {
|
|
2411
|
-
return ["nuxt.config.*"];
|
|
2552
|
+
return ["nuxt.config.*", "package.json"];
|
|
2412
2553
|
}
|
|
2413
2554
|
summary(_ctx) {
|
|
2414
2555
|
return {
|
|
@@ -3773,4 +3914,4 @@ function isErrno(error, code) {
|
|
|
3773
3914
|
//#endregion
|
|
3774
3915
|
export { AGENTS_HEADER as a, RENDERER_IDS as i, inspectScaffoldTarget as n, removeGuidanceSection as o, AVAILABLE_RENDERER_IDS as r, issuerFromPort as s, createOrca as t };
|
|
3775
3916
|
|
|
3776
|
-
//# sourceMappingURL=orca-
|
|
3917
|
+
//# sourceMappingURL=orca-Cu0iW1mv.mjs.map
|