eddev 2.0.0-beta.45 → 2.0.0-beta.46

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.
@@ -8,7 +8,7 @@ import { MetaTags } from "./MetaTags.js";
8
8
  import { useSnapshot } from "valtio";
9
9
  import { clientMetaTags } from "../lib/routing/context.js";
10
10
  export function SSRClientRoot(props) {
11
- return (_jsxs("html", { lang: "en", children: [_jsxs("head", { children: [_jsx("link", { rel: "icon", href: "/favicon.ico" }), _jsx(DynamicMetaTags, { tags: props.metaTags }), _jsx(Trackers, { position: "head" }), props.assets] }), _jsxs("body", { children: [_jsx(Trackers, { position: "body" }), _jsxs(QueryClientProvider, { client: getQueryClient(), children: [_jsx(Suspense, { children: _jsx(BrowserRouter, {}) }), _jsx(DevUILoader, {})] }), _jsx(Trackers, { position: "footer" })] })] }));
11
+ return (_jsxs("html", { lang: "en", children: [_jsxs("head", { children: [_jsx(DynamicMetaTags, { tags: props.metaTags }), _jsx(Trackers, { position: "head" }), props.assets] }), _jsxs("body", { children: [_jsx(Trackers, { position: "body" }), _jsxs(QueryClientProvider, { client: getQueryClient(), children: [_jsx(Suspense, { children: _jsx(BrowserRouter, {}) }), _jsx(DevUILoader, {})] }), _jsx(Trackers, { position: "footer" })] })] }));
12
12
  }
