@codefresh-io/cf-telemetry 2.1.0 → 2.2.0-alpha.1

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.
@@ -1,37 +1,9 @@
1
1
  "use strict";
2
- var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
3
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
4
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
5
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
6
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
7
- var _, done = false;
8
- for (var i = decorators.length - 1; i >= 0; i--) {
9
- var context = {};
10
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
11
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
12
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
13
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
14
- if (kind === "accessor") {
15
- if (result === void 0) continue;
16
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
17
- if (_ = accept(result.get)) descriptor.get = _;
18
- if (_ = accept(result.set)) descriptor.set = _;
19
- if (_ = accept(result.init)) initializers.unshift(_);
20
- }
21
- else if (_ = accept(result)) {
22
- if (kind === "field") initializers.unshift(_);
23
- else descriptor[key] = _;
24
- }
25
- }
26
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
27
- done = true;
28
- };
29
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
30
- var useValue = arguments.length > 2;
31
- for (var i = 0; i < initializers.length; i++) {
32
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
33
- }
34
- return useValue ? value : void 0;
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
35
7
  };
36
8
  Object.defineProperty(exports, "__esModule", { value: true });
37
9
  exports.LoggerModule = void 0;
@@ -39,31 +11,24 @@ const common_1 = require("@nestjs/common");
39
11
  const express_1 = require("../express");
40
12
  const logger_1 = require("./logger");
41
13
  // TODO: add options to configure the logger
42
- let LoggerModule = (() => {
43
- let _classDecorators = [(0, common_1.Global)(), (0, common_1.Module)({
44
- providers: [logger_1.Logger],
45
- exports: [logger_1.Logger],
46
- })];
47
- let _classDescriptor;
48
- let _classExtraInitializers = [];
49
- let _classThis;
50
- var LoggerModule = class {
51
- static { _classThis = this; }
52
- static {
53
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
54
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
55
- LoggerModule = _classThis = _classDescriptor.value;
56
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
57
- __runInitializers(_classThis, _classExtraInitializers);
58
- }
59
- configure(consumer) {
60
- const middleware = (0, express_1.httpLoggerMiddlewareFactory)(new logger_1.Logger('http'), 'info');
61
- consumer
62
- .apply(middleware)
63
- .forRoutes({ path: '*', method: common_1.RequestMethod.ALL });
64
- }
65
- };
66
- return LoggerModule = _classThis;
67
- })();
14
+ let LoggerModule = class LoggerModule {
15
+ configure(consumer) {
16
+ const middleware = (0, express_1.httpLoggerMiddlewareFactory)(new logger_1.Logger('http'), 'info');
17
+ consumer
18
+ .apply(middleware)
19
+ .forRoutes({ path: '*', method: common_1.RequestMethod.ALL });
20
+ }
21
+ };
68
22
  exports.LoggerModule = LoggerModule;
23
+ exports.LoggerModule = LoggerModule = __decorate([
24
+ (0, common_1.Global)(),
25
+ (0, common_1.Module)({
26
+ providers: [logger_1.Logger],
27
+ exports: [logger_1.Logger],
28
+ })
29
+ /**
30
+ * LoggerModule is a global module that provides a logger service,
31
+ * and enables HTTP logging middleware.
32
+ */
33
+ ], LoggerModule);
69
34
  //# sourceMappingURL=logger-module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger-module.js","sourceRoot":"","sources":["../../../src/logs/nest/logger-module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+F;AAC/F,wCAAyD;AACzD,qCAAkC;AAElC,4CAA4C;IAW/B,YAAY;4BATxB,IAAA,eAAM,GAAE,EACR,IAAA,eAAM,EAAC;YACN,SAAS,EAAE,CAAC,eAAM,CAAC;YACnB,OAAO,EAAE,CAAC,eAAM,CAAC;SAClB,CAAC;;;;;;;;YAKF,6KAOC;;;YAPY,uDAAY;;QACvB,SAAS,CAAC,QAA4B;YACpC,MAAM,UAAU,GAAG,IAAA,qCAA2B,EAAC,IAAI,eAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;YAC3E,QAAQ;iBACL,KAAK,CAAC,UAAU,CAAC;iBACjB,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,sBAAa,CAAC,GAAG,EAAE,CAAC,CAAC;QACzD,CAAC;;;;AANU,oCAAY"}
