@lukoweb/apitogo 0.2.30 → 0.2.34
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/cli/cli.js +794 -248
- package/dist/declarations/app/entry.server.d.ts +2 -2
- package/dist/declarations/app/main.d.ts +3 -1
- package/dist/declarations/cli/platform/client/platform-api.d.ts +16 -5
- package/dist/declarations/cli/platform/helpers/deploy-artifact-hash.d.ts +1 -1
- package/dist/declarations/cli/platform/helpers/package-files.d.ts +1 -1
- package/dist/declarations/cli/platform/helpers/platform-plan.d.ts +1 -1
- package/dist/declarations/cli/platform/helpers/zip.d.ts +1 -1
- package/dist/declarations/cli/platform/tools/infrastructure.d.ts +0 -4
- package/dist/declarations/config/effective-redirects.d.ts +6 -0
- package/dist/declarations/config/header-navigation-guard.d.ts +2 -0
- package/dist/declarations/config/resolve-modules.d.ts +1 -4
- package/dist/declarations/config/validators/HeaderNavigationSchema.d.ts +1 -2
- package/docs/cli/commands.md +151 -75
- package/docs/cli/go-live.md +135 -123
- package/docs/cli/walkthrough.md +40 -1
- package/docs/configuration/gateway.md +52 -0
- package/docs/guides/customer-account.md +33 -2
- package/docs/mcp/tools.md +101 -102
- package/package.json +2 -1
- package/src/app/demo.tsx +78 -77
- package/src/app/entry.client.tsx +115 -107
- package/src/app/entry.server.tsx +164 -160
- package/src/app/main.tsx +175 -167
- package/src/app/standalone.tsx +61 -60
- package/src/config/effective-redirects.ts +31 -0
- package/src/config/header-navigation-guard.ts +13 -0
- package/src/config/resolve-modules.ts +331 -354
- package/src/config/v2/home-redirect.ts +104 -98
- package/src/config/v2/index.ts +127 -126
- package/src/config/v2/ledger.ts +242 -235
- package/src/config/v2/resolve.ts +12 -4
- package/src/config/v2/rules.ts +716 -714
- package/src/config/v2/services.ts +799 -663
- package/src/config/v2/workspace.ts +17 -1
- package/src/config/validators/HeaderNavigationSchema.ts +42 -44
- package/src/lib/assets/powered-by-icon.png +0 -0
- package/src/lib/authentication/providers/dev-portal-auth-pages.tsx +667 -602
- package/src/lib/authentication/providers/dev-portal.tsx +476 -448
- package/src/lib/components/HeaderNavigation.tsx +176 -176
- package/src/lib/components/MobileTopNavigation.tsx +283 -283
- package/src/lib/components/navigation/PoweredByZudoku.tsx +42 -39
- package/src/vite/plugin-offroot-resolve.ts +68 -67
- package/src/vite/prerender/prerender.ts +242 -242
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
|
-
import { access, lstat, readFile, rm } from "node:fs/promises";
|
|
2
|
+
import { access, lstat, readFile, rm, writeFile } from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { glob } from "glob";
|
|
5
5
|
import { ensureStateDir } from "./layout.js";
|
|
@@ -24,6 +24,21 @@ async function relink(target: string, link: string): Promise<void> {
|
|
|
24
24
|
await linkDirectory(target, link);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* `generated/` is an ES-module package of its own. The build's output is ES modules, and Vite names the server files
|
|
29
|
+
* `.js` or `.mjs` and Node reads them as modules or not by the nearest `package.json`. Without this file that is the
|
|
30
|
+
* tenant's, which has no `"type": "module"` in many projects (a CommonJS project, or the embedded layout), and then
|
|
31
|
+
* the build failed with "Could not find server config output file".
|
|
32
|
+
*/
|
|
33
|
+
const GENERATED_PACKAGE_JSON = '{\n "private": true,\n "type": "module"\n}\n';
|
|
34
|
+
|
|
35
|
+
async function writeGeneratedPackageJson(root: string): Promise<void> {
|
|
36
|
+
const file = path.join(root, "package.json");
|
|
37
|
+
const current = await readFile(file, "utf8").catch(() => undefined);
|
|
38
|
+
if (current !== GENERATED_PACKAGE_JSON)
|
|
39
|
+
await writeFile(file, GENERATED_PACKAGE_JSON, "utf8");
|
|
40
|
+
}
|
|
41
|
+
|
|
27
42
|
/**
|
|
28
43
|
* Makes `generated/` a self-contained site root the existing build can run in: the wrapper, an empty site
|
|
29
44
|
* config, and links to the tenant's files. Tenant files are linked, never copied, edited or patched.
|
|
@@ -34,6 +49,7 @@ export async function materializeWorkspace(
|
|
|
34
49
|
): Promise<string> {
|
|
35
50
|
const root = path.dirname(prepared.wrapperPath);
|
|
36
51
|
await ensureStateDir(resolved.state);
|
|
52
|
+
await writeGeneratedPackageJson(root);
|
|
37
53
|
await relink(resolved.configDir, path.join(root, CONTENT_LINK));
|
|
38
54
|
const publicDir = resolved.portal && path.join(resolved.portal.dir, "public");
|
|
39
55
|
const publicLink = path.join(root, "public");
|
|
@@ -1,44 +1,42 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { IconNames } from "./icon-types.js";
|
|
3
|
-
import { DisplaySchema } from "./InputNavigationSchema.js";
|
|
4
|
-
|
|
5
|
-
const IconSchema = z.enum(IconNames);
|
|
6
|
-
|
|
7
|
-
const HeaderNavLinkItemSchema = z.object({
|
|
8
|
-
label: z.string(),
|
|
9
|
-
icon: IconSchema.optional(),
|
|
10
|
-
description: z.string().optional(),
|
|
11
|
-
to: z.string(),
|
|
12
|
-
target: z.enum(["_self", "_blank"]).optional(),
|
|
13
|
-
display: DisplaySchema,
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
const HeaderNavGroupSchema = z.object({
|
|
17
|
-
label: z.string(),
|
|
18
|
-
items: z.array(HeaderNavLinkItemSchema),
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
const HeaderNavItemSchema = z.union([
|
|
22
|
-
z.object({
|
|
23
|
-
label: z.string(),
|
|
24
|
-
icon: IconSchema.optional(),
|
|
25
|
-
to: z.string(),
|
|
26
|
-
target: z.enum(["_self", "_blank"]).optional(),
|
|
27
|
-
display: DisplaySchema,
|
|
28
|
-
}),
|
|
29
|
-
z.object({
|
|
30
|
-
label: z.string(),
|
|
31
|
-
items: z.array(z.union([HeaderNavLinkItemSchema, HeaderNavGroupSchema])),
|
|
32
|
-
}),
|
|
33
|
-
]);
|
|
34
|
-
|
|
35
|
-
export const HeaderNavigationSchema = z.array(HeaderNavItemSchema);
|
|
36
|
-
|
|
37
|
-
export
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
export type
|
|
42
|
-
export type
|
|
43
|
-
export type HeaderNavItem = z.infer<typeof HeaderNavItemSchema>;
|
|
44
|
-
export type HeaderNavigation = z.infer<typeof HeaderNavigationSchema>;
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { IconNames } from "./icon-types.js";
|
|
3
|
+
import { DisplaySchema } from "./InputNavigationSchema.js";
|
|
4
|
+
|
|
5
|
+
const IconSchema = z.enum(IconNames);
|
|
6
|
+
|
|
7
|
+
const HeaderNavLinkItemSchema = z.object({
|
|
8
|
+
label: z.string(),
|
|
9
|
+
icon: IconSchema.optional(),
|
|
10
|
+
description: z.string().optional(),
|
|
11
|
+
to: z.string(),
|
|
12
|
+
target: z.enum(["_self", "_blank"]).optional(),
|
|
13
|
+
display: DisplaySchema,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const HeaderNavGroupSchema = z.object({
|
|
17
|
+
label: z.string(),
|
|
18
|
+
items: z.array(HeaderNavLinkItemSchema),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const HeaderNavItemSchema = z.union([
|
|
22
|
+
z.object({
|
|
23
|
+
label: z.string(),
|
|
24
|
+
icon: IconSchema.optional(),
|
|
25
|
+
to: z.string(),
|
|
26
|
+
target: z.enum(["_self", "_blank"]).optional(),
|
|
27
|
+
display: DisplaySchema,
|
|
28
|
+
}),
|
|
29
|
+
z.object({
|
|
30
|
+
label: z.string(),
|
|
31
|
+
items: z.array(z.union([HeaderNavLinkItemSchema, HeaderNavGroupSchema])),
|
|
32
|
+
}),
|
|
33
|
+
]);
|
|
34
|
+
|
|
35
|
+
export const HeaderNavigationSchema = z.array(HeaderNavItemSchema);
|
|
36
|
+
|
|
37
|
+
export { isHeaderNavGroup } from "../header-navigation-guard.js";
|
|
38
|
+
|
|
39
|
+
export type HeaderNavLinkItem = z.infer<typeof HeaderNavLinkItemSchema>;
|
|
40
|
+
export type HeaderNavGroup = z.infer<typeof HeaderNavGroupSchema>;
|
|
41
|
+
export type HeaderNavItem = z.infer<typeof HeaderNavItemSchema>;
|
|
42
|
+
export type HeaderNavigation = z.infer<typeof HeaderNavigationSchema>;
|
|
Binary file
|