@plurid/plurid-react-server 0.0.0-8 → 0.0.0-9
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const DEFAULT_SERVER_PORT: number;
|
|
2
2
|
export declare const DEFAULT_SERVER_OPTIONS_SERVER_NAME = "Plurid Server";
|
|
3
|
+
export declare const DEFAULT_SERVER_OPTIONS_HOSTNAME = "origin";
|
|
3
4
|
export declare const DEFAULT_SERVER_OPTIONS_QUIET = false;
|
|
4
5
|
export declare const DEFAULT_SERVER_OPTIONS_COMPRESSION = true;
|
|
5
6
|
export declare const DEFAULT_SERVER_OPTIONS_OPEN = false;
|
|
@@ -9,6 +10,7 @@ export declare const DEFAULT_SERVER_OPTIONS_STILLS_DIRECTORY = "stills";
|
|
|
9
10
|
export declare const DEFAULT_SERVER_OPTIONS_GATEWAY = "/gateway";
|
|
10
11
|
export declare const DEFAULT_SERVER_OPTIONS: {
|
|
11
12
|
SERVER_NAME: string;
|
|
13
|
+
HOSTNAME: string;
|
|
12
14
|
QUIET: boolean;
|
|
13
15
|
COMPRESSION: boolean;
|
|
14
16
|
OPEN: boolean;
|
|
@@ -11,6 +11,11 @@ export declare type DebugLevels = 'none' | 'error' | 'warn' | 'info';
|
|
|
11
11
|
export interface PluridServerOptions {
|
|
12
12
|
/** To be used for logging. Default `Plurid Server` */
|
|
13
13
|
serverName: string;
|
|
14
|
+
/**
|
|
15
|
+
* The hostname of the server exposed to the internet, e.g. `example.com`,
|
|
16
|
+
* to be used in plurid plane links.
|
|
17
|
+
*/
|
|
18
|
+
hostname: string;
|
|
14
19
|
/**
|
|
15
20
|
* To log or not to log to the console.
|
|
16
21
|
*/
|
package/distribution/index.es.js
CHANGED
|
@@ -102,6 +102,8 @@ const DEFAULT_SERVER_PORT = process.env.PORT ? parseInt(process.env.PORT) : 8080
|
|
|
102
102
|
|
|
103
103
|
const DEFAULT_SERVER_OPTIONS_SERVER_NAME = "Plurid Server";
|
|
104
104
|
|
|
105
|
+
const DEFAULT_SERVER_OPTIONS_HOSTNAME = "origin";
|
|
106
|
+
|
|
105
107
|
const DEFAULT_SERVER_OPTIONS_QUIET = false;
|
|
106
108
|
|
|
107
109
|
const DEFAULT_SERVER_OPTIONS_COMPRESSION = true;
|
|
@@ -118,6 +120,7 @@ const DEFAULT_SERVER_OPTIONS_GATEWAY = "/gateway";
|
|
|
118
120
|
|
|
119
121
|
const DEFAULT_SERVER_OPTIONS = {
|
|
120
122
|
SERVER_NAME: DEFAULT_SERVER_OPTIONS_SERVER_NAME,
|
|
123
|
+
HOSTNAME: DEFAULT_SERVER_OPTIONS_HOSTNAME,
|
|
121
124
|
QUIET: DEFAULT_SERVER_OPTIONS_QUIET,
|
|
122
125
|
COMPRESSION: DEFAULT_SERVER_OPTIONS_COMPRESSION,
|
|
123
126
|
OPEN: DEFAULT_SERVER_OPTIONS_OPEN,
|
|
@@ -156,7 +159,9 @@ const defaultStillerOptions = {
|
|
|
156
159
|
ignore: []
|
|
157
160
|
};
|
|
158
161
|
|
|
159
|
-
const cleanTemplate = template => minify(template
|
|
162
|
+
const cleanTemplate = template => minify(template, {
|
|
163
|
+
collapseWhitespace: true
|
|
164
|
+
});
|
|
160
165
|
|
|
161
166
|
const resolveBackgroundStyle = store => {
|
|
162
167
|
var _a;
|
|
@@ -366,7 +371,7 @@ class PluridServer {
|
|
|
366
371
|
this.isoMatcher = new PluridIsoMatcher({
|
|
367
372
|
routes: this.routes,
|
|
368
373
|
routePlanes: this.planes
|
|
369
|
-
});
|
|
374
|
+
}, this.options.hostname);
|
|
370
375
|
this.configureServer();
|
|
371
376
|
this.handleEndpoints();
|
|
372
377
|
process.addListener("SIGINT", (() => {
|
|
@@ -826,6 +831,7 @@ class PluridServer {
|
|
|
826
831
|
var _a, _b;
|
|
827
832
|
const options = {
|
|
828
833
|
serverName: (partialOptions === null || partialOptions === void 0 ? void 0 : partialOptions.serverName) || DEFAULT_SERVER_OPTIONS.SERVER_NAME,
|
|
834
|
+
hostname: (partialOptions === null || partialOptions === void 0 ? void 0 : partialOptions.hostname) || DEFAULT_SERVER_OPTIONS.HOSTNAME,
|
|
829
835
|
quiet: (partialOptions === null || partialOptions === void 0 ? void 0 : partialOptions.quiet) || DEFAULT_SERVER_OPTIONS.QUIET,
|
|
830
836
|
debug: (partialOptions === null || partialOptions === void 0 ? void 0 : partialOptions.debug) ? partialOptions === null || partialOptions === void 0 ? void 0 : partialOptions.debug : environment.production ? "error" : "info",
|
|
831
837
|
compression: (_a = partialOptions === null || partialOptions === void 0 ? void 0 : partialOptions.compression) !== null && _a !== void 0 ? _a : DEFAULT_SERVER_OPTIONS.COMPRESSION,
|
package/distribution/index.js
CHANGED
|
@@ -150,6 +150,8 @@ const DEFAULT_SERVER_PORT = process.env.PORT ? parseInt(process.env.PORT) : 8080
|
|
|
150
150
|
|
|
151
151
|
const DEFAULT_SERVER_OPTIONS_SERVER_NAME = "Plurid Server";
|
|
152
152
|
|
|
153
|
+
const DEFAULT_SERVER_OPTIONS_HOSTNAME = "origin";
|
|
154
|
+
|
|
153
155
|
const DEFAULT_SERVER_OPTIONS_QUIET = false;
|
|
154
156
|
|
|
155
157
|
const DEFAULT_SERVER_OPTIONS_COMPRESSION = true;
|
|
@@ -166,6 +168,7 @@ const DEFAULT_SERVER_OPTIONS_GATEWAY = "/gateway";
|
|
|
166
168
|
|
|
167
169
|
const DEFAULT_SERVER_OPTIONS = {
|
|
168
170
|
SERVER_NAME: DEFAULT_SERVER_OPTIONS_SERVER_NAME,
|
|
171
|
+
HOSTNAME: DEFAULT_SERVER_OPTIONS_HOSTNAME,
|
|
169
172
|
QUIET: DEFAULT_SERVER_OPTIONS_QUIET,
|
|
170
173
|
COMPRESSION: DEFAULT_SERVER_OPTIONS_COMPRESSION,
|
|
171
174
|
OPEN: DEFAULT_SERVER_OPTIONS_OPEN,
|
|
@@ -204,7 +207,9 @@ const defaultStillerOptions = {
|
|
|
204
207
|
ignore: []
|
|
205
208
|
};
|
|
206
209
|
|
|
207
|
-
const cleanTemplate = template => htmlMinifier.minify(template
|
|
210
|
+
const cleanTemplate = template => htmlMinifier.minify(template, {
|
|
211
|
+
collapseWhitespace: true
|
|
212
|
+
});
|
|
208
213
|
|
|
209
214
|
const resolveBackgroundStyle = store => {
|
|
210
215
|
var _a;
|
|
@@ -418,7 +423,7 @@ class PluridServer {
|
|
|
418
423
|
this.isoMatcher = new PluridIsoMatcher({
|
|
419
424
|
routes: this.routes,
|
|
420
425
|
routePlanes: this.planes
|
|
421
|
-
});
|
|
426
|
+
}, this.options.hostname);
|
|
422
427
|
this.configureServer();
|
|
423
428
|
this.handleEndpoints();
|
|
424
429
|
process.addListener("SIGINT", (() => {
|
|
@@ -878,6 +883,7 @@ class PluridServer {
|
|
|
878
883
|
var _a, _b;
|
|
879
884
|
const options = {
|
|
880
885
|
serverName: (partialOptions === null || partialOptions === void 0 ? void 0 : partialOptions.serverName) || DEFAULT_SERVER_OPTIONS.SERVER_NAME,
|
|
886
|
+
hostname: (partialOptions === null || partialOptions === void 0 ? void 0 : partialOptions.hostname) || DEFAULT_SERVER_OPTIONS.HOSTNAME,
|
|
881
887
|
quiet: (partialOptions === null || partialOptions === void 0 ? void 0 : partialOptions.quiet) || DEFAULT_SERVER_OPTIONS.QUIET,
|
|
882
888
|
debug: (partialOptions === null || partialOptions === void 0 ? void 0 : partialOptions.debug) ? partialOptions === null || partialOptions === void 0 ? void 0 : partialOptions.debug : environment.production ? "error" : "info",
|
|
883
889
|
compression: (_a = partialOptions === null || partialOptions === void 0 ? void 0 : partialOptions.compression) !== null && _a !== void 0 ? _a : DEFAULT_SERVER_OPTIONS.COMPRESSION,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurid/plurid-react-server",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-9",
|
|
4
4
|
"description": "React implementation of Plurid to view and explore the web in three dimensions with server-side rendering",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plurid",
|
|
@@ -80,13 +80,13 @@
|
|
|
80
80
|
"@babel/core": "^7.18.6",
|
|
81
81
|
"@plurid/elementql": "^0.0.0-1",
|
|
82
82
|
"@plurid/elementql-client-react": "^0.0.0-1",
|
|
83
|
-
"@plurid/plurid-data": "0.0.0-
|
|
84
|
-
"@plurid/plurid-engine": "0.0.0-
|
|
83
|
+
"@plurid/plurid-data": "0.0.0-14",
|
|
84
|
+
"@plurid/plurid-engine": "0.0.0-12",
|
|
85
85
|
"@plurid/plurid-functions": "0.0.0-25",
|
|
86
86
|
"@plurid/plurid-functions-react": "0.0.0-5",
|
|
87
87
|
"@plurid/plurid-icons-react": "0.0.0-4",
|
|
88
88
|
"@plurid/plurid-pubsub": "0.0.0-6",
|
|
89
|
-
"@plurid/plurid-react": "0.0.0-
|
|
89
|
+
"@plurid/plurid-react": "0.0.0-22",
|
|
90
90
|
"@plurid/plurid-themes": "0.0.0-2",
|
|
91
91
|
"@plurid/plurid-ui-components-react": "0.0.0-13",
|
|
92
92
|
"@plurid/plurid-ui-state-react": "0.0.0-3",
|
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
"@types/express": "^4.17.13",
|
|
99
99
|
"@types/hammerjs": "^2.0.41",
|
|
100
100
|
"@types/html-minifier": "^4.0.2",
|
|
101
|
-
"@types/jest": "^28.1.
|
|
102
|
-
"@types/node": "^18.0.
|
|
101
|
+
"@types/jest": "^28.1.6",
|
|
102
|
+
"@types/node": "^18.0.5",
|
|
103
103
|
"@types/react": "^18.0.15",
|
|
104
104
|
"@types/react-dom": "^18.0.6",
|
|
105
105
|
"@types/react-redux": "^7.1.24",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"react-redux": "^8.0.2",
|
|
121
121
|
"redux": "^4.2.0",
|
|
122
122
|
"redux-thunk": "^2.4.1",
|
|
123
|
-
"rollup": "^2.
|
|
123
|
+
"rollup": "^2.77.0",
|
|
124
124
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
125
125
|
"rollup-plugin-terser": "^7.0.2",
|
|
126
126
|
"rollup-plugin-typescript2": "^0.32.1",
|