1
+ {"version":3,"file":"logger-module.js","sourceRoot":"","sources":["../../../src/logs/nest/logger-module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA+F;AAC/F,wCAAyD;AACzD,qCAAkC;AAElC,4CAA4C;AAWrC,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB,SAAS,CAAC,QAA4B;QACpC,MAAM,UAAU,GAAG,IAAA,qCAA2B,EAAC,IAAI,eAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;QAC3E,QAAQ;aACL,KAAK,CAAC,UAAU,CAAC;aACjB,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,sBAAa,CAAC,GAAG,EAAE,CAAC,CAAC;IACzD,CAAC;CACF,CAAA;AAPY,oCAAY;uBAAZ,YAAY;IATxB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,eAAM,CAAC;QACnB,OAAO,EAAE,CAAC,eAAM,CAAC;KAClB,CAAC;IACF;;;OAGG;GACU,YAAY,CAOxB"}
@@ -1,69 +1,32 @@
1
1
  "use strict";
2
- var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
3
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
4
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
5
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
6
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
7
- var _, done = false;
8
- for (var i = decorators.length - 1; i >= 0; i--) {
9
- var context = {};
10
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
11
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
12
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
13
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
14
- if (kind === "accessor") {
15
- if (result === void 0) continue;
16
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
17
- if (_ = accept(result.get)) descriptor.get = _;
18
- if (_ = accept(result.set)) descriptor.set = _;
19
- if (_ = accept(result.init)) initializers.unshift(_);
20
- }
21
- else if (_ = accept(result)) {
22
- if (kind === "field") initializers.unshift(_);
23
- else descriptor[key] = _;
24
- }
25
- }
26
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
27
- done = true;
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
28
7
  };
29
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
30
- var useValue = arguments.length > 2;
31
- for (var i = 0; i < initializers.length; i++) {
32
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
33
- }
34
- return useValue ? value : void 0;
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
35
10
  };
36
11
  Object.defineProperty(exports, "__esModule", { value: true });
37
12
  exports.Logger = void 0;
38
13
  const common_1 = require("@nestjs/common");
39
14
  const logger_1 = require("../logger");
