reactivated 0.36.0-a1966 → 0.36.1
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/build.client.mjs +3 -11
- package/dist/build.client.mjs.map +1 -1
- package/dist/build.renderer.mjs +2 -8
- package/dist/build.renderer.mjs.map +1 -1
- package/dist/generator.mjs +0 -2
- package/dist/generator.mjs.map +1 -1
- package/dist/renderer.js +1 -16
- package/dist/renderer.js.map +1 -1
- package/package.json +1 -3
- package/src/build.client.mts +43 -63
- package/src/build.renderer.mts +36 -55
- package/src/generator.mts +0 -2
- package/src/renderer.tsx +2 -27
- package/dist/conf.d.ts +0 -9
- package/dist/conf.js +0 -2
- package/dist/conf.js.map +0 -1
- package/dist/generator/configuration.d.mts +0 -2
- package/dist/generator/configuration.mjs +0 -18
- package/dist/generator/configuration.mjs.map +0 -1
- package/src/conf.tsx +0 -9
- package/src/generator/configuration.mts +0 -20
package/dist/build.client.mjs
CHANGED
|
@@ -2,18 +2,12 @@
|
|
|
2
2
|
import { vanillaExtractPlugin } from "@vanilla-extract/esbuild-plugin";
|
|
3
3
|
import * as esbuild from "esbuild";
|
|
4
4
|
import ImportGlobPlugin from "esbuild-plugin-import-glob";
|
|
5
|
-
import { produce } from "immer";
|
|
6
5
|
import { execSync, exec } from "child_process";
|
|
7
6
|
import fs from "fs";
|
|
8
7
|
const entryNames = process.argv.slice(2);
|
|
9
8
|
const entryPoints = Object.fromEntries(entryNames.map((entry) => [entry, `./client/${entry}.tsx`]));
|
|
10
9
|
const production = process.env.NODE_ENV === "production";
|
|
11
10
|
const identifiers = production ? "short" : "debug";
|
|
12
|
-
// @ts-ignore
|
|
13
|
-
const customConfigurationImport = await import(`${process.cwd()}/node_modules/_reactivated/conf.mjs`);
|
|
14
|
-
const getOptions = customConfigurationImport?.default?.build?.client != null
|
|
15
|
-
? customConfigurationImport.default.build.client
|
|
16
|
-
: (options) => { };
|
|
17
11
|
const env = {
|
|
18
12
|
NODE_ENV: production ? "production" : "development",
|
|
19
13
|
BUILD_VERSION: process.env.BUILD_VERSION,
|
|
@@ -25,7 +19,7 @@ if (hasTailwind) {
|
|
|
25
19
|
execSync("npx tailwind -i client/input.css -o ./node_modules/_reactivated/tailwind.css", { stdio: "ignore" });
|
|
26
20
|
}
|
|
27
21
|
esbuild
|
|
28
|
-
.context(
|
|
22
|
+
.context({
|
|
29
23
|
entryPoints,
|
|
30
24
|
bundle: true,
|
|
31
25
|
// We use terser to minify because esbuild breaks safari sourcemaps.
|
|
@@ -42,9 +36,7 @@ esbuild
|
|
|
42
36
|
define: {
|
|
43
37
|
// You need both. The one from the stringified JSON is not picked
|
|
44
38
|
// up during the build process.
|
|
45
|
-
"process.env.NODE_ENV": production
|
|
46
|
-
? '"production"'
|
|
47
|
-
: '"development"',
|
|
39
|
+
"process.env.NODE_ENV": production ? '"production"' : '"development"',
|
|
48
40
|
process: JSON.stringify({ env }),
|
|
49
41
|
// Redux persist needs this.
|
|
50
42
|
global: "{}",
|
|
@@ -69,7 +61,7 @@ esbuild
|
|
|
69
61
|
// settings.
|
|
70
62
|
vanillaExtractPlugin({ identifiers }),
|
|
71
63
|
],
|
|
72
|
-
}
|
|
64
|
+
})
|
|
73
65
|
.then(async (context) => {
|
|
74
66
|
if (production === false) {
|
|
75
67
|
if (hasTailwind) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.client.mjs","sourceRoot":"","sources":["../src/build.client.mts"],"names":[],"mappings":";AAEA,OAAO,EAAC,oBAAoB,EAAC,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"build.client.mjs","sourceRoot":"","sources":["../src/build.client.mts"],"names":[],"mappings":";AAEA,OAAO,EAAC,oBAAoB,EAAC,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,OAAO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AE,QAAQ;IAChB,gBAAgB,EAAE,IAAI;IACtB,QAAQ,EAAE,CAAC,qBAAqB,CAAC;IACjC,MAAM,EAAE;QACJ,iEAAiE;QACjE,+BAA+B;QAC/B,sBAAsB,EAAE,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe;QACrE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,EAAC,GAAG,EAAC,CAAC;QAE9B,4BAA4B;QAC5B,MAAM,EAAE,IAAI;KACf;IACD,MAAM,EAAE;QACJ,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE,MAAM;KACnB;IACD,OAAO,EAAE;QACL,+BAA+B;QAC9B,gBAA+D,CAAC,OAAO,EAAE;QAC1E,4DAA4D;QAC5D,gEAAgE;QAChE,UAAU;QACV,gEAAgE;QAChE,YAAY;QACZ,oBAAoB,CAAC,EAAC,WAAW,EAAC,CAAC;KACtC;CACJ,CAAC;KACD,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACpB,IAAI,UAAU,KAAK,KAAK,EAAE;QACtB,IAAI,WAAW,EAAE;YACb,IAAI,CACA,sFAAsF,CACzF,CAAC;SACL;QACD,OAAO,CAAC,KAAK,EAAE,CAAC;KACnB;SAAM;QACH,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;QACxB,OAAO,CAAC,IAAI,EAAE,CAAC;KAClB;AACL,CAAC,CAAC,CAAC"}
|
package/dist/build.renderer.mjs
CHANGED
|
@@ -4,9 +4,6 @@ import * as esbuild from "esbuild";
|
|
|
4
4
|
import ImportGlobPlugin from "esbuild-plugin-import-glob";
|
|
5
5
|
import path from "path";
|
|
6
6
|
import { createRequire } from "module";
|
|
7
|
-
import { produce } from "immer";
|
|
8
|
-
// @ts-ignore
|
|
9
|
-
const customConfigurationImport = await import(`${process.cwd()}/node_modules/_reactivated/conf.mjs`);
|
|
10
7
|
let server = null;
|
|
11
8
|
const CACHE_KEY = `${process.cwd()}/node_modules/_reactivated/renderer.js`;
|
|
12
9
|
const production = process.env.NODE_ENV === "production";
|
|
@@ -21,11 +18,8 @@ const restartServer = async () => {
|
|
|
21
18
|
delete require.cache[CACHE_KEY];
|
|
22
19
|
server = require(CACHE_KEY).server;
|
|
23
20
|
};
|
|
24
|
-
const getOptions = customConfigurationImport?.default?.build?.renderer != null
|
|
25
|
-
? customConfigurationImport.default.build.renderer
|
|
26
|
-
: (options) => { };
|
|
27
21
|
esbuild
|
|
28
|
-
.context(
|
|
22
|
+
.context({
|
|
29
23
|
stdin: {
|
|
30
24
|
contents: `
|
|
31
25
|
export {server, currentTime} from "reactivated/dist/renderer";
|
|
@@ -64,7 +58,7 @@ esbuild
|
|
|
64
58
|
},
|
|
65
59
|
},
|
|
66
60
|
],
|
|
67
|
-
}
|
|
61
|
+
})
|
|
68
62
|
.then(async (context) => {
|
|
69
63
|
if (production === false) {
|
|
70
64
|
context.watch();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.renderer.mjs","sourceRoot":"","sources":["../src/build.renderer.mts"],"names":[],"mappings":";AAEA,OAAO,EAAC,oBAAoB,EAAC,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAG1D,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAC,aAAa,EAAC,MAAM,QAAQ,CAAC;AAErC,
|
|
1
|
+
{"version":3,"file":"build.renderer.mjs","sourceRoot":"","sources":["../src/build.renderer.mts"],"names":[],"mappings":";AAEA,OAAO,EAAC,oBAAoB,EAAC,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,gBAAgB,MAAM,4BAA4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AC9B,gBAA+D,CAAC,OAAO,EAAE;QAC1E,4DAA4D;QAC5D,gEAAgE;QAChE,UAAU;QACV,gEAAgE;QAChE,YAAY;QACZ,oBAAoB,CAAC,EAAC,WAAW,EAAC,CAAC;QACnC;YACI,IAAI,EAAE,eAAe;YACrB,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;gBACb,IAAI,UAAU,KAAK,KAAK,EAAE;oBACtB,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE;wBACnB,aAAa,EAAE,CAAC;oBACpB,CAAC,CAAC,CAAC;iBACN;YACL,CAAC;SACJ;KACJ;CACJ,CAAC;KACD,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACpB,IAAI,UAAU,KAAK,KAAK,EAAE;QACtB,OAAO,CAAC,KAAK,EAAE,CAAC;KACnB;SAAM;QACH,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;QACxB,OAAO,CAAC,IAAI,EAAE,CAAC;KAClB;AACL,CAAC,CAAC,CAAC"}
|
package/dist/generator.mjs
CHANGED
|
@@ -213,8 +213,6 @@ if (Object.keys(urls).length !== 0) {
|
|
|
213
213
|
}
|
|
214
214
|
sourceFile.addStatements("export type UUID = `${string}-${string}-${string}-${string}-${string}`;");
|
|
215
215
|
sourceFile.addStatements(`
|
|
216
|
-
export {Options} from "reactivated/dist/conf";
|
|
217
|
-
|
|
218
216
|
export const rpc = new RPC(typeof window != "undefined" ? rpcUtils.defaultRequester : null as any);
|
|
219
217
|
import React from "react"
|
|
220
218
|
import createContext from "reactivated/dist/context";
|
package/dist/generator.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.mjs","sourceRoot":"","sources":["../src/generator.mts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,IAAI,CAAC;AAGpB,wDAAwD;AACxD,qEAAqE;AACrE,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AAEv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form/"];
|
|
38
38
|
export const render = async ({ context, props, }) => {
|
|
39
|
-
const defaultConfiguration = {
|
|
40
|
-
render: (content) => Promise.resolve(content),
|
|
41
|
-
};
|
|
42
|
-
let customConfiguration = null;
|
|
43
|
-
try {
|
|
44
|
-
customConfiguration = await import(
|
|
45
|
-
// @ts-ignore
|
|
46
|
-
"_reactivated/conf.mjs");
|
|
47
|
-
}
|
|
48
|
-
catch (error) { }
|
|
49
39
|
// @ts-ignore
|
|
50
40
|
const { Provider, getTemplate } = await import("_reactivated/index.tsx");
|
|
51
41
|
try {
|
|
52
42
|
const Template = getTemplate(context);
|
|
53
43
|
const helmetContext = {};
|
|
54
|
-
const
|
|
44
|
+
const rendered = ReactDOMServer.renderToString(React.createElement(HelmetProvider, { context: helmetContext },
|
|
55
45
|
React.createElement(Provider, { value: context },
|
|
56
46
|
React.createElement(Template, { ...props }))));
|
|
57
|
-
const rendered = ReactDOMServer.renderToString(await (customConfiguration?.default?.render ?? defaultConfiguration.render)(content));
|
|
58
47
|
const { helmet } = helmetContext;
|
|
59
48
|
return {
|
|
60
49
|
status: "success",
|
|
@@ -65,10 +54,6 @@ export const render = async ({ context, props, }) => {
|
|
|
65
54
|
context,
|
|
66
55
|
}),
|
|
67
56
|
};
|
|
68
|
-
return {
|
|
69
|
-
status: "success",
|
|
70
|
-
rendered,
|
|
71
|
-
};
|
|
72
57
|
}
|
|
73
58
|
catch (error) {
|
|
74
59
|
return { status: "error", error };
|
package/dist/renderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.js","sourceRoot":"","sources":["../src/renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAGH,cAAc,GAEjB,MAAM,oBAAoB,CAAC;
|
|
1
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nE,GAAG,CAAC,GAAG,CACH,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CACzE,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC;AAEH,IAAI,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE;IAC5B,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;CAC9B;AAED,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,EAAE;IAC5B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;IAEjC,IAAI,OAAO,IAAI,IAAI,EAAE;QACjB,MAAM,IAAI,KAAK,EAAE,CAAC;KACrB;SAAM,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QACpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,OAAO,YAAY,CAAC,CAAC;KACzD;SAAM;QACH,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;KACzE;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reactivated",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.js",
|
|
7
7
|
"./dist/renderer": "./dist/renderer.js",
|
|
8
8
|
"./dist/forms": "./dist/forms/index.js",
|
|
9
9
|
"./dist/context": "./dist/context.js",
|
|
10
|
-
"./dist/conf": "./dist/conf.js",
|
|
11
10
|
"./dist/rpc": "./dist/rpc.js"
|
|
12
11
|
},
|
|
13
12
|
"typings": "dist/index.d.ts",
|
|
@@ -20,7 +19,6 @@
|
|
|
20
19
|
"setup_environment.sh": "./scripts/setup_environment.sh",
|
|
21
20
|
"generate_client_assets": "./dist/generator.mjs",
|
|
22
21
|
"generate_client_constants": "./dist/generator/constants.mjs",
|
|
23
|
-
"generate_client_configuration": "./dist/generator/configuration.mjs",
|
|
24
22
|
"build.client": "./dist/build.client.mjs",
|
|
25
23
|
"build.renderer": "./dist/build.renderer.mjs"
|
|
26
24
|
},
|
package/src/build.client.mts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import {vanillaExtractPlugin} from "@vanilla-extract/esbuild-plugin";
|
|
4
4
|
import * as esbuild from "esbuild";
|
|
5
5
|
import ImportGlobPlugin from "esbuild-plugin-import-glob";
|
|
6
|
-
import {produce} from "immer";
|
|
7
6
|
import {execSync, exec} from "child_process";
|
|
8
7
|
import fs from "fs";
|
|
9
8
|
|
|
@@ -16,16 +15,6 @@ const entryPoints = Object.fromEntries(
|
|
|
16
15
|
const production = process.env.NODE_ENV === "production";
|
|
17
16
|
const identifiers = production ? "short" : "debug";
|
|
18
17
|
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
const customConfigurationImport: {default?: Options} | null = await import(
|
|
21
|
-
`${process.cwd()}/node_modules/_reactivated/conf.mjs`
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
const getOptions =
|
|
25
|
-
customConfigurationImport?.default?.build?.client != null
|
|
26
|
-
? customConfigurationImport.default.build.client
|
|
27
|
-
: (options: esbuild.BuildOptions) => {};
|
|
28
|
-
|
|
29
18
|
const env = {
|
|
30
19
|
NODE_ENV: production ? "production" : "development",
|
|
31
20
|
BUILD_VERSION: process.env.BUILD_VERSION,
|
|
@@ -43,59 +32,50 @@ if (hasTailwind) {
|
|
|
43
32
|
}
|
|
44
33
|
|
|
45
34
|
esbuild
|
|
46
|
-
.context(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"process.env.NODE_ENV": production
|
|
66
|
-
? '"production"'
|
|
67
|
-
: '"development"',
|
|
68
|
-
process: JSON.stringify({env}),
|
|
35
|
+
.context({
|
|
36
|
+
entryPoints,
|
|
37
|
+
bundle: true,
|
|
38
|
+
// We use terser to minify because esbuild breaks safari sourcemaps.
|
|
39
|
+
// It's likely a Safari bug, but terser seems to work for some reason.
|
|
40
|
+
minify: false,
|
|
41
|
+
// Related to sourcemaps as well in Safari.
|
|
42
|
+
legalComments: "none",
|
|
43
|
+
platform: "browser",
|
|
44
|
+
outdir: "./static/dist",
|
|
45
|
+
sourcemap: true,
|
|
46
|
+
target: "es2018",
|
|
47
|
+
preserveSymlinks: true,
|
|
48
|
+
external: ["@reactivated/images"],
|
|
49
|
+
define: {
|
|
50
|
+
// You need both. The one from the stringified JSON is not picked
|
|
51
|
+
// up during the build process.
|
|
52
|
+
"process.env.NODE_ENV": production ? '"production"' : '"development"',
|
|
53
|
+
process: JSON.stringify({env}),
|
|
69
54
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
],
|
|
95
|
-
},
|
|
96
|
-
(draftState) => getOptions(draftState),
|
|
97
|
-
),
|
|
98
|
-
)
|
|
55
|
+
// Redux persist needs this.
|
|
56
|
+
global: "{}",
|
|
57
|
+
},
|
|
58
|
+
loader: {
|
|
59
|
+
".gif": "file",
|
|
60
|
+
".jpeg": "file",
|
|
61
|
+
".jpg": "file",
|
|
62
|
+
".png": "file",
|
|
63
|
+
".svg": "file",
|
|
64
|
+
".ttf": "file",
|
|
65
|
+
".woff": "file",
|
|
66
|
+
".woff2": "file",
|
|
67
|
+
},
|
|
68
|
+
plugins: [
|
|
69
|
+
// ESM imports make this weird.
|
|
70
|
+
(ImportGlobPlugin as unknown as {default: () => esbuild.Plugin}).default(),
|
|
71
|
+
// We manually pass in identifiers because the client is not
|
|
72
|
+
// minified by esbuild but the renderer is, so class names could
|
|
73
|
+
// differ.
|
|
74
|
+
// Instead of set it manually instead of relying on minification
|
|
75
|
+
// settings.
|
|
76
|
+
vanillaExtractPlugin({identifiers}),
|
|
77
|
+
],
|
|
78
|
+
})
|
|
99
79
|
.then(async (context) => {
|
|
100
80
|
if (production === false) {
|
|
101
81
|
if (hasTailwind) {
|
package/src/build.renderer.mts
CHANGED
|
@@ -7,13 +7,6 @@ import http from "http";
|
|
|
7
7
|
import fs from "fs";
|
|
8
8
|
import path from "path";
|
|
9
9
|
import {createRequire} from "module";
|
|
10
|
-
import type {Options} from "./conf";
|
|
11
|
-
import {produce} from "immer";
|
|
12
|
-
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
const customConfigurationImport: {default?: Options} | null = await import(
|
|
15
|
-
`${process.cwd()}/node_modules/_reactivated/conf.mjs`
|
|
16
|
-
);
|
|
17
10
|
|
|
18
11
|
let server: http.Server | null = null;
|
|
19
12
|
|
|
@@ -34,59 +27,47 @@ const restartServer = async () => {
|
|
|
34
27
|
server = require(CACHE_KEY).server;
|
|
35
28
|
};
|
|
36
29
|
|
|
37
|
-
const getOptions =
|
|
38
|
-
customConfigurationImport?.default?.build?.renderer != null
|
|
39
|
-
? customConfigurationImport.default.build.renderer
|
|
40
|
-
: (options: esbuild.BuildOptions) => {};
|
|
41
|
-
|
|
42
30
|
esbuild
|
|
43
|
-
.context(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
stdin: {
|
|
47
|
-
contents: `
|
|
31
|
+
.context({
|
|
32
|
+
stdin: {
|
|
33
|
+
contents: `
|
|
48
34
|
export {server, currentTime} from "reactivated/dist/renderer";
|
|
49
35
|
`,
|
|
50
|
-
|
|
51
|
-
|
|
36
|
+
resolveDir: process.cwd(),
|
|
37
|
+
loader: "ts",
|
|
38
|
+
},
|
|
39
|
+
minify: production,
|
|
40
|
+
bundle: true,
|
|
41
|
+
platform: "node",
|
|
42
|
+
outfile: "./node_modules/_reactivated/renderer.js",
|
|
43
|
+
sourcemap: true,
|
|
44
|
+
target: "es2018",
|
|
45
|
+
preserveSymlinks: true,
|
|
46
|
+
// Needed so _reactivated is included in renderer.tsx regardless
|
|
47
|
+
// of the location of reactivated being in the cwd node_modules or
|
|
48
|
+
// above as in monorepos.
|
|
49
|
+
nodePaths: [`${process.cwd()}/node_modules`],
|
|
50
|
+
plugins: [
|
|
51
|
+
// ESM imports make this weird.
|
|
52
|
+
(ImportGlobPlugin as unknown as {default: () => esbuild.Plugin}).default(),
|
|
53
|
+
// We manually pass in identifiers because the client is not
|
|
54
|
+
// minified by esbuild but the renderer is, so class names could
|
|
55
|
+
// differ.
|
|
56
|
+
// Instead of set it manually instead of relying on minification
|
|
57
|
+
// settings.
|
|
58
|
+
vanillaExtractPlugin({identifiers}),
|
|
59
|
+
{
|
|
60
|
+
name: "restartServer",
|
|
61
|
+
setup: (build) => {
|
|
62
|
+
if (production === false) {
|
|
63
|
+
build.onEnd((result) => {
|
|
64
|
+
restartServer();
|
|
65
|
+
});
|
|
66
|
+
}
|
|
52
67
|
},
|
|
53
|
-
minify: production,
|
|
54
|
-
bundle: true,
|
|
55
|
-
platform: "node",
|
|
56
|
-
outfile: "./node_modules/_reactivated/renderer.js",
|
|
57
|
-
sourcemap: true,
|
|
58
|
-
target: "es2018",
|
|
59
|
-
preserveSymlinks: true,
|
|
60
|
-
// Needed so _reactivated is included in renderer.tsx regardless
|
|
61
|
-
// of the location of reactivated being in the cwd node_modules or
|
|
62
|
-
// above as in monorepos.
|
|
63
|
-
nodePaths: [`${process.cwd()}/node_modules`],
|
|
64
|
-
plugins: [
|
|
65
|
-
// ESM imports make this weird.
|
|
66
|
-
(
|
|
67
|
-
ImportGlobPlugin as unknown as {default: () => esbuild.Plugin}
|
|
68
|
-
).default(),
|
|
69
|
-
// We manually pass in identifiers because the client is not
|
|
70
|
-
// minified by esbuild but the renderer is, so class names could
|
|
71
|
-
// differ.
|
|
72
|
-
// Instead of set it manually instead of relying on minification
|
|
73
|
-
// settings.
|
|
74
|
-
vanillaExtractPlugin({identifiers}),
|
|
75
|
-
{
|
|
76
|
-
name: "restartServer",
|
|
77
|
-
setup: (build) => {
|
|
78
|
-
if (production === false) {
|
|
79
|
-
build.onEnd((result) => {
|
|
80
|
-
restartServer();
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
68
|
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
)
|
|
69
|
+
],
|
|
70
|
+
})
|
|
90
71
|
.then(async (context) => {
|
|
91
72
|
if (production === false) {
|
|
92
73
|
context.watch();
|
package/src/generator.mts
CHANGED
|
@@ -280,8 +280,6 @@ sourceFile.addStatements(
|
|
|
280
280
|
);
|
|
281
281
|
|
|
282
282
|
sourceFile.addStatements(`
|
|
283
|
-
export {Options} from "reactivated/dist/conf";
|
|
284
|
-
|
|
285
283
|
export const rpc = new RPC(typeof window != "undefined" ? rpcUtils.defaultRequester : null as any);
|
|
286
284
|
import React from "react"
|
|
287
285
|
import createContext from "reactivated/dist/context";
|
package/src/renderer.tsx
CHANGED
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
HelmetServerState,
|
|
12
12
|
} from "react-helmet-async";
|
|
13
13
|
|
|
14
|
-
import {Options} from "./conf";
|
|
15
14
|
import {Settings} from "./models";
|
|
16
15
|
|
|
17
16
|
// TODO: WHAT DOES THIS NEED TO BE? Even 100k was super fragile and a 10 choice field broke it.
|
|
@@ -82,19 +81,6 @@ export const render = async ({
|
|
|
82
81
|
context: any;
|
|
83
82
|
props: any;
|
|
84
83
|
}): Promise<Result> => {
|
|
85
|
-
const defaultConfiguration = {
|
|
86
|
-
render: (content) => Promise.resolve(content),
|
|
87
|
-
} satisfies Options;
|
|
88
|
-
|
|
89
|
-
let customConfiguration: {default?: Options} | null = null;
|
|
90
|
-
|
|
91
|
-
try {
|
|
92
|
-
customConfiguration = await import(
|
|
93
|
-
// @ts-ignore
|
|
94
|
-
"_reactivated/conf.mjs"
|
|
95
|
-
);
|
|
96
|
-
} catch (error: unknown) {}
|
|
97
|
-
|
|
98
84
|
// @ts-ignore
|
|
99
85
|
const {Provider, getTemplate} = await import("_reactivated/index.tsx");
|
|
100
86
|
|
|
@@ -102,18 +88,12 @@ export const render = async ({
|
|
|
102
88
|
const Template = getTemplate(context);
|
|
103
89
|
const helmetContext = {} as FilledContext;
|
|
104
90
|
|
|
105
|
-
const
|
|
91
|
+
const rendered = ReactDOMServer.renderToString(
|
|
106
92
|
<HelmetProvider context={helmetContext}>
|
|
107
93
|
<Provider value={context}>
|
|
108
94
|
<Template {...props} />
|
|
109
95
|
</Provider>
|
|
110
|
-
</HelmetProvider
|
|
111
|
-
);
|
|
112
|
-
|
|
113
|
-
const rendered = ReactDOMServer.renderToString(
|
|
114
|
-
await (customConfiguration?.default?.render ?? defaultConfiguration.render)(
|
|
115
|
-
content,
|
|
116
|
-
),
|
|
96
|
+
</HelmetProvider>,
|
|
117
97
|
);
|
|
118
98
|
|
|
119
99
|
const {helmet} = helmetContext;
|
|
@@ -127,11 +107,6 @@ export const render = async ({
|
|
|
127
107
|
context,
|
|
128
108
|
}),
|
|
129
109
|
};
|
|
130
|
-
|
|
131
|
-
return {
|
|
132
|
-
status: "success",
|
|
133
|
-
rendered,
|
|
134
|
-
};
|
|
135
110
|
} catch (error) {
|
|
136
111
|
return {status: "error", error};
|
|
137
112
|
}
|
package/dist/conf.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { BuildOptions } from "esbuild";
|
|
3
|
-
export type Options = {
|
|
4
|
-
build?: {
|
|
5
|
-
client?: (options: BuildOptions) => void;
|
|
6
|
-
renderer?: (options: BuildOptions) => void;
|
|
7
|
-
};
|
|
8
|
-
render?: (content: JSX.Element) => Promise<JSX.Element>;
|
|
9
|
-
};
|
package/dist/conf.js
DELETED
package/dist/conf.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conf.js","sourceRoot":"","sources":["../src/conf.tsx"],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import fs from "fs";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import * as esbuild from "esbuild";
|
|
5
|
-
const CONF_INPUT_FILE = "./client/reactivated.config.tsx";
|
|
6
|
-
const CONF_OUTPUT_FILE = "./node_modules/_reactivated/conf.mjs";
|
|
7
|
-
if (fs.existsSync(CONF_INPUT_FILE)) {
|
|
8
|
-
await esbuild.build({
|
|
9
|
-
entryPoints: [CONF_INPUT_FILE],
|
|
10
|
-
bundle: false,
|
|
11
|
-
outfile: CONF_OUTPUT_FILE,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
fs.mkdirSync(path.dirname(CONF_OUTPUT_FILE), { recursive: true });
|
|
16
|
-
fs.writeFileSync(CONF_OUTPUT_FILE, "");
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=configuration.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.mjs","sourceRoot":"","sources":["../../src/generator/configuration.mts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,MAAM,eAAe,GAAG,iCAAiC,CAAC;AAC1D,MAAM,gBAAgB,GAAG,sCAAsC,CAAC;AAEhE,IAAI,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE;IAChC,MAAM,OAAO,CAAC,KAAK,CAAC;QAChB,WAAW,EAAE,CAAC,eAAe,CAAC;QAC9B,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,gBAAgB;KAC5B,CAAC,CAAC;CACN;KAAM;IACH,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;IAChE,EAAE,CAAC,aAAa,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;CAC1C"}
|
package/src/conf.tsx
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import fs from "fs";
|
|
4
|
-
import path from "path";
|
|
5
|
-
|
|
6
|
-
import * as esbuild from "esbuild";
|
|
7
|
-
|
|
8
|
-
const CONF_INPUT_FILE = "./client/reactivated.config.tsx";
|
|
9
|
-
const CONF_OUTPUT_FILE = "./node_modules/_reactivated/conf.mjs";
|
|
10
|
-
|
|
11
|
-
if (fs.existsSync(CONF_INPUT_FILE)) {
|
|
12
|
-
await esbuild.build({
|
|
13
|
-
entryPoints: [CONF_INPUT_FILE],
|
|
14
|
-
bundle: false,
|
|
15
|
-
outfile: CONF_OUTPUT_FILE,
|
|
16
|
-
});
|
|
17
|
-
} else {
|
|
18
|
-
fs.mkdirSync(path.dirname(CONF_OUTPUT_FILE), {recursive: true});
|
|
19
|
-
fs.writeFileSync(CONF_OUTPUT_FILE, "");
|
|
20
|
-
}
|