@geekmidas/events 10.0.0-alpha.13 → 10.0.0-alpha.131
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/README.md +46 -1
- package/dist/{SQSSubscriber-cpo624qU.mjs → SQSSubscriber-BEJBfNTe.mjs} +94 -10
- package/dist/SQSSubscriber-BEJBfNTe.mjs.map +1 -0
- package/dist/{SQSSubscriber-DLPZCzFE.cjs → SQSSubscriber-COTqWvOk.cjs} +101 -10
- package/dist/SQSSubscriber-COTqWvOk.cjs.map +1 -0
- package/dist/basic/index.cjs +35 -4
- package/dist/basic/index.cjs.map +1 -1
- package/dist/basic/index.d.cts +8 -1
- package/dist/basic/index.d.cts.map +1 -1
- package/dist/basic/index.d.mts +8 -1
- package/dist/basic/index.d.mts.map +1 -1
- package/dist/basic/index.mjs +35 -5
- package/dist/basic/index.mjs.map +1 -1
- package/dist/index.cjs +45 -141
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +80 -20
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +80 -20
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +33 -141
- package/dist/index.mjs.map +1 -1
- package/dist/pgboss/index.cjs +124 -27
- package/dist/pgboss/index.cjs.map +1 -1
- package/dist/pgboss/index.d.cts +51 -4
- package/dist/pgboss/index.d.cts.map +1 -1
- package/dist/pgboss/index.d.mts +51 -4
- package/dist/pgboss/index.d.mts.map +1 -1
- package/dist/pgboss/index.mjs +121 -27
- package/dist/pgboss/index.mjs.map +1 -1
- package/dist/rabbitmq/index.cjs +63 -20
- package/dist/rabbitmq/index.cjs.map +1 -1
- package/dist/rabbitmq/index.d.cts +15 -1
- package/dist/rabbitmq/index.d.cts.map +1 -1
- package/dist/rabbitmq/index.d.mts +15 -1
- package/dist/rabbitmq/index.d.mts.map +1 -1
- package/dist/rabbitmq/index.mjs +63 -20
- package/dist/rabbitmq/index.mjs.map +1 -1
- package/dist/registry-DIx25Q5s.d.cts +255 -0
- package/dist/registry-DIx25Q5s.d.cts.map +1 -0
- package/dist/registry-DIx25Q5s.d.mts +255 -0
- package/dist/registry-DIx25Q5s.d.mts.map +1 -0
- package/dist/registry-DXLY1Xf6.mjs +99 -0
- package/dist/registry-DXLY1Xf6.mjs.map +1 -0
- package/dist/registry-DlT36229.cjs +122 -0
- package/dist/registry-DlT36229.cjs.map +1 -0
- package/dist/sns/index.cjs +439 -12
- package/dist/sns/index.cjs.map +1 -1
- package/dist/sns/index.d.cts +263 -8
- package/dist/sns/index.d.cts.map +1 -1
- package/dist/sns/index.d.mts +263 -8
- package/dist/sns/index.d.mts.map +1 -1
- package/dist/sns/index.mjs +423 -13
- package/dist/sns/index.mjs.map +1 -1
- package/dist/sns/snsUrl.d.cts.map +1 -1
- package/dist/sns/snsUrl.d.mts.map +1 -1
- package/dist/sqs/index.cjs +22 -55
- package/dist/sqs/index.cjs.map +1 -1
- package/dist/sqs/index.d.cts +23 -1
- package/dist/sqs/index.d.cts.map +1 -1
- package/dist/sqs/index.d.mts +23 -1
- package/dist/sqs/index.d.mts.map +1 -1
- package/dist/sqs/index.mjs +20 -53
- package/dist/sqs/index.mjs.map +1 -1
- package/dist/sqs/sqsUrl.d.cts.map +1 -1
- package/dist/sqs/sqsUrl.d.mts.map +1 -1
- package/dist/telemetry-DG3l807O.cjs +309 -0
- package/dist/telemetry-DG3l807O.cjs.map +1 -0
- package/dist/telemetry-DjjgJMul.mjs +244 -0
- package/dist/telemetry-DjjgJMul.mjs.map +1 -0
- package/package.json +8 -3
- package/dist/PgBossConnection-CywKoAZU.cjs +0 -2
- package/dist/PgBossConnection-DjoqT84r.mjs +0 -2
- package/dist/RabbitMQConnection-C9eccBL8.cjs +0 -2
- package/dist/RabbitMQConnection-CAp7VqyT.mjs +0 -2
- package/dist/SNSConnection-BWDC1wAF.cjs +0 -2
- package/dist/SNSConnection-ezQvVrDv.mjs +0 -2
- package/dist/SQSSubscriber-DLPZCzFE.cjs.map +0 -1
- package/dist/SQSSubscriber-cpo624qU.mjs.map +0 -1
- package/dist/types-C15FC0qp.mjs +0 -18
- package/dist/types-C15FC0qp.mjs.map +0 -1
- package/dist/types-DXNwyRyg.cjs +0 -23
- package/dist/types-DXNwyRyg.cjs.map +0 -1
- package/dist/types-lnM-qoe_.d.cts +0 -140
- package/dist/types-lnM-qoe_.d.cts.map +0 -1
- package/dist/types-lnM-qoe_.d.mts +0 -140
- package/dist/types-lnM-qoe_.d.mts.map +0 -1
package/dist/sqs/index.cjs
CHANGED
|
@@ -1,64 +1,31 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
require("../telemetry-DG3l807O.cjs");
|
|
3
|
+
const require_registry = require("../registry-DlT36229.cjs");
|
|
3
4
|
const require_sqs_sqsUrl = require("./sqsUrl.cjs");
|
|
4
|
-
const require_SQSSubscriber = require("../SQSSubscriber-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const params = new URL(connectionString).searchParams;
|
|
22
|
-
const { SQSConnection } = await Promise.resolve().then(() => require("../SQSSubscriber-DLPZCzFE.cjs")).then((n) => n.SQSConnection_exports);
|
|
23
|
-
const connection = await SQSConnection.fromConnectionString(connectionString);
|
|
24
|
-
const options = { maxBatchSize: params.get("maxBatchSize") ? Number.parseInt(params.get("maxBatchSize"), 10) : void 0 };
|
|
25
|
-
return new SQSPublisher(connection, options);
|
|
26
|
-
}
|
|
27
|
-
async publish(messages) {
|
|
28
|
-
if (messages.length === 0) return;
|
|
29
|
-
if (!this.connection.isConnected()) await this.connection.connect();
|
|
30
|
-
const batches = (0, lodash_chunk.default)(messages, this.options.maxBatchSize);
|
|
31
|
-
await Promise.all(batches.map((batch) => this.sendBatch(batch)));
|
|
32
|
-
}
|
|
33
|
-
async sendBatch(messages) {
|
|
34
|
-
const entries = messages.map((message, index) => ({
|
|
35
|
-
Id: `${index}`,
|
|
36
|
-
MessageBody: JSON.stringify({
|
|
37
|
-
type: message.type,
|
|
38
|
-
payload: message.payload
|
|
39
|
-
}),
|
|
40
|
-
MessageAttributes: { type: {
|
|
41
|
-
DataType: "String",
|
|
42
|
-
StringValue: message.type
|
|
43
|
-
} }
|
|
44
|
-
}));
|
|
45
|
-
const input = {
|
|
46
|
-
QueueUrl: this.connection.queueUrl,
|
|
47
|
-
Entries: entries
|
|
48
|
-
};
|
|
49
|
-
const command = new _aws_sdk_client_sqs.SendMessageBatchCommand(input);
|
|
50
|
-
const response = await this.connection.sqsClient.send(command);
|
|
51
|
-
if (response.Failed && response.Failed.length > 0) {
|
|
52
|
-
const errors = response.Failed.map((f) => `${f.Id}: ${f.Code} - ${f.Message}`).join(", ");
|
|
53
|
-
throw new Error(`Failed to send ${response.Failed.length} messages: ${errors}`);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
async close() {}
|
|
5
|
+
const require_SQSSubscriber = require("../SQSSubscriber-COTqWvOk.cjs");
|
|
6
|
+
//#region src/sqs/driver.ts
|
|
7
|
+
/**
|
|
8
|
+
* `sqs://` — an SQS queue. Register it with
|
|
9
|
+
* `registerEventsDriver(sqsEventsDriver)`; this subpath is the only one that
|
|
10
|
+
* imports `@aws-sdk/client-sqs` on its own.
|
|
11
|
+
*/
|
|
12
|
+
const sqsEventsDriver = {
|
|
13
|
+
scheme: "sqs",
|
|
14
|
+
connect: (url) => require_SQSSubscriber.SQSConnection.fromConnectionString(url),
|
|
15
|
+
publisher: (url) => require_SQSSubscriber.SQSPublisher.fromConnectionString(url),
|
|
16
|
+
publisherFor: (connection) => new require_SQSSubscriber.SQSPublisher(connection),
|
|
17
|
+
async subscriber(url) {
|
|
18
|
+
if (new URL(url).searchParams.get("topicArn")) return require_registry.eventsDriverFor("sns", "subscriber").subscriber(url.replace(/^sqs:/, "sns:"));
|
|
19
|
+
return new require_SQSSubscriber.SQSSubscriber(await require_SQSSubscriber.SQSConnection.fromConnectionString(url));
|
|
20
|
+
},
|
|
21
|
+
subscriberFor: (connection) => new require_SQSSubscriber.SQSSubscriber(connection)
|
|
57
22
|
};
|
|
58
23
|
//#endregion
|
|
59
24
|
exports.SQSConnection = require_SQSSubscriber.SQSConnection;
|
|
60
|
-
exports.SQSPublisher = SQSPublisher;
|
|
25
|
+
exports.SQSPublisher = require_SQSSubscriber.SQSPublisher;
|
|
61
26
|
exports.SQSSubscriber = require_SQSSubscriber.SQSSubscriber;
|
|
27
|
+
exports.SqsBatchPartlyFailed = require_SQSSubscriber.SqsBatchPartlyFailed;
|
|
28
|
+
exports.sqsEventsDriver = sqsEventsDriver;
|
|
62
29
|
Object.defineProperty(exports, "sqsUrl", {
|
|
63
30
|
enumerable: true,
|
|
64
31
|
get: function() {
|
package/dist/sqs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["SQSConnection","SQSPublisher","eventsDriverFor","SQSSubscriber"],"sources":["../../src/sqs/driver.ts"],"sourcesContent":["import { type EventsDriver, eventsDriverFor } from '../registry';\nimport { EventPublisherType } from '../types';\nimport { SQSConnection } from './SQSConnection';\nimport { SQSPublisher } from './SQSPublisher';\nimport { SQSSubscriber } from './SQSSubscriber';\n\n/**\n * `sqs://` — an SQS queue. Register it with\n * `registerEventsDriver(sqsEventsDriver)`; this subpath is the only one that\n * imports `@aws-sdk/client-sqs` on its own.\n */\nexport const sqsEventsDriver: EventsDriver = {\n\tscheme: EventPublisherType.SQS,\n\tconnect: (url) => SQSConnection.fromConnectionString(url),\n\tpublisher: (url) => SQSPublisher.fromConnectionString(url),\n\tpublisherFor: (connection) => new SQSPublisher(connection as SQSConnection),\n\tasync subscriber(url) {\n\t\t// A queue named with the topic it is subscribed to is a managed SNS→SQS\n\t\t// subscription, which is the SNS driver's to build — reached through the\n\t\t// registry, so this subpath never imports the SNS client.\n\t\tif (new URL(url).searchParams.get('topicArn')) {\n\t\t\treturn eventsDriverFor(EventPublisherType.SNS, 'subscriber').subscriber(\n\t\t\t\turl.replace(/^sqs:/, 'sns:'),\n\t\t\t);\n\t\t}\n\t\treturn new SQSSubscriber(await SQSConnection.fromConnectionString(url));\n\t},\n\tsubscriberFor: (connection) => new SQSSubscriber(connection as SQSConnection),\n};\n"],"mappings":";;;;;;;;;;;AAWA,MAAa,kBAAgC;CAC5C,QAAA;CACA,UAAU,QAAQA,sBAAAA,cAAc,qBAAqB,GAAG;CACxD,YAAY,QAAQC,sBAAAA,aAAa,qBAAqB,GAAG;CACzD,eAAe,eAAe,IAAIA,sBAAAA,aAAa,UAA2B;CAC1E,MAAM,WAAW,KAAK;EAIrB,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC,aAAa,IAAI,UAAU,GAC3C,OAAOC,iBAAAA,gBAAAA,OAAwC,YAAY,CAAC,CAAC,WAC5D,IAAI,QAAQ,SAAS,MAAM,CAC5B;EAED,OAAO,IAAIC,sBAAAA,cAAc,MAAMH,sBAAAA,cAAc,qBAAqB,GAAG,CAAC;CACvE;CACA,gBAAgB,eAAe,IAAIG,sBAAAA,cAAc,UAA2B;AAC7E"}
|
package/dist/sqs/index.d.cts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as EventPublisher, f as EventPublisherType, g as PublishableMessage, p as EventSubscriber, t as EventsDriver, u as EventConnection } from "../registry-DIx25Q5s.cjs";
|
|
2
2
|
import { SqsAddress, t as sqsUrl_d_exports } from "./sqsUrl.cjs";
|
|
3
3
|
import { SQSClient } from "@aws-sdk/client-sqs";
|
|
4
|
+
//#region src/sqs/driver.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* `sqs://` — an SQS queue. Register it with
|
|
7
|
+
* `registerEventsDriver(sqsEventsDriver)`; this subpath is the only one that
|
|
8
|
+
* imports `@aws-sdk/client-sqs` on its own.
|
|
9
|
+
*/
|
|
10
|
+
export declare const sqsEventsDriver: EventsDriver;
|
|
11
|
+
//#endregion
|
|
4
12
|
//#region src/sqs/SQSConnection.d.ts
|
|
5
13
|
interface SQSConnectionConfig {
|
|
6
14
|
queueUrl: string;
|
|
@@ -51,8 +59,22 @@ export declare class SQSPublisher<TMessage extends PublishableMessage<string, an
|
|
|
51
59
|
static fromConnectionString<TMessage extends PublishableMessage<string, any>>(connectionString: string): Promise<SQSPublisher<TMessage>>;
|
|
52
60
|
publish(messages: TMessage[]): Promise<void>;
|
|
53
61
|
private sendBatch;
|
|
62
|
+
private send;
|
|
54
63
|
close(): Promise<void>;
|
|
55
64
|
}
|
|
65
|
+
/** SQS accepted the batch but refused some of its messages; the rest were sent. */
|
|
66
|
+
export declare class SqsBatchPartlyFailed extends Error {
|
|
67
|
+
readonly failed: readonly {
|
|
68
|
+
id?: string;
|
|
69
|
+
code?: string;
|
|
70
|
+
message?: string;
|
|
71
|
+
}[];
|
|
72
|
+
constructor(failed: readonly {
|
|
73
|
+
id?: string;
|
|
74
|
+
code?: string;
|
|
75
|
+
message?: string;
|
|
76
|
+
}[]);
|
|
77
|
+
}
|
|
56
78
|
//#endregion
|
|
57
79
|
//#region src/sqs/SQSSubscriber.d.ts
|
|
58
80
|
interface SQSSubscriberOptions {
|
package/dist/sqs/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/sqs/SQSConnection.ts","../../src/sqs/SQSPublisher.ts","../../src/sqs/SQSSubscriber.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/sqs/driver.ts","../../src/sqs/SQSConnection.ts","../../src/sqs/SQSPublisher.ts","../../src/sqs/SQSSubscriber.ts"],"mappings":";;;;;;;;;qBAWa,iBAAiB;;;UCNb;EAChB;EACA;EACA;EACA;IACC;IACA;IACA;;;qBAIW,yBAAyB;WAKhB,QAAQ;WAJpB,OAAI,mBAAA;UACL;UACA;EAER,YAAqB,QAAQ;;;;;SAgBhB,qBACZ,2BACE,QAAQ;EA8BL,WAAW;EAKX,SAAS;EAKf;;;;MAOI,aAAa;;;;MAOb;;;;UCnFY;EAChB;;qBAGY,aAAa,iBAAiB,4CAC/B,eAAe;WAKhB,YAAY;WAHb,SAAS,SAAS;EAE3B,YACU,YAAY,eACrB,UAAS;;;;;SAWG,qBACZ,iBAAiB,iCAChB,2BAA2B,QAAQ,aAAa;EAiB5C,QAAQ,UAAU,aAAa;UAcvB;UA2BA;EAqBR,SAAS;;;qBAOH,6BAA6B;WAE/B;IACR;IACA;IACA;;EAJF,YACU;IACR;IACA;IACA;;;;;UC/Gc;EAChB;EACA;EACA;;;;;;;;;;;;;;;qBAgBY,cAAc,iBAAiB,4CAChC,gBAAgB;UAQlB;UAND;UACA;UACA;UACA;EAER,YACS,YAAY,eACpB,UAAS;EASJ,UACL,UAAU,oBACV,WAAW,SAAS,aAAa,gBAC/B;EAYH;UAIc;UAqBA;;;;UA8DN;UAuCM;UAUN"}
|
package/dist/sqs/index.d.mts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as EventPublisher, f as EventPublisherType, g as PublishableMessage, p as EventSubscriber, t as EventsDriver, u as EventConnection } from "../registry-DIx25Q5s.mjs";
|
|
2
2
|
import { SqsAddress, t as sqsUrl_d_exports } from "./sqsUrl.mjs";
|
|
3
3
|
import { SQSClient } from "@aws-sdk/client-sqs";
|
|
4
|
+
//#region src/sqs/driver.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* `sqs://` — an SQS queue. Register it with
|
|
7
|
+
* `registerEventsDriver(sqsEventsDriver)`; this subpath is the only one that
|
|
8
|
+
* imports `@aws-sdk/client-sqs` on its own.
|
|
9
|
+
*/
|
|
10
|
+
export declare const sqsEventsDriver: EventsDriver;
|
|
11
|
+
//#endregion
|
|
4
12
|
//#region src/sqs/SQSConnection.d.ts
|
|
5
13
|
interface SQSConnectionConfig {
|
|
6
14
|
queueUrl: string;
|
|
@@ -51,8 +59,22 @@ export declare class SQSPublisher<TMessage extends PublishableMessage<string, an
|
|
|
51
59
|
static fromConnectionString<TMessage extends PublishableMessage<string, any>>(connectionString: string): Promise<SQSPublisher<TMessage>>;
|
|
52
60
|
publish(messages: TMessage[]): Promise<void>;
|
|
53
61
|
private sendBatch;
|
|
62
|
+
private send;
|
|
54
63
|
close(): Promise<void>;
|
|
55
64
|
}
|
|
65
|
+
/** SQS accepted the batch but refused some of its messages; the rest were sent. */
|
|
66
|
+
export declare class SqsBatchPartlyFailed extends Error {
|
|
67
|
+
readonly failed: readonly {
|
|
68
|
+
id?: string;
|
|
69
|
+
code?: string;
|
|
70
|
+
message?: string;
|
|
71
|
+
}[];
|
|
72
|
+
constructor(failed: readonly {
|
|
73
|
+
id?: string;
|
|
74
|
+
code?: string;
|
|
75
|
+
message?: string;
|
|
76
|
+
}[]);
|
|
77
|
+
}
|
|
56
78
|
//#endregion
|
|
57
79
|
//#region src/sqs/SQSSubscriber.d.ts
|
|
58
80
|
interface SQSSubscriberOptions {
|
package/dist/sqs/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/sqs/SQSConnection.ts","../../src/sqs/SQSPublisher.ts","../../src/sqs/SQSSubscriber.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/sqs/driver.ts","../../src/sqs/SQSConnection.ts","../../src/sqs/SQSPublisher.ts","../../src/sqs/SQSSubscriber.ts"],"mappings":";;;;;;;;;qBAWa,iBAAiB;;;UCNb;EAChB;EACA;EACA;EACA;IACC;IACA;IACA;;;qBAIW,yBAAyB;WAKhB,QAAQ;WAJpB,OAAI,mBAAA;UACL;UACA;EAER,YAAqB,QAAQ;;;;;SAgBhB,qBACZ,2BACE,QAAQ;EA8BL,WAAW;EAKX,SAAS;EAKf;;;;MAOI,aAAa;;;;MAOb;;;;UCnFY;EAChB;;qBAGY,aAAa,iBAAiB,4CAC/B,eAAe;WAKhB,YAAY;WAHb,SAAS,SAAS;EAE3B,YACU,YAAY,eACrB,UAAS;;;;;SAWG,qBACZ,iBAAiB,iCAChB,2BAA2B,QAAQ,aAAa;EAiB5C,QAAQ,UAAU,aAAa;UAcvB;UA2BA;EAqBR,SAAS;;;qBAOH,6BAA6B;WAE/B;IACR;IACA;IACA;;EAJF,YACU;IACR;IACA;IACA;;;;;UC/Gc;EAChB;EACA;EACA;;;;;;;;;;;;;;;qBAgBY,cAAc,iBAAiB,4CAChC,gBAAgB;UAQlB;UAND;UACA;UACA;UACA;EAER,YACS,YAAY,eACpB,UAAS;EASJ,UACL,UAAU,oBACV,WAAW,SAAS,aAAa,gBAC/B;EAYH;UAIc;UAqBA;;;;UA8DN;UAuCM;UAUN"}
|
package/dist/sqs/index.mjs
CHANGED
|
@@ -1,58 +1,25 @@
|
|
|
1
|
+
import "../telemetry-DjjgJMul.mjs";
|
|
2
|
+
import { n as eventsDriverFor } from "../registry-DXLY1Xf6.mjs";
|
|
1
3
|
import { t as sqsUrl_exports } from "./sqsUrl.mjs";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const { SQSConnection } = await import("../SQSSubscriber-cpo624qU.mjs").then((n) => n.r);
|
|
20
|
-
const connection = await SQSConnection.fromConnectionString(connectionString);
|
|
21
|
-
const options = { maxBatchSize: params.get("maxBatchSize") ? Number.parseInt(params.get("maxBatchSize"), 10) : void 0 };
|
|
22
|
-
return new SQSPublisher(connection, options);
|
|
23
|
-
}
|
|
24
|
-
async publish(messages) {
|
|
25
|
-
if (messages.length === 0) return;
|
|
26
|
-
if (!this.connection.isConnected()) await this.connection.connect();
|
|
27
|
-
const batches = chunk(messages, this.options.maxBatchSize);
|
|
28
|
-
await Promise.all(batches.map((batch) => this.sendBatch(batch)));
|
|
29
|
-
}
|
|
30
|
-
async sendBatch(messages) {
|
|
31
|
-
const entries = messages.map((message, index) => ({
|
|
32
|
-
Id: `${index}`,
|
|
33
|
-
MessageBody: JSON.stringify({
|
|
34
|
-
type: message.type,
|
|
35
|
-
payload: message.payload
|
|
36
|
-
}),
|
|
37
|
-
MessageAttributes: { type: {
|
|
38
|
-
DataType: "String",
|
|
39
|
-
StringValue: message.type
|
|
40
|
-
} }
|
|
41
|
-
}));
|
|
42
|
-
const input = {
|
|
43
|
-
QueueUrl: this.connection.queueUrl,
|
|
44
|
-
Entries: entries
|
|
45
|
-
};
|
|
46
|
-
const command = new SendMessageBatchCommand(input);
|
|
47
|
-
const response = await this.connection.sqsClient.send(command);
|
|
48
|
-
if (response.Failed && response.Failed.length > 0) {
|
|
49
|
-
const errors = response.Failed.map((f) => `${f.Id}: ${f.Code} - ${f.Message}`).join(", ");
|
|
50
|
-
throw new Error(`Failed to send ${response.Failed.length} messages: ${errors}`);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
async close() {}
|
|
4
|
+
import { i as SQSConnection, n as SQSPublisher, r as SqsBatchPartlyFailed, t as SQSSubscriber } from "../SQSSubscriber-BEJBfNTe.mjs";
|
|
5
|
+
//#region src/sqs/driver.ts
|
|
6
|
+
/**
|
|
7
|
+
* `sqs://` — an SQS queue. Register it with
|
|
8
|
+
* `registerEventsDriver(sqsEventsDriver)`; this subpath is the only one that
|
|
9
|
+
* imports `@aws-sdk/client-sqs` on its own.
|
|
10
|
+
*/
|
|
11
|
+
const sqsEventsDriver = {
|
|
12
|
+
scheme: "sqs",
|
|
13
|
+
connect: (url) => SQSConnection.fromConnectionString(url),
|
|
14
|
+
publisher: (url) => SQSPublisher.fromConnectionString(url),
|
|
15
|
+
publisherFor: (connection) => new SQSPublisher(connection),
|
|
16
|
+
async subscriber(url) {
|
|
17
|
+
if (new URL(url).searchParams.get("topicArn")) return eventsDriverFor("sns", "subscriber").subscriber(url.replace(/^sqs:/, "sns:"));
|
|
18
|
+
return new SQSSubscriber(await SQSConnection.fromConnectionString(url));
|
|
19
|
+
},
|
|
20
|
+
subscriberFor: (connection) => new SQSSubscriber(connection)
|
|
54
21
|
};
|
|
55
22
|
//#endregion
|
|
56
|
-
export { SQSConnection, SQSPublisher, SQSSubscriber, sqsUrl_exports as sqsUrl };
|
|
23
|
+
export { SQSConnection, SQSPublisher, SQSSubscriber, SqsBatchPartlyFailed, sqsEventsDriver, sqsUrl_exports as sqsUrl };
|
|
57
24
|
|
|
58
25
|
//# sourceMappingURL=index.mjs.map
|
package/dist/sqs/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/sqs/
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/sqs/driver.ts"],"sourcesContent":["import { type EventsDriver, eventsDriverFor } from '../registry';\nimport { EventPublisherType } from '../types';\nimport { SQSConnection } from './SQSConnection';\nimport { SQSPublisher } from './SQSPublisher';\nimport { SQSSubscriber } from './SQSSubscriber';\n\n/**\n * `sqs://` — an SQS queue. Register it with\n * `registerEventsDriver(sqsEventsDriver)`; this subpath is the only one that\n * imports `@aws-sdk/client-sqs` on its own.\n */\nexport const sqsEventsDriver: EventsDriver = {\n\tscheme: EventPublisherType.SQS,\n\tconnect: (url) => SQSConnection.fromConnectionString(url),\n\tpublisher: (url) => SQSPublisher.fromConnectionString(url),\n\tpublisherFor: (connection) => new SQSPublisher(connection as SQSConnection),\n\tasync subscriber(url) {\n\t\t// A queue named with the topic it is subscribed to is a managed SNS→SQS\n\t\t// subscription, which is the SNS driver's to build — reached through the\n\t\t// registry, so this subpath never imports the SNS client.\n\t\tif (new URL(url).searchParams.get('topicArn')) {\n\t\t\treturn eventsDriverFor(EventPublisherType.SNS, 'subscriber').subscriber(\n\t\t\t\turl.replace(/^sqs:/, 'sns:'),\n\t\t\t);\n\t\t}\n\t\treturn new SQSSubscriber(await SQSConnection.fromConnectionString(url));\n\t},\n\tsubscriberFor: (connection) => new SQSSubscriber(connection as SQSConnection),\n};\n"],"mappings":";;;;;;;;;;AAWA,MAAa,kBAAgC;CAC5C,QAAA;CACA,UAAU,QAAQ,cAAc,qBAAqB,GAAG;CACxD,YAAY,QAAQ,aAAa,qBAAqB,GAAG;CACzD,eAAe,eAAe,IAAI,aAAa,UAA2B;CAC1E,MAAM,WAAW,KAAK;EAIrB,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC,aAAa,IAAI,UAAU,GAC3C,OAAO,gBAAA,OAAwC,YAAY,CAAC,CAAC,WAC5D,IAAI,QAAQ,SAAS,MAAM,CAC5B;EAED,OAAO,IAAI,cAAc,MAAM,cAAc,qBAAqB,GAAG,CAAC;CACvE;CACA,gBAAgB,eAAe,IAAI,cAAc,UAA2B;AAC7E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqsUrl.d.cts","names":[],"sources":["../../src/sqs/sqsUrl.ts"],"mappings":";;;;;;;;;;;;;;;;;iBAeiB;EAChB;;EAEA;;EAEA;;EAEA;;;;;;;;;wBAYe,MAAM,SAAS;;wBAgBf,MAAM,2BAA2B;;qBA4BpC,0BAA0B;WACjB;
|
|
1
|
+
{"version":3,"file":"sqsUrl.d.cts","names":[],"sources":["../../src/sqs/sqsUrl.ts"],"mappings":";;;;;;;;;;;;;;;;;iBAeiB;EAChB;;EAEA;;EAEA;;EAEA;;;;;;;;;wBAYe,MAAM,SAAS;;wBAgBf,MAAM,2BAA2B;;qBA4BpC,0BAA0B;WACjB;EAArB,YAAqB;;;qBAOT,8BAA8B;WAEhC;WACA;WACA;EAHV,YACU,aACA,kBACA;;;qBAUE,wBAAwB;WACf;EAArB,YAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqsUrl.d.mts","names":[],"sources":["../../src/sqs/sqsUrl.ts"],"mappings":";;;;;;;;;;;;;;;;;iBAeiB;EAChB;;EAEA;;EAEA;;EAEA;;;;;;;;;wBAYe,MAAM,SAAS;;wBAgBf,MAAM,2BAA2B;;qBA4BpC,0BAA0B;WACjB;
|
|
1
|
+
{"version":3,"file":"sqsUrl.d.mts","names":[],"sources":["../../src/sqs/sqsUrl.ts"],"mappings":";;;;;;;;;;;;;;;;;iBAeiB;EAChB;;EAEA;;EAEA;;EAEA;;;;;;;;;wBAYe,MAAM,SAAS;;wBAgBf,MAAM,2BAA2B;;qBA4BpC,0BAA0B;WACjB;EAArB,YAAqB;;;qBAOT,8BAA8B;WAEhC;WACA;WACA;EAHV,YACU,aACA,kBACA;;;qBAUE,wBAAwB;WACf;EAArB,YAAqB"}
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
let _opentelemetry_api = require("@opentelemetry/api");
|
|
2
|
+
//#region src/types.ts
|
|
3
|
+
/**
|
|
4
|
+
* Event publisher/subscriber types
|
|
5
|
+
*/
|
|
6
|
+
let EventPublisherType = /* @__PURE__ */ function(EventPublisherType) {
|
|
7
|
+
EventPublisherType["Basic"] = "basic";
|
|
8
|
+
EventPublisherType["EventBridge"] = "eventbridge";
|
|
9
|
+
EventPublisherType["SQS"] = "sqs";
|
|
10
|
+
EventPublisherType["SNS"] = "sns";
|
|
11
|
+
EventPublisherType["Kafka"] = "kafka";
|
|
12
|
+
EventPublisherType["RabbitMQ"] = "rabbitmq";
|
|
13
|
+
EventPublisherType["PgBoss"] = "pgboss";
|
|
14
|
+
return EventPublisherType;
|
|
15
|
+
}({});
|
|
16
|
+
/** The transports a publisher, subscriber or connection can be built for. */
|
|
17
|
+
const SUPPORTED = [
|
|
18
|
+
"basic",
|
|
19
|
+
"sqs",
|
|
20
|
+
"sns",
|
|
21
|
+
"rabbitmq",
|
|
22
|
+
"pgboss"
|
|
23
|
+
];
|
|
24
|
+
/**
|
|
25
|
+
* A connection string or connection whose transport nothing here implements —
|
|
26
|
+
* a typo'd scheme, or one of the listed-but-unbuilt ones (EventBridge, Kafka).
|
|
27
|
+
*/
|
|
28
|
+
var UnsupportedEventTransport = class extends Error {
|
|
29
|
+
transport;
|
|
30
|
+
role;
|
|
31
|
+
constructor(transport, role) {
|
|
32
|
+
super(`No event ${role} for "${transport}". Use one of: ${SUPPORTED.join(", ")} — e.g. pgboss://… or sns://….`);
|
|
33
|
+
this.transport = transport;
|
|
34
|
+
this.role = role;
|
|
35
|
+
this.name = "UnsupportedEventTransport";
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/telemetry.ts
|
|
40
|
+
/**
|
|
41
|
+
* Trace context across a broker: what makes request → queue → worker one trace.
|
|
42
|
+
*
|
|
43
|
+
* On publish, each message gets a PRODUCER span, and that span's context is
|
|
44
|
+
* written into the message through the global propagator — into the broker's
|
|
45
|
+
* own header or attribute field where it has one. On consume, the context is
|
|
46
|
+
* read back and the handler runs inside a CONSUMER span that is its child. A
|
|
47
|
+
* message carrying no context (an older publisher, a process with telemetry
|
|
48
|
+
* off) starts a new trace instead.
|
|
49
|
+
*
|
|
50
|
+
* Everything goes through `@opentelemetry/api`'s globals. Without a registered
|
|
51
|
+
* provider and propagator the spans are no-ops and nothing is written into a
|
|
52
|
+
* message, so a process that never asked for telemetry publishes exactly what
|
|
53
|
+
* it did before.
|
|
54
|
+
*
|
|
55
|
+
* @module
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* The key a trace context travels under where a broker has no header field of
|
|
59
|
+
* its own — a pg-boss job's data. Reserved: it is removed before a handler sees
|
|
60
|
+
* the payload, and a payload of the application's own should not use it.
|
|
61
|
+
*/
|
|
62
|
+
const TRACE_CONTEXT_KEY = "__gkmTrace";
|
|
63
|
+
const TRACER = "@geekmidas/events";
|
|
64
|
+
function tracer() {
|
|
65
|
+
return _opentelemetry_api.trace.getTracer(TRACER);
|
|
66
|
+
}
|
|
67
|
+
function attributes(target, operation) {
|
|
68
|
+
return {
|
|
69
|
+
"messaging.system": target.system,
|
|
70
|
+
"messaging.destination.name": target.destination,
|
|
71
|
+
"messaging.operation": operation,
|
|
72
|
+
"messaging.operation.type": operation === "publish" ? "send" : "process",
|
|
73
|
+
...target.type && { "gkm.event.type": target.type },
|
|
74
|
+
...target.messageId && { "messaging.message.id": target.messageId }
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Start the PRODUCER span for one message, as a child of whatever is active,
|
|
79
|
+
* and write its context into a carrier for the broker.
|
|
80
|
+
*/
|
|
81
|
+
function startProducer(target) {
|
|
82
|
+
const active = _opentelemetry_api.context.active();
|
|
83
|
+
const span = tracer().startSpan(`${target.destination} publish`, {
|
|
84
|
+
kind: _opentelemetry_api.SpanKind.PRODUCER,
|
|
85
|
+
attributes: attributes(target, "publish")
|
|
86
|
+
}, active);
|
|
87
|
+
const carrier = {};
|
|
88
|
+
_opentelemetry_api.propagation.inject(_opentelemetry_api.trace.setSpan(active, span), carrier);
|
|
89
|
+
return {
|
|
90
|
+
span,
|
|
91
|
+
carrier: Object.keys(carrier).length > 0 ? carrier : void 0
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
/** End producer spans, recording `error` on each when the send failed. */
|
|
95
|
+
function endProducers(spans, error) {
|
|
96
|
+
for (const span of spans) {
|
|
97
|
+
if (error !== void 0) recordError(span, error);
|
|
98
|
+
span.end();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Publish `items`, each with a PRODUCER span of its own, through `send` —
|
|
103
|
+
* which receives the carrier to attach to each item, in order.
|
|
104
|
+
*/
|
|
105
|
+
async function publishTraced(items, describe, send) {
|
|
106
|
+
const produced = items.map((item) => startProducer(describe(item)));
|
|
107
|
+
const spans = produced.map((p) => p.span);
|
|
108
|
+
try {
|
|
109
|
+
const result = await send(produced.map((p) => p.carrier));
|
|
110
|
+
endProducers(spans);
|
|
111
|
+
return result;
|
|
112
|
+
} catch (error) {
|
|
113
|
+
endProducers(spans, error);
|
|
114
|
+
throw error;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The context a carrier holds, or undefined when it holds none — no carrier, a
|
|
119
|
+
* malformed `traceparent`, or a propagator that throws.
|
|
120
|
+
*/
|
|
121
|
+
function extractTraceContext(carrier) {
|
|
122
|
+
if (!carrier || Object.keys(carrier).length === 0) return void 0;
|
|
123
|
+
try {
|
|
124
|
+
const extracted = _opentelemetry_api.propagation.extract(_opentelemetry_api.ROOT_CONTEXT, carrier);
|
|
125
|
+
return _opentelemetry_api.trace.getSpanContext(extracted) ? extracted : void 0;
|
|
126
|
+
} catch {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Run `fn` inside a CONSUMER span for one message: a child of the context the
|
|
132
|
+
* message carried, or a new trace when it carried none. The active context of
|
|
133
|
+
* the poller that received it is never the parent — a job is not part of
|
|
134
|
+
* whatever happened to start the poll loop.
|
|
135
|
+
*/
|
|
136
|
+
function consumeTraced(target, carrier, fn) {
|
|
137
|
+
return runConsumer(target, extractTraceContext(carrier) ?? _opentelemetry_api.ROOT_CONTEXT, [], fn);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* One CONSUMER span for a batch that arrived together — a Lambda's records.
|
|
141
|
+
* One message with a context is its child; several start a trace of their own
|
|
142
|
+
* that links to each message's producer, since a span has one parent.
|
|
143
|
+
*/
|
|
144
|
+
function consumeBatchTraced(target, carriers, fn) {
|
|
145
|
+
const contexts = carriers.map(extractTraceContext).filter((c) => c !== void 0);
|
|
146
|
+
if (carriers.length === 1 && contexts.length === 1) return runConsumer(target, contexts[0], [], fn);
|
|
147
|
+
const links = contexts.map((c) => ({ context: _opentelemetry_api.trace.getSpanContext(c) }));
|
|
148
|
+
return runConsumer(target, _opentelemetry_api.ROOT_CONTEXT, links, fn);
|
|
149
|
+
}
|
|
150
|
+
function runConsumer(target, parent, links, fn) {
|
|
151
|
+
const span = tracer().startSpan(`${target.destination} process`, {
|
|
152
|
+
kind: _opentelemetry_api.SpanKind.CONSUMER,
|
|
153
|
+
attributes: attributes(target, "process"),
|
|
154
|
+
links
|
|
155
|
+
}, parent);
|
|
156
|
+
return _opentelemetry_api.context.with(_opentelemetry_api.trace.setSpan(parent, span), async () => {
|
|
157
|
+
try {
|
|
158
|
+
return await fn();
|
|
159
|
+
} catch (error) {
|
|
160
|
+
recordError(span, error);
|
|
161
|
+
throw error;
|
|
162
|
+
} finally {
|
|
163
|
+
span.end();
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
function recordError(span, error) {
|
|
168
|
+
if (error instanceof Error) span.recordException(error);
|
|
169
|
+
span.setStatus({
|
|
170
|
+
code: _opentelemetry_api.SpanStatusCode.ERROR,
|
|
171
|
+
...error instanceof Error && { message: error.message }
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* A carrier from broker message attributes, in any of the shapes they arrive
|
|
176
|
+
* in: SQS's `{ StringValue }`, a Lambda SQS record's `{ stringValue }`, an SNS
|
|
177
|
+
* envelope's `{ Value }`, or plain strings (RabbitMQ headers).
|
|
178
|
+
*/
|
|
179
|
+
function carrierFromAttributes(attributes) {
|
|
180
|
+
if (!attributes) return void 0;
|
|
181
|
+
const carrier = {};
|
|
182
|
+
for (const field of PROPAGATION_FIELDS) {
|
|
183
|
+
const value = attributeValue(attributes[field]);
|
|
184
|
+
if (value) carrier[field] = value;
|
|
185
|
+
}
|
|
186
|
+
return Object.keys(carrier).length > 0 ? carrier : void 0;
|
|
187
|
+
}
|
|
188
|
+
/** The W3C fields; what the default propagator reads and writes. */
|
|
189
|
+
const PROPAGATION_FIELDS = ["traceparent", "tracestate"];
|
|
190
|
+
function attributeValue(value) {
|
|
191
|
+
if (typeof value === "string") return value;
|
|
192
|
+
if (Buffer.isBuffer(value)) return value.toString();
|
|
193
|
+
if (value && typeof value === "object") {
|
|
194
|
+
const v = value;
|
|
195
|
+
const found = v.StringValue ?? v.stringValue ?? v.Value;
|
|
196
|
+
return typeof found === "string" ? found : void 0;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
/** A carrier as SQS/SNS message attributes. */
|
|
200
|
+
function carrierAsAttributes(carrier) {
|
|
201
|
+
const attributes = {};
|
|
202
|
+
if (!carrier) return attributes;
|
|
203
|
+
for (const [key, value] of Object.entries(carrier)) attributes[key] = {
|
|
204
|
+
DataType: "String",
|
|
205
|
+
StringValue: value
|
|
206
|
+
};
|
|
207
|
+
return attributes;
|
|
208
|
+
}
|
|
209
|
+
function isPlainObject(value) {
|
|
210
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
211
|
+
const proto = Object.getPrototypeOf(value);
|
|
212
|
+
return proto === Object.prototype || proto === null;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* `data` with the carrier under {@link TRACE_CONTEXT_KEY}, for a broker with no
|
|
216
|
+
* header field. Unchanged when there is no carrier, or when `data` is not a
|
|
217
|
+
* plain object a key can be added to — such a message starts its own trace.
|
|
218
|
+
*/
|
|
219
|
+
function withTraceKey(data, carrier) {
|
|
220
|
+
if (!carrier || !isPlainObject(data)) return data;
|
|
221
|
+
return {
|
|
222
|
+
...data,
|
|
223
|
+
[TRACE_CONTEXT_KEY]: carrier
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* `data` without {@link TRACE_CONTEXT_KEY}, and the carrier that was under it.
|
|
228
|
+
* What a handler sees never has the key.
|
|
229
|
+
*/
|
|
230
|
+
function withoutTraceKey(data) {
|
|
231
|
+
if (!isPlainObject(data) || !("__gkmTrace" in data)) return {
|
|
232
|
+
data,
|
|
233
|
+
carrier: void 0
|
|
234
|
+
};
|
|
235
|
+
const { [TRACE_CONTEXT_KEY]: raw, ...rest } = data;
|
|
236
|
+
return {
|
|
237
|
+
data: rest,
|
|
238
|
+
carrier: isPlainObject(raw) ? carrierFromAttributes(raw) : void 0
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
//#endregion
|
|
242
|
+
Object.defineProperty(exports, "EventPublisherType", {
|
|
243
|
+
enumerable: true,
|
|
244
|
+
get: function() {
|
|
245
|
+
return EventPublisherType;
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
Object.defineProperty(exports, "TRACE_CONTEXT_KEY", {
|
|
249
|
+
enumerable: true,
|
|
250
|
+
get: function() {
|
|
251
|
+
return TRACE_CONTEXT_KEY;
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
Object.defineProperty(exports, "UnsupportedEventTransport", {
|
|
255
|
+
enumerable: true,
|
|
256
|
+
get: function() {
|
|
257
|
+
return UnsupportedEventTransport;
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
Object.defineProperty(exports, "carrierAsAttributes", {
|
|
261
|
+
enumerable: true,
|
|
262
|
+
get: function() {
|
|
263
|
+
return carrierAsAttributes;
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
Object.defineProperty(exports, "carrierFromAttributes", {
|
|
267
|
+
enumerable: true,
|
|
268
|
+
get: function() {
|
|
269
|
+
return carrierFromAttributes;
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
Object.defineProperty(exports, "consumeBatchTraced", {
|
|
273
|
+
enumerable: true,
|
|
274
|
+
get: function() {
|
|
275
|
+
return consumeBatchTraced;
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
Object.defineProperty(exports, "consumeTraced", {
|
|
279
|
+
enumerable: true,
|
|
280
|
+
get: function() {
|
|
281
|
+
return consumeTraced;
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
Object.defineProperty(exports, "extractTraceContext", {
|
|
285
|
+
enumerable: true,
|
|
286
|
+
get: function() {
|
|
287
|
+
return extractTraceContext;
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
Object.defineProperty(exports, "publishTraced", {
|
|
291
|
+
enumerable: true,
|
|
292
|
+
get: function() {
|
|
293
|
+
return publishTraced;
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
Object.defineProperty(exports, "withTraceKey", {
|
|
297
|
+
enumerable: true,
|
|
298
|
+
get: function() {
|
|
299
|
+
return withTraceKey;
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
Object.defineProperty(exports, "withoutTraceKey", {
|
|
303
|
+
enumerable: true,
|
|
304
|
+
get: function() {
|
|
305
|
+
return withoutTraceKey;
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
//# sourceMappingURL=telemetry-DG3l807O.cjs.map
|