@arizeai/phoenix-otel 0.0.1 → 0.2.0
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/dist/esm/createNoOpProvider.d.ts +6 -0
- package/dist/esm/createNoOpProvider.d.ts.map +1 -0
- package/dist/esm/createNoOpProvider.js +9 -0
- package/dist/esm/createNoOpProvider.js.map +1 -0
- package/dist/esm/index.d.ts +6 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +5 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/register.d.ts +54 -8
- package/dist/esm/register.d.ts.map +1 -1
- package/dist/esm/register.js +46 -6
- package/dist/esm/register.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/utils.d.ts +3 -0
- package/dist/esm/utils.d.ts.map +1 -0
- package/dist/esm/utils.js +4 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/src/createNoOpProvider.d.ts +6 -0
- package/dist/src/createNoOpProvider.d.ts.map +1 -0
- package/dist/src/createNoOpProvider.js +12 -0
- package/dist/src/createNoOpProvider.js.map +1 -0
- package/dist/src/index.d.ts +6 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +8 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/register.d.ts +54 -8
- package/dist/src/register.d.ts.map +1 -1
- package/dist/src/register.js +46 -6
- package/dist/src/register.js.map +1 -1
- package/dist/src/utils.d.ts +3 -0
- package/dist/src/utils.d.ts.map +1 -0
- package/dist/src/utils.js +7 -0
- package/dist/src/utils.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/createNoOpProvider.ts +10 -0
- package/src/index.ts +14 -1
- package/src/register.ts +75 -10
- package/src/utils.ts +9 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClE,GAAG,EAAE,CAAC,GACL,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAIhC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,kBAAkB,CAChC,GAAM;IAEN,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,CACzB,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createNoOpProvider.d.ts","sourceRoot":"","sources":["../../src/createNoOpProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE;;GAEG;AACH,wBAAgB,kBAAkB,uBAIjC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createNoOpProvider = createNoOpProvider;
|
|
4
|
+
const sdk_trace_node_1 = require("@opentelemetry/sdk-trace-node");
|
|
5
|
+
/**
|
|
6
|
+
* For dry runs we create a provider that doesn't export traces.
|
|
7
|
+
*/
|
|
8
|
+
function createNoOpProvider() {
|
|
9
|
+
const provider = new sdk_trace_node_1.NodeTracerProvider({});
|
|
10
|
+
return provider;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=createNoOpProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createNoOpProvider.js","sourceRoot":"","sources":["../../src/createNoOpProvider.ts"],"names":[],"mappings":";;AAKA,gDAIC;AATD,kEAAmE;AAEnE;;GAEG;AACH,SAAgB,kBAAkB;IAChC,MAAM,QAAQ,GAAG,IAAI,mCAAkB,CAAC,EAAE,CAAC,CAAC;IAE5C,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
export { trace } from "@opentelemetry/api";
|
|
1
|
+
export { trace, context, type DiagLogLevel, type Tracer, SpanStatusCode, } from "@opentelemetry/api";
|
|
2
|
+
export { registerInstrumentations } from "@opentelemetry/instrumentation";
|
|
3
|
+
export { type Instrumentation } from "@opentelemetry/instrumentation";
|
|
4
|
+
export { type NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
|
|
5
|
+
export * from "./createNoOpProvider";
|
|
2
6
|
export * from "./register";
|
|
7
|
+
export * from "./utils";
|
|
3
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,MAAM,EACX,cAAc,GACf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGxE,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -14,8 +14,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.trace = void 0;
|
|
17
|
+
exports.registerInstrumentations = exports.SpanStatusCode = exports.context = exports.trace = void 0;
|
|
18
18
|
var api_1 = require("@opentelemetry/api");
|
|
19
19
|
Object.defineProperty(exports, "trace", { enumerable: true, get: function () { return api_1.trace; } });
|
|
20
|
+
Object.defineProperty(exports, "context", { enumerable: true, get: function () { return api_1.context; } });
|
|
21
|
+
Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function () { return api_1.SpanStatusCode; } });
|
|
22
|
+
var instrumentation_1 = require("@opentelemetry/instrumentation");
|
|
23
|
+
Object.defineProperty(exports, "registerInstrumentations", { enumerable: true, get: function () { return instrumentation_1.registerInstrumentations; } });
|
|
24
|
+
// Phoenix abstractions
|
|
25
|
+
__exportStar(require("./createNoOpProvider"), exports);
|
|
20
26
|
__exportStar(require("./register"), exports);
|
|
27
|
+
__exportStar(require("./utils"), exports);
|
|
21
28
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0CAM4B;AAL1B,4FAAA,KAAK,OAAA;AACL,8FAAA,OAAO,OAAA;AAGP,qGAAA,cAAc,OAAA;AAEhB,kEAA0E;AAAjE,2HAAA,wBAAwB,OAAA;AAIjC,uBAAuB;AACvB,uDAAqC;AACrC,6CAA2B;AAC3B,0CAAwB"}
|
package/dist/src/register.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
|
|
2
|
-
|
|
2
|
+
import { Instrumentation } from "@opentelemetry/instrumentation";
|
|
3
|
+
import { DiagLogLevel } from "@opentelemetry/api";
|
|
4
|
+
export type Headers = Record<string, string>;
|
|
5
|
+
/**
|
|
6
|
+
* Configuration parameters for registering Phoenix OpenTelemetry tracing
|
|
7
|
+
*/
|
|
8
|
+
export type RegisterParams = {
|
|
3
9
|
/**
|
|
4
10
|
* The project the spans should be associated to
|
|
5
11
|
* @default "default"
|
|
6
12
|
*/
|
|
7
13
|
projectName?: string;
|
|
8
14
|
/**
|
|
9
|
-
*
|
|
15
|
+
* The URL to the phoenix server. Can be postfixed with tracing path.
|
|
10
16
|
* If not provided, environment variables are checked.
|
|
11
17
|
* @example "https://app.phoenix.arize.com"
|
|
12
18
|
*/
|
|
@@ -16,24 +22,64 @@ type RegisterParams = {
|
|
|
16
22
|
* If not provided, environment variables are checked.
|
|
17
23
|
*/
|
|
18
24
|
apiKey?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Headers to be used when communicating with the OTLP collector
|
|
27
|
+
*/
|
|
28
|
+
headers?: Headers;
|
|
19
29
|
/**
|
|
20
30
|
* Whether to use batching for span processing.
|
|
21
31
|
* It is recommended to use batching in production environments
|
|
22
32
|
* @default true
|
|
23
33
|
*/
|
|
24
34
|
batch?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* A list of instrumentation to register.
|
|
37
|
+
* Note: this may only work with commonjs projects. ESM projects will require manually applying instrumentation.
|
|
38
|
+
*/
|
|
39
|
+
instrumentations?: Instrumentation[];
|
|
25
40
|
/**
|
|
26
41
|
* Whether to set the tracer as a global provider.
|
|
27
42
|
* @default true
|
|
28
43
|
*/
|
|
29
|
-
|
|
44
|
+
global?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The diag log level to set for the built in DiagConsoleLogger instance.
|
|
47
|
+
* Omit to disable built in logging.
|
|
48
|
+
*/
|
|
49
|
+
diagLogLevel?: DiagLogLevel;
|
|
30
50
|
};
|
|
31
|
-
export declare function register({ url: paramsUrl, apiKey: paramsApiKey, projectName, batch, setGlobalTracerProvider, }: RegisterParams): NodeTracerProvider;
|
|
32
51
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* @param
|
|
52
|
+
* Registers Phoenix OpenTelemetry tracing with the specified configuration
|
|
53
|
+
*
|
|
54
|
+
* @param params - Configuration parameters for Phoenix tracing
|
|
55
|
+
* @param params.url - The URL to the phoenix server. Can be postfixed with tracing path
|
|
56
|
+
* @param params.apiKey - The API key for the phoenix instance
|
|
57
|
+
* @param params.projectName - The project the spans should be associated to
|
|
58
|
+
* @param params.instrumentations - A list of instrumentation to register
|
|
59
|
+
* @param params.batch - Whether to use batching for span processing
|
|
60
|
+
* @param params.global - Whether to set the tracer as a global provider
|
|
61
|
+
* @param params.diagLogLevel - the diagnostics log level
|
|
62
|
+
* @returns {NodeTracerProvider} The configured NodeTracerProvider instance
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```typescript
|
|
66
|
+
* import { register } from '@arizeai/phoenix-otel';
|
|
67
|
+
*
|
|
68
|
+
* const provider = register({
|
|
69
|
+
* projectName: 'my-app',
|
|
70
|
+
* url: 'https://app.phoenix.arize.com',
|
|
71
|
+
* apiKey: 'your-api-key',
|
|
72
|
+
* batch: true
|
|
73
|
+
* });
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export declare function register({ url: paramsUrl, apiKey: paramsApiKey, headers: paramsHeaders, projectName, instrumentations, batch, global, diagLogLevel, }: RegisterParams): NodeTracerProvider;
|
|
77
|
+
/**
|
|
78
|
+
* A utility method to normalize the URL to be HTTP compatible.
|
|
79
|
+
* Assumes we are using HTTP over gRPC and ensures the URL ends with the correct traces endpoint.
|
|
80
|
+
*
|
|
81
|
+
* @param url - The URL to the phoenix server. May contain a slug
|
|
82
|
+
* @returns {string} The normalized URL with the '/v1/traces' endpoint
|
|
36
83
|
*/
|
|
37
84
|
export declare function ensureCollectorEndpoint(url: string): string;
|
|
38
|
-
export {};
|
|
39
85
|
//# sourceMappingURL=register.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/register.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,kBAAkB,EAEnB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/register.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,kBAAkB,EAEnB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,eAAe,EAEhB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAA2B,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE3E,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrC;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,QAAQ,CAAC,EACvB,GAAG,EAAE,SAAS,EACd,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,aAAkB,EAC3B,WAAuB,EACvB,gBAAgB,EAChB,KAAY,EACZ,MAAa,EACb,YAAY,GACb,EAAE,cAAc,GAAG,kBAAkB,CA0CrC;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAK3D"}
|
package/dist/src/register.js
CHANGED
|
@@ -8,10 +8,42 @@ const exporter_trace_otlp_proto_1 = require("@opentelemetry/exporter-trace-otlp-
|
|
|
8
8
|
const resources_1 = require("@opentelemetry/resources");
|
|
9
9
|
const sdk_trace_node_1 = require("@opentelemetry/sdk-trace-node");
|
|
10
10
|
const config_1 = require("./config");
|
|
11
|
-
|
|
11
|
+
const instrumentation_1 = require("@opentelemetry/instrumentation");
|
|
12
|
+
const api_1 = require("@opentelemetry/api");
|
|
13
|
+
/**
|
|
14
|
+
* Registers Phoenix OpenTelemetry tracing with the specified configuration
|
|
15
|
+
*
|
|
16
|
+
* @param params - Configuration parameters for Phoenix tracing
|
|
17
|
+
* @param params.url - The URL to the phoenix server. Can be postfixed with tracing path
|
|
18
|
+
* @param params.apiKey - The API key for the phoenix instance
|
|
19
|
+
* @param params.projectName - The project the spans should be associated to
|
|
20
|
+
* @param params.instrumentations - A list of instrumentation to register
|
|
21
|
+
* @param params.batch - Whether to use batching for span processing
|
|
22
|
+
* @param params.global - Whether to set the tracer as a global provider
|
|
23
|
+
* @param params.diagLogLevel - the diagnostics log level
|
|
24
|
+
* @returns {NodeTracerProvider} The configured NodeTracerProvider instance
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* import { register } from '@arizeai/phoenix-otel';
|
|
29
|
+
*
|
|
30
|
+
* const provider = register({
|
|
31
|
+
* projectName: 'my-app',
|
|
32
|
+
* url: 'https://app.phoenix.arize.com',
|
|
33
|
+
* apiKey: 'your-api-key',
|
|
34
|
+
* batch: true
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
function register({ url: paramsUrl, apiKey: paramsApiKey, headers: paramsHeaders = {}, projectName = "default", instrumentations, batch = true, global = true, diagLogLevel, }) {
|
|
39
|
+
if (diagLogLevel) {
|
|
40
|
+
api_1.diag.setLogger(new api_1.DiagConsoleLogger(), diagLogLevel);
|
|
41
|
+
}
|
|
12
42
|
const url = ensureCollectorEndpoint(paramsUrl || (0, config_1.getEnvCollectorURL)() || "http://localhost:6006");
|
|
13
43
|
const apiKey = paramsApiKey || (0, config_1.getEnvApiKey)();
|
|
14
|
-
const headers =
|
|
44
|
+
const headers = Array.isArray(paramsHeaders)
|
|
45
|
+
? Object.fromEntries(paramsHeaders)
|
|
46
|
+
: paramsHeaders;
|
|
15
47
|
const configureHeaders = typeof apiKey == "string";
|
|
16
48
|
if (configureHeaders) {
|
|
17
49
|
headers["authorization"] = `Bearer ${apiKey}`;
|
|
@@ -33,15 +65,23 @@ function register({ url: paramsUrl, apiKey: paramsApiKey, projectName = "default
|
|
|
33
65
|
}),
|
|
34
66
|
spanProcessors: [spanProcessor],
|
|
35
67
|
});
|
|
36
|
-
if (
|
|
68
|
+
if (instrumentations) {
|
|
69
|
+
(0, instrumentation_1.registerInstrumentations)({
|
|
70
|
+
instrumentations,
|
|
71
|
+
tracerProvider: provider,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
if (global) {
|
|
37
75
|
provider.register();
|
|
38
76
|
}
|
|
39
77
|
return provider;
|
|
40
78
|
}
|
|
41
79
|
/**
|
|
42
|
-
* A utility method to normalize the
|
|
43
|
-
* Assumes we are using
|
|
44
|
-
*
|
|
80
|
+
* A utility method to normalize the URL to be HTTP compatible.
|
|
81
|
+
* Assumes we are using HTTP over gRPC and ensures the URL ends with the correct traces endpoint.
|
|
82
|
+
*
|
|
83
|
+
* @param url - The URL to the phoenix server. May contain a slug
|
|
84
|
+
* @returns {string} The normalized URL with the '/v1/traces' endpoint
|
|
45
85
|
*/
|
|
46
86
|
function ensureCollectorEndpoint(url) {
|
|
47
87
|
if (!url.includes("/v1/traces")) {
|
package/dist/src/register.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../src/register.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../src/register.ts"],"names":[],"mappings":";;AA4FA,4BAmDC;AASD,0DAKC;AA7JD,oGAAuF;AACvF,wEAGuC;AACvC,wFAA6E;AAC7E,wDAAkE;AAClE,kEAGuC;AACvC,qCAA4D;AAC5D,oEAGwC;AACxC,4CAA2E;AAmD3E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAgB,QAAQ,CAAC,EACvB,GAAG,EAAE,SAAS,EACd,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,aAAa,GAAG,EAAE,EAC3B,WAAW,GAAG,SAAS,EACvB,gBAAgB,EAChB,KAAK,GAAG,IAAI,EACZ,MAAM,GAAG,IAAI,EACb,YAAY,GACG;IACf,IAAI,YAAY,EAAE,CAAC;QACjB,UAAI,CAAC,SAAS,CAAC,IAAI,uBAAiB,EAAE,EAAE,YAAY,CAAC,CAAC;IACxD,CAAC;IACD,MAAM,GAAG,GAAG,uBAAuB,CACjC,SAAS,IAAI,IAAA,2BAAkB,GAAE,IAAI,uBAAuB,CAC7D,CAAC;IACF,MAAM,MAAM,GAAG,YAAY,IAAI,IAAA,qBAAY,GAAE,CAAC;IAC9C,MAAM,OAAO,GAAY,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC;QACnD,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC;QACnC,CAAC,CAAC,aAAa,CAAC;IAClB,MAAM,gBAAgB,GAAG,OAAO,MAAM,IAAI,QAAQ,CAAC;IACnD,IAAI,gBAAgB,EAAE,CAAC;QACrB,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,MAAM,EAAE,CAAC;IAChD,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,6CAAiB,CAAC;QACrC,GAAG;QACH,OAAO;KACR,CAAC,CAAC;IACH,IAAI,aAA4B,CAAC;IACjC,IAAI,KAAK,EAAE,CAAC;QACV,aAAa,GAAG,IAAI,sDAA+B,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IACpE,CAAC;SAAM,CAAC;QACN,aAAa,GAAG,IAAI,uDAAgC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,mCAAkB,CAAC;QACtC,QAAQ,EAAE,IAAA,kCAAsB,EAAC;YAC/B,CAAC,6DAAwB,CAAC,EAAE,WAAW;SACxC,CAAC;QACF,cAAc,EAAE,CAAC,aAAa,CAAC;KAChC,CAAC,CAAC;IAEH,IAAI,gBAAgB,EAAE,CAAC;QACrB,IAAA,0CAAwB,EAAC;YACvB,gBAAgB;YAChB,cAAc,EAAE,QAAQ;SACzB,CAAC,CAAC;IACL,CAAC;IACD,IAAI,MAAM,EAAE,CAAC;QACX,QAAQ,CAAC,QAAQ,EAAE,CAAC;IACtB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,uBAAuB,CAAC,GAAW;IACjD,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;QAChC,OAAO,IAAI,GAAG,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC/C,CAAC;IACD,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClE,GAAG,EAAE,CAAC,GACL,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAIhC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.objectAsAttributes = objectAsAttributes;
|
|
4
|
+
function objectAsAttributes(obj) {
|
|
5
|
+
return Object.fromEntries(Object.entries(obj).filter(([_, value]) => value !== null));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;AAEA,gDAMC;AAND,SAAgB,kBAAkB,CAChC,GAAM;IAEN,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,CACzB,CAAC;AACtC,CAAC"}
|