@podium/podlet 5.1.15 → 5.1.17
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 +14 -0
- package/package.json +6 -6
- package/types/podium.d.ts +72 -0
- package/types/podlet.d.ts +67 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [5.1.17](https://github.com/podium-lib/podlet/compare/v5.1.16...v5.1.17) (2024-09-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* type the known context values in an extendable way ([#427](https://github.com/podium-lib/podlet/issues/427)) ([f90ef57](https://github.com/podium-lib/podlet/commit/f90ef577cf6f0fdeabb08edb121a8a0107e77c4d))
|
|
7
|
+
|
|
8
|
+
## [5.1.16](https://github.com/podium-lib/podlet/compare/v5.1.15...v5.1.16) (2024-09-23)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update all dependencies (non-major) ([b8eddfd](https://github.com/podium-lib/podlet/commit/b8eddfd676810607adc56cdc71d2622e73b25e0e))
|
|
14
|
+
|
|
1
15
|
## [5.1.15](https://github.com/podium-lib/podlet/compare/v5.1.14...v5.1.15) (2024-09-16)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@podium/podlet",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Module for building page fragment servers in a micro frontend architecture.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@metrics/client": "2.5.3",
|
|
38
|
-
"@podium/proxy": "5.0.
|
|
38
|
+
"@podium/proxy": "5.0.28",
|
|
39
39
|
"@podium/schemas": "5.0.6",
|
|
40
|
-
"@podium/utils": "5.
|
|
40
|
+
"@podium/utils": "5.3.1",
|
|
41
41
|
"abslog": "2.4.4",
|
|
42
42
|
"ajv": "8.17.1",
|
|
43
43
|
"objobj": "1.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@babel/eslint-parser": "7.25.1",
|
|
47
|
-
"@podium/test-utils": "
|
|
47
|
+
"@podium/test-utils": "3.0.8",
|
|
48
48
|
"@semantic-release/changelog": "6.0.3",
|
|
49
49
|
"@semantic-release/commit-analyzer": "11.1.0",
|
|
50
50
|
"@semantic-release/git": "10.0.1",
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
"eslint": "9.9.1",
|
|
57
57
|
"eslint-config-prettier": "9.1.0",
|
|
58
58
|
"eslint-plugin-prettier": "5.2.1",
|
|
59
|
-
"express": "4.
|
|
59
|
+
"express": "4.20.0",
|
|
60
60
|
"globals": "15.9.0",
|
|
61
61
|
"json-stringify-safe": "5.0.1",
|
|
62
|
-
"npm-run-all2": "
|
|
62
|
+
"npm-run-all2": "6.2.3",
|
|
63
63
|
"prettier": "3.3.3",
|
|
64
64
|
"semantic-release": "23.1.1",
|
|
65
65
|
"tap": "18.8.0",
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Express {
|
|
3
|
+
export interface PodiumHttpIncomingParameters {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface PodiumHttpIncomingContext {
|
|
8
|
+
/**
|
|
9
|
+
* @see https://podium-lib.io/docs/guides/context#default-context-variables
|
|
10
|
+
*/
|
|
11
|
+
debug?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Does user agent sniffing to try to guess the visitor's device type.
|
|
14
|
+
* @see https://podium-lib.io/docs/guides/context#default-context-variables
|
|
15
|
+
*/
|
|
16
|
+
deviceType?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Locale information from the layout.
|
|
19
|
+
* @see https://podium-lib.io/docs/guides/context#default-context-variables
|
|
20
|
+
*/
|
|
21
|
+
locale?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Used to calculate the podlet's public URL when proxied behind a layout.
|
|
24
|
+
* @see https://podium-lib.io/docs/guides/context#construct-public-urls
|
|
25
|
+
*/
|
|
26
|
+
mountOrigin?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Used to calculate the podlet's public URL when proxied behind a layout.
|
|
29
|
+
* @see https://podium-lib.io/docs/guides/context#construct-public-urls
|
|
30
|
+
*/
|
|
31
|
+
mountPathname?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Used to calculate the podlet's public URL when proxied behind a layout.
|
|
34
|
+
* @see https://podium-lib.io/docs/guides/context#construct-public-urls
|
|
35
|
+
*/
|
|
36
|
+
publicPathname?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Name of the caller.
|
|
39
|
+
*/
|
|
40
|
+
requestedBy?: string;
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface PodiumHttpIncomingViewParameters {
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface Locals {
|
|
49
|
+
podium: HttpIncoming<
|
|
50
|
+
PodiumHttpIncomingParameters,
|
|
51
|
+
PodiumHttpIncomingContext,
|
|
52
|
+
PodiumHttpIncomingViewParameters
|
|
53
|
+
>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface Response {
|
|
57
|
+
/**
|
|
58
|
+
* Calls the send / write method on the `http.ServerResponse` object.
|
|
59
|
+
*
|
|
60
|
+
* When in development mode this method will wrap the provided fragment in a
|
|
61
|
+
* default HTML document before dispatching. When not in development mode, this
|
|
62
|
+
* method will just dispatch the fragment.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* app.get(podlet.content(), (req, res) => {
|
|
66
|
+
* res.podiumSend('<h1>Hello World</h1>');
|
|
67
|
+
* });
|
|
68
|
+
*/
|
|
69
|
+
podiumSend(fragment: string, ...args: unknown[]): Response;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
package/types/podlet.d.ts
CHANGED
|
@@ -1,28 +1,74 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Express {
|
|
3
|
+
export interface PodiumHttpIncomingParameters {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
}
|
|
1
6
|
|
|
2
|
-
|
|
7
|
+
export interface PodiumHttpIncomingContext {
|
|
8
|
+
/**
|
|
9
|
+
* @see https://podium-lib.io/docs/guides/context#default-context-variables
|
|
10
|
+
*/
|
|
11
|
+
debug?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Does user agent sniffing to try to guess the visitor's device type.
|
|
14
|
+
* @see https://podium-lib.io/docs/guides/context#default-context-variables
|
|
15
|
+
*/
|
|
16
|
+
deviceType?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Locale information from the layout.
|
|
19
|
+
* @see https://podium-lib.io/docs/guides/context#default-context-variables
|
|
20
|
+
*/
|
|
21
|
+
locale?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Used to calculate the podlet's public URL when proxied behind a layout.
|
|
24
|
+
* @see https://podium-lib.io/docs/guides/context#construct-public-urls
|
|
25
|
+
*/
|
|
26
|
+
mountOrigin?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Used to calculate the podlet's public URL when proxied behind a layout.
|
|
29
|
+
* @see https://podium-lib.io/docs/guides/context#construct-public-urls
|
|
30
|
+
*/
|
|
31
|
+
mountPathname?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Used to calculate the podlet's public URL when proxied behind a layout.
|
|
34
|
+
* @see https://podium-lib.io/docs/guides/context#construct-public-urls
|
|
35
|
+
*/
|
|
36
|
+
publicPathname?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Name of the caller.
|
|
39
|
+
*/
|
|
40
|
+
requestedBy?: string;
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
}
|
|
3
43
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
44
|
+
export interface PodiumHttpIncomingViewParameters {
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface Locals {
|
|
49
|
+
podium: HttpIncoming<
|
|
50
|
+
PodiumHttpIncomingParameters,
|
|
51
|
+
PodiumHttpIncomingContext,
|
|
52
|
+
PodiumHttpIncomingViewParameters
|
|
53
|
+
>;
|
|
54
|
+
}
|
|
9
55
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
56
|
+
export interface Response {
|
|
57
|
+
/**
|
|
58
|
+
* Calls the send / write method on the `http.ServerResponse` object.
|
|
59
|
+
*
|
|
60
|
+
* When in development mode this method will wrap the provided fragment in a
|
|
61
|
+
* default HTML document before dispatching. When not in development mode, this
|
|
62
|
+
* method will just dispatch the fragment.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* app.get(podlet.content(), (req, res) => {
|
|
66
|
+
* res.podiumSend('<h1>Hello World</h1>');
|
|
67
|
+
* });
|
|
68
|
+
*/
|
|
69
|
+
podiumSend(fragment: string, ...args: unknown[]): Response;
|
|
70
|
+
}
|
|
24
71
|
}
|
|
25
|
-
}
|
|
26
72
|
}
|
|
27
73
|
|
|
28
74
|
/**
|