13
13
  function DynamicMetaTags(props) {
14
14
  const dynamicTags = useSnapshot(clientMetaTags).tags;
@@ -9,7 +9,7 @@ export function SSRRoot(props) {
9
9
  const loader = props.loader;
10
10
  loader.setAppData(props.initialData.appData.data);
11
11
  loader.populateRouteData(props.pathname, props.initialData);
12
- return (_jsxs("html", { lang: "en", children: [_jsxs("head", { children: [_jsx("link", { rel: "icon", href: "/favicon.ico" }), _jsx(MetaTags, { tags: props.metaTags }), props.assets] }), _jsx("body", { children: _jsx(QueryClientProvider, { client: getQueryClient(), children: _jsx(Suspense, { children: _jsx(SSRRouter, { loader: loader, route: normalizeRoute({
12
+ return (_jsxs("html", { lang: "en", children: [_jsxs("head", { children: [_jsx(MetaTags, { tags: props.metaTags }), props.assets] }), _jsx("body", { children: _jsx(QueryClientProvider, { client: getQueryClient(), children: _jsx(Suspense, { children: _jsx(SSRRouter, { loader: loader, route: normalizeRoute({
13
13
  id: "initial",
14
14
  component: loader.getRouteComponent(props.initialData.view),
15
15
  key: "",
@@ -1 +1 @@
1
- export declare const VERSION = "2.0.0-beta.45";
1
+ export declare const VERSION = "2.0.0-beta.46";
@@ -1 +1 @@
1
- export const VERSION = "2.0.0-beta.45";
1
+ export const VERSION = "2.0.0-beta.46";
@@ -25,6 +25,14 @@ export function createVinxiApp(args) {
25
25
  varies: [],
26
26
  },
27
27
  },
28
+ "/favicon**": {
29
+ proxy: joinURL(args.origin, "**"),
30
+ static: true,
31
+ cache: {
32
+ maxAge: 3600,
33
+ varies: [],
34
+ },
35
+ },
28
36
  "/wp-content/plugins/**": {
29
37
  proxy: joinURL(args.origin, "wp-content/plugins/**"),
30
38
  headers: {
@@ -5,31 +5,25 @@ export declare const EDConfigSchema: z.ZodObject<{
5
5
  version: z.ZodEffects<z.ZodEnum<["1", "2"]>, "2", "1" | "2">;
6
6
  legacyMetadata: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
7
7
  legacyStitches: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8
- tracking: z.ZodOptional<z.ZodObject<{
9
- tagManagerID: z.ZodOptional<z.ZodString>;
10
- ga: z.ZodOptional<z.ZodObject<{
11
- trackingID: z.ZodOptional<z.ZodString>;
12
- version: z.ZodEnum<["3", "4"]>;
13
- }, "strip", z.ZodTypeAny, {
14
- version: "3" | "4";
15
- trackingID?: string | undefined;
16
- }, {
17
- version: "3" | "4";
18
- trackingID?: string | undefined;
19
- }>>;
8
+ trackers: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"provider", [z.ZodObject<{
9
+ provider: z.ZodLiteral<"ga4">;
10
+ id: z.ZodString;
20
11
  }, "strip", z.ZodTypeAny, {
21
- tagManagerID?: string | undefined;
22
- ga?: {
23
- version: "3" | "4";
24
- trackingID?: string | undefined;
25
- } | undefined;
12
+ provider: "ga4";
13
+ id: string;
26
14
  }, {
27
- tagManagerID?: string | undefined;
28
- ga?: {
29
- version: "3" | "4";
30
- trackingID?: string | undefined;
31
- } | undefined;
32
- }>>;
15
+ provider: "ga4";
16
+ id: string;
17
+ }>, z.ZodObject<{
18
+ provider: z.ZodLiteral<"gtm">;
19
+ id: z.ZodString;
20
+ }, "strip", z.ZodTypeAny, {
21
+ provider: "gtm";
22
+ id: string;
23
+ }, {
24
+ provider: "gtm";
25
+ id: string;
26
+ }>]>, "many">>;
33
27
  serverless: z.ZodObject<{
34
28
  enabled: z.ZodDefault<z.ZodBoolean>;
35
29
  uploads: z.ZodEnum<["proxy", "remote"]>;
@@ -85,13 +79,13 @@ export declare const EDConfigSchema: z.ZodObject<{
85
79
  };
86
80
  devUI: "enabled" | "disabled";
87
81
  $schema?: string | undefined;
88
- tracking?: {
89
- tagManagerID?: string | undefined;
90
- ga?: {
91
- version: "3" | "4";
92
- trackingID?: string | undefined;
93
- } | undefined;
94
- } | undefined;
82
+ trackers?: ({
83
+ provider: "ga4";
84
+ id: string;
85
+ } | {
86
+ provider: "gtm";
87
+ id: string;
88
+ })[] | undefined;
95
89
  cache?: Record<string, {
96
90
  props: number;
97
91
  queries: number;
@@ -111,13 +105,13 @@ export declare const EDConfigSchema: z.ZodObject<{
111
105
  $schema?: string | undefined;
112
106
  legacyMetadata?: boolean | undefined;
113
107
  legacyStitches?: boolean | undefined;
114
- tracking?: {
115
- tagManagerID?: string | undefined;
116
- ga?: {
117
- version: "3" | "4";
118
- trackingID?: string | undefined;
119
- } | undefined;
120
- } | undefined;
108
+ trackers?: ({
109
+ provider: "ga4";
110
+ id: string;
111
+ } | {
112
+ provider: "gtm";
113
+ id: string;
114
+ })[] | undefined;
121
115
  cache?: Record<string, {
122
116
  props: number;
123
117
  queries: number;
@@ -15,16 +15,18 @@ export const EDConfigSchema = z.object({
15
15
  .default(false)
16
16
  .describe("Whether to use legacy comments or exported JSON for block and view metadata"),
17
17
  legacyStitches: z.boolean().optional().default(true).describe("Whether this site is using Stitches"),
18
- tracking: z
19
- .object({
20
- tagManagerID: z.string().optional(),
21
- ga: z
22
- .object({
23
- trackingID: z.string().optional(),
24
- version: z.enum(["3", "4"]),
25
- })
26
- .optional(),
27
- })
18
+ trackers: z
19
+ .array(z.discriminatedUnion("provider", [
20
+ z.object({
21
+ provider: z.literal("ga4"),
22
+ id: z.string().describe("The Google Analytics 4 tracking ID"),
23
+ }),
24
+ z.object({
25
+ provider: z.literal("gtm"),
26
+ id: z.string().describe("The Google Tag Manager project ID (eg. GTM-XXXXXXX)"),
27
+ }),
28
+ ]))
29
+ .describe("An array of standard tracking codes to embed")
28
30
  .optional(),
29
31
  serverless: z.object({
30
32
  enabled: z.boolean().default(true).describe("Whether to deploy the site as a serverless app"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eddev",
3
- "version": "2.0.0-beta.45",
3
+ "version": "2.0.0-beta.46",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",