@podium/podlet 5.1.14 → 5.1.16

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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [5.1.16](https://github.com/podium-lib/podlet/compare/v5.1.15...v5.1.16) (2024-09-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update all dependencies (non-major) ([b8eddfd](https://github.com/podium-lib/podlet/commit/b8eddfd676810607adc56cdc71d2622e73b25e0e))
7
+
8
+ ## [5.1.15](https://github.com/podium-lib/podlet/compare/v5.1.14...v5.1.15) (2024-09-16)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * correct the JSDoc for fallback ([#423](https://github.com/podium-lib/podlet/issues/423)) ([7444897](https://github.com/podium-lib/podlet/commit/7444897b7cf45a9e2b9c310ce309f69f80fa91d1))
14
+
1
15
  ## [5.1.14](https://github.com/podium-lib/podlet/compare/v5.1.13...v5.1.14) (2024-09-16)
2
16
 
3
17
 
package/lib/podlet.js CHANGED
@@ -25,14 +25,14 @@ const { template } = utils;
25
25
 
26
26
  /**
27
27
  * @typedef {Object} PodletOptions
28
- * @property {string} name - (required) podlet name
29
- * @property {string} version - (required) podlet version
30
- * @property {string} pathname - (required) podlet pathname
31
- * @property {string} [manifest] - path where the podlet manifest file is served from (default '/manifest.json')
32
- * @property {string} [content] - path where the podlet content HTML markup is served from (default '/')
33
- * @property {string} [fallback] - path where the podlet fallback HTML markup is served from (default '/fallback')
34
- * @property {boolean} [development] - a boolean flag that, when true, enables additional development setup (default false)
35
- * @property {import('abslog').AbstractLoggerOptions} [logger] - a logger to use when provided. Can be the console object if console logging is desired but can also be any Log4j compatible logging object as well. Nothing is logged if no logger is provided. (default null)
28
+ * @property {string} name - Podlet name
29
+ * @property {string} version - Podlet version
30
+ * @property {string} pathname - Podlet pathname
31
+ * @property {string} [manifest="/manifest.json"] - Path where the podlet manifest file is served from.
32
+ * @property {string} [content="/"] - Path where the podlet content HTML markup is served from.
33
+ * @property {string} [fallback=""] - Path where the podlet fallback HTML markup is served from. By default there is no fallback. Set this to for instance `"/fallback"` to serve a cacheable version of the contents in case the podlet goes down.
34
+ * @property {boolean} [development=false] - a boolean flag that, when true, enables additional development setup
35
+ * @property {import('abslog').AbstractLoggerOptions} [logger] - a logger to use when provided. Can be the console object if console logging is desired but can also be any Log4j compatible logging object as well. Nothing is logged if no logger is provided.
36
36
  * @property {import("@podium/proxy").PodiumProxyOptions} [proxy] - options that can be provided to configure the @podium/proxy instance used by the podlet. See that module for details.
37
37
  *
38
38
  * @typedef {{ debug: 'true' | 'false', locale: string, deviceType: string, requestedBy: string, mountOrigin: string, mountPathname: string, publicPathname: string }} PodletContext
@@ -134,7 +134,7 @@ export default class PodiumPodlet {
134
134
  httpProxy;
135
135
 
136
136
  /**
137
- * The pathname for the manifest of the podlet. Defaults to /manifest.json. (set in the constructor)
137
+ * The pathname for the manifest of the podlet. Defaults to "/manifest.json".
138
138
  * The value should be relative to the value set on the pathname argument.
139
139
  * In other words if a podlet is mounted into an HTTP server at /foo and the manifest is at /foo/component.json, pathname will be /foo and manifestRoute will be /component.json
140
140
  *
@@ -148,7 +148,7 @@ export default class PodiumPodlet {
148
148
  manifestRoute = '/manifest.json';
149
149
 
150
150
  /**
151
- * The pathname for the content route of the podlet. Defaults to /. (set in the constructor)
151
+ * The pathname for the content route of the podlet. Defaults to "/".
152
152
  * The value should be relative to the value set on the pathname argument.
153
153
  * In other words if a podlet is mounted into an HTTP server at /foo and the content is at /foo/content, pathname will be /foo and contentRoute will be /content
154
154
  *
@@ -162,7 +162,7 @@ export default class PodiumPodlet {
162
162
  contentRoute = '/';
163
163
 
164
164
  /**
165
- * The pathname for the fallback route of the podlet. Defaults to /fallback. (set in the constructor)
165
+ * The pathname for the fallback route of the podlet. Defaults to no fallback.
166
166
  * The value should be relative to the value set on the pathname argument.
167
167
  * In other words if a podlet is mounted into an HTTP server at /foo and the fallback is at /foo/fallback, pathname will be /foo and fallbackRoute will be /fallback
168
168
  *
@@ -285,16 +285,6 @@ export default class PodiumPodlet {
285
285
  * Creates a new instance of a Podium podlet which can be used in conjunction with your framework of choice to build podlet server apps.
286
286
  * `name`, `version` and `pathname` constructor arguments are required. All other options are optional.
287
287
  *
288
- * * `name` - podlet name (**required**)
289
- * * `version` - podlet version (**required**)
290
- * * `pathname` - podlet pathname (**required**)
291
- * * `manifest` - path where the podlet manifest file is served from (**default** `'/manifest.json'`)
292
- * * `content` - path where the podlet content HTML markup is served from (**default** `'/'`)
293
- * * `fallback` - path where the podlet fallback HTML markup is served from (**default** `'/fallback'`)
294
- * * `development` - a boolean flag that, when true, enables additional development setup (**default** `false`)
295
- * * `logger` - a logger to use when provided. Can be the console object if console logging is desired but can also be any Log4j compatible logging object as well. Nothing is logged if no logger is provided. (**default** `null`)
296
- * * `proxy` - options that can be provided to configure the @podium/proxy instance used by the podlet. See that module for details. (**default**: `{}`)
297
- *
298
288
  * @see https://podium-lib.io/docs/api/podlet/#constructor
299
289
  * @see https://podium-lib.io/docs/podlet/getting_started
300
290
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@podium/podlet",
3
- "version": "5.1.14",
3
+ "version": "5.1.16",
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.26",
38
+ "@podium/proxy": "5.0.28",
39
39
  "@podium/schemas": "5.0.6",
40
- "@podium/utils": "5.2.0",
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": "2.5.2",
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.19.2",
59
+ "express": "4.20.0",
60
60
  "globals": "15.9.0",
61
61
  "json-stringify-safe": "5.0.1",
62
- "npm-run-all2": "5.0.2",
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",
package/types/podlet.d.ts CHANGED
@@ -27,14 +27,14 @@ declare global {
27
27
 
28
28
  /**
29
29
  * @typedef {Object} PodletOptions
30
- * @property {string} name - (required) podlet name
31
- * @property {string} version - (required) podlet version
32
- * @property {string} pathname - (required) podlet pathname
33
- * @property {string} [manifest] - path where the podlet manifest file is served from (default '/manifest.json')
34
- * @property {string} [content] - path where the podlet content HTML markup is served from (default '/')
35
- * @property {string} [fallback] - path where the podlet fallback HTML markup is served from (default '/fallback')
36
- * @property {boolean} [development] - a boolean flag that, when true, enables additional development setup (default false)
37
- * @property {import('abslog').AbstractLoggerOptions} [logger] - a logger to use when provided. Can be the console object if console logging is desired but can also be any Log4j compatible logging object as well. Nothing is logged if no logger is provided. (default null)
30
+ * @property {string} name - Podlet name
31
+ * @property {string} version - Podlet version
32
+ * @property {string} pathname - Podlet pathname
33
+ * @property {string} [manifest="/manifest.json"] - Path where the podlet manifest file is served from.
34
+ * @property {string} [content="/"] - Path where the podlet content HTML markup is served from.
35
+ * @property {string} [fallback=""] - Path where the podlet fallback HTML markup is served from. By default there is no fallback. Set this to for instance `"/fallback"` to serve a cacheable version of the contents in case the podlet goes down.
36
+ * @property {boolean} [development=false] - a boolean flag that, when true, enables additional development setup
37
+ * @property {import('abslog').AbstractLoggerOptions} [logger] - a logger to use when provided. Can be the console object if console logging is desired but can also be any Log4j compatible logging object as well. Nothing is logged if no logger is provided.
38
38
  * @property {import("@podium/proxy").PodiumProxyOptions} [proxy] - options that can be provided to configure the @podium/proxy instance used by the podlet. See that module for details.
39
39
  *
40
40
  * @typedef {{ debug: 'true' | 'false', locale: string, deviceType: string, requestedBy: string, mountOrigin: string, mountPathname: string, publicPathname: string }} PodletContext
@@ -46,16 +46,6 @@ export default class PodiumPodlet {
46
46
  * Creates a new instance of a Podium podlet which can be used in conjunction with your framework of choice to build podlet server apps.
47
47
  * `name`, `version` and `pathname` constructor arguments are required. All other options are optional.
48
48
  *
49
- * * `name` - podlet name (**required**)
50
- * * `version` - podlet version (**required**)
51
- * * `pathname` - podlet pathname (**required**)
52
- * * `manifest` - path where the podlet manifest file is served from (**default** `'/manifest.json'`)
53
- * * `content` - path where the podlet content HTML markup is served from (**default** `'/'`)
54
- * * `fallback` - path where the podlet fallback HTML markup is served from (**default** `'/fallback'`)
55
- * * `development` - a boolean flag that, when true, enables additional development setup (**default** `false`)
56
- * * `logger` - a logger to use when provided. Can be the console object if console logging is desired but can also be any Log4j compatible logging object as well. Nothing is logged if no logger is provided. (**default** `null`)
57
- * * `proxy` - options that can be provided to configure the @podium/proxy instance used by the podlet. See that module for details. (**default**: `{}`)
58
- *
59
49
  * @see https://podium-lib.io/docs/api/podlet/#constructor
60
50
  * @see https://podium-lib.io/docs/podlet/getting_started
61
51
  *
@@ -131,7 +121,7 @@ export default class PodiumPodlet {
131
121
  */
132
122
  httpProxy: Proxy;
133
123
  /**
134
- * The pathname for the manifest of the podlet. Defaults to /manifest.json. (set in the constructor)
124
+ * The pathname for the manifest of the podlet. Defaults to "/manifest.json".
135
125
  * The value should be relative to the value set on the pathname argument.
136
126
  * In other words if a podlet is mounted into an HTTP server at /foo and the manifest is at /foo/component.json, pathname will be /foo and manifestRoute will be /component.json
137
127
  *
@@ -144,7 +134,7 @@ export default class PodiumPodlet {
144
134
  */
145
135
  manifestRoute: string;
146
136
  /**
147
- * The pathname for the content route of the podlet. Defaults to /. (set in the constructor)
137
+ * The pathname for the content route of the podlet. Defaults to "/".
148
138
  * The value should be relative to the value set on the pathname argument.
149
139
  * In other words if a podlet is mounted into an HTTP server at /foo and the content is at /foo/content, pathname will be /foo and contentRoute will be /content
150
140
  *
@@ -157,7 +147,7 @@ export default class PodiumPodlet {
157
147
  */
158
148
  contentRoute: string;
159
149
  /**
160
- * The pathname for the fallback route of the podlet. Defaults to /fallback. (set in the constructor)
150
+ * The pathname for the fallback route of the podlet. Defaults to no fallback.
161
151
  * The value should be relative to the value set on the pathname argument.
162
152
  * In other words if a podlet is mounted into an HTTP server at /foo and the fallback is at /foo/fallback, pathname will be /foo and fallbackRoute will be /fallback
163
153
  *
@@ -584,35 +574,35 @@ export default class PodiumPodlet {
584
574
  }
585
575
  export type PodletOptions = {
586
576
  /**
587
- * - (required) podlet name
577
+ * - Podlet name
588
578
  */
589
579
  name: string;
590
580
  /**
591
- * - (required) podlet version
581
+ * - Podlet version
592
582
  */
593
583
  version: string;
594
584
  /**
595
- * - (required) podlet pathname
585
+ * - Podlet pathname
596
586
  */
597
587
  pathname: string;
598
588
  /**
599
- * - path where the podlet manifest file is served from (default '/manifest.json')
589
+ * - Path where the podlet manifest file is served from.
600
590
  */
601
591
  manifest?: string;
602
592
  /**
603
- * - path where the podlet content HTML markup is served from (default '/')
593
+ * - Path where the podlet content HTML markup is served from.
604
594
  */
605
595
  content?: string;
606
596
  /**
607
- * - path where the podlet fallback HTML markup is served from (default '/fallback')
597
+ * - Path where the podlet fallback HTML markup is served from. By default there is no fallback. Set this to for instance `"/fallback"` to serve a cacheable version of the contents in case the podlet goes down.
608
598
  */
609
599
  fallback?: string;
610
600
  /**
611
- * - a boolean flag that, when true, enables additional development setup (default false)
601
+ * - a boolean flag that, when true, enables additional development setup
612
602
  */
613
603
  development?: boolean;
614
604
  /**
615
- * - a logger to use when provided. Can be the console object if console logging is desired but can also be any Log4j compatible logging object as well. Nothing is logged if no logger is provided. (default null)
605
+ * - a logger to use when provided. Can be the console object if console logging is desired but can also be any Log4j compatible logging object as well. Nothing is logged if no logger is provided.
616
606
  */
617
607
  logger?: import("abslog").AbstractLoggerOptions;
618
608
  /**