@proteinjs/server 2.1.10 → 3.0.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/CHANGELOG.md +25 -0
- package/dist/generated/index.d.ts +0 -17
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +1 -18
- package/dist/generated/index.js.map +1 -1
- package/dist/src/startServer.d.ts.map +1 -1
- package/dist/src/startServer.js +52 -15
- package/dist/src/startServer.js.map +1 -1
- package/generated/index.ts +1 -18
- package/package.json +5 -26
- package/src/startServer.ts +60 -15
- package/dist/src/nodeModulesPath.d.ts +0 -3
- package/dist/src/nodeModulesPath.d.ts.map +0 -1
- package/dist/src/nodeModulesPath.js +0 -8
- package/dist/src/nodeModulesPath.js.map +0 -1
- package/dist/webpack.config.d.ts +0 -87
- package/dist/webpack.config.d.ts.map +0 -1
- package/dist/webpack.config.js +0 -135
- package/dist/webpack.config.js.map +0 -1
- package/src/nodeModulesPath.ts +0 -5
- package/webpack.config.js +0 -136
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,31 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.0.1](https://github.com/proteinjs/server/compare/@proteinjs/server@3.0.0...@proteinjs/server@3.0.1) (2025-11-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* `startServer` should resolve all dependencies used in webpack hot client builds to the consuming ui package's node_modules. Was grabbing some (ie. webpack-hot-middleware) from the consuming server package. ([e128e83](https://github.com/proteinjs/server/commit/e128e83e6cb8c57bf972ef86c41805b8ab852a56))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.0.0](https://github.com/proteinjs/server/compare/@proteinjs/server@2.1.10...@proteinjs/server@3.0.0) (2025-11-16)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
* feat!: Server now constructs hot client builds entirely from the consumer's webpack config and node_modules. ([bf9a7dd](https://github.com/proteinjs/server/commit/bf9a7dddbbfa2d0f3b9ad6b4a54fb706dd0dab2b))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### BREAKING CHANGES
|
|
24
|
+
|
|
25
|
+
* Added required `ServerConfig.hotClientBuilds.webpackConfigPath` prop to enable hot client builds.
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
6
31
|
## [2.1.10](https://github.com/proteinjs/server/compare/@proteinjs/server@2.1.9...@proteinjs/server@2.1.10) (2025-11-15)
|
|
7
32
|
|
|
8
33
|
|
|
@@ -1,37 +1,20 @@
|
|
|
1
1
|
/** Load Dependency Source Graphs */
|
|
2
|
-
import '@pmmmwh/react-refresh-webpack-plugin';
|
|
3
2
|
import '@proteinjs/event';
|
|
4
3
|
import '@proteinjs/logger';
|
|
5
4
|
import '@proteinjs/reflection';
|
|
6
5
|
import '@proteinjs/server-api';
|
|
7
6
|
import '@proteinjs/util-node';
|
|
8
7
|
import 'body-parser';
|
|
9
|
-
import 'buffer';
|
|
10
8
|
import 'cookie-parser';
|
|
11
|
-
import 'crypto-browserify';
|
|
12
|
-
import 'css-loader';
|
|
13
9
|
import 'events';
|
|
14
10
|
import 'express';
|
|
15
11
|
import 'express-session';
|
|
16
|
-
import 'file-loader';
|
|
17
12
|
import 'passport';
|
|
18
13
|
import 'passport-local';
|
|
19
|
-
import 'path-browserify';
|
|
20
14
|
import 'process';
|
|
21
15
|
import 'react';
|
|
22
16
|
import 'react-helmet';
|
|
23
|
-
import 'react-refresh';
|
|
24
|
-
import 'react-refresh-typescript';
|
|
25
17
|
import 'socket.io';
|
|
26
|
-
import 'stream-browserify';
|
|
27
|
-
import 'style-loader';
|
|
28
|
-
import 'ts-loader';
|
|
29
18
|
import 'typescript';
|
|
30
|
-
import 'url';
|
|
31
|
-
import 'util';
|
|
32
|
-
import 'vm-browserify';
|
|
33
|
-
import 'webpack';
|
|
34
|
-
import 'webpack-dev-middleware';
|
|
35
|
-
import 'webpack-hot-middleware';
|
|
36
19
|
export * from '../index';
|
|
37
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":"AAAA,oCAAoC;AAEpC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":"AAAA,oCAAoC;AAEpC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,aAAa,CAAC;AACrB,OAAO,eAAe,CAAC;AACvB,OAAO,QAAQ,CAAC;AAChB,OAAO,SAAS,CAAC;AACjB,OAAO,iBAAiB,CAAC;AACzB,OAAO,UAAU,CAAC;AAClB,OAAO,gBAAgB,CAAC;AACxB,OAAO,SAAS,CAAC;AACjB,OAAO,OAAO,CAAC;AACf,OAAO,cAAc,CAAC;AACtB,OAAO,WAAW,CAAC;AACnB,OAAO,YAAY,CAAC;AA6BpB,cAAc,UAAU,CAAC"}
|
package/dist/generated/index.js
CHANGED
|
@@ -15,42 +15,25 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
16
|
};
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
require("@pmmmwh/react-refresh-webpack-plugin");
|
|
19
18
|
require("@proteinjs/event");
|
|
20
19
|
require("@proteinjs/logger");
|
|
21
20
|
require("@proteinjs/reflection");
|
|
22
21
|
require("@proteinjs/server-api");
|
|
23
22
|
require("@proteinjs/util-node");
|
|
24
23
|
require("body-parser");
|
|
25
|
-
require("buffer");
|
|
26
24
|
require("cookie-parser");
|
|
27
|
-
require("crypto-browserify");
|
|
28
|
-
require("css-loader");
|
|
29
25
|
require("events");
|
|
30
26
|
require("express");
|
|
31
27
|
require("express-session");
|
|
32
|
-
require("file-loader");
|
|
33
28
|
require("passport");
|
|
34
29
|
require("passport-local");
|
|
35
|
-
require("path-browserify");
|
|
36
30
|
require("process");
|
|
37
31
|
require("react");
|
|
38
32
|
require("react-helmet");
|
|
39
|
-
require("react-refresh");
|
|
40
|
-
require("react-refresh-typescript");
|
|
41
33
|
require("socket.io");
|
|
42
|
-
require("stream-browserify");
|
|
43
|
-
require("style-loader");
|
|
44
|
-
require("ts-loader");
|
|
45
34
|
require("typescript");
|
|
46
|
-
require("url");
|
|
47
|
-
require("util");
|
|
48
|
-
require("vm-browserify");
|
|
49
|
-
require("webpack");
|
|
50
|
-
require("webpack-dev-middleware");
|
|
51
|
-
require("webpack-hot-middleware");
|
|
52
35
|
/** Generate Source Graph */
|
|
53
|
-
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/server/NodeGlobalDataStorage\",\"value\":{\"packageName\":\"@proteinjs/server\",\"name\":\"NodeGlobalDataStorage\",\"filePath\":\"/home/runner/work/server/server/packages/server/src/NodeGlobalDataStorage.ts\",\"qualifiedName\":\"@proteinjs/server/NodeGlobalDataStorage\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"HOOK_INITIALIZED\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"GLOBAL_DATA\",\"type\":{\"packageName\":\"@proteinjs/server\",\"name\":\"{ [id: string]: GlobalData }\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server/{ [id: string]: GlobalData }\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"environment\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"setData\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"data\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"GlobalData\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/GlobalData\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getData\",\"returnType\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"GlobalData\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/GlobalData\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"initHook\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"GlobalDataStorage\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/GlobalDataStorage\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/server-api/GlobalDataStorage\"},{\"v\":\"@proteinjs/server/NodeSessionDataStorage\",\"value\":{\"packageName\":\"@proteinjs/server\",\"name\":\"NodeSessionDataStorage\",\"filePath\":\"/home/runner/work/server/server/packages/server/src/NodeSessionDataStorage.ts\",\"qualifiedName\":\"@proteinjs/server/NodeSessionDataStorage\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"HOOK_INITIALIZED\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"SESSION_DATA\",\"type\":{\"packageName\":\"@proteinjs/server\",\"name\":\"{ [id: string]: SessionData }\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server/{ [id: string]: SessionData }\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"environment\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"setData\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"data\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"SessionData\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/SessionData\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getData\",\"returnType\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"SessionData\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/SessionData\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"initHook\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"SessionDataStorage\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/SessionDataStorage\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/server-api/SessionDataStorage\"},{\"v\":\"@proteinjs/server/ExtendedIncomingMessage\",\"value\":{\"packageName\":\"@proteinjs/server\",\"name\":\"ExtendedIncomingMessage\",\"filePath\":\"/home/runner/work/server/server/packages/server/src/SocketIOServerRepo.ts\",\"qualifiedName\":\"@proteinjs/server/ExtendedIncomingMessage\",\"properties\":[{\"name\":\"sessionID\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"user\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"http\",\"name\":\"IncomingMessage\",\"filePath\":null,\"qualifiedName\":\"http/IncomingMessage\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"http/IncomingMessage\"},{\"v\":\"@proteinjs/server/ExtendedSocket\",\"value\":{\"packageName\":\"@proteinjs/server\",\"name\":\"ExtendedSocket\",\"filePath\":\"/home/runner/work/server/server/packages/server/src/SocketIOServerRepo.ts\",\"qualifiedName\":\"@proteinjs/server/ExtendedSocket\",\"properties\":[{\"name\":\"request\",\"type\":{\"packageName\":\"@proteinjs/server\",\"name\":\"ExtendedIncomingMessage\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server/ExtendedIncomingMessage\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"socket.io\",\"name\":\"Socket\",\"filePath\":null,\"qualifiedName\":\"socket.io/Socket\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"socket.io/Socket\"},{\"v\":\"@proteinjs/server/environmentCache\",\"value\":{\"packageName\":\"@proteinjs/server\",\"name\":\"environmentCache\",\"filePath\":\"/home/runner/work/server/server/packages/server/src/envCache.ts\",\"qualifiedName\":\"@proteinjs/server/environmentCache\",\"type\":{\"packageName\":\"\",\"name\":\"GlobalDataCache<Env>\",\"filePath\":null,\"qualifiedName\":\"/GlobalDataCache<Env>\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"GlobalDataCache\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/GlobalDataCache\",\"typeParameters\":[\"@proteinjs/server-api/Env\"],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/server-api/GlobalDataCache\"},{\"v\":\"
|
|
36
|
+
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/server/NodeGlobalDataStorage\",\"value\":{\"packageName\":\"@proteinjs/server\",\"name\":\"NodeGlobalDataStorage\",\"filePath\":\"/home/runner/work/server/server/packages/server/src/NodeGlobalDataStorage.ts\",\"qualifiedName\":\"@proteinjs/server/NodeGlobalDataStorage\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"HOOK_INITIALIZED\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"GLOBAL_DATA\",\"type\":{\"packageName\":\"@proteinjs/server\",\"name\":\"{ [id: string]: GlobalData }\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server/{ [id: string]: GlobalData }\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"environment\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"setData\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"data\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"GlobalData\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/GlobalData\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getData\",\"returnType\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"GlobalData\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/GlobalData\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"initHook\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"GlobalDataStorage\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/GlobalDataStorage\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/server-api/GlobalDataStorage\"},{\"v\":\"@proteinjs/server/NodeSessionDataStorage\",\"value\":{\"packageName\":\"@proteinjs/server\",\"name\":\"NodeSessionDataStorage\",\"filePath\":\"/home/runner/work/server/server/packages/server/src/NodeSessionDataStorage.ts\",\"qualifiedName\":\"@proteinjs/server/NodeSessionDataStorage\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"HOOK_INITIALIZED\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"SESSION_DATA\",\"type\":{\"packageName\":\"@proteinjs/server\",\"name\":\"{ [id: string]: SessionData }\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server/{ [id: string]: SessionData }\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"environment\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"setData\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"data\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"SessionData\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/SessionData\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getData\",\"returnType\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"SessionData\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/SessionData\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"initHook\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"SessionDataStorage\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/SessionDataStorage\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/server-api/SessionDataStorage\"},{\"v\":\"@proteinjs/server/ExtendedIncomingMessage\",\"value\":{\"packageName\":\"@proteinjs/server\",\"name\":\"ExtendedIncomingMessage\",\"filePath\":\"/home/runner/work/server/server/packages/server/src/SocketIOServerRepo.ts\",\"qualifiedName\":\"@proteinjs/server/ExtendedIncomingMessage\",\"properties\":[{\"name\":\"sessionID\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"user\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"http\",\"name\":\"IncomingMessage\",\"filePath\":null,\"qualifiedName\":\"http/IncomingMessage\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"http/IncomingMessage\"},{\"v\":\"@proteinjs/server/ExtendedSocket\",\"value\":{\"packageName\":\"@proteinjs/server\",\"name\":\"ExtendedSocket\",\"filePath\":\"/home/runner/work/server/server/packages/server/src/SocketIOServerRepo.ts\",\"qualifiedName\":\"@proteinjs/server/ExtendedSocket\",\"properties\":[{\"name\":\"request\",\"type\":{\"packageName\":\"@proteinjs/server\",\"name\":\"ExtendedIncomingMessage\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server/ExtendedIncomingMessage\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"socket.io\",\"name\":\"Socket\",\"filePath\":null,\"qualifiedName\":\"socket.io/Socket\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"socket.io/Socket\"},{\"v\":\"@proteinjs/server/environmentCache\",\"value\":{\"packageName\":\"@proteinjs/server\",\"name\":\"environmentCache\",\"filePath\":\"/home/runner/work/server/server/packages/server/src/envCache.ts\",\"qualifiedName\":\"@proteinjs/server/environmentCache\",\"type\":{\"packageName\":\"\",\"name\":\"GlobalDataCache<Env>\",\"filePath\":null,\"qualifiedName\":\"/GlobalDataCache<Env>\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"GlobalDataCache\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/GlobalDataCache\",\"typeParameters\":[\"@proteinjs/server-api/Env\"],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/server-api/GlobalDataCache\"},{\"v\":\"@proteinjs/server/healthCheck\",\"value\":{\"packageName\":\"@proteinjs/server\",\"name\":\"healthCheck\",\"filePath\":\"/home/runner/work/server/server/packages/server/src/routes/healthCheck.ts\",\"qualifiedName\":\"@proteinjs/server/healthCheck\",\"type\":{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/server-api\",\"name\":\"Route\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/server-api/Route\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/server-api/Route\"}],\"edges\":[{\"v\":\"@proteinjs/server/NodeGlobalDataStorage\",\"w\":\"@proteinjs/server-api/GlobalDataStorage\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/server/NodeSessionDataStorage\",\"w\":\"@proteinjs/server-api/SessionDataStorage\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/server/ExtendedIncomingMessage\",\"w\":\"http/IncomingMessage\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/server/ExtendedSocket\",\"w\":\"socket.io/Socket\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/server/environmentCache\",\"w\":\"@proteinjs/server-api/GlobalDataCache\",\"value\":\"has type\"},{\"v\":\"@proteinjs/server/healthCheck\",\"w\":\"@proteinjs/server-api/Route\",\"value\":\"has type\"}]}";
|
|
54
37
|
/** Generate Source Links */
|
|
55
38
|
var NodeGlobalDataStorage_1 = require("../src/NodeGlobalDataStorage");
|
|
56
39
|
var NodeSessionDataStorage_1 = require("../src/NodeSessionDataStorage");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,4BAA0B;AAC1B,6BAA2B;AAC3B,iCAA+B;AAC/B,iCAA+B;AAC/B,gCAA8B;AAC9B,uBAAqB;AACrB,yBAAuB;AACvB,kBAAgB;AAChB,mBAAiB;AACjB,2BAAyB;AACzB,oBAAkB;AAClB,0BAAwB;AACxB,mBAAiB;AACjB,iBAAe;AACf,wBAAsB;AACtB,qBAAmB;AACnB,sBAAoB;AAGpB,4BAA4B;AAE5B,IAAM,WAAW,GAAG,gqRAAgqR,CAAC;AAGrrR,4BAA4B;AAE5B,sEAAqE;AACrE,wEAAuE;AACvE,4CAAmD;AACnD,yDAAwD;AAExD,IAAM,WAAW,GAAG;IACnB,yCAAyC,EAAE,6CAAqB;IAChE,0CAA0C,EAAE,+CAAsB;IAClE,oCAAoC,EAAE,2BAAgB;IACtD,+BAA+B,EAAE,yBAAW;CAC5C,CAAC;AAGF,kCAAkC;AAElC,oDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,2CAAyB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startServer.d.ts","sourceRoot":"","sources":["../../src/startServer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"startServer.d.ts","sourceRoot":"","sources":["../../src/startServer.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,YAAY,EAKb,MAAM,uBAAuB,CAAC;AAU/B,wBAAsB,WAAW,CAAC,MAAM,EAAE,YAAY,iBAwCrD"}
|
package/dist/src/startServer.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
14
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
15
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -40,20 +51,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
40
51
|
};
|
|
41
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
53
|
exports.startServer = void 0;
|
|
54
|
+
var path_1 = __importDefault(require("path"));
|
|
55
|
+
var module_1 = require("module");
|
|
43
56
|
var express_1 = __importDefault(require("express"));
|
|
44
57
|
var express_session_1 = __importDefault(require("express-session"));
|
|
45
58
|
var cookie_parser_1 = __importDefault(require("cookie-parser"));
|
|
46
59
|
var body_parser_1 = __importDefault(require("body-parser"));
|
|
47
60
|
var passport_1 = __importDefault(require("passport"));
|
|
48
61
|
var passport_local_1 = __importDefault(require("passport-local"));
|
|
49
|
-
var webpack_1 = __importDefault(require("webpack"));
|
|
50
|
-
var webpack_dev_middleware_1 = __importDefault(require("webpack-dev-middleware"));
|
|
51
|
-
var webpack_hot_middleware_1 = __importDefault(require("webpack-hot-middleware"));
|
|
52
62
|
var http_1 = require("http");
|
|
53
63
|
var server_api_1 = require("@proteinjs/server-api");
|
|
54
64
|
var loadRoutes_1 = require("./loadRoutes");
|
|
55
65
|
var logger_1 = require("@proteinjs/logger");
|
|
56
|
-
var nodeModulesPath_1 = require("./nodeModulesPath");
|
|
57
66
|
var SocketIOServerRepo_1 = require("./SocketIOServerRepo");
|
|
58
67
|
var staticContentPath = '/static/';
|
|
59
68
|
var logger = new logger_1.Logger({ name: 'Server' });
|
|
@@ -167,28 +176,56 @@ function configureRequests(app) {
|
|
|
167
176
|
}
|
|
168
177
|
function initializeHotReloading(app, config) {
|
|
169
178
|
var _a, _b;
|
|
179
|
+
// Enable only in dev with all required settings present
|
|
170
180
|
if (!process.env.DEVELOPMENT ||
|
|
171
181
|
process.env.DISABLE_HOT_CLIENT_BUILDS ||
|
|
172
182
|
!config.hotClientBuilds ||
|
|
183
|
+
!config.hotClientBuilds.nodeModulesPath ||
|
|
184
|
+
!config.hotClientBuilds.webpackConfigPath ||
|
|
173
185
|
!((_a = config.staticContent) === null || _a === void 0 ? void 0 : _a.staticContentDir) ||
|
|
174
186
|
!((_b = config.staticContent) === null || _b === void 0 ? void 0 : _b.appEntryPath)) {
|
|
175
187
|
return;
|
|
176
188
|
}
|
|
177
|
-
var
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
var
|
|
182
|
-
|
|
189
|
+
var appRequire = makeAppRequire(config.hotClientBuilds.nodeModulesPath);
|
|
190
|
+
// Load webpack & middlewares from the consumer app
|
|
191
|
+
var webpack = appRequire('webpack');
|
|
192
|
+
var webpackDevMiddleware = appRequire('webpack-dev-middleware');
|
|
193
|
+
var webpackHotMiddleware = appRequire('webpack-hot-middleware');
|
|
194
|
+
var devConfig = createWebpackConfigOverlay(config, webpack, appRequire);
|
|
195
|
+
var compiler = webpack(devConfig);
|
|
196
|
+
app.use(webpackDevMiddleware(compiler, {
|
|
183
197
|
publicPath: staticContentPath,
|
|
184
198
|
}));
|
|
185
|
-
app.use((
|
|
199
|
+
app.use(webpackHotMiddleware(compiler));
|
|
186
200
|
}
|
|
187
|
-
|
|
201
|
+
// Resolve modules (webpack + middlewares) from the consumer’s node_modules
|
|
202
|
+
function makeAppRequire(nodeModulesPath) {
|
|
203
|
+
// Any file under the consumer's node_modules works as a base for createRequire
|
|
204
|
+
return (0, module_1.createRequire)(path_1.default.join(nodeModulesPath, '__app_require__.js'));
|
|
205
|
+
}
|
|
206
|
+
function createWebpackConfigOverlay(config, webpack, appRequire) {
|
|
188
207
|
var _a;
|
|
189
|
-
|
|
190
|
-
var
|
|
191
|
-
|
|
208
|
+
// Load the consumer webpack config (CommonJS). If it exports a function, call with { mode: 'development' }.
|
|
209
|
+
var consumerExport = require(config.hotClientBuilds.webpackConfigPath);
|
|
210
|
+
var baseConfig = typeof consumerExport === 'function' ? consumerExport({ mode: 'development' }) : consumerExport;
|
|
211
|
+
var devConfig = __assign({}, baseConfig);
|
|
212
|
+
devConfig.mode = 'development';
|
|
213
|
+
// Ensure the compiler context points at the consumer app root (helps some plugins)
|
|
214
|
+
devConfig.context = devConfig.context || path_1.default.dirname(config.hotClientBuilds.nodeModulesPath);
|
|
215
|
+
// Use an ABSOLUTE path to the HMR client from the consumer's node_modules
|
|
216
|
+
var hmrClientAbs = appRequire.resolve('webpack-hot-middleware/client');
|
|
217
|
+
devConfig.entry = { app: [hmrClientAbs, config.staticContent.appEntryPath] };
|
|
218
|
+
// Ensure bundles are served from memory at /static/, and set a concrete path for plugins that read it.
|
|
219
|
+
devConfig.output = __assign(__assign({}, (baseConfig.output || {})), { publicPath: staticContentPath, path: config.staticContent.staticContentDir });
|
|
220
|
+
// Make loaders (e.g., ts-loader) resolve from the consumer's node_modules
|
|
221
|
+
devConfig.resolveLoader = __assign(__assign({}, (devConfig.resolveLoader || {})), { modules: [config.hotClientBuilds.nodeModulesPath, 'node_modules'] });
|
|
222
|
+
// Ensure HMR plugin exists (idempotent)
|
|
223
|
+
devConfig.plugins = (_a = devConfig.plugins) !== null && _a !== void 0 ? _a : [];
|
|
224
|
+
var hasHmr = devConfig.plugins.some(function (p) { var _a; return ((_a = p === null || p === void 0 ? void 0 : p.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'HotModuleReplacementPlugin'; });
|
|
225
|
+
if (!hasHmr) {
|
|
226
|
+
devConfig.plugins.push(new webpack.HotModuleReplacementPlugin());
|
|
227
|
+
}
|
|
228
|
+
return devConfig;
|
|
192
229
|
}
|
|
193
230
|
function configureHttps(app) {
|
|
194
231
|
app.use(function (request, response, next) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startServer.js","sourceRoot":"","sources":["../../src/startServer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAA8B;AAC9B,oEAA6C;AAC7C,gEAAyC;AACzC,4DAAqC;AACrC,sDAAgC;AAChC,kEAA2C;AAC3C,oDAA8B;AAC9B,kFAA0D;AAC1D,kFAA0D;AAC1D,6BAA4C;AAC5C,oDAQ+B;AAC/B,2CAAgE;AAChE,4CAA2C;AAC3C,qDAAuD;AACvD,2DAA0E;AAE1E,IAAM,iBAAiB,GAAG,UAAU,CAAC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;AAC9C,IAAM,GAAG,GAAG,IAAA,iBAAO,GAAE,CAAC;AACtB,IAAM,MAAM,GAAG,IAAI,aAAU,CAAC,GAAG,CAAC,CAAC;AAEnC,SAAsB,WAAW,CAAC,MAAoB;;;;;wBACpD,qBAAM,eAAe,CAAC,sBAAsB,CAAC,EAAA;;oBAA7C,SAA6C,CAAC;oBACxC,MAAM,GAAG,IAAA,sBAAS,GAAE,CAAC;oBAC3B,iBAAiB,CAAC,GAAG,CAAC,CAAC;oBACvB,sBAAsB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;oBACpC,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;oBAC9B,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;oBAC3B,IAAA,uBAAU,EACR,MAAM,CAAC,MAAM,CAAC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,OAAO,EAAb,CAAa,CAAC,EACvC,GAAG,EACH,MAAM,CACP,CAAC;oBACF,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,mEAAmE;oBACxF,4BAA4B,CAAC,GAAG,EAAE,MAA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AS,CAAC,CAAC;yBACxB;oBACH,CAAC,CAAC,CAAC;;;;;CACJ;AAED,SAAS,KAAK,CAAC,MAAkB,EAAE,MAAoB;IACrD,IAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;QAClB,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;YAC3B,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC,CAAC;SAC1D;QAED,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,oCAA6B,IAAI,CAAE,EAAE,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/generated/index.ts
CHANGED
|
@@ -1,44 +1,27 @@
|
|
|
1
1
|
/** Load Dependency Source Graphs */
|
|
2
2
|
|
|
3
|
-
import '@pmmmwh/react-refresh-webpack-plugin';
|
|
4
3
|
import '@proteinjs/event';
|
|
5
4
|
import '@proteinjs/logger';
|
|
6
5
|
import '@proteinjs/reflection';
|
|
7
6
|
import '@proteinjs/server-api';
|
|
8
7
|
import '@proteinjs/util-node';
|
|
9
8
|
import 'body-parser';
|
|
10
|
-
import 'buffer';
|
|
11
9
|
import 'cookie-parser';
|
|
12
|
-
import 'crypto-browserify';
|
|
13
|
-
import 'css-loader';
|
|
14
10
|
import 'events';
|
|
15
11
|
import 'express';
|
|
16
12
|
import 'express-session';
|
|
17
|
-
import 'file-loader';
|
|
18
13
|
import 'passport';
|
|
19
14
|
import 'passport-local';
|
|
20
|
-
import 'path-browserify';
|
|
21
15
|
import 'process';
|
|
22
16
|
import 'react';
|
|
23
17
|
import 'react-helmet';
|
|
24
|
-
import 'react-refresh';
|
|
25
|
-
import 'react-refresh-typescript';
|
|
26
18
|
import 'socket.io';
|
|
27
|
-
import 'stream-browserify';
|
|
28
|
-
import 'style-loader';
|
|
29
|
-
import 'ts-loader';
|
|
30
19
|
import 'typescript';
|
|
31
|
-
import 'url';
|
|
32
|
-
import 'util';
|
|
33
|
-
import 'vm-browserify';
|
|
34
|
-
import 'webpack';
|
|
35
|
-
import 'webpack-dev-middleware';
|
|
36
|
-
import 'webpack-hot-middleware';
|
|
37
20
|
|
|
38
21
|
/** Generate Source Graph */
|
|
39
22
|
|
|
40
23
|
const sourceGraph =
|
|
41
|
-
'{"options":{"directed":true,"multigraph":false,"compound":false},"nodes":[{"v":"@proteinjs/server/NodeGlobalDataStorage","value":{"packageName":"@proteinjs/server","name":"NodeGlobalDataStorage","filePath":"/home/runner/work/server/server/packages/server/src/NodeGlobalDataStorage.ts","qualifiedName":"@proteinjs/server/NodeGlobalDataStorage","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"HOOK_INITIALIZED","type":null,"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private"},{"name":"GLOBAL_DATA","type":{"packageName":"@proteinjs/server","name":"{ [id: string]: GlobalData }","filePath":null,"qualifiedName":"@proteinjs/server/{ [id: string]: GlobalData }","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private"},{"name":"environment","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[{"name":"setData","returnType":null,"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"data","type":{"packageName":"@proteinjs/server-api","name":"GlobalData","filePath":null,"qualifiedName":"@proteinjs/server-api/GlobalData","typeParameters":null,"directParents":null}}]},{"name":"getData","returnType":{"packageName":"@proteinjs/server-api","name":"GlobalData","filePath":null,"qualifiedName":"@proteinjs/server-api/GlobalData","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[]},{"name":"initHook","returnType":null,"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[]}],"typeParameters":[],"directParentInterfaces":[{"packageName":"@proteinjs/server-api","name":"GlobalDataStorage","filePath":null,"qualifiedName":"@proteinjs/server-api/GlobalDataStorage","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"directParentClasses":[],"sourceType":2}},{"v":"@proteinjs/server-api/GlobalDataStorage"},{"v":"@proteinjs/server/NodeSessionDataStorage","value":{"packageName":"@proteinjs/server","name":"NodeSessionDataStorage","filePath":"/home/runner/work/server/server/packages/server/src/NodeSessionDataStorage.ts","qualifiedName":"@proteinjs/server/NodeSessionDataStorage","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"HOOK_INITIALIZED","type":null,"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private"},{"name":"SESSION_DATA","type":{"packageName":"@proteinjs/server","name":"{ [id: string]: SessionData }","filePath":null,"qualifiedName":"@proteinjs/server/{ [id: string]: SessionData }","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private"},{"name":"environment","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[{"name":"setData","returnType":null,"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"data","type":{"packageName":"@proteinjs/server-api","name":"SessionData","filePath":null,"qualifiedName":"@proteinjs/server-api/SessionData","typeParameters":null,"directParents":null}}]},{"name":"getData","returnType":{"packageName":"@proteinjs/server-api","name":"SessionData","filePath":null,"qualifiedName":"@proteinjs/server-api/SessionData","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[]},{"name":"initHook","returnType":null,"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[]}],"typeParameters":[],"directParentInterfaces":[{"packageName":"@proteinjs/server-api","name":"SessionDataStorage","filePath":null,"qualifiedName":"@proteinjs/server-api/SessionDataStorage","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"directParentClasses":[],"sourceType":2}},{"v":"@proteinjs/server-api/SessionDataStorage"},{"v":"@proteinjs/server/ExtendedIncomingMessage","value":{"packageName":"@proteinjs/server","name":"ExtendedIncomingMessage","filePath":"/home/runner/work/server/server/packages/server/src/SocketIOServerRepo.ts","qualifiedName":"@proteinjs/server/ExtendedIncomingMessage","properties":[{"name":"sessionID","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"user","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParents":[{"packageName":"http","name":"IncomingMessage","filePath":null,"qualifiedName":"http/IncomingMessage","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"http/IncomingMessage"},{"v":"@proteinjs/server/ExtendedSocket","value":{"packageName":"@proteinjs/server","name":"ExtendedSocket","filePath":"/home/runner/work/server/server/packages/server/src/SocketIOServerRepo.ts","qualifiedName":"@proteinjs/server/ExtendedSocket","properties":[{"name":"request","type":{"packageName":"@proteinjs/server","name":"ExtendedIncomingMessage","filePath":null,"qualifiedName":"@proteinjs/server/ExtendedIncomingMessage","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParents":[{"packageName":"socket.io","name":"Socket","filePath":null,"qualifiedName":"socket.io/Socket","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"socket.io/Socket"},{"v":"@proteinjs/server/environmentCache","value":{"packageName":"@proteinjs/server","name":"environmentCache","filePath":"/home/runner/work/server/server/packages/server/src/envCache.ts","qualifiedName":"@proteinjs/server/environmentCache","type":{"packageName":"","name":"GlobalDataCache<Env>","filePath":null,"qualifiedName":"/GlobalDataCache<Env>","typeParameters":[],"directParents":[{"packageName":"@proteinjs/server-api","name":"GlobalDataCache","filePath":null,"qualifiedName":"@proteinjs/server-api/GlobalDataCache","typeParameters":["@proteinjs/server-api/Env"],"directParents":null}]},"isExported":true,"isConst":true,"sourceType":0}},{"v":"@proteinjs/server-api/GlobalDataCache"},{"v":"
|
|
24
|
+
'{"options":{"directed":true,"multigraph":false,"compound":false},"nodes":[{"v":"@proteinjs/server/NodeGlobalDataStorage","value":{"packageName":"@proteinjs/server","name":"NodeGlobalDataStorage","filePath":"/home/runner/work/server/server/packages/server/src/NodeGlobalDataStorage.ts","qualifiedName":"@proteinjs/server/NodeGlobalDataStorage","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"HOOK_INITIALIZED","type":null,"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private"},{"name":"GLOBAL_DATA","type":{"packageName":"@proteinjs/server","name":"{ [id: string]: GlobalData }","filePath":null,"qualifiedName":"@proteinjs/server/{ [id: string]: GlobalData }","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private"},{"name":"environment","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[{"name":"setData","returnType":null,"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"data","type":{"packageName":"@proteinjs/server-api","name":"GlobalData","filePath":null,"qualifiedName":"@proteinjs/server-api/GlobalData","typeParameters":null,"directParents":null}}]},{"name":"getData","returnType":{"packageName":"@proteinjs/server-api","name":"GlobalData","filePath":null,"qualifiedName":"@proteinjs/server-api/GlobalData","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[]},{"name":"initHook","returnType":null,"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[]}],"typeParameters":[],"directParentInterfaces":[{"packageName":"@proteinjs/server-api","name":"GlobalDataStorage","filePath":null,"qualifiedName":"@proteinjs/server-api/GlobalDataStorage","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"directParentClasses":[],"sourceType":2}},{"v":"@proteinjs/server-api/GlobalDataStorage"},{"v":"@proteinjs/server/NodeSessionDataStorage","value":{"packageName":"@proteinjs/server","name":"NodeSessionDataStorage","filePath":"/home/runner/work/server/server/packages/server/src/NodeSessionDataStorage.ts","qualifiedName":"@proteinjs/server/NodeSessionDataStorage","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"HOOK_INITIALIZED","type":null,"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private"},{"name":"SESSION_DATA","type":{"packageName":"@proteinjs/server","name":"{ [id: string]: SessionData }","filePath":null,"qualifiedName":"@proteinjs/server/{ [id: string]: SessionData }","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private"},{"name":"environment","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[{"name":"setData","returnType":null,"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"data","type":{"packageName":"@proteinjs/server-api","name":"SessionData","filePath":null,"qualifiedName":"@proteinjs/server-api/SessionData","typeParameters":null,"directParents":null}}]},{"name":"getData","returnType":{"packageName":"@proteinjs/server-api","name":"SessionData","filePath":null,"qualifiedName":"@proteinjs/server-api/SessionData","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[]},{"name":"initHook","returnType":null,"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[]}],"typeParameters":[],"directParentInterfaces":[{"packageName":"@proteinjs/server-api","name":"SessionDataStorage","filePath":null,"qualifiedName":"@proteinjs/server-api/SessionDataStorage","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"directParentClasses":[],"sourceType":2}},{"v":"@proteinjs/server-api/SessionDataStorage"},{"v":"@proteinjs/server/ExtendedIncomingMessage","value":{"packageName":"@proteinjs/server","name":"ExtendedIncomingMessage","filePath":"/home/runner/work/server/server/packages/server/src/SocketIOServerRepo.ts","qualifiedName":"@proteinjs/server/ExtendedIncomingMessage","properties":[{"name":"sessionID","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"user","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParents":[{"packageName":"http","name":"IncomingMessage","filePath":null,"qualifiedName":"http/IncomingMessage","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"http/IncomingMessage"},{"v":"@proteinjs/server/ExtendedSocket","value":{"packageName":"@proteinjs/server","name":"ExtendedSocket","filePath":"/home/runner/work/server/server/packages/server/src/SocketIOServerRepo.ts","qualifiedName":"@proteinjs/server/ExtendedSocket","properties":[{"name":"request","type":{"packageName":"@proteinjs/server","name":"ExtendedIncomingMessage","filePath":null,"qualifiedName":"@proteinjs/server/ExtendedIncomingMessage","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParents":[{"packageName":"socket.io","name":"Socket","filePath":null,"qualifiedName":"socket.io/Socket","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"socket.io/Socket"},{"v":"@proteinjs/server/environmentCache","value":{"packageName":"@proteinjs/server","name":"environmentCache","filePath":"/home/runner/work/server/server/packages/server/src/envCache.ts","qualifiedName":"@proteinjs/server/environmentCache","type":{"packageName":"","name":"GlobalDataCache<Env>","filePath":null,"qualifiedName":"/GlobalDataCache<Env>","typeParameters":[],"directParents":[{"packageName":"@proteinjs/server-api","name":"GlobalDataCache","filePath":null,"qualifiedName":"@proteinjs/server-api/GlobalDataCache","typeParameters":["@proteinjs/server-api/Env"],"directParents":null}]},"isExported":true,"isConst":true,"sourceType":0}},{"v":"@proteinjs/server-api/GlobalDataCache"},{"v":"@proteinjs/server/healthCheck","value":{"packageName":"@proteinjs/server","name":"healthCheck","filePath":"/home/runner/work/server/server/packages/server/src/routes/healthCheck.ts","qualifiedName":"@proteinjs/server/healthCheck","type":{"packageName":"@proteinjs/server-api","name":"Route","filePath":null,"qualifiedName":"@proteinjs/server-api/Route","typeParameters":[],"directParents":[{"packageName":"@proteinjs/server-api","name":"Route","filePath":null,"qualifiedName":"@proteinjs/server-api/Route","typeParameters":[],"directParents":null}]},"isExported":true,"isConst":true,"sourceType":0}},{"v":"@proteinjs/server-api/Route"}],"edges":[{"v":"@proteinjs/server/NodeGlobalDataStorage","w":"@proteinjs/server-api/GlobalDataStorage","value":"implements interface"},{"v":"@proteinjs/server/NodeSessionDataStorage","w":"@proteinjs/server-api/SessionDataStorage","value":"implements interface"},{"v":"@proteinjs/server/ExtendedIncomingMessage","w":"http/IncomingMessage","value":"extends interface"},{"v":"@proteinjs/server/ExtendedSocket","w":"socket.io/Socket","value":"extends interface"},{"v":"@proteinjs/server/environmentCache","w":"@proteinjs/server-api/GlobalDataCache","value":"has type"},{"v":"@proteinjs/server/healthCheck","w":"@proteinjs/server-api/Route","value":"has type"}]}';
|
|
42
25
|
|
|
43
26
|
/** Generate Source Links */
|
|
44
27
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proteinjs/server",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "A server impl",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -21,40 +21,23 @@
|
|
|
21
21
|
"watch": "reflection-watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@pmmmwh/react-refresh-webpack-plugin": "0.5.11",
|
|
25
24
|
"@proteinjs/event": "^1.0.8",
|
|
26
25
|
"@proteinjs/logger": "1.0.12",
|
|
27
26
|
"@proteinjs/reflection": "1.1.10",
|
|
28
|
-
"@proteinjs/server-api": "^
|
|
27
|
+
"@proteinjs/server-api": "^3.0.0",
|
|
29
28
|
"@proteinjs/util-node": "1.6.0",
|
|
30
29
|
"body-parser": "1.19.0",
|
|
31
|
-
"buffer": "6.0.3",
|
|
32
30
|
"cookie-parser": "1.4.5",
|
|
33
|
-
"crypto-browserify": "3.12.0",
|
|
34
|
-
"css-loader": "7.1.2",
|
|
35
31
|
"events": "3.3.0",
|
|
36
32
|
"express": "4.17.1",
|
|
37
33
|
"express-session": "1.17.1",
|
|
38
|
-
"file-loader": "6.2.0",
|
|
39
34
|
"passport": "0.4.1",
|
|
40
35
|
"passport-local": "1.0.0",
|
|
41
|
-
"path-browserify": "1.0.1",
|
|
42
36
|
"process": "0.11.10",
|
|
43
37
|
"react": "18.2.0",
|
|
44
38
|
"react-helmet": "6.1.0",
|
|
45
|
-
"react-refresh": "0.14.0",
|
|
46
|
-
"react-refresh-typescript": "2.0.9",
|
|
47
39
|
"socket.io": "4.7.5",
|
|
48
|
-
"
|
|
49
|
-
"style-loader": "4.0.0",
|
|
50
|
-
"ts-loader": "8.0.3",
|
|
51
|
-
"typescript": "5.2.2",
|
|
52
|
-
"url": "0.11.3",
|
|
53
|
-
"util": "0.12.5",
|
|
54
|
-
"vm-browserify": "1.1.2",
|
|
55
|
-
"webpack": "5.88.2",
|
|
56
|
-
"webpack-dev-middleware": "7.0.0",
|
|
57
|
-
"webpack-hot-middleware": "2.26.0"
|
|
40
|
+
"typescript": "5.2.2"
|
|
58
41
|
},
|
|
59
42
|
"devDependencies": {
|
|
60
43
|
"@proteinjs/reflection-build": "1.4.1",
|
|
@@ -69,17 +52,13 @@
|
|
|
69
52
|
"@types/react-helmet": "6.1.0",
|
|
70
53
|
"@types/react-router": "5.1.20",
|
|
71
54
|
"@types/react-router-dom": "5.3.3",
|
|
72
|
-
"@types/webpack-hot-middleware": "2.25.9",
|
|
73
55
|
"@typescript-eslint/eslint-plugin": "7.8.0",
|
|
74
56
|
"@typescript-eslint/parser": "7.8.0",
|
|
75
57
|
"eslint": "8.57.0",
|
|
76
58
|
"eslint-config-prettier": "9.1.0",
|
|
77
|
-
"eslint-plugin-prettier": "5.1.3"
|
|
78
|
-
"react-dom": "18.2.0",
|
|
79
|
-
"react-router": "6.16.0",
|
|
80
|
-
"react-router-dom": "6.16.0"
|
|
59
|
+
"eslint-plugin-prettier": "5.1.3"
|
|
81
60
|
},
|
|
82
61
|
"main": "./dist/generated/index.js",
|
|
83
62
|
"types": "./dist/generated/index.d.ts",
|
|
84
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "624158eb72d8c4b0663d807c6713e83b17dcc8a5"
|
|
85
64
|
}
|
package/src/startServer.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { createRequire } from 'module';
|
|
1
3
|
import express from 'express';
|
|
2
4
|
import expressSession from 'express-session';
|
|
3
5
|
import cookieParser from 'cookie-parser';
|
|
4
6
|
import bodyParser from 'body-parser';
|
|
5
7
|
import passport from 'passport';
|
|
6
8
|
import passportLocal from 'passport-local';
|
|
7
|
-
import webpack from 'webpack';
|
|
8
|
-
import webpackDevMiddleware from 'webpack-dev-middleware';
|
|
9
|
-
import webpackHotMiddleware from 'webpack-hot-middleware';
|
|
10
9
|
import { Server as HttpServer } from 'http';
|
|
11
10
|
import {
|
|
12
11
|
Global,
|
|
@@ -19,7 +18,6 @@ import {
|
|
|
19
18
|
} from '@proteinjs/server-api';
|
|
20
19
|
import { loadRoutes, loadDefaultStarRoute } from './loadRoutes';
|
|
21
20
|
import { Logger } from '@proteinjs/logger';
|
|
22
|
-
import { setNodeModulesPath } from './nodeModulesPath';
|
|
23
21
|
import { SocketIOServerRepo, ExtendedSocket } from './SocketIOServerRepo';
|
|
24
22
|
|
|
25
23
|
const staticContentPath = '/static/';
|
|
@@ -103,33 +101,80 @@ function configureRequests(app: express.Express) {
|
|
|
103
101
|
}
|
|
104
102
|
|
|
105
103
|
function initializeHotReloading(app: express.Express, config: ServerConfig) {
|
|
104
|
+
// Enable only in dev with all required settings present
|
|
106
105
|
if (
|
|
107
106
|
!process.env.DEVELOPMENT ||
|
|
108
107
|
process.env.DISABLE_HOT_CLIENT_BUILDS ||
|
|
109
108
|
!config.hotClientBuilds ||
|
|
109
|
+
!config.hotClientBuilds.nodeModulesPath ||
|
|
110
|
+
!config.hotClientBuilds.webpackConfigPath ||
|
|
110
111
|
!config.staticContent?.staticContentDir ||
|
|
111
112
|
!config.staticContent?.appEntryPath
|
|
112
113
|
) {
|
|
113
114
|
return;
|
|
114
115
|
}
|
|
115
116
|
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const
|
|
117
|
+
const appRequire = makeAppRequire(config.hotClientBuilds.nodeModulesPath);
|
|
118
|
+
|
|
119
|
+
// Load webpack & middlewares from the consumer app
|
|
120
|
+
const webpack = appRequire('webpack');
|
|
121
|
+
const webpackDevMiddleware = appRequire('webpack-dev-middleware');
|
|
122
|
+
const webpackHotMiddleware = appRequire('webpack-hot-middleware');
|
|
123
|
+
|
|
124
|
+
const devConfig = createWebpackConfigOverlay(config, webpack, appRequire);
|
|
125
|
+
|
|
126
|
+
const compiler = webpack(devConfig);
|
|
127
|
+
|
|
121
128
|
app.use(
|
|
122
|
-
webpackDevMiddleware(
|
|
129
|
+
webpackDevMiddleware(compiler, {
|
|
123
130
|
publicPath: staticContentPath,
|
|
124
131
|
})
|
|
125
132
|
);
|
|
126
|
-
app.use(webpackHotMiddleware(
|
|
133
|
+
app.use(webpackHotMiddleware(compiler));
|
|
127
134
|
}
|
|
128
135
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
return
|
|
136
|
+
// Resolve modules (webpack + middlewares) from the consumer’s node_modules
|
|
137
|
+
function makeAppRequire(nodeModulesPath: string) {
|
|
138
|
+
// Any file under the consumer's node_modules works as a base for createRequire
|
|
139
|
+
return createRequire(path.join(nodeModulesPath, '__app_require__.js'));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function createWebpackConfigOverlay(config: ServerConfig, webpack: any, appRequire: any) {
|
|
143
|
+
// Load the consumer webpack config (CommonJS). If it exports a function, call with { mode: 'development' }.
|
|
144
|
+
const consumerExport = require(config.hotClientBuilds!.webpackConfigPath);
|
|
145
|
+
const baseConfig = typeof consumerExport === 'function' ? consumerExport({ mode: 'development' }) : consumerExport;
|
|
146
|
+
const devConfig: any = { ...baseConfig };
|
|
147
|
+
|
|
148
|
+
devConfig.mode = 'development';
|
|
149
|
+
|
|
150
|
+
// Ensure the compiler context points at the consumer app root (helps some plugins)
|
|
151
|
+
devConfig.context = devConfig.context || path.dirname(config.hotClientBuilds!.nodeModulesPath);
|
|
152
|
+
|
|
153
|
+
// Use an ABSOLUTE path to the HMR client from the consumer's node_modules
|
|
154
|
+
const hmrClientAbs = appRequire.resolve('webpack-hot-middleware/client');
|
|
155
|
+
devConfig.entry = { app: [hmrClientAbs, config.staticContent!.appEntryPath] };
|
|
156
|
+
|
|
157
|
+
// Ensure bundles are served from memory at /static/, and set a concrete path for plugins that read it.
|
|
158
|
+
devConfig.output = {
|
|
159
|
+
...(baseConfig.output || {}),
|
|
160
|
+
publicPath: staticContentPath,
|
|
161
|
+
path: config.staticContent!.staticContentDir, // safe for plugins; dev-middleware serves from memory
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
// Make loaders (e.g., ts-loader) resolve from the consumer's node_modules
|
|
165
|
+
devConfig.resolveLoader = {
|
|
166
|
+
...(devConfig.resolveLoader || {}),
|
|
167
|
+
modules: [config.hotClientBuilds!.nodeModulesPath, 'node_modules'],
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
// Ensure HMR plugin exists (idempotent)
|
|
171
|
+
devConfig.plugins = devConfig.plugins ?? [];
|
|
172
|
+
const hasHmr = devConfig.plugins.some((p: any) => p?.constructor?.name === 'HotModuleReplacementPlugin');
|
|
173
|
+
if (!hasHmr) {
|
|
174
|
+
devConfig.plugins.push(new webpack.HotModuleReplacementPlugin());
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return devConfig;
|
|
133
178
|
}
|
|
134
179
|
|
|
135
180
|
function configureHttps(app: express.Express) {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nodeModulesPath.d.ts","sourceRoot":"","sources":["../../src/nodeModulesPath.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,eAAe,EAAE,MAAM,CAAC;AAEnC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,QAE9C"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setNodeModulesPath = exports.nodeModulesPath = void 0;
|
|
4
|
-
function setNodeModulesPath(path) {
|
|
5
|
-
exports.nodeModulesPath = path;
|
|
6
|
-
}
|
|
7
|
-
exports.setNodeModulesPath = setNodeModulesPath;
|
|
8
|
-
//# sourceMappingURL=nodeModulesPath.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nodeModulesPath.js","sourceRoot":"","sources":["../../src/nodeModulesPath.ts"],"names":[],"mappings":";;;AAEA,SAAgB,kBAAkB,CAAC,IAAY;IAC7C,uBAAe,GAAG,IAAI,CAAC;AACzB,CAAC;AAFD,gDAEC"}
|
package/dist/webpack.config.d.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import webpack = require("webpack");
|
|
2
|
-
import ReactRefreshWebpackPlugin = require("@pmmmwh/react-refresh-webpack-plugin");
|
|
3
|
-
export let mode: string;
|
|
4
|
-
export let devtool: string;
|
|
5
|
-
export namespace output {
|
|
6
|
-
let filename: string;
|
|
7
|
-
let library: string;
|
|
8
|
-
}
|
|
9
|
-
export namespace resolve {
|
|
10
|
-
let extensions: string[];
|
|
11
|
-
let alias: {
|
|
12
|
-
react: string;
|
|
13
|
-
process: string;
|
|
14
|
-
'@mui/joy': string;
|
|
15
|
-
'@mui/material': string;
|
|
16
|
-
'@mui/icons-material': string;
|
|
17
|
-
'@mui/material/styles': string;
|
|
18
|
-
'@mui/system': string;
|
|
19
|
-
'@mui/private-theming': string;
|
|
20
|
-
'@mui/styled-engine': string;
|
|
21
|
-
'webpack-hot-middleware': string;
|
|
22
|
-
'react-query': string;
|
|
23
|
-
'react-router': string;
|
|
24
|
-
'react-router-dom': string;
|
|
25
|
-
};
|
|
26
|
-
let fallback: {
|
|
27
|
-
crypto: string;
|
|
28
|
-
util: string;
|
|
29
|
-
events: string;
|
|
30
|
-
url: string;
|
|
31
|
-
buffer: string;
|
|
32
|
-
stream: string;
|
|
33
|
-
'process/browser': string;
|
|
34
|
-
path: string;
|
|
35
|
-
vm: string;
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
export namespace resolveLoader {
|
|
39
|
-
let modules: string[];
|
|
40
|
-
}
|
|
41
|
-
export namespace module {
|
|
42
|
-
let rules: ({
|
|
43
|
-
test: RegExp;
|
|
44
|
-
resolve: {
|
|
45
|
-
fullySpecified: boolean;
|
|
46
|
-
};
|
|
47
|
-
} | {
|
|
48
|
-
test: RegExp;
|
|
49
|
-
exclude: RegExp;
|
|
50
|
-
use: {
|
|
51
|
-
loader: string;
|
|
52
|
-
options: {
|
|
53
|
-
getCustomTransformers: () => {
|
|
54
|
-
before: any[];
|
|
55
|
-
};
|
|
56
|
-
transpileOnly: boolean;
|
|
57
|
-
};
|
|
58
|
-
}[];
|
|
59
|
-
} | {
|
|
60
|
-
test: RegExp;
|
|
61
|
-
use: {
|
|
62
|
-
loader: string;
|
|
63
|
-
options: {
|
|
64
|
-
name: string;
|
|
65
|
-
};
|
|
66
|
-
}[];
|
|
67
|
-
exclude?: undefined;
|
|
68
|
-
} | {
|
|
69
|
-
test: RegExp;
|
|
70
|
-
use: string[];
|
|
71
|
-
exclude?: undefined;
|
|
72
|
-
})[];
|
|
73
|
-
}
|
|
74
|
-
export namespace optimization {
|
|
75
|
-
namespace splitChunks {
|
|
76
|
-
namespace cacheGroups {
|
|
77
|
-
namespace vendor {
|
|
78
|
-
let test: RegExp;
|
|
79
|
-
let name: string;
|
|
80
|
-
let chunks: string;
|
|
81
|
-
let priority: number;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
export let plugins: (webpack.ProvidePlugin | webpack.HotModuleReplacementPlugin | ReactRefreshWebpackPlugin | webpack.NormalModuleReplacementPlugin)[];
|
|
87
|
-
//# sourceMappingURL=webpack.config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webpack.config.d.ts","sourceRoot":"","sources":["../webpack.config.js"],"names":[],"mappings":""}
|
package/dist/webpack.config.js
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var path = require('path');
|
|
3
|
-
var webpack = require('webpack');
|
|
4
|
-
var ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
|
5
|
-
var ReactRefreshTypeScript = require('react-refresh-typescript');
|
|
6
|
-
var nodeModulesPath = require('./src/nodeModulesPath').nodeModulesPath;
|
|
7
|
-
// const nodeModulesPath = path.join(__dirname, '../../../');
|
|
8
|
-
// if there are module resolution issues, verify assumptions about pathing
|
|
9
|
-
// console.log(`nodeModulesPath: ${nodeModulesPath}`);
|
|
10
|
-
// see https://github.com/webpack/webpack/issues/11467#issuecomment-808618999/
|
|
11
|
-
// for details
|
|
12
|
-
var webpack5esmInteropRule = {
|
|
13
|
-
test: /\.m?js/,
|
|
14
|
-
resolve: {
|
|
15
|
-
fullySpecified: false,
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
module.exports = {
|
|
19
|
-
mode: 'development',
|
|
20
|
-
devtool: 'inline-source-map',
|
|
21
|
-
// entry provided dynamically in startServer.initializeHotReloading
|
|
22
|
-
// entry: {
|
|
23
|
-
// app: ['webpack-hot-middleware/client', './generated/index.ts'],
|
|
24
|
-
// },
|
|
25
|
-
output: {
|
|
26
|
-
filename: '[name].js',
|
|
27
|
-
// path and publicPath provided in startServer.initializeHotReloading
|
|
28
|
-
// path: path.join(__dirname, 'dist'),
|
|
29
|
-
library: '[name]',
|
|
30
|
-
},
|
|
31
|
-
resolve: {
|
|
32
|
-
extensions: ['.tsx', '.ts', '.js', '.json'],
|
|
33
|
-
alias: {
|
|
34
|
-
react: path.join(nodeModulesPath, 'react'),
|
|
35
|
-
process: 'process/browser',
|
|
36
|
-
'@mui/joy': path.join(nodeModulesPath, '@mui/joy'),
|
|
37
|
-
'@mui/material': path.join(nodeModulesPath, '@mui/material'),
|
|
38
|
-
'@mui/icons-material': path.join(nodeModulesPath, '@mui/icons-material'),
|
|
39
|
-
'@mui/material/styles': path.resolve(nodeModulesPath, '@mui/material/styles'),
|
|
40
|
-
'@mui/system': path.resolve(nodeModulesPath, '@mui/system'),
|
|
41
|
-
'@mui/private-theming': path.resolve(nodeModulesPath, '@mui/private-theming'),
|
|
42
|
-
'@mui/styled-engine': path.resolve(nodeModulesPath, '@mui/styled-engine'),
|
|
43
|
-
'webpack-hot-middleware': path.join(nodeModulesPath, 'webpack-hot-middleware'),
|
|
44
|
-
'react-query': path.join(nodeModulesPath, 'react-query'),
|
|
45
|
-
'react-router': path.join(nodeModulesPath, 'react-router'),
|
|
46
|
-
'react-router-dom': path.join(nodeModulesPath, 'react-router-dom'),
|
|
47
|
-
},
|
|
48
|
-
// provide shims for node libraries for webpack >= 5
|
|
49
|
-
fallback: {
|
|
50
|
-
crypto: require.resolve('crypto-browserify'),
|
|
51
|
-
util: require.resolve('util/'),
|
|
52
|
-
events: require.resolve('events/'),
|
|
53
|
-
url: require.resolve('url/'),
|
|
54
|
-
buffer: require.resolve('buffer/'),
|
|
55
|
-
stream: require.resolve('stream-browserify'),
|
|
56
|
-
'process/browser': require.resolve('process/browser'),
|
|
57
|
-
path: require.resolve('path-browserify'),
|
|
58
|
-
vm: require.resolve('vm-browserify'),
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
// since this webpack.config is invoked via webpack-dev-middleware in the process of the consuming server package (not this package)
|
|
62
|
-
// we need to let webpack know where to look for loaders like: file-loader and ts-loader
|
|
63
|
-
// it's ideal to keep those dependencies within this package instead of requiring them installed by the consumer
|
|
64
|
-
resolveLoader: {
|
|
65
|
-
modules: [nodeModulesPath, 'node_modules'],
|
|
66
|
-
},
|
|
67
|
-
module: {
|
|
68
|
-
rules: [
|
|
69
|
-
webpack5esmInteropRule,
|
|
70
|
-
// all files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'
|
|
71
|
-
// this will only transpile (to integrate with babel via ReactRefreshTypeScript); rely on the ide for compiler checks
|
|
72
|
-
{
|
|
73
|
-
test: /\.[jt]sx?$/,
|
|
74
|
-
exclude: /node_modules/,
|
|
75
|
-
use: [
|
|
76
|
-
{
|
|
77
|
-
loader: require.resolve('ts-loader'),
|
|
78
|
-
options: {
|
|
79
|
-
getCustomTransformers: function () { return ({
|
|
80
|
-
before: [ReactRefreshTypeScript()],
|
|
81
|
-
}); },
|
|
82
|
-
transpileOnly: true,
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
},
|
|
87
|
-
// image files
|
|
88
|
-
{
|
|
89
|
-
test: /\.(png|jpe?g|gif|svg)$/i,
|
|
90
|
-
use: [
|
|
91
|
-
{
|
|
92
|
-
loader: 'file-loader',
|
|
93
|
-
options: {
|
|
94
|
-
name: '[path][name].[ext]', // This line will keep the original path and filename
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
],
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
test: /\.css$/i,
|
|
101
|
-
use: ['style-loader', 'css-loader'],
|
|
102
|
-
},
|
|
103
|
-
],
|
|
104
|
-
},
|
|
105
|
-
optimization: {
|
|
106
|
-
splitChunks: {
|
|
107
|
-
cacheGroups: {
|
|
108
|
-
vendor: {
|
|
109
|
-
test: /[\\/]node_modules[\\/]/,
|
|
110
|
-
name: 'vendor',
|
|
111
|
-
chunks: 'all',
|
|
112
|
-
priority: -10,
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
plugins: [
|
|
118
|
-
new webpack.ProvidePlugin({
|
|
119
|
-
process: 'process/browser',
|
|
120
|
-
Buffer: ['buffer', 'Buffer'],
|
|
121
|
-
}),
|
|
122
|
-
new webpack.HotModuleReplacementPlugin(),
|
|
123
|
-
new ReactRefreshWebpackPlugin(),
|
|
124
|
-
new webpack.NormalModuleReplacementPlugin(/^node:process$/, function (resource) {
|
|
125
|
-
resource.request = 'process/browser';
|
|
126
|
-
}),
|
|
127
|
-
new webpack.NormalModuleReplacementPlugin(/^node:path$/, function (resource) {
|
|
128
|
-
resource.request = 'path';
|
|
129
|
-
}),
|
|
130
|
-
new webpack.NormalModuleReplacementPlugin(/^node:url$/, function (resource) {
|
|
131
|
-
resource.request = 'url';
|
|
132
|
-
}),
|
|
133
|
-
],
|
|
134
|
-
};
|
|
135
|
-
//# sourceMappingURL=webpack.config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webpack.config.js","sourceRoot":"","sources":["../webpack.config.js"],"names":[],"mappings":";AAAA,IAAI,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC3B,IAAI,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AACjC,IAAM,yBAAyB,GAAG,OAAO,CAAC,sCAAsC,CAAC,CAAC;AAClF,IAAM,sBAAsB,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;AAC3D,IAAA,eAAe,GAAK,OAAO,CAAC,uBAAuB,CAAC,gBAArC,CAAsC;AAE7D,6DAA6D;AAC7D,0EAA0E;AAC1E,sDAAsD;AAEtD,+EAA+E;AAC/E,cAAc;AACd,IAAM,sBAAsB,GAAG;IAC7B,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE;QACP,cAA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;YACD;gBACE,IAAI,EAAE,SAAS;gBACf,GAAG,EAAE,CAAC,cAAc,EAAE,YAAY,CAAC;aACpC;SACF;KACF;IACD,YAAY,EAAE;QACZ,WAAW,EAAE;YACX,WAAW,EAAE;gBACX,MAAM,EAAE;oBACN,IAAI,EAAE,wBAAwB;oBAC9B,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE,KAAK;oBACb,QAAQ,EAAE,CAAC,EAAE;iBACd;aACF;SACF;KACF;IACD,OAAO,EAAE;QACP,IAAI,OAAO,CAAC,aAAa,CAAC;YACxB,OAAO,EAAE,iBAAiB;YAC1B,MAAM,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;SAC7B,CAAC;QACF,IAAI,OAAO,CAAC,0BAA0B,EAAE;QACxC,IAAI,yBAAyB,EAAE;QAC/B,IAAI,OAAO,CAAC,6BAA6B,CAAC,gBAAgB,EAAE,UAAC,QAAQ;YACnE,QAAQ,CAAC,OAAO,GAAG,iBAAiB,CAAC;QACvC,CAAC,CAAC;QACF,IAAI,OAAO,CAAC,6BAA6B,CAAC,aAAa,EAAE,UAAC,QAAQ;YAChE,QAAQ,CAAC,OAAO,GAAG,MAAM,CAAC;QAC5B,CAAC,CAAC;QACF,IAAI,OAAO,CAAC,6BAA6B,CAAC,YAAY,EAAE,UAAC,QAAQ;YAC/D,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC;QAC3B,CAAC,CAAC;KACH;CACF,CAAC"}
|
package/src/nodeModulesPath.ts
DELETED
package/webpack.config.js
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
var path = require('path');
|
|
2
|
-
var webpack = require('webpack');
|
|
3
|
-
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
|
4
|
-
const ReactRefreshTypeScript = require('react-refresh-typescript');
|
|
5
|
-
const { nodeModulesPath } = require('./src/nodeModulesPath');
|
|
6
|
-
|
|
7
|
-
// const nodeModulesPath = path.join(__dirname, '../../../');
|
|
8
|
-
// if there are module resolution issues, verify assumptions about pathing
|
|
9
|
-
// console.log(`nodeModulesPath: ${nodeModulesPath}`);
|
|
10
|
-
|
|
11
|
-
// see https://github.com/webpack/webpack/issues/11467#issuecomment-808618999/
|
|
12
|
-
// for details
|
|
13
|
-
const webpack5esmInteropRule = {
|
|
14
|
-
test: /\.m?js/,
|
|
15
|
-
resolve: {
|
|
16
|
-
fullySpecified: false,
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
module.exports = {
|
|
21
|
-
mode: 'development',
|
|
22
|
-
devtool: 'inline-source-map',
|
|
23
|
-
// entry provided dynamically in startServer.initializeHotReloading
|
|
24
|
-
// entry: {
|
|
25
|
-
// app: ['webpack-hot-middleware/client', './generated/index.ts'],
|
|
26
|
-
// },
|
|
27
|
-
output: {
|
|
28
|
-
filename: '[name].js',
|
|
29
|
-
// path and publicPath provided in startServer.initializeHotReloading
|
|
30
|
-
// path: path.join(__dirname, 'dist'),
|
|
31
|
-
library: '[name]',
|
|
32
|
-
},
|
|
33
|
-
resolve: {
|
|
34
|
-
extensions: ['.tsx', '.ts', '.js', '.json'],
|
|
35
|
-
alias: {
|
|
36
|
-
react: path.join(nodeModulesPath, 'react'),
|
|
37
|
-
process: 'process/browser',
|
|
38
|
-
'@mui/joy': path.join(nodeModulesPath, '@mui/joy'),
|
|
39
|
-
'@mui/material': path.join(nodeModulesPath, '@mui/material'),
|
|
40
|
-
'@mui/icons-material': path.join(nodeModulesPath, '@mui/icons-material'),
|
|
41
|
-
'@mui/material/styles': path.resolve(nodeModulesPath, '@mui/material/styles'),
|
|
42
|
-
'@mui/system': path.resolve(nodeModulesPath, '@mui/system'),
|
|
43
|
-
'@mui/private-theming': path.resolve(nodeModulesPath, '@mui/private-theming'),
|
|
44
|
-
'@mui/styled-engine': path.resolve(nodeModulesPath, '@mui/styled-engine'),
|
|
45
|
-
'webpack-hot-middleware': path.join(nodeModulesPath, 'webpack-hot-middleware'),
|
|
46
|
-
'react-query': path.join(nodeModulesPath, 'react-query'),
|
|
47
|
-
'react-router': path.join(nodeModulesPath, 'react-router'),
|
|
48
|
-
'react-router-dom': path.join(nodeModulesPath, 'react-router-dom'),
|
|
49
|
-
},
|
|
50
|
-
// provide shims for node libraries for webpack >= 5
|
|
51
|
-
fallback: {
|
|
52
|
-
crypto: require.resolve('crypto-browserify'),
|
|
53
|
-
util: require.resolve('util/'),
|
|
54
|
-
events: require.resolve('events/'),
|
|
55
|
-
url: require.resolve('url/'),
|
|
56
|
-
buffer: require.resolve('buffer/'),
|
|
57
|
-
stream: require.resolve('stream-browserify'),
|
|
58
|
-
'process/browser': require.resolve('process/browser'),
|
|
59
|
-
path: require.resolve('path-browserify'),
|
|
60
|
-
vm: require.resolve('vm-browserify'),
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
// since this webpack.config is invoked via webpack-dev-middleware in the process of the consuming server package (not this package)
|
|
64
|
-
// we need to let webpack know where to look for loaders like: file-loader and ts-loader
|
|
65
|
-
// it's ideal to keep those dependencies within this package instead of requiring them installed by the consumer
|
|
66
|
-
resolveLoader: {
|
|
67
|
-
modules: [nodeModulesPath, 'node_modules'],
|
|
68
|
-
},
|
|
69
|
-
module: {
|
|
70
|
-
rules: [
|
|
71
|
-
webpack5esmInteropRule,
|
|
72
|
-
// all files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'
|
|
73
|
-
// this will only transpile (to integrate with babel via ReactRefreshTypeScript); rely on the ide for compiler checks
|
|
74
|
-
{
|
|
75
|
-
test: /\.[jt]sx?$/,
|
|
76
|
-
exclude: /node_modules/,
|
|
77
|
-
use: [
|
|
78
|
-
{
|
|
79
|
-
loader: require.resolve('ts-loader'),
|
|
80
|
-
options: {
|
|
81
|
-
getCustomTransformers: () => ({
|
|
82
|
-
before: [ReactRefreshTypeScript()],
|
|
83
|
-
}),
|
|
84
|
-
transpileOnly: true,
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
|
-
},
|
|
89
|
-
// image files
|
|
90
|
-
{
|
|
91
|
-
test: /\.(png|jpe?g|gif|svg)$/i,
|
|
92
|
-
use: [
|
|
93
|
-
{
|
|
94
|
-
loader: 'file-loader',
|
|
95
|
-
options: {
|
|
96
|
-
name: '[path][name].[ext]', // This line will keep the original path and filename
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
test: /\.css$/i,
|
|
103
|
-
use: ['style-loader', 'css-loader'],
|
|
104
|
-
},
|
|
105
|
-
],
|
|
106
|
-
},
|
|
107
|
-
optimization: {
|
|
108
|
-
splitChunks: {
|
|
109
|
-
cacheGroups: {
|
|
110
|
-
vendor: {
|
|
111
|
-
test: /[\\/]node_modules[\\/]/, // Matches node_modules folder
|
|
112
|
-
name: 'vendor',
|
|
113
|
-
chunks: 'all',
|
|
114
|
-
priority: -10,
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
plugins: [
|
|
120
|
-
new webpack.ProvidePlugin({
|
|
121
|
-
process: 'process/browser',
|
|
122
|
-
Buffer: ['buffer', 'Buffer'],
|
|
123
|
-
}),
|
|
124
|
-
new webpack.HotModuleReplacementPlugin(),
|
|
125
|
-
new ReactRefreshWebpackPlugin(),
|
|
126
|
-
new webpack.NormalModuleReplacementPlugin(/^node:process$/, (resource) => {
|
|
127
|
-
resource.request = 'process/browser';
|
|
128
|
-
}),
|
|
129
|
-
new webpack.NormalModuleReplacementPlugin(/^node:path$/, (resource) => {
|
|
130
|
-
resource.request = 'path';
|
|
131
|
-
}),
|
|
132
|
-
new webpack.NormalModuleReplacementPlugin(/^node:url$/, (resource) => {
|
|
133
|
-
resource.request = 'url';
|
|
134
|
-
}),
|
|
135
|
-
],
|
|
136
|
-
};
|