@segment/actions-shared 1.124.1-remove-abort-controller.2 → 1.125.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.
@@ -1,10 +1,10 @@
1
1
  import { ContextFromDecorator } from './operationTracking';
2
2
  export declare const track: ((decoratorArgs?: ({
3
3
  onError?: ((ctx: import("./operationTracking").OperationErrorHandlerContext<import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>>) => void) | undefined;
4
- } & {
4
+ } & import("./operationTracking").OperationLoggerDecoratorArgs & {
5
5
  onTry?: ((ctx: import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>) => void) | undefined;
6
6
  onFinally?: ((ctx: import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>) => void) | undefined;
7
- } & import("./operationTracking").OperationLoggerDecoratorArgs & {
7
+ } & {
8
8
  shouldStats?: ((args: import("./operationTracking").OperationStatsEventArgs) => boolean | void) | undefined;
9
9
  } & {
10
10
  wrapIntegrationError?: ((ctx: import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>) => import("@segment/actions-core/*").IntegrationError | [message: string, code: string, status: number]) | undefined;
@@ -15,6 +15,9 @@ export declare const track: ((decoratorArgs?: ({
15
15
  }) | undefined;
16
16
  } & {
17
17
  _contextType: import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any> & {
18
+ start?: number | undefined;
19
+ duration?: number | undefined;
20
+ } & {
18
21
  decoratorArgs?: {
19
22
  onError?: ((ctx: import("./operationTracking").OperationErrorHandlerContext<import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>>) => void) | undefined;
20
23
  } | undefined;
@@ -22,19 +25,16 @@ export declare const track: ((decoratorArgs?: ({
22
25
  parent?: (import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any> & any) | undefined;
23
26
  sharedContext: {};
24
27
  } & {
25
- start?: number | undefined;
26
- duration?: number | undefined;
28
+ logs: string[];
29
+ logMetadata?: Record<string, unknown> | undefined;
30
+ decoratorArgs?: import("./operationTracking").OperationLoggerDecoratorArgs | undefined;
31
+ sharedContext: import("./operationTracking").OperationLoggerSharedContext;
27
32
  } & {
28
33
  onFinally: (() => void)[];
29
34
  decoratorArgs?: {
30
35
  onTry?: ((ctx: import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>) => void) | undefined;
31
36
  onFinally?: ((ctx: import("./operationTracking").TryCatchFinallyContext<(this: any, ...args: any[]) => any>) => void) | undefined;
32
37
  } | undefined;
33
- } & {
34
- logs: string[];
35
- logMetadata?: Record<string, unknown> | undefined;
36
- decoratorArgs?: import("./operationTracking").OperationLoggerDecoratorArgs | undefined;
37
- sharedContext: import("./operationTracking").OperationLoggerSharedContext;
38
38
  } & {
39
39
  tags: string[];
40
40
  sharedContext: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@segment/actions-shared",
3
3
  "description": "Shared destination action methods and definitions.",
4
- "version": "1.124.1-remove-abort-controller.2+5b38b1114",
4
+ "version": "1.125.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/segmentio/action-destinations",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@amplitude/ua-parser-js": "^0.7.25",
40
- "@segment/actions-core": "^3.143.1-remove-abort-controller.2+5b38b1114",
40
+ "@segment/actions-core": "^3.144.0",
41
41
  "cheerio": "^1.0.0-rc.10",
42
42
  "dayjs": "^1.10.7",
43
43
  "escape-goat": "^3",
@@ -64,5 +64,5 @@
64
64
  "<rootDir>/test/setup-after-env.ts"
65
65
  ]
66
66
  },
67
- "gitHead": "5b38b1114aae082a144d53f4a1a0bf0f2d500c29"
67
+ "gitHead": "25a5473dc11ce71095adb6939eb84c0d27cb09b7"
68
68
  }
@@ -1,23 +0,0 @@
1
- export declare enum CachedResponseType {
2
- Success = 0,
3
- Error = 1
4
- }
5
- export declare class CachedValueSerializationError extends Error {
6
- constructor(message: string);
7
- }
8
- export declare class CachedValue {
9
- status: number;
10
- type: CachedResponseType;
11
- protected seperator: string;
12
- constructor(status: number);
13
- serialize(): string;
14
- }
15
- export declare class CachedError extends CachedValue {
16
- message: string;
17
- code: string;
18
- constructor(status: number, message: string, code: string);
19
- serialize(): string;
20
- }
21
- export declare class CachedValueFactory {
22
- static fromString(value: string): CachedValue | CachedError;
23
- }
@@ -1,62 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CachedValueFactory = exports.CachedError = exports.CachedValue = exports.CachedValueSerializationError = exports.CachedResponseType = void 0;
4
- var CachedResponseType;
5
- (function (CachedResponseType) {
6
- CachedResponseType[CachedResponseType["Success"] = 0] = "Success";
7
- CachedResponseType[CachedResponseType["Error"] = 1] = "Error";
8
- })(CachedResponseType = exports.CachedResponseType || (exports.CachedResponseType = {}));
9
- class CachedValueSerializationError extends Error {
10
- constructor(message) {
11
- super(message);
12
- this.name = 'CachedValueSerializationError';
13
- }
14
- }
15
- exports.CachedValueSerializationError = CachedValueSerializationError;
16
- class CachedValue {
17
- constructor(status) {
18
- this.seperator = ':-:';
19
- this.status = status;
20
- this.type = CachedResponseType.Success;
21
- }
22
- serialize() {
23
- return `${this.type}${this.seperator}${this.status}`;
24
- }
25
- }
26
- exports.CachedValue = CachedValue;
27
- class CachedError extends CachedValue {
28
- constructor(status, message, code) {
29
- super(status);
30
- this.type = CachedResponseType.Error;
31
- this.code = code;
32
- this.message = message;
33
- }
34
- serialize() {
35
- return `${super.serialize()}${this.seperator}${this.message}${this.seperator}${this.code}`;
36
- }
37
- }
38
- exports.CachedError = CachedError;
39
- class CachedValueFactory {
40
- static fromString(value) {
41
- const parts = value.split(':-:');
42
- if (parts.length < 2) {
43
- throw new CachedValueSerializationError(`Invalid cached value ${value}`);
44
- }
45
- const [type, status] = parts;
46
- if (CachedResponseType.Success === +type) {
47
- return new CachedValue(+status);
48
- }
49
- else if (CachedResponseType.Error === +type) {
50
- if (parts.length < 4) {
51
- throw new CachedValueSerializationError(`Invalid cached value ${value}`);
52
- }
53
- const [message, code] = parts.slice(2);
54
- return new CachedError(+status, message, code);
55
- }
56
- else {
57
- throw new CachedValueSerializationError(`Invalid cached value ${value}`);
58
- }
59
- }
60
- }
61
- exports.CachedValueFactory = CachedValueFactory;
62
- //# sourceMappingURL=CachedResponse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CachedResponse.js","sourceRoot":"","sources":["../../../src/engage/utils/CachedResponse.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,iEAAW,CAAA;IACX,6DAAS,CAAA;AACX,CAAC,EAHW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAG7B;AAED,MAAa,6BAA8B,SAAQ,KAAK;IACtD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,+BAA+B,CAAA;IAC7C,CAAC;CACF;AALD,sEAKC;AAED,MAAa,WAAW;IAKtB,YAAY,MAAc;QAFhB,cAAS,GAAG,KAAK,CAAA;QAGzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC,OAAO,CAAA;IACxC,CAAC;IAED,SAAS;QACP,OAAO,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAA;IACtD,CAAC;CACF;AAbD,kCAaC;AAED,MAAa,WAAY,SAAQ,WAAW;IAG1C,YAAY,MAAc,EAAE,OAAe,EAAE,IAAY;QACvD,KAAK,CAAC,MAAM,CAAC,CAAA;QACb,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC,KAAK,CAAA;QACpC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,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