@podium/podlet 4.4.68 → 4.4.70

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/index.d.ts +53 -2
  3. package/package.json +12 -12
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [4.4.70](https://github.com/podium-lib/podlet/compare/v4.4.69...v4.4.70) (2023-09-13)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * adding type information closes [#344](https://github.com/podium-lib/podlet/issues/344) ([28e6ed9](https://github.com/podium-lib/podlet/commit/28e6ed9508d9218046f925e85fd97d17479bf390))
7
+
8
+ ## [4.4.69](https://github.com/podium-lib/podlet/compare/v4.4.68...v4.4.69) (2023-01-09)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **deps:** update all dependencies (non-major) ([0d14c8a](https://github.com/podium-lib/podlet/commit/0d14c8aae8a69ba80a32021fcd87f7f6e06b791f))
14
+
1
15
  ## [4.4.68](https://github.com/podium-lib/podlet/compare/v4.4.67...v4.4.68) (2022-12-12)
2
16
 
3
17
 
package/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- import { HttpIncoming, AssetJs, AssetCss } from '@podium/utils';
1
+ import {HttpIncoming, AssetJs, AssetCss} from '@podium/utils';
2
+ import * as Proxy from '@podium/proxy';
3
+ import MetricsClient from '@metrics/client';
2
4
 
3
5
  // Use declaration merging to extend Express.
4
6
  declare global {
@@ -9,6 +11,27 @@ declare global {
9
11
  }
10
12
  }
11
13
 
14
+ type AbsLogger = {
15
+ trace: LogFunction;
16
+ debug: LogFunction;
17
+ info: LogFunction;
18
+ warn: LogFunction;
19
+ error: LogFunction;
20
+ fatal: LogFunction;
21
+ }
22
+
23
+ type LogFunction = (...args: any) => void
24
+
25
+ type PodletContext = {
26
+ debug: 'true' | 'false';
27
+ locale: string;
28
+ deviceType: string;
29
+ requestedBy: string;
30
+ mountOrigin: string;
31
+ mountPathname: string;
32
+ publicPathname: string;
33
+ }
34
+
12
35
  export interface PodletOptions {
13
36
  name: string;
14
37
  pathname: string;
@@ -16,13 +39,41 @@ export interface PodletOptions {
16
39
  manifest?: string;
17
40
  content?: string;
18
41
  fallback?: string;
19
- logger?: any;
42
+ logger?: Console | AbsLogger;
20
43
  development?: boolean;
21
44
  }
22
45
 
23
46
  export default class Podlet {
24
47
  constructor(options: PodletOptions);
25
48
 
49
+ name: string;
50
+
51
+ version: string;
52
+
53
+ manifestRoute: string;
54
+
55
+ contentRoute: string;
56
+
57
+ fallbackRoute: string;
58
+
59
+ cssRoute: [];
60
+
61
+ jsRoute: [];
62
+
63
+ proxyRoutes: Record<string, string>;
64
+
65
+ log: AbsLogger;
66
+
67
+ development: boolean;
68
+
69
+ httpProxy: Proxy;
70
+
71
+ baseContext: PodletContext;
72
+
73
+ defaultContext: PodletContext;
74
+
75
+ metrics: MetricsClient;
76
+
26
77
  pathname(): string;
27
78
 
28
79
  middleware(): (req: any, res: any, next: any) => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@podium/podlet",
3
- "version": "4.4.68",
3
+ "version": "4.4.70",
4
4
  "description": "Module for building page fragment servers in a micro frontend architecture.",
5
5
  "main": "lib/podlet.js",
6
6
  "license": "MIT",
@@ -28,29 +28,29 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@metrics/client": "2.5.0",
31
- "@podium/proxy": "4.2.78",
32
- "@podium/schemas": "4.1.33",
33
- "@podium/utils": "4.4.38",
31
+ "@podium/proxy": "4.2.80",
32
+ "@podium/schemas": "4.1.34",
33
+ "@podium/utils": "4.4.39",
34
34
  "abslog": "2.4.0",
35
- "ajv": "8.11.2",
35
+ "ajv": "8.12.0",
36
36
  "objobj": "1.0.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@semantic-release/changelog": "6.0.2",
39
+ "@semantic-release/changelog": "6.0.3",
40
40
  "@semantic-release/commit-analyzer": "9.0.2",
41
41
  "@semantic-release/git": "10.0.1",
42
- "@semantic-release/github": "8.0.7",
43
- "@semantic-release/npm": "9.0.1",
42
+ "@semantic-release/github": "8.1.0",
43
+ "@semantic-release/npm": "9.0.2",
44
44
  "@semantic-release/release-notes-generator": "10.0.3",
45
45
  "semantic-release": "19.0.5",
46
46
  "@podium/test-utils": "2.5.2",
47
47
  "eslint": "7.32.0",
48
48
  "eslint-config-airbnb-base": "14.2.1",
49
- "eslint-config-prettier": "8.5.0",
50
- "eslint-plugin-import": "2.26.0",
49
+ "eslint-config-prettier": "8.10.0",
50
+ "eslint-plugin-import": "2.28.1",
51
51
  "eslint-plugin-prettier": "3.4.1",
52
52
  "express": "4.18.2",
53
- "prettier": "2.7.1",
54
- "tap": "16.3.2"
53
+ "prettier": "2.8.8",
54
+ "tap": "16.3.8"
55
55
  }
56
56
  }