eddev 0.2.10 → 0.2.13

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.
@@ -23,11 +23,8 @@ function NextRouter(_a) {
23
23
  var setIsLoading = (0, hooks_1.usePageLoad)(function (s) { return s.setIsLoading; });
24
24
  var route = __assign(__assign({}, nextRoute), { pathname: nextRoute.asPath });
25
25
  (0, react_1.useEffect)(function () {
26
- router_1.Router.events.on("routeChangeStart", function () {
27
- console.log("Loading");
28
- setIsLoading(true);
29
- });
30
- router_1.Router.events.on("routeChangeStart", function () { return setIsLoading(false); });
26
+ router_1.Router.events.on("routeChangeStart", function () { return setIsLoading(true); });
27
+ router_1.Router.events.on("routeChangeComplete", function () { return setIsLoading(false); });
31
28
  router_1.Router.events.on("routeChangeError", function () { return setIsLoading(false); });
32
29
  }, []);
33
30
  return ((0, jsx_runtime_1.jsx)(routing_1.RouterRoot, __assign({ url: nextRoute.asPath, data: data, onNavigateRequest: function (url) {
@@ -19,7 +19,7 @@ export declare const EDConfigSchema: z.ZodObject<{
19
19
  enabled: boolean;
20
20
  uploads: "proxy" | "remote";
21
21
  plugins: "proxy" | "remote";
22
- theme: "proxy" | "remote" | "copy";
22
+ theme: "copy" | "proxy" | "remote";
23
23
  endpoints: Record<string, string>;
24
24
  }, {
25
25
  themeAssets?: string[] | undefined;
@@ -29,7 +29,7 @@ export declare const EDConfigSchema: z.ZodObject<{
29
29
  enabled: boolean;
30
30
  uploads: "proxy" | "remote";
31
31
  plugins: "proxy" | "remote";
32
- theme: "proxy" | "remote" | "copy";
32
+ theme: "copy" | "proxy" | "remote";
33
33
  endpoints: Record<string, string>;
34
34
  }>>;
35
35
  cache: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -53,7 +53,7 @@ export declare const EDConfigSchema: z.ZodObject<{
53
53
  enabled: boolean;
54
54
  uploads: "proxy" | "remote";
55
55
  plugins: "proxy" | "remote";
56
- theme: "proxy" | "remote" | "copy";
56
+ theme: "copy" | "proxy" | "remote";
57
57
  endpoints: Record<string, string>;
58
58
  } | undefined;
59
59
  cache?: Record<string, {
@@ -71,7 +71,7 @@ export declare const EDConfigSchema: z.ZodObject<{
71
71
  enabled: boolean;
72
72
  uploads: "proxy" | "remote";
73
73
  plugins: "proxy" | "remote";
74
- theme: "proxy" | "remote" | "copy";
74
+ theme: "copy" | "proxy" | "remote";
75
75
  endpoints: Record<string, string>;
76
76
  } | undefined;
77
77
  cache?: Record<string, {
@@ -8,7 +8,7 @@ export declare function getEDConfig(dir?: string): import("zod").SafeParseReturn
8
8
  enabled: boolean;
9
9
  uploads: "proxy" | "remote";
10
10
  plugins: "proxy" | "remote";
11
- theme: "proxy" | "remote" | "copy";
11
+ theme: "copy" | "proxy" | "remote";
12
12
  endpoints: Record<string, string>;
13
13
  } | undefined;
14
14
  cache?: Record<string, {
@@ -26,7 +26,7 @@ export declare function getEDConfig(dir?: string): import("zod").SafeParseReturn
26
26
  enabled: boolean;
27
27
  uploads: "proxy" | "remote";
28
28
  plugins: "proxy" | "remote";
29
- theme: "proxy" | "remote" | "copy";
29
+ theme: "copy" | "proxy" | "remote";
30
30
  endpoints: Record<string, string>;
31
31
  } | undefined;
32
32
  cache?: Record<string, {
@@ -45,7 +45,7 @@ export declare function getEDConfigUnwrapped(dir?: string): {
45
45
  enabled: boolean;
46
46
  uploads: "proxy" | "remote";
47
47
  plugins: "proxy" | "remote";
48
- theme: "proxy" | "remote" | "copy";
48
+ theme: "copy" | "proxy" | "remote";
49
49
  endpoints: Record<string, string>;
50
50
  } | undefined;
51
51
  cache?: Record<string, {
@@ -8,7 +8,7 @@ export declare function parseConfig(config: any): import("zod").SafeParseReturnT
8
8
  enabled: boolean;
9
9
  uploads: "proxy" | "remote";
10
10
  plugins: "proxy" | "remote";
11
- theme: "proxy" | "remote" | "copy";
11
+ theme: "copy" | "proxy" | "remote";
12
12
  endpoints: Record<string, string>;
13
13
  } | undefined;
14
14
  cache?: Record<string, {
@@ -26,7 +26,7 @@ export declare function parseConfig(config: any): import("zod").SafeParseReturnT
26
26
  enabled: boolean;
27
27
  uploads: "proxy" | "remote";
28
28
  plugins: "proxy" | "remote";
29
- theme: "proxy" | "remote" | "copy";
29
+ theme: "copy" | "proxy" | "remote";
30
30
  endpoints: Record<string, string>;
31
31
  } | undefined;
32
32
  cache?: Record<string, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eddev",
3
- "version": "0.2.10",
3
+ "version": "0.2.13",
4
4
  "main": "./index.js",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -13,6 +13,18 @@ module.exports = (() => {
13
13
  rewrites() {
14
14
  return {
15
15
  afterFiles: [
16
+ {
17
+ source: "/sitemap.xml",
18
+ destination: process.env.SITE_URL + "/sitemap.xml",
19
+ },
20
+ {
21
+ source: "/:path*-sitemap.xml",
22
+ destination: process.env.SITE_URL + "/:path*-sitemap.xml",
23
+ },
24
+ settings.serverless.uploads === "proxy" && {
25
+ source: "/wp-content/uploads/:path*",
26
+ destination: process.env.SITE_URL + "/wp-content/uploads/:path*",
27
+ },
16
28
  settings.serverless.uploads === "proxy" && {
17
29
  source: "/wp-content/uploads/:path*",
18
30
  destination: process.env.SITE_URL + "/wp-content/uploads/:path*",
@@ -1,3 +1,4 @@
1
+ import settings from "_utils/ed-config"
1
2
  import { fetchWordpressProps } from "../_utils/fetch-wordpress-props"
2
3
 
3
4
  export default function Home() {
@@ -6,7 +7,9 @@ export default function Home() {
6
7
 
7
8
  export async function getStaticProps({ params }: any) {
8
9
  const result = await fetchWordpressProps("/")
10
+ const revalidate = result.data.revalidate || settings.serverless?.defaultRevalidate || false
9
11
  return {
12
+ revalidate,
10
13
  props: result.data,
11
14
  }
12
15
  }