40
- let Logger = (() => {
41
- let _classDecorators = [(0, common_1.Injectable)({ scope: common_1.Scope.TRANSIENT })];
42
- let _classDescriptor;
43
- let _classExtraInitializers = [];
44
- let _classThis;
45
- let _classSuper = logger_1.Logger;
46
- var Logger = class extends _classSuper {
47
- static { _classThis = this; }
48
- static {
49
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
50
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
51
- Logger = _classThis = _classDescriptor.value;
52
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
53
- __runInitializers(_classThis, _classExtraInitializers);
15
+ let Logger = class Logger extends logger_1.Logger {
16
+ constructor(...params) {
17
+ let options = params?.at(0);
18
+ if (typeof options === 'string') {
19
+ options = { scope: options, useLastArgAsScope: true };
54
20
  }
55
- constructor(...params) {
56
- let options = params?.at(0);
57
- if (typeof options === 'string') {
58
- options = { scope: options, useLastArgAsScope: true };
59
- }
60
- else {
61
- options = { ...options, useLastArgAsScope: true };
62
- }
63
- super(options);
21
+ else {
22
+ options = { ...options, useLastArgAsScope: true };
64
23
  }
65
- };
66
- return Logger = _classThis;
67
- })();
24
+ super(options);
25
+ }
26
+ };
68
27
  exports.Logger = Logger;
28
+ exports.Logger = Logger = __decorate([
29
+ (0, common_1.Injectable)({ scope: common_1.Scope.TRANSIENT }),
30
+ __metadata("design:paramtypes", [Object])
31
+ ], Logger);
69
32
  //# sourceMappingURL=logger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/logs/nest/logger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAmD;AACnD,sCAAiD;IAGpC,MAAM;4BADlB,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,SAAS,EAAE,CAAC;;;;sBACX,eAAU;sBAAlB,SAAQ,WAAU;;;;YAAtC,6KAUC;;;YAVY,uDAAM;;QACjB,YAAY,GAAG,MAAgD;YAC7D,IAAI,OAAO,GAAG,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;YAC5B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;gBAChC,OAAO,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;YACxD,CAAC;iBAAM,CAAC;gBACN,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;YACpD,CAAC;YACD,KAAK,CAAC,OAAO,CAAC,CAAC;QACjB,CAAC;;;;AATU,wBAAM"}
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/logs/nest/logger.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAmD;AACnD,sCAAiD;AAG1C,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,eAAU;IACpC,YAAY,GAAG,MAAgD;QAC7D,IAAI,OAAO,GAAG,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QAC5B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YAChC,OAAO,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;QACxD,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;QACpD,CAAC;QACD,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF,CAAA;AAVY,wBAAM;iBAAN,MAAM;IADlB,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,SAAS,EAAE,CAAC;;GAC1B,MAAM,CAUlB"}
@@ -0,0 +1,14 @@
1
+ import { api } from '@opentelemetry/sdk-node';
2
+ /**
3
+ * Returns a tracer from the global tracer provider.
4
+ * Tracer name and version are set to the service name and version.
5
+ *
6
+ * Utility wrapper for {@link api.trace.getTracer|api.trace.getTracer}
7
+ **/
8
+ export declare const getTracer: () => api.Tracer;
9
+ /**
10
+ * Decorator wraps a method in an active span.
11
+ * The span name is set to the method name and the class name.
12
+ * The span kind is set to INTERNAL.
13
+ */
14
+ export declare const Span: (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<(...args: any[]) => any>) => TypedPropertyDescriptor<(...args: any[]) => any>;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Span = exports.getTracer = void 0;
4
+ const sdk_node_1 = require("@opentelemetry/sdk-node");
5
+ const global_config_1 = require("../global-config");
6
+ /**
7
+ * Returns a tracer from the global tracer provider.
8
+ * Tracer name and version are set to the service name and version.
9
+ *
10
+ * Utility wrapper for {@link api.trace.getTracer|api.trace.getTracer}
11
+ **/
12
+ const getTracer = () => {
13
+ return sdk_node_1.api.trace.getTracer(global_config_1.globalConfig.serviceName, global_config_1.globalConfig.serviceVersion);
14
+ };
15
+ exports.getTracer = getTracer;
16
+ /**
17
+ * Decorator wraps a method in an active span.
18
+ * The span name is set to the method name and the class name.
19
+ * The span kind is set to INTERNAL.
20
+ */
21
+ // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types, @typescript-eslint/no-explicit-any
22
+ const Span = (target, propertyKey, descriptor) => {
23
+ const originalMethod = descriptor.value;
24
+ descriptor.value = function (...args) {
25
+ (0, exports.getTracer)().startActiveSpan(`${target.constructor.name} ${String(propertyKey)}`, { kind: sdk_node_1.api.SpanKind.INTERNAL }, (span) => {
26
+ try {
27
+ const result = originalMethod.apply(target, args);
28
+ if (result instanceof Promise) {
29
+ return result
30
+ .then((res) => {
31
+ // Async success handling
32
+ span.setStatus({ code: sdk_node_1.api.SpanStatusCode.OK });
33
+ span.end();
34
+ return res;
35
+ })
36
+ .catch((exception) => {
37
+ // Async error handling
38
+ if (exception instanceof Error) {
39
+ span.recordException(exception);
40
+ span.setStatus({
41
+ code: sdk_node_1.api.SpanStatusCode.ERROR,
42
+ message: exception.message,
43
+ });
44
+ }
45
+ else {
46
+ span.setStatus({ code: sdk_node_1.api.SpanStatusCode.ERROR });
47
+ }
48
+ span.end();
49
+ throw exception;
50
+ });
51
+ }
52
+ // Sync success handling
53
+ span.setStatus({ code: sdk_node_1.api.SpanStatusCode.OK });
54
+ span.end();
55
+ return result;
56
+ }
57
+ catch (exception) {
58
+ // Sync error handling
59
+ if (exception instanceof Error) {
60
+ span.recordException(exception);
61
+ span.setStatus({
62
+ code: sdk_node_1.api.SpanStatusCode.ERROR,
63
+ message: exception.message,
64
+ });
65
+ }
66
+ else {
67
+ span.setStatus({ code: sdk_node_1.api.SpanStatusCode.ERROR });
68
+ }
69
+ span.end();
70
+ throw exception;
71
+ }
72
+ });
73
+ };
74
+ return descriptor;
75
+ };
76
+ exports.Span = Span;
77
+ //# sourceMappingURL=cf-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cf-helpers.js","sourceRoot":"","sources":["../../src/otel/cf-helpers.ts"],"names":[],"mappings":";;;AAAA,sDAA8C;AAC9C,oDAAgD;AAEhD;;;;;IAKI;AACG,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,OAAO,cAAG,CAAC,KAAK,CAAC,SAAS,CAAC,4BAAY,CAAC,WAAW,EAAE,4BAAY,CAAC,cAAc,CAAC,CAAC;AACpF,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB;AAEF;;;;GAIG;AACH,0GAA0G;AACnG,MAAM,IAAI,GAAG,CAAC,MAAc,EAAE,WAA4B,EAAE,UAA4D,EAAE,EAAE;IACjI,MAAM,cAAc,GAAG,UAAU,CAAC,KAAM,CAAC;IACzC,UAAU,CAAC,KAAK,GAAG,UAAU,GAAG,IAAe;QAC7C,IAAA,iBAAS,GAAE,CAAC,eAAe,CACzB,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,IAAI,MAAM,CAAC,WAAW,CAAC,EAAE,EACnD,EAAE,IAAI,EAAE,cAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAC/B,CAAC,IAAI,EAAE,EAAE;YACP,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;gBAClD,IAAI,MAAM,YAAY,OAAO,EAAE,CAAC;oBAC9B,OAAO,MAAM;yBACV,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;wBACZ,yBAAyB;wBACzB,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,cAAG,CAAC,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC;wBAChD,IAAI,CAAC,GAAG,EAAE,CAAC;wBACX,OAAO,GAAG,CAAC;oBACb,CAAC,CAAC;yBACD,KAAK,CAAC,CAAC,SAAS,EAAE,EAAE;wBACnB,uBAAuB;wBACvB,IAAI,SAAS,YAAY,KAAK,EAAE,CAAC;4BAC/B,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;4BAChC,IAAI,CAAC,SAAS,CAAC;gCACb,IAAI,EAAE,cAAG,CAAC,cAAc,CAAC,KAAK;gCAC9B,OAAO,EAAE,SAAS,CAAC,OAAO;6BAC3B,CAAC,CAAC;wBACL,CAAC;6BAAM,CAAC;4BACN,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,cAAG,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC;wBACrD,CAAC;wBACD,IAAI,CAAC,GAAG,EAAE,CAAC;wBACX,MAAM,SAAS,CAAC;oBAClB,CAAC,CAAC,CAAC;gBACP,CAAC;gBACD,wBAAwB;gBACxB,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,cAAG,CAAC,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC;gBAChD,IAAI,CAAC,GAAG,EAAE,CAAC;gBACX,OAAO,MAAM,CAAC;YAChB,CAAC;YAAC,OAAO,SAAS,EAAE,CAAC;gBACnB,sBAAsB;gBACtB,IAAI,SAAS,YAAY,KAAK,EAAE,CAAC;oBAC/B,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;oBAChC,IAAI,CAAC,SAAS,CAAC;wBACb,IAAI,EAAE,cAAG,CAAC,cAAc,CAAC,KAAK;wBAC9B,OAAO,EAAE,SAAS,CAAC,OAAO;qBAC3B,CAAC,CAAC;gBACL,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,cAAG,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC;gBACrD,CAAC;gBACD,IAAI,CAAC,GAAG,EAAE,CAAC;gBACX,MAAM,SAAS,CAAC;YAClB,CAAC;QACH,CAAC,CACF,CAAC;IACJ,CAAC,CAAC;IACF,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAtDW,QAAA,IAAI,QAsDf"}
@@ -1 +1,2 @@
1
1
  export * from '@opentelemetry/sdk-node';
2
+ export * as cf from './cf-helpers';
@@ -11,9 +11,33 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
11
11
  if (k2 === undefined) k2 = k;
12
12
  o[k2] = m[k];
13
13
  }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
14
19
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
20
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
21
  };
