@wix/sdk-types 1.12.6 → 1.12.8
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/build/index.d.mts +3 -37
- package/build/index.d.ts +3 -37
- package/package.json +7 -5
package/build/index.d.mts
CHANGED
|
@@ -1,38 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
type Tags = Record<string, Primitive>;
|
|
3
|
-
type Context = Record<string, unknown>;
|
|
4
|
-
type Contexts = Record<string, Context | undefined>;
|
|
5
|
-
|
|
6
|
-
interface SpanContextData {
|
|
7
|
-
traceId: string;
|
|
8
|
-
spanId: string;
|
|
9
|
-
}
|
|
10
|
-
interface Span {
|
|
11
|
-
spanContext(): SpanContextData;
|
|
12
|
-
end(): void;
|
|
13
|
-
}
|
|
14
|
-
interface SpanOptions {
|
|
15
|
-
name: string;
|
|
16
|
-
tags?: Tags;
|
|
17
|
-
}
|
|
18
|
-
interface Breadcrumb {
|
|
19
|
-
type?: string;
|
|
20
|
-
category?: string;
|
|
21
|
-
message: string;
|
|
22
|
-
level?: 'info' | 'warning' | 'error';
|
|
23
|
-
data?: Record<string, unknown>;
|
|
24
|
-
}
|
|
25
|
-
interface CaptureContext {
|
|
26
|
-
level?: 'info' | 'warning' | 'error';
|
|
27
|
-
tags?: Tags;
|
|
28
|
-
contexts?: Contexts;
|
|
29
|
-
}
|
|
30
|
-
interface MonitoringClient {
|
|
31
|
-
captureException(error: unknown, context?: CaptureContext): void;
|
|
32
|
-
captureMessage(message: string, context?: CaptureContext): void;
|
|
33
|
-
startSpan<T>(options: SpanOptions, callback: (span: Span | undefined) => T): T;
|
|
34
|
-
addBreadcrumb(breadcrumb: Breadcrumb): void;
|
|
35
|
-
}
|
|
1
|
+
import { MonitoringClient } from '@wix/monitoring-types';
|
|
36
2
|
|
|
37
3
|
type HostModule<T, H extends Host> = {
|
|
38
4
|
__type: 'host';
|
|
@@ -284,8 +250,8 @@ type Includes<Value extends readonly any[], Item> =
|
|
|
284
250
|
@category Utilities
|
|
285
251
|
*/
|
|
286
252
|
type IsEqual<A, B> =
|
|
287
|
-
(<G>() => G extends A ? 1 : 2) extends
|
|
288
|
-
(<G>() => G extends B ? 1 : 2)
|
|
253
|
+
(<G>() => G extends A & G | G ? 1 : 2) extends
|
|
254
|
+
(<G>() => G extends B & G | G ? 1 : 2)
|
|
289
255
|
? true
|
|
290
256
|
: false;
|
|
291
257
|
|
package/build/index.d.ts
CHANGED
|
@@ -1,38 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
type Tags = Record<string, Primitive>;
|
|
3
|
-
type Context = Record<string, unknown>;
|
|
4
|
-
type Contexts = Record<string, Context | undefined>;
|
|
5
|
-
|
|
6
|
-
interface SpanContextData {
|
|
7
|
-
traceId: string;
|
|
8
|
-
spanId: string;
|
|
9
|
-
}
|
|
10
|
-
interface Span {
|
|
11
|
-
spanContext(): SpanContextData;
|
|
12
|
-
end(): void;
|
|
13
|
-
}
|
|
14
|
-
interface SpanOptions {
|
|
15
|
-
name: string;
|
|
16
|
-
tags?: Tags;
|
|
17
|
-
}
|
|
18
|
-
interface Breadcrumb {
|
|
19
|
-
type?: string;
|
|
20
|
-
category?: string;
|
|
21
|
-
message: string;
|
|
22
|
-
level?: 'info' | 'warning' | 'error';
|
|
23
|
-
data?: Record<string, unknown>;
|
|
24
|
-
}
|
|
25
|
-
interface CaptureContext {
|
|
26
|
-
level?: 'info' | 'warning' | 'error';
|
|
27
|
-
tags?: Tags;
|
|
28
|
-
contexts?: Contexts;
|
|
29
|
-
}
|
|
30
|
-
interface MonitoringClient {
|
|
31
|
-
captureException(error: unknown, context?: CaptureContext): void;
|
|
32
|
-
captureMessage(message: string, context?: CaptureContext): void;
|
|
33
|
-
startSpan<T>(options: SpanOptions, callback: (span: Span | undefined) => T): T;
|
|
34
|
-
addBreadcrumb(breadcrumb: Breadcrumb): void;
|
|
35
|
-
}
|
|
1
|
+
import { MonitoringClient } from '@wix/monitoring-types';
|
|
36
2
|
|
|
37
3
|
type HostModule<T, H extends Host> = {
|
|
38
4
|
__type: 'host';
|
|
@@ -284,8 +250,8 @@ type Includes<Value extends readonly any[], Item> =
|
|
|
284
250
|
@category Utilities
|
|
285
251
|
*/
|
|
286
252
|
type IsEqual<A, B> =
|
|
287
|
-
(<G>() => G extends A ? 1 : 2) extends
|
|
288
|
-
(<G>() => G extends B ? 1 : 2)
|
|
253
|
+
(<G>() => G extends A & G | G ? 1 : 2) extends
|
|
254
|
+
(<G>() => G extends B & G | G ? 1 : 2)
|
|
289
255
|
? true
|
|
290
256
|
: false;
|
|
291
257
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/sdk-types",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.8",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Ronny Ringel",
|
|
@@ -27,13 +27,15 @@
|
|
|
27
27
|
"lint-staged": {
|
|
28
28
|
"*.{js,ts}": "yarn lint"
|
|
29
29
|
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@wix/monitoring-types": "^0.1.0"
|
|
32
|
+
},
|
|
30
33
|
"devDependencies": {
|
|
31
|
-
"@types/node": "^20.17.
|
|
32
|
-
"@wix/monitoring-types": "^0.1.0",
|
|
34
|
+
"@types/node": "^20.17.10",
|
|
33
35
|
"eslint": "^8.57.1",
|
|
34
36
|
"eslint-config-sdk": "0.0.0",
|
|
35
37
|
"tsup": "^7.3.0",
|
|
36
|
-
"type-fest": "^4.
|
|
38
|
+
"type-fest": "^4.31.0",
|
|
37
39
|
"typescript": "^5.7.2"
|
|
38
40
|
},
|
|
39
41
|
"eslintConfig": {
|
|
@@ -56,5 +58,5 @@
|
|
|
56
58
|
"wallaby": {
|
|
57
59
|
"autoDetect": true
|
|
58
60
|
},
|
|
59
|
-
"falconPackageHash": "
|
|
61
|
+
"falconPackageHash": "63b5f65cadbdc43d77cb40e3bcfb19670a4185b479de5316ea38bf58"
|
|
60
62
|
}
|