@plurid/plurid-react-server 0.0.0-0 → 0.0.0-11
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/distribution/data/constants/general/index.d.ts +34 -0
- package/distribution/data/constants/index.d.ts +1 -29
- package/distribution/data/constants/{stiller.d.ts → stiller/index.d.ts} +1 -1
- package/distribution/data/interfaces/{external.d.ts → external/index.d.ts} +39 -28
- package/distribution/data/interfaces/{internal.d.ts → internal/index.d.ts} +18 -20
- package/distribution/data/templates/index.d.ts +1 -0
- package/distribution/index.d.ts +3 -2
- package/distribution/index.es.js +974 -8790
- package/distribution/index.js +1017 -8815
- package/distribution/objects/ContentGenerator/index.d.ts +4 -2
- package/distribution/objects/LiveServer/index.d.ts +13 -0
- package/distribution/objects/Renderer/index.d.ts +7 -8
- package/distribution/objects/Renderer/{template.d.ts → template/index.d.ts} +1 -1
- package/distribution/objects/Server/index.d.ts +20 -6
- package/distribution/objects/Stiller/{__specs__/index.d.ts → __tests__/index.test.d.ts} +0 -0
- package/distribution/objects/Stiller/index.d.ts +2 -1
- package/distribution/objects/StillsGenerator/index.d.ts +1 -1
- package/distribution/objects/StillsManager/index.d.ts +1 -1
- package/distribution/utilities/pttp/index.d.ts +6 -0
- package/distribution/utilities/{template.d.ts → template/index.d.ts} +3 -2
- package/distribution/utilities/{wrapping.d.ts → wrapping/index.d.ts} +2 -4
- package/package.json +71 -58
- package/distribution/index.es.js.map +0 -1
- package/distribution/index.js.map +0 -1
- package/distribution/index.min.js +0 -2
- package/distribution/index.min.js.map +0 -1
- package/distribution/objects/PluridsResponder/index.d.ts +0 -42
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { PluridContentGeneratorData } from
|
|
2
|
-
|
|
1
|
+
import { PluridContentGeneratorData } from "../../data/interfaces";
|
|
2
|
+
declare class PluridContentGenerator {
|
|
3
3
|
private data;
|
|
4
|
+
private providers;
|
|
4
5
|
constructor(data: PluridContentGeneratorData);
|
|
5
6
|
render(): Promise<string>;
|
|
6
7
|
private importProviders;
|
|
7
8
|
}
|
|
9
|
+
export default PluridContentGenerator;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PluridLiveServerOptions } from "../../data/interfaces";
|
|
2
|
+
declare class LiveServer {
|
|
3
|
+
private options;
|
|
4
|
+
private expressServer;
|
|
5
|
+
private httpServer;
|
|
6
|
+
private sockets;
|
|
7
|
+
constructor(options?: Partial<PluridLiveServerOptions>);
|
|
8
|
+
private resolveOptions;
|
|
9
|
+
private setupExpressServer;
|
|
10
|
+
private setupHttpServer;
|
|
11
|
+
start(): void;
|
|
12
|
+
}
|
|
13
|
+
export default LiveServer;
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { PluridRendererConfiguration } from
|
|
2
|
-
|
|
1
|
+
import { PluridRendererConfiguration } from "../../data/interfaces";
|
|
2
|
+
declare class PluridRenderer {
|
|
3
3
|
private htmlLanguage;
|
|
4
|
-
private htmlAttributes;
|
|
5
4
|
private head;
|
|
5
|
+
private htmlAttributes;
|
|
6
|
+
private bodyAttributes;
|
|
6
7
|
private defaultStyle;
|
|
7
8
|
private styles;
|
|
8
9
|
private headScripts;
|
|
10
|
+
private bodyScripts;
|
|
9
11
|
private vendorScriptSource;
|
|
10
12
|
private mainScriptSource;
|
|
11
|
-
private bodyAttributes;
|
|
12
13
|
private root;
|
|
13
14
|
private content;
|
|
14
|
-
private windowSizerScript;
|
|
15
|
-
private defaultPreloadedReduxState;
|
|
16
|
-
private reduxState;
|
|
17
15
|
private defaultPreloadedPluridMetastate;
|
|
18
16
|
private pluridMetastate;
|
|
19
|
-
private
|
|
17
|
+
private globals;
|
|
20
18
|
constructor(configuration: PluridRendererConfiguration);
|
|
21
19
|
html(): string;
|
|
22
20
|
}
|
|
21
|
+
export default PluridRenderer;
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
import { Server } from 'http';
|
|
3
3
|
import express from 'express';
|
|
4
4
|
import { PluridRoute } from '@plurid/plurid-data';
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { PluridReactComponent } from '@plurid/plurid-react';
|
|
6
|
+
import { PluridServerOptions, PluridServerConfiguration } from "../../data/interfaces";
|
|
7
|
+
declare class PluridServer {
|
|
7
8
|
private routes;
|
|
9
|
+
private planes;
|
|
8
10
|
private preserves;
|
|
9
11
|
private helmet;
|
|
10
12
|
private styles;
|
|
@@ -12,16 +14,18 @@ export default class PluridServer {
|
|
|
12
14
|
private exterior;
|
|
13
15
|
private shell;
|
|
14
16
|
private services;
|
|
15
|
-
private servicesData;
|
|
16
17
|
private options;
|
|
17
18
|
private template;
|
|
19
|
+
usePTTP: boolean;
|
|
20
|
+
private pttpHandler;
|
|
21
|
+
private elementqlEndpoint;
|
|
18
22
|
private serverApplication;
|
|
19
23
|
private server;
|
|
20
24
|
private port;
|
|
21
|
-
private
|
|
25
|
+
private isoMatcher;
|
|
22
26
|
constructor(configuration: PluridServerConfiguration);
|
|
23
27
|
static analysis(pluridServer: PluridServer): {
|
|
24
|
-
routes: PluridRoute[];
|
|
28
|
+
routes: PluridRoute<PluridReactComponent<any, import("@plurid/plurid-data").PluridPlaneComponentProperty | import("@plurid/plurid-data").PluridRouteComponentProperty>, any>[];
|
|
25
29
|
options: PluridServerOptions;
|
|
26
30
|
};
|
|
27
31
|
start(port?: string | number): Server;
|
|
@@ -33,11 +37,21 @@ export default class PluridServer {
|
|
|
33
37
|
delete: (path: string, ...handlers: express.RequestHandler[]) => express.Express;
|
|
34
38
|
};
|
|
35
39
|
instance(): express.Express;
|
|
36
|
-
private
|
|
40
|
+
private handleEndpoints;
|
|
41
|
+
private handleGetRequest;
|
|
42
|
+
private handlePTTPRequest;
|
|
43
|
+
private ignoreGetRequest;
|
|
44
|
+
private resolveMatchingPath;
|
|
45
|
+
private resolvePreserve;
|
|
46
|
+
private resolvePreserveAfterServe;
|
|
47
|
+
private handleGateway;
|
|
37
48
|
private renderApplication;
|
|
38
49
|
private getContentAndStyles;
|
|
50
|
+
private computeRequestTime;
|
|
39
51
|
private handleOptions;
|
|
40
52
|
private configureServer;
|
|
41
53
|
private loadMiddleware;
|
|
42
54
|
private open;
|
|
55
|
+
private debugAllows;
|
|
43
56
|
}
|
|
57
|
+
export default PluridServer;
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StillerOptions } from
|
|
1
|
+
import { StillerOptions } from "../../data/interfaces";
|
|
2
2
|
/**
|
|
3
3
|
* The Server will parse the given application routes,
|
|
4
4
|
* and will decide which ones to send to the Stiller.
|
|
@@ -10,6 +10,7 @@ import { StillerOptions } from '../../data/interfaces';
|
|
|
10
10
|
* to serve the adequate plurid space structure when asked for the given route.
|
|
11
11
|
*/
|
|
12
12
|
declare class Stiller {
|
|
13
|
+
private puppeteer;
|
|
13
14
|
private host;
|
|
14
15
|
private routes;
|
|
15
16
|
private configuration;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IsoMatcherPlaneResult } from '@plurid/plurid-data';
|
|
2
|
+
import { PluridReactComponent } from '@plurid/plurid-react';
|
|
3
|
+
export declare const resolveElementFromPlaneMatch: (planeMatch: IsoMatcherPlaneResult<PluridReactComponent<any>>, elementqlEndpoint: string | undefined) => {
|
|
4
|
+
name: string;
|
|
5
|
+
url: string | undefined;
|
|
6
|
+
} | undefined;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export declare const cleanTemplate: (template: string) => string;
|
|
2
2
|
export declare const resolveBackgroundStyle: (store: string) => {
|
|
3
|
-
gradientBackground:
|
|
4
|
-
gradientForeground:
|
|
3
|
+
gradientBackground: string;
|
|
4
|
+
gradientForeground: string;
|
|
5
5
|
};
|
|
6
6
|
export declare const recordToString: (record: Record<string, string> | undefined) => string;
|
|
7
7
|
export declare const assetsPathRewrite: (content: string) => string;
|
|
8
8
|
export declare const safeStore: (store: string) => string;
|
|
9
|
+
export declare const globalsInjector: (globals: Record<string, string>) => string;
|
|
@@ -2,12 +2,10 @@ import React from 'react';
|
|
|
2
2
|
declare const wrapping: (WrappedComponent: any, WrappeeComponent: any, properties: any) => {
|
|
3
3
|
new (props: any): {
|
|
4
4
|
render(): JSX.Element;
|
|
5
|
-
context:
|
|
5
|
+
context: unknown;
|
|
6
6
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
7
7
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
8
|
-
readonly props: Readonly<{}
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
}>;
|
|
8
|
+
readonly props: Readonly<{}>;
|
|
11
9
|
state: Readonly<{}>;
|
|
12
10
|
refs: {
|
|
13
11
|
[key: string]: React.ReactInstance;
|
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-11",
|
|
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",
|
|
@@ -39,19 +39,27 @@
|
|
|
39
39
|
"clean": "rm -rf ./distribution",
|
|
40
40
|
"test": "jest ./source --config ./configurations/jest.config.js --rootDir ./",
|
|
41
41
|
"lint": "eslint -c ./configurations/.eslintrc.js ./source --ext .ts,.tsx",
|
|
42
|
-
"start": "
|
|
43
|
-
"build.development": "
|
|
44
|
-
"build.production": "
|
|
45
|
-
"build": "
|
|
46
|
-
"
|
|
42
|
+
"start": "pnpm clean && rollup -c ./scripts/rollup.development.js -w --environment ENV_MODE:local",
|
|
43
|
+
"build.development": "pnpm clean && rollup -c ./scripts/rollup.config.js --environment ENV_MODE:development",
|
|
44
|
+
"build.production": "pnpm clean && rollup -c ./scripts/rollup.config.js --environment ENV_MODE:production",
|
|
45
|
+
"build": "pnpm clean && pnpm lint && pnpm test && pnpm build.production",
|
|
46
|
+
"esbuild": "esbuild source/index.ts --bundle --platform=node --outfile=distribution/index.js --external:react",
|
|
47
|
+
"prepublishOnly": "pnpm build"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|
|
50
|
+
"@plurid/elementql": "*",
|
|
51
|
+
"@plurid/elementql-client-react": "*",
|
|
49
52
|
"@plurid/plurid-data": "*",
|
|
50
53
|
"@plurid/plurid-engine": "*",
|
|
51
54
|
"@plurid/plurid-functions": "*",
|
|
55
|
+
"@plurid/plurid-functions-react": "*",
|
|
56
|
+
"@plurid/plurid-icons-react": "*",
|
|
52
57
|
"@plurid/plurid-pubsub": "*",
|
|
53
58
|
"@plurid/plurid-react": "*",
|
|
54
|
-
"
|
|
59
|
+
"@plurid/plurid-themes": "*",
|
|
60
|
+
"@plurid/plurid-ui-components-react": "*",
|
|
61
|
+
"@plurid/plurid-ui-state-react": "*",
|
|
62
|
+
"cross-fetch": ">=3.1",
|
|
55
63
|
"react": ">=16.8",
|
|
56
64
|
"react-dom": ">=16.8",
|
|
57
65
|
"react-helmet-async": ">=1",
|
|
@@ -60,63 +68,68 @@
|
|
|
60
68
|
"styled-components": ">=5"
|
|
61
69
|
},
|
|
62
70
|
"dependencies": {
|
|
71
|
+
"body-parser": "^1.20.0",
|
|
63
72
|
"compression": "^1.7.4",
|
|
64
73
|
"detect-port": "^1.3.0",
|
|
65
|
-
"express": "^4.
|
|
66
|
-
"
|
|
74
|
+
"express": "^4.18.1",
|
|
75
|
+
"html-minifier": "^4.0.0",
|
|
76
|
+
"open": "^8.4.0"
|
|
67
77
|
},
|
|
68
78
|
"devDependencies": {
|
|
69
|
-
"@apollo/client": "^3.
|
|
70
|
-
"@babel/core": "^7.
|
|
71
|
-
"@plurid/
|
|
72
|
-
"@plurid/
|
|
73
|
-
"@plurid/plurid-
|
|
74
|
-
"@plurid/plurid-
|
|
75
|
-
"@plurid/plurid-
|
|
76
|
-
"@plurid/plurid-
|
|
77
|
-
"@plurid/plurid-react": "0.0.0-
|
|
78
|
-
"@plurid/plurid-
|
|
79
|
-
"@plurid/plurid-
|
|
80
|
-
"@plurid/plurid-
|
|
81
|
-
"@
|
|
82
|
-
"@
|
|
83
|
-
"@
|
|
84
|
-
"@rollup/plugin-
|
|
85
|
-
"@
|
|
86
|
-
"@types/compression": "^1.7.
|
|
87
|
-
"@types/detect-port": "^1.3.
|
|
88
|
-
"@types/express": "^4.17.
|
|
89
|
-
"@types/hammerjs": "^2.0.
|
|
90
|
-
"@types/
|
|
91
|
-
"@types/
|
|
92
|
-
"@types/
|
|
93
|
-
"@types/react
|
|
94
|
-
"@types/react-
|
|
95
|
-
"@types/react-
|
|
96
|
-
"@types/
|
|
97
|
-
"@
|
|
98
|
-
"@typescript-eslint/
|
|
99
|
-
"eslint": "^
|
|
100
|
-
"
|
|
79
|
+
"@apollo/client": "^3.6.9",
|
|
80
|
+
"@babel/core": "^7.18.6",
|
|
81
|
+
"@plurid/elementql": "^0.0.0-1",
|
|
82
|
+
"@plurid/elementql-client-react": "^0.0.0-1",
|
|
83
|
+
"@plurid/plurid-data": "0.0.0-14",
|
|
84
|
+
"@plurid/plurid-engine": "0.0.0-13",
|
|
85
|
+
"@plurid/plurid-functions": "0.0.0-25",
|
|
86
|
+
"@plurid/plurid-functions-react": "0.0.0-5",
|
|
87
|
+
"@plurid/plurid-icons-react": "0.0.0-4",
|
|
88
|
+
"@plurid/plurid-pubsub": "0.0.0-6",
|
|
89
|
+
"@plurid/plurid-react": "0.0.0-23",
|
|
90
|
+
"@plurid/plurid-themes": "0.0.0-2",
|
|
91
|
+
"@plurid/plurid-ui-components-react": "0.0.0-13",
|
|
92
|
+
"@plurid/plurid-ui-state-react": "0.0.0-3",
|
|
93
|
+
"@redux-devtools/extension": "^3.2.2",
|
|
94
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
95
|
+
"@types/body-parser": "^1.19.2",
|
|
96
|
+
"@types/compression": "^1.7.2",
|
|
97
|
+
"@types/detect-port": "^1.3.2",
|
|
98
|
+
"@types/express": "^4.17.13",
|
|
99
|
+
"@types/hammerjs": "^2.0.41",
|
|
100
|
+
"@types/html-minifier": "^4.0.2",
|
|
101
|
+
"@types/jest": "^28.1.6",
|
|
102
|
+
"@types/node": "^18.0.5",
|
|
103
|
+
"@types/react": "^18.0.15",
|
|
104
|
+
"@types/react-dom": "^18.0.6",
|
|
105
|
+
"@types/react-redux": "^7.1.24",
|
|
106
|
+
"@types/react-stripe-elements": "^6.0.6",
|
|
107
|
+
"@types/styled-components": "^5.1.25",
|
|
108
|
+
"@typescript-eslint/eslint-plugin": "^5.30.6",
|
|
109
|
+
"@typescript-eslint/parser": "^5.30.6",
|
|
110
|
+
"@zerollup/ts-transform-paths": "^1.7.18",
|
|
111
|
+
"cross-fetch": "^3.1.5",
|
|
112
|
+
"eslint": "^8.19.0",
|
|
113
|
+
"graphql": "^16.5.0",
|
|
101
114
|
"hammerjs": "^2.0.8",
|
|
102
|
-
"jest": "^
|
|
103
|
-
"jest-config": "^
|
|
104
|
-
"
|
|
105
|
-
"react": "^
|
|
106
|
-
"react-
|
|
107
|
-
"react-
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"redux-thunk": "^2.3.0",
|
|
112
|
-
"rollup": "^2.34.2",
|
|
115
|
+
"jest": "^28.1.3",
|
|
116
|
+
"jest-config": "^28.1.3",
|
|
117
|
+
"react": "^18.2.0",
|
|
118
|
+
"react-dom": "^18.2.0",
|
|
119
|
+
"react-helmet-async": "^1.3.0",
|
|
120
|
+
"react-redux": "^8.0.2",
|
|
121
|
+
"redux": "^4.2.0",
|
|
122
|
+
"redux-thunk": "^2.4.1",
|
|
123
|
+
"rollup": "^2.77.0",
|
|
113
124
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
114
|
-
"rollup-plugin-postcss": "^4.0.0",
|
|
115
125
|
"rollup-plugin-terser": "^7.0.2",
|
|
116
|
-
"rollup-plugin-typescript2": "^0.
|
|
117
|
-
"styled-components": "^5.
|
|
118
|
-
"ts-jest": "^
|
|
119
|
-
"ts-node": "^9.1
|
|
120
|
-
"
|
|
126
|
+
"rollup-plugin-typescript2": "^0.32.1",
|
|
127
|
+
"styled-components": "^5.3.5",
|
|
128
|
+
"ts-jest": "^28.0.6",
|
|
129
|
+
"ts-node": "^10.9.1",
|
|
130
|
+
"tslib": "^2.4.0",
|
|
131
|
+
"ttypescript": "^1.5.13",
|
|
132
|
+
"typescript": "^4.7.4",
|
|
133
|
+
"typescript-transform-paths": "^3.3.1"
|
|
121
134
|
}
|
|
122
135
|
}
|