eddev 0.2.32 → 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/build/get-webpack-config.js +0 -1
- package/components/ServerlessRouter.d.ts +0 -0
- package/components/ServerlessRouter.js +1 -0
- package/dev-ui/theme.d.ts +5 -4
- package/dynamic/dynamic-component.d.ts +1 -0
- package/entry/Root.d.ts +1 -1
- package/package.json +1 -1
- package/serverless/define-rpc-router.d.ts +1 -1
- package/serverless-template/next.config.js +6 -2
- package/serverless-template/pages/api/sitemap/[...sitemap].ts +56 -0
- package/style/createStitches.d.ts +5 -4
- package/style/createStitches.js +3 -8
- package/yarn-error.log +8865 -0
|
@@ -130,7 +130,6 @@ function getWebpackConfig(opts) {
|
|
|
130
130
|
ALIAS["@components"] = path_1.default.join(opts.baseDirectory, "components");
|
|
131
131
|
ALIAS["@views"] = path_1.default.join(opts.baseDirectory, "views");
|
|
132
132
|
ALIAS["@hooks"] = path_1.default.join(opts.baseDirectory, "hooks");
|
|
133
|
-
ALIAS["@lib"] = path_1.default.join(opts.baseDirectory, "lib");
|
|
134
133
|
ALIAS["@queries"] = path_1.default.join(opts.baseDirectory, "hooks/queries");
|
|
135
134
|
ALIAS["@utils"] = path_1.default.join(opts.baseDirectory, "utils");
|
|
136
135
|
RULES.push({
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/dev-ui/theme.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const styled: <Type extends import("react").ComponentType<any> | keyof JSX.IntrinsicElements | import("@stitches/react/types/util").Function, Composers extends (string | import("react").ComponentType<any> | import("@stitches/react/types/util").Function | {
|
|
2
3
|
[name: string]: unknown;
|
|
3
4
|
})[], CSS = import("@stitches/react/types/css-util").CSS<{}, {
|
|
4
5
|
space: {
|
|
@@ -41,7 +42,7 @@ export declare const styled: <Type extends import("@stitches/react/types/util").
|
|
|
41
42
|
transitions: {
|
|
42
43
|
default: string;
|
|
43
44
|
};
|
|
44
|
-
}, import("@stitches/react/types/config").DefaultThemeMap, {}>>(type: Type, ...composers: { [K in keyof Composers]:
|
|
45
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {}>>(type: Type, ...composers: { [K in keyof Composers]: Composers[K] extends string | import("react").ComponentType<any> | import("@stitches/react/types/util").Function ? Composers[K] : import("@stitches/react/types/stitches").RemoveIndex<CSS> & {
|
|
45
46
|
variants?: {
|
|
46
47
|
[x: string]: {
|
|
47
48
|
[x: string]: CSS;
|
|
@@ -93,7 +94,7 @@ export declare const styled: <Type extends import("@stitches/react/types/util").
|
|
|
93
94
|
transitions: {
|
|
94
95
|
default: string;
|
|
95
96
|
};
|
|
96
|
-
}, import("@stitches/react/types/config").DefaultThemeMap, {}>>, css: <Composers extends (string | import("
|
|
97
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {}>>, css: <Composers extends (string | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | import("@stitches/react/types/util").Function | {
|
|
97
98
|
[name: string]: unknown;
|
|
98
99
|
})[], CSS = import("@stitches/react/types/css-util").CSS<{}, {
|
|
99
100
|
space: {
|
|
@@ -136,7 +137,7 @@ export declare const styled: <Type extends import("@stitches/react/types/util").
|
|
|
136
137
|
transitions: {
|
|
137
138
|
default: string;
|
|
138
139
|
};
|
|
139
|
-
}, import("@stitches/react/types/config").DefaultThemeMap, {}>>(...composers: { [K in keyof Composers]:
|
|
140
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {}>>(...composers: { [K in keyof Composers]: Composers[K] extends string | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | import("@stitches/react/types/util").Function ? Composers[K] : import("@stitches/react/types/stitches").RemoveIndex<CSS> & {
|
|
140
141
|
variants?: {
|
|
141
142
|
[x: string]: {
|
|
142
143
|
[x: string]: CSS;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const dynamic: {
|
|
2
3
|
<Props, Module = import("@loadable/component").DefaultComponent<Props>>(loadFn: (props: Props) => Promise<Module>, options: import("@loadable/component").OptionsWithResolver<Props, Module>): import("@loadable/component").LoadableComponent<Props>;
|
|
3
4
|
<Props_1>(loadFn: (props: Props_1) => Promise<import("@loadable/component").DefaultComponent<Props_1>>, options?: import("@loadable/component").OptionsWithoutResolver<Props_1> | undefined): import("@loadable/component").LoadableComponent<Props_1>;
|
package/entry/Root.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
declare function Root(): JSX.Element;
|
|
2
|
-
declare const _default: typeof Root | import("next
|
|
2
|
+
declare const _default: typeof Root | import("next").NextComponentType<import("next").NextPageContext, {}, {}>;
|
|
3
3
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as trpc from "@trpc/server";
|
|
2
2
|
import * as trpcNext from "@trpc/server/adapters/next";
|
|
3
|
-
declare const createRouter: () => import("@trpc/server/dist/declarations/src/router").Router<RPCContextType, RPCContextType, {}, {}, {},
|
|
3
|
+
declare const createRouter: () => import("@trpc/server/dist/declarations/src/router").Router<RPCContextType, RPCContextType, {}, {}, {}, trpc.DefaultErrorShape>;
|
|
4
4
|
export declare function defineRPC<TCreator extends (base: ReturnType<typeof createRouter>, z: typeof import("zod")) => any>(creator: TCreator): ReturnType<TCreator>;
|
|
5
5
|
export declare function defineRPCContextCreator<TCreator extends (opts: trpcNext.CreateNextContextOptions) => any>(creator: TCreator): TCreator;
|
|
6
6
|
export {};
|
|
@@ -15,11 +15,15 @@ module.exports = (() => {
|
|
|
15
15
|
afterFiles: [
|
|
16
16
|
{
|
|
17
17
|
source: "/sitemap.xml",
|
|
18
|
-
destination:
|
|
18
|
+
destination: "/api/sitemap/sitemap.xml",
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
source: "/:path*-sitemap.xml",
|
|
22
|
-
destination:
|
|
22
|
+
destination: "/api/sitemap/:path*-sitemap.xml",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
source: "/sitemap_index.xml",
|
|
26
|
+
destination: "/api/sitemap/sitemap_index.xml",
|
|
23
27
|
},
|
|
24
28
|
settings.serverless.uploads === "proxy" && {
|
|
25
29
|
source: "/wp-content/uploads/:path*",
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import config from "../../../_utils/ed-config"
|
|
2
|
+
import type { NextApiRequest, NextApiResponse } from "next"
|
|
3
|
+
import { fetchWP } from "../../../_utils/fetch-wp"
|
|
4
|
+
|
|
5
|
+
const validProxyPaths = {
|
|
6
|
+
"form-submit": {
|
|
7
|
+
path: "/wp-json/ed/v1/gf/submit",
|
|
8
|
+
method: "POST",
|
|
9
|
+
},
|
|
10
|
+
query: {
|
|
11
|
+
path: "/wp-json/ed/v1/query/*",
|
|
12
|
+
method: "GET",
|
|
13
|
+
},
|
|
14
|
+
mutation: {
|
|
15
|
+
path: "/wp-json/ed/v1/mutation/*",
|
|
16
|
+
method: "POST",
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default async function (req: NextApiRequest, res: NextApiResponse) {
|
|
21
|
+
const name = req.query.sitemap[0] as string
|
|
22
|
+
if (name === "sitemap.xml") {
|
|
23
|
+
res.status(301).redirect("/sitemap_index.xml")
|
|
24
|
+
return
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const response = await fetchWP(
|
|
28
|
+
process.env.SITE_URL + "/" + name,
|
|
29
|
+
{
|
|
30
|
+
method: "GET",
|
|
31
|
+
headers: {
|
|
32
|
+
"Content-Type": "application/json",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
async (response) => ({
|
|
36
|
+
payload: await response.text(),
|
|
37
|
+
cacheFor: parseInt(response.headers.get("x-ed-cache-duration") || "") || 0,
|
|
38
|
+
})
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
let content = response.payload
|
|
42
|
+
content = content.replace(/<\?xml-stylesheet.+\?>/, "")
|
|
43
|
+
if (config.serverless?.endpoints) {
|
|
44
|
+
Object.entries(config.serverless?.endpoints).forEach(([endpoint, url]) => {
|
|
45
|
+
console.log(endpoint, url)
|
|
46
|
+
content = content.replaceAll("https://" + endpoint, "https://" + url)
|
|
47
|
+
content = content.replaceAll("http://" + endpoint, "https://" + url)
|
|
48
|
+
content = content.replaceAll(endpoint, url)
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
res.status(200)
|
|
53
|
+
res.setHeader("Content-Type", "text/xml; charset=UTF-8")
|
|
54
|
+
res.send(content)
|
|
55
|
+
res.end()
|
|
56
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { DefaultThemeMap } from "@stitches/react";
|
|
2
3
|
import { ConfigType } from "@stitches/core/types/config";
|
|
3
4
|
import { Properties as CSS } from "csstype";
|
|
@@ -656,7 +657,7 @@ export declare function createStitches<Prefix extends string = "", Media extends
|
|
|
656
657
|
} & { [Scale_4 in keyof (Theme & { [Scale_1 in keyof Responsive]: { [T_1 in keyof Responsive[Scale_1]]: string; }; })]: { [Token_2 in keyof (Theme & { [Scale_1 in keyof Responsive]: { [T_1 in keyof Responsive[Scale_1]]: string; }; })[Scale_4]]: import("@stitches/react/types/theme").Token<Extract<Token_2, string | number>, string, Extract<Scale_4, string | void>, "">; }; };
|
|
657
658
|
reset: () => void;
|
|
658
659
|
getCssText: () => string;
|
|
659
|
-
css: <Composers extends (string | import("
|
|
660
|
+
css: <Composers extends (string | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | import("@stitches/react/types/util").Function | {
|
|
660
661
|
[name: string]: unknown;
|
|
661
662
|
})[], CSS_1 = import("@stitches/react/types/css-util").CSS<{
|
|
662
663
|
initial: "";
|
|
@@ -779,7 +780,7 @@ export declare function createStitches<Prefix extends string = "", Media extends
|
|
|
779
780
|
gridColumn: string;
|
|
780
781
|
"--grid-columns": number;
|
|
781
782
|
};
|
|
782
|
-
}>>(...composers: { [K_1 in keyof Composers]:
|
|
783
|
+
}>>(...composers: { [K_1 in keyof Composers]: Composers[K_1] extends string | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | import("@stitches/react/types/util").Function ? Composers[K_1] : import("@stitches/react/types/stitches").RemoveIndex<CSS_1> & {
|
|
783
784
|
variants?: {
|
|
784
785
|
[x: string]: {
|
|
785
786
|
[x: string]: CSS_1;
|
|
@@ -793,7 +794,7 @@ export declare function createStitches<Prefix extends string = "", Media extends
|
|
|
793
794
|
} & CSS_1 & { [K2 in keyof Composers[K_1]]: K2 extends "compoundVariants" | "defaultVariants" | "variants" ? unknown : K2 extends keyof CSS_1 ? CSS_1[K2] : unknown; }; }) => import("@stitches/react/types/styled-component").CssComponent<import("@stitches/react/types/styled-component").StyledComponentType<Composers>, import("@stitches/react/types/styled-component").StyledComponentProps<Composers>, {
|
|
794
795
|
initial: "";
|
|
795
796
|
} & Media, CSS_1>;
|
|
796
|
-
styled: <Type extends import("
|
|
797
|
+
styled: <Type extends import("react").ComponentType<any> | keyof JSX.IntrinsicElements | import("@stitches/react/types/util").Function, Composers_1 extends (string | import("react").ComponentType<any> | import("@stitches/react/types/util").Function | {
|
|
797
798
|
[name: string]: unknown;
|
|
798
799
|
})[], CSS_2 = import("@stitches/react/types/css-util").CSS<{
|
|
799
800
|
initial: "";
|
|
@@ -916,7 +917,7 @@ export declare function createStitches<Prefix extends string = "", Media extends
|
|
|
916
917
|
gridColumn: string;
|
|
917
918
|
"--grid-columns": number;
|
|
918
919
|
};
|
|
919
|
-
}>>(type: Type, ...composers: { [K_2 in keyof Composers_1]:
|
|
920
|
+
}>>(type: Type, ...composers: { [K_2 in keyof Composers_1]: Composers_1[K_2] extends string | import("react").ComponentType<any> | import("@stitches/react/types/util").Function ? Composers_1[K_2] : import("@stitches/react/types/stitches").RemoveIndex<CSS_2> & {
|
|
920
921
|
variants?: {
|
|
921
922
|
[x: string]: {
|
|
922
923
|
[x: string]: CSS_2;
|
package/style/createStitches.js
CHANGED
|
@@ -274,8 +274,8 @@ function parseResponsiveObject(breakpoints, object) {
|
|
|
274
274
|
}
|
|
275
275
|
exports.parseResponsiveObject = parseResponsiveObject;
|
|
276
276
|
function getResponsiveObjectStyles(breakpoints, object, varName, unit) {
|
|
277
|
-
var _a, _b
|
|
278
|
-
var
|
|
277
|
+
var _a, _b;
|
|
278
|
+
var _c;
|
|
279
279
|
if (unit === void 0) { unit = "px"; }
|
|
280
280
|
// Prescale object
|
|
281
281
|
object = __assign({}, object);
|
|
@@ -294,13 +294,8 @@ function getResponsiveObjectStyles(breakpoints, object, varName, unit) {
|
|
|
294
294
|
_b[varName] = atom.concreteValue + unit,
|
|
295
295
|
_b);
|
|
296
296
|
}
|
|
297
|
-
else if (atom.defined) {
|
|
298
|
-
globals["@" + atom.breakpoint] = (_c = {},
|
|
299
|
-
_c[varName] = atom.value,
|
|
300
|
-
_c);
|
|
301
|
-
}
|
|
302
297
|
}
|
|
303
|
-
return [globals, (
|
|
298
|
+
return [globals, (_c = globals["@initial"]) === null || _c === void 0 ? void 0 : _c[varName]];
|
|
304
299
|
}
|
|
305
300
|
exports.getResponsiveObjectStyles = getResponsiveObjectStyles;
|
|
306
301
|
// parseResponsiveTokens({'@initial': blah, '@desktop': blah}, breakpoints, )
|