22
+ var __importStar = (this && this.__importStar) || (function () {
23
+ var ownKeys = function(o) {
24
+ ownKeys = Object.getOwnPropertyNames || function (o) {
25
+ var ar = [];
26
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
+ return ar;
28
+ };
29
+ return ownKeys(o);
30
+ };
31
+ return function (mod) {
32
+ if (mod && mod.__esModule) return mod;
33
+ var result = {};
34
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
+ __setModuleDefault(result, mod);
36
+ return result;
37
+ };
38
+ })();
17
39
  Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.cf = void 0;
18
41
  __exportStar(require("@opentelemetry/sdk-node"), exports);
42
+ exports.cf = __importStar(require("./cf-helpers"));
19
43
  //# sourceMappingURL=public.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"public.js","sourceRoot":"","sources":["../../src/otel/public.ts"],"names":[],"mappings":";AAAA,wBAAwB;;;;;;;;;;;;;;;;AAExB,0DAAwC"}
1
+ {"version":3,"file":"public.js","sourceRoot":"","sources":["../../src/otel/public.ts"],"names":[],"mappings":";AAAA,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAExB,0DAAwC;AACxC,mDAAmC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codefresh-io/cf-telemetry",
3
- "version": "2.1.0",
3
+ "version": "2.2.0-alpha.1",
4
4
  "exports": {
5
5
  "./init": {
6
6
  "import": "./dist/init.mjs",