@goldstack/template-ssr 0.1.8 → 0.1.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.
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export * from './types/SSRPackage';
|
|
3
|
-
import type { APIGatewayProxyResultV2 } from 'aws-lambda';
|
|
3
|
+
import type { APIGatewayProxyEventV2, APIGatewayProxyResultV2, Handler } from 'aws-lambda';
|
|
4
4
|
import type { RenderPageProps } from '@goldstack/template-ssr-server';
|
|
5
5
|
import type { LambdaApiDeploymentConfiguration } from '@goldstack/utils-aws-lambda';
|
|
6
6
|
import type { SSRDeploymentConfiguration } from './types/SSRPackage';
|
|
7
|
-
export type
|
|
7
|
+
export declare type SSRHandler = Handler<APIGatewayProxyEventV2, APIGatewayProxyResultV2>;
|
|
8
|
+
export type { RenderDocumentProps, PartialRenderPageProps, BuildConfiguration, ClientBuildOptionsArgs, ServerBuildOptionsArgs, } from '@goldstack/template-ssr-server';
|
|
8
9
|
export declare const renderPage: <PropType>(props: RenderPageProps<PropType>) => Promise<APIGatewayProxyResultV2>;
|
|
9
10
|
export declare const createLambdaAPIDeploymentConfiguration: (configuration: SSRDeploymentConfiguration) => LambdaApiDeploymentConfiguration;
|
|
10
11
|
export declare const hydrate: (c: React.FunctionComponent<any>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateSSR.d.ts","sourceRoot":"","sources":["../../src/templateSSR.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AAEnC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"templateSSR.d.ts","sourceRoot":"","sources":["../../src/templateSSR.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AAEnC,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,OAAO,EACR,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAErE,oBAAY,UAAU,GAAG,OAAO,CAC9B,sBAAsB,EACtB,uBAAuB,CACxB,CAAC;AAEF,YAAY,EACV,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,gCAAgC,CAAC;AAExC,eAAO,MAAM,UAAU,kDAEpB,QAAQ,uBAAuB,CAGjC,CAAC;AAMF,eAAO,MAAM,sCAAsC,kBAClC,0BAA0B,KACxC,gCAOF,CAAC;AAEF,eAAO,MAAM,OAAO,MAEf,MAAM,iBAAiB,CAAC,GAAG,CAAC,KAC9B,IAiBF,CAAC"}
|
package/dist/src/templateSSR.js
CHANGED
|
@@ -49,7 +49,7 @@ c) => {
|
|
|
49
49
|
}
|
|
50
50
|
// hydration not required in test environments
|
|
51
51
|
if (!node && !process.env.JEST_WORKER_ID) {
|
|
52
|
-
throw new Error('Cannot hydrate server-side rendered content and
|
|
52
|
+
throw new Error('Cannot hydrate server-side rendered content and initialise JavaScript on the client. No element with id "root" found on page.');
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
exports.hydrate = hydrate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateSSR.js","sourceRoot":"","sources":["../../src/templateSSR.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,qDAAmC;
|
|
1
|
+
{"version":3,"file":"templateSSR.js","sourceRoot":"","sources":["../../src/templateSSR.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,qDAAmC;AAQnC,8DAAwC;AAkBjC,MAAM,UAAU,GAAG,KAAK,EAC7B,KAAgC,EACE,EAAE;IACpC,8DAA8D;IAC9D,OAAO,OAAO,CAAC,gCAAgC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC,CAAC;AALW,QAAA,UAAU,cAKrB;AAEF,SAAS,QAAQ;IACf,OAAO,CAAC,CAAC,OAAO,MAAM,IAAI,WAAW,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC5D,CAAC;AAEM,MAAM,sCAAsC,GAAG,CACpD,aAAyC,EACP,EAAE;IACpC,OAAO;QACL,SAAS,EAAE,aAAa,CAAC,MAAM;QAC/B,gBAAgB,EAAE,aAAa,CAAC,gBAAgB;QAChD,OAAO,EAAE,aAAa,CAAC,OAAO;QAC9B,gBAAgB,EAAE,aAAa,CAAC,gBAAgB;KACjD,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,sCAAsC,0CASjD;AAEK,MAAM,OAAO,GAAG;AACrB,8EAA8E;AAC9E,CAA+B,EACzB,EAAE;IACR,IAAI,QAAQ,EAAE;QAAE,OAAO;IAEvB,MAAM,IAAI,GAAG,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAC7C,IAAI,IAAI,EAAE;QACR,gBAAQ,CAAC,WAAW,CAClB,IAAI,EACJ,eAAK,CAAC,aAAa,CAAC,CAAC,EAAG,MAAc,CAAC,iBAAiB,CAAC,CAC1D,CAAC;KACH;IAED,8CAA8C;IAC9C,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE;QACxC,MAAM,IAAI,KAAK,CACb,+HAA+H,CAChI,CAAC;KACH;AACH,CAAC,CAAC;AApBW,QAAA,OAAO,WAoBlB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goldstack/template-ssr",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Building blocks for implementing server-side rendered pages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"goldstack",
|
|
@@ -39,26 +39,26 @@
|
|
|
39
39
|
"version:apply:force": "yarn version $@ && yarn version apply"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@goldstack/infra": "0.3.
|
|
43
|
-
"@goldstack/infra-aws": "0.3.
|
|
44
|
-
"@goldstack/template-ssr-server": "0.1.
|
|
45
|
-
"@goldstack/utils-aws-lambda": "0.1.
|
|
46
|
-
"@goldstack/utils-esbuild": "0.4.
|
|
47
|
-
"@goldstack/utils-package": "0.3.
|
|
48
|
-
"@goldstack/utils-package-config-embedded": "0.4.
|
|
49
|
-
"@goldstack/utils-template": "0.3.
|
|
50
|
-
"@goldstack/utils-terraform": "0.3.
|
|
42
|
+
"@goldstack/infra": "0.3.40",
|
|
43
|
+
"@goldstack/infra-aws": "0.3.49",
|
|
44
|
+
"@goldstack/template-ssr-server": "0.1.11",
|
|
45
|
+
"@goldstack/utils-aws-lambda": "0.1.40",
|
|
46
|
+
"@goldstack/utils-esbuild": "0.4.4",
|
|
47
|
+
"@goldstack/utils-package": "0.3.43",
|
|
48
|
+
"@goldstack/utils-package-config-embedded": "0.4.7",
|
|
49
|
+
"@goldstack/utils-template": "0.3.39",
|
|
50
|
+
"@goldstack/utils-terraform": "0.3.73",
|
|
51
51
|
"react": "^18.2.0",
|
|
52
52
|
"react-dom": "^18.2.0",
|
|
53
53
|
"source-map-support": "^0.5.21"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@goldstack/utils-docs-cli": "0.3.11",
|
|
57
|
-
"@goldstack/utils-git": "0.1.
|
|
58
|
-
"@goldstack/utils-package-config-generate": "0.2.
|
|
57
|
+
"@goldstack/utils-git": "0.1.37",
|
|
58
|
+
"@goldstack/utils-package-config-generate": "0.2.18",
|
|
59
59
|
"@types/aws-lambda": "^8.10.88",
|
|
60
|
-
"@types/jest": "^
|
|
61
|
-
"@types/node": "^
|
|
60
|
+
"@types/jest": "^28.1.8",
|
|
61
|
+
"@types/node": "^18.7.13",
|
|
62
62
|
"@types/react": "^18.0.15",
|
|
63
63
|
"@types/react-dom": "^18.0.6",
|
|
64
64
|
"@types/yargs": "^17.0.10",
|