Skip to content

Commit feab350

Browse files
committed
chore: more renames
1 parent 961df7b commit feab350

File tree

7 files changed

+26
-20
lines changed

7 files changed

+26
-20
lines changed

benchmark-output.txt

Whitespace-only changes.

nx.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
{
22
"targetDefaults": {
33
"build": {
4-
"dependsOn": ["^build"],
5-
"outputs": ["{projectRoot}/dist"],
4+
"dependsOn": [
5+
"^build"
6+
],
7+
"outputs": [
8+
"{projectRoot}/dist"
9+
],
610
"cache": true
711
},
812
"test": {
@@ -14,4 +18,4 @@
1418
},
1519
"defaultBase": "main",
1620
"useInferencePlugins": false
17-
}
21+
}
File renamed without changes.
File renamed without changes.

packages/benchmark/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"name": "benchmark",
33
"packageManager": "yarn@4.6.0",
4+
"private": true,
45
"scripts": {
5-
"benchmark": "yarn benchmark:eventstoreClient && yarn benchmark:kurrentClient && yarn benchmark:bridge",
6-
"benchmark:eventstoreClient": "node ./eventstoreClient/readStream.js",
7-
"benchmark:kurrentClient": "node ./kurrentClient/readStream.js",
6+
"benchmark": "yarn benchmark:legacy && yarn benchmark:kurrent && yarn benchmark:bridge",
7+
"benchmark:legacy": "node ./legacy/readStream.js",
8+
"benchmark:kurrent": "node ./kurrent/readStream.js",
89
"benchmark:bridge": "node ./bridge/readStream.js",
910
"loadEvents": "node ./load"
1011
},

packages/opentelemetry/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"name": "@kurrent/opentelemetry",
33
"version": "1.0.0-alpha.1",
4-
"description": "Kurrent NodeJS Client SDK interceptors for tracing with OpenTelemetry",
4+
"description": "KurrentDB NodeJS Client SDK interceptors for tracing with OpenTelemetry",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",
77
"license": "Apache-2.0",
8+
"author": "Kurrent, Inc",
89
"scripts": {
910
"build": "yarn build:ts",
1011
"build:ts": "tsc --build",

packages/opentelemetry/src/instrumentation.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
InstrumentationConfig,
1818
InstrumentationNodeModuleDefinition,
1919
} from "@opentelemetry/instrumentation";
20-
import type * as kdb from "@kurrent/kurrentdb-client";
20+
import type * as kurrentdb from "@kurrent/kurrentdb-client";
2121
import type {
2222
AppendResult,
2323
BinaryEventType,
@@ -61,7 +61,7 @@ export class Instrumentation extends InstrumentationBase {
6161
}
6262

6363
private _onPatchMain() {
64-
return (moduleExports: typeof kdb) => {
64+
return (moduleExports: typeof kurrentdb) => {
6565
this.wrap(
6666
moduleExports.KurrentDBClient.prototype,
6767
"appendToStream",
@@ -102,7 +102,7 @@ export class Instrumentation extends InstrumentationBase {
102102
}
103103

104104
private _onUnPatchMain() {
105-
return (moduleExports: typeof kdb) => {
105+
return (moduleExports: typeof kurrentdb) => {
106106
this._diag.debug("un-patching");
107107

108108
this._unwrap(moduleExports.KurrentDBClient.prototype, "appendToStream");
@@ -123,17 +123,17 @@ export class Instrumentation extends InstrumentationBase {
123123

124124
private _patchAppendToStream(): (
125125
original: Function,
126-
operation: keyof kdb.KurrentDBClient
126+
operation: keyof kurrentdb.KurrentDBClient
127127
) => (...args: AppendToStreamParams) => Promise<AppendResult> {
128128
const instrumentation = this;
129129
const tracer = instrumentation.tracer;
130130

131131
return function appendToStream(
132132
original: Function,
133-
operation: keyof kdb.KurrentDBClient
133+
operation: keyof kurrentdb.KurrentDBClient
134134
) {
135135
return async function (
136-
this: kdb.KurrentDBClient,
136+
this: kurrentdb.KurrentDBClient,
137137
...args: AppendToStreamParams
138138
): Promise<AppendResult> {
139139
const [streamName, events, options] = [...args];
@@ -261,17 +261,17 @@ export class Instrumentation extends InstrumentationBase {
261261

262262
private _patchCatchUpSubscription(): (
263263
original: Function,
264-
operation: keyof kdb.KurrentDBClient
264+
operation: keyof kurrentdb.KurrentDBClient
265265
) => (...args: any) => any {
266266
const instrumentation = this;
267267
const tracer = instrumentation.tracer;
268268

269269
return function subscribe<KnownEventType extends EventType = EventType>(
270270
original: Function,
271-
operation: keyof kdb.KurrentDBClient
271+
operation: keyof kurrentdb.KurrentDBClient
272272
) {
273273
return function (
274-
this: kdb.KurrentDBClient,
274+
this: kurrentdb.KurrentDBClient,
275275
...args: SubscribeParameters
276276
) {
277277
let options:
@@ -308,17 +308,17 @@ export class Instrumentation extends InstrumentationBase {
308308

309309
private _patchPersistentSubscription(): (
310310
original: Function,
311-
operation: keyof kdb.KurrentDBClient
311+
operation: keyof kurrentdb.KurrentDBClient
312312
) => (...args: any) => any {
313313
const instrumentation = this;
314314
const tracer = instrumentation.tracer;
315315

316316
return function subscribe<E>(
317317
original: Function,
318-
operation: keyof kdb.KurrentDBClient
318+
operation: keyof kurrentdb.KurrentDBClient
319319
) {
320320
return function (
321-
this: kdb.KurrentDBClient,
321+
this: kurrentdb.KurrentDBClient,
322322
...args: PersistentSubscribeParameters
323323
) {
324324
let options:
@@ -353,7 +353,7 @@ export class Instrumentation extends InstrumentationBase {
353353
}
354354

355355
private static restoreContext = (
356-
metadata: kdb.MetadataType,
356+
metadata: kurrentdb.MetadataType,
357357
isRemote = true
358358
): Context => {
359359
const traceId = metadata[TRACE_ID] as string;

0 commit comments

Comments
 (0)