@reproapp/node-sdk 0.0.23 → 0.0.25
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/index.d.ts +16 -0
- package/dist/index.js +786 -6
- package/dist/ingest/client.d.ts +1 -1
- package/dist/ingest/client.js +2 -1
- package/package.json +2 -2
- package/src/index.ts +879 -8
- package/src/ingest/client.ts +3 -2
- package/test/amqplib-integration.test.js +340 -0
package/dist/ingest/client.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ export declare const configureIngestQueueDrain: (options: {
|
|
|
8
8
|
}) => void;
|
|
9
9
|
export declare const kickIngestQueueDrain: () => void;
|
|
10
10
|
export declare const postIngestEntries: (config: IngestClientConfig, sessionId: string, entries: LegacyEntry[]) => Promise<void>;
|
|
11
|
-
export declare const enqueueIngestEntries: (config: IngestClientConfig, sessionId: string, entries: LegacyEntry[], options?: EnqueueIngestOptions) =>
|
|
11
|
+
export declare const enqueueIngestEntries: (config: IngestClientConfig, sessionId: string, entries: LegacyEntry[], options?: EnqueueIngestOptions) => boolean;
|
|
12
12
|
export declare const flushIngestQueue: () => Promise<void>;
|
|
13
13
|
export type { IngestClientConfig, LegacyEntry } from './types';
|
package/dist/ingest/client.js
CHANGED
|
@@ -173,7 +173,7 @@ const drainIngestQueue = async () => {
|
|
|
173
173
|
};
|
|
174
174
|
const enqueueIngestEntries = (config, sessionId, entries, options = {}) => {
|
|
175
175
|
if (!sessionId || !Array.isArray(entries) || entries.length === 0) {
|
|
176
|
-
return;
|
|
176
|
+
return false;
|
|
177
177
|
}
|
|
178
178
|
const priority = options.priority === 'high' ? 'high' : 'normal';
|
|
179
179
|
const batch = {
|
|
@@ -208,6 +208,7 @@ const enqueueIngestEntries = (config, sessionId, entries, options = {}) => {
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
scheduleDrain(shouldDeferDrain?.() ? deferDrainMs : 0);
|
|
211
|
+
return ingestQueue.includes(batch);
|
|
211
212
|
};
|
|
212
213
|
exports.enqueueIngestEntries = enqueueIngestEntries;
|
|
213
214
|
const flushIngestQueue = async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reproapp/node-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"description": "Repro Nest SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"build": "tsc -p tsconfig.json",
|
|
13
13
|
"dev": "tsc -p tsconfig.json --watch --preserveWatchOutput",
|
|
14
14
|
"prepublishOnly": "npm run build",
|
|
15
|
-
"test": "npm run build && node test/unawaited.test.js && node test/integration-unawaited.js && node test/request-flush-timing.test.js && node test/request-capture-background.test.js && node test/client-performance-regression.test.js && node test/request-manifest-priority.test.js && node test/runtime-no-double-invoke.test.js && node test/express-trace-http-args.test.js && node test/trace-batch-size.test.js && node test/sdk-background-priority.test.js && node test/ingest-queue-retention.test.js && node test/ingest-timeout.test.js && node -r ./tracer/register test/promise-map.test.js && node test/disable-subtree.test.js && node test/circular-capture.test.js && node test/wrap-plugin-arrow-args.test.js && node test/wrap-plugin-super-call.test.js && node test/function-arg-identity.test.js && node test/privacy-runtime-policy.test.js && node test/runtime-privacy-materialization.test.js && node test/kafka-runtime-privacy-policy.test.js",
|
|
15
|
+
"test": "npm run build && node test/unawaited.test.js && node test/integration-unawaited.js && node test/request-flush-timing.test.js && node test/request-capture-background.test.js && node test/client-performance-regression.test.js && node test/request-manifest-priority.test.js && node test/runtime-no-double-invoke.test.js && node test/express-trace-http-args.test.js && node test/trace-batch-size.test.js && node test/sdk-background-priority.test.js && node test/ingest-queue-retention.test.js && node test/ingest-timeout.test.js && node -r ./tracer/register test/promise-map.test.js && node test/disable-subtree.test.js && node test/circular-capture.test.js && node test/wrap-plugin-arrow-args.test.js && node test/wrap-plugin-super-call.test.js && node test/function-arg-identity.test.js && node test/privacy-runtime-policy.test.js && node test/runtime-privacy-materialization.test.js && node test/kafka-runtime-privacy-policy.test.js && node test/amqplib-integration.test.js",
|
|
16
16
|
"test:containers": "npm run build && node test/runtime-no-double-invoke.testcontainers.test.js && node test/wrap-plugin-super-call.testcontainers.test.js && node test/function-arg-identity.testcontainers.test.js"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|