@stackone/olap 0.5.0 → 0.7.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.
- package/dist/index.d.mts +39 -8
- package/dist/index.d.ts +39 -8
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -92,17 +92,47 @@ type AdvancedOptions = {
|
|
|
92
92
|
//#endregion
|
|
93
93
|
//#region src/types.d.ts
|
|
94
94
|
interface IOlapClient {
|
|
95
|
-
recordAction(
|
|
95
|
+
recordAction(actionResult: ActionResult, options?: OlapOptions): void;
|
|
96
96
|
recordStep(stepResult: StepResult, options?: OlapOptions): void;
|
|
97
97
|
}
|
|
98
98
|
type ActionResult = {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
actionRunId: string;
|
|
100
|
+
actionId: string;
|
|
101
|
+
connectorKey: string;
|
|
102
|
+
connectorVersion: string;
|
|
103
|
+
operationType: string;
|
|
104
|
+
mode?: string;
|
|
105
|
+
category?: string;
|
|
106
|
+
organizationId: string;
|
|
107
|
+
projectSecureId: string;
|
|
108
|
+
accountSecureId: string;
|
|
109
|
+
originOwnerId?: string;
|
|
110
|
+
originOwnerName?: string;
|
|
111
|
+
httpMethod?: string;
|
|
112
|
+
url?: string;
|
|
113
|
+
path?: string;
|
|
114
|
+
sourceId?: string;
|
|
115
|
+
sourceType?: string;
|
|
116
|
+
sourceValue?: string;
|
|
117
|
+
resource?: string;
|
|
118
|
+
subResource?: string;
|
|
119
|
+
childResource?: string;
|
|
120
|
+
status?: string;
|
|
121
|
+
message?: string;
|
|
122
|
+
outputs?: unknown;
|
|
123
|
+
startTime?: Date;
|
|
124
|
+
endTime?: Date;
|
|
102
125
|
};
|
|
103
126
|
type StepResult = {
|
|
127
|
+
actionRunId: string;
|
|
104
128
|
stepId: string;
|
|
105
|
-
status
|
|
129
|
+
status?: string;
|
|
130
|
+
message?: string;
|
|
131
|
+
outputs?: unknown;
|
|
132
|
+
errors?: unknown;
|
|
133
|
+
skipped?: boolean;
|
|
134
|
+
startTime?: Date;
|
|
135
|
+
endTime?: Date;
|
|
106
136
|
};
|
|
107
137
|
//#endregion
|
|
108
138
|
//#region src/olap/olapClient.d.ts
|
|
@@ -122,6 +152,7 @@ declare class OlapClient implements IOlapClient {
|
|
|
122
152
|
s3ClientConfig?: S3ClientConfig;
|
|
123
153
|
logger?: ILogger;
|
|
124
154
|
});
|
|
155
|
+
initialize(): Promise<void>;
|
|
125
156
|
recordAction(actionResult: ActionResult, options?: OlapOptions): Promise<void>;
|
|
126
157
|
recordStep(stepResult: StepResult, options?: OlapOptions): Promise<void>;
|
|
127
158
|
}
|
|
@@ -139,9 +170,9 @@ declare const buildOlapClientInstance: ({
|
|
|
139
170
|
kafkaClientConfig?: KafkaClientConfig;
|
|
140
171
|
s3ClientConfig?: S3ClientConfig;
|
|
141
172
|
logger?: ILogger;
|
|
142
|
-
}) => IOlapClient
|
|
173
|
+
}) => Promise<IOlapClient>;
|
|
143
174
|
declare class OlapClientManager {
|
|
144
|
-
private static
|
|
175
|
+
private static olapClientPromise;
|
|
145
176
|
static getInstance({
|
|
146
177
|
getKafkaClient,
|
|
147
178
|
getS3Client,
|
|
@@ -156,7 +187,7 @@ declare class OlapClientManager {
|
|
|
156
187
|
s3ClientConfig?: S3ClientConfig;
|
|
157
188
|
logger?: ILogger;
|
|
158
189
|
getOlapClient?: typeof buildOlapClientInstance;
|
|
159
|
-
}): IOlapClient
|
|
190
|
+
}): Promise<IOlapClient>;
|
|
160
191
|
static resetInstance(): void;
|
|
161
192
|
}
|
|
162
193
|
//#endregion
|
package/dist/index.d.ts
CHANGED
|
@@ -92,17 +92,47 @@ type AdvancedOptions = {
|
|
|
92
92
|
//#endregion
|
|
93
93
|
//#region src/types.d.ts
|
|
94
94
|
interface IOlapClient {
|
|
95
|
-
recordAction(
|
|
95
|
+
recordAction(actionResult: ActionResult, options?: OlapOptions): void;
|
|
96
96
|
recordStep(stepResult: StepResult, options?: OlapOptions): void;
|
|
97
97
|
}
|
|
98
98
|
type ActionResult = {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
actionRunId: string;
|
|
100
|
+
actionId: string;
|
|
101
|
+
connectorKey: string;
|
|
102
|
+
connectorVersion: string;
|
|
103
|
+
operationType: string;
|
|
104
|
+
mode?: string;
|
|
105
|
+
category?: string;
|
|
106
|
+
organizationId: string;
|
|
107
|
+
projectSecureId: string;
|
|
108
|
+
accountSecureId: string;
|
|
109
|
+
originOwnerId?: string;
|
|
110
|
+
originOwnerName?: string;
|
|
111
|
+
httpMethod?: string;
|
|
112
|
+
url?: string;
|
|
113
|
+
path?: string;
|
|
114
|
+
sourceId?: string;
|
|
115
|
+
sourceType?: string;
|
|
116
|
+
sourceValue?: string;
|
|
117
|
+
resource?: string;
|
|
118
|
+
subResource?: string;
|
|
119
|
+
childResource?: string;
|
|
120
|
+
status?: string;
|
|
121
|
+
message?: string;
|
|
122
|
+
outputs?: unknown;
|
|
123
|
+
startTime?: Date;
|
|
124
|
+
endTime?: Date;
|
|
102
125
|
};
|
|
103
126
|
type StepResult = {
|
|
127
|
+
actionRunId: string;
|
|
104
128
|
stepId: string;
|
|
105
|
-
status
|
|
129
|
+
status?: string;
|
|
130
|
+
message?: string;
|
|
131
|
+
outputs?: unknown;
|
|
132
|
+
errors?: unknown;
|
|
133
|
+
skipped?: boolean;
|
|
134
|
+
startTime?: Date;
|
|
135
|
+
endTime?: Date;
|
|
106
136
|
};
|
|
107
137
|
//#endregion
|
|
108
138
|
//#region src/olap/olapClient.d.ts
|
|
@@ -122,6 +152,7 @@ declare class OlapClient implements IOlapClient {
|
|
|
122
152
|
s3ClientConfig?: S3ClientConfig;
|
|
123
153
|
logger?: ILogger;
|
|
124
154
|
});
|
|
155
|
+
initialize(): Promise<void>;
|
|
125
156
|
recordAction(actionResult: ActionResult, options?: OlapOptions): Promise<void>;
|
|
126
157
|
recordStep(stepResult: StepResult, options?: OlapOptions): Promise<void>;
|
|
127
158
|
}
|
|
@@ -139,9 +170,9 @@ declare const buildOlapClientInstance: ({
|
|
|
139
170
|
kafkaClientConfig?: KafkaClientConfig;
|
|
140
171
|
s3ClientConfig?: S3ClientConfig;
|
|
141
172
|
logger?: ILogger;
|
|
142
|
-
}) => IOlapClient
|
|
173
|
+
}) => Promise<IOlapClient>;
|
|
143
174
|
declare class OlapClientManager {
|
|
144
|
-
private static
|
|
175
|
+
private static olapClientPromise;
|
|
145
176
|
static getInstance({
|
|
146
177
|
getKafkaClient,
|
|
147
178
|
getS3Client,
|
|
@@ -156,7 +187,7 @@ declare class OlapClientManager {
|
|
|
156
187
|
s3ClientConfig?: S3ClientConfig;
|
|
157
188
|
logger?: ILogger;
|
|
158
189
|
getOlapClient?: typeof buildOlapClientInstance;
|
|
159
|
-
}): IOlapClient
|
|
190
|
+
}): Promise<IOlapClient>;
|
|
160
191
|
static resetInstance(): void;
|
|
161
192
|
}
|
|
162
193
|
//#endregion
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));const c=s(require(`@aws-sdk/client-s3`)),l=s(require(`kafkajs`));var
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));const c=s(require(`@aws-sdk/client-s3`)),l=s(require(`kafkajs`)),u=e=>{try{return JSON.stringify(e)}catch{return`[Unserializable payload]`}};var d=class{#s3Client;#logger;constructor(e,t){this.#s3Client=e,this.#logger=t}async initialize(){if(!this.#s3Client){this.#logger?.warning({message:`No s3 client provided, advanced sink will not function`,category:`AdvancedSink`});return}}async send(e,t,n){if(!n?.enabled){this.#logger?.debug({message:`Logs sink is disabled, skipping send to bucket ${e}`,category:`AdvancedSink`});return}let r=u(t);this.#logger?.info({message:`[S3] Sent to bucket ${e}: ${r}`,context:{bucket:e,payload:t},category:`S3Sink`}),await Promise.resolve()}};const f=(e,t)=>{try{let t=new c.S3Client(e);return t??void 0}catch(e){let n=e;t?.error({message:`Error building s3 client: ${n.message}`,error:n,code:`BuildS3ClientError`,category:`buildS3Client`});return}},p=(e,t)=>{try{let t=new l.Kafka(e);return t??void 0}catch(e){let n=e;t?.error({message:`Error building kafka client: ${n.message}`,error:n,code:`BuildKafkaClientError`,category:`buildKafkaClient`});return}};var m=class{#kafka;#producer;#logger;constructor(e,t){this.#kafka=e,this.#logger=t}async initialize(){if(!this.#kafka){this.#logger?.warning({message:`No kafka client provided, logs sink cannot be initialized`,category:`LogsSink`});return}if(!this.#producer){try{this.#producer=this.#kafka.producer({createPartitioner:l.Partitioners.DefaultPartitioner})}catch(e){this.#logger?.error({message:`Failed to create kafka producer for logs sink`,code:`KafkaProducerCreationError`,category:`LogsSink`,error:e}),this.#producer=void 0;return}try{await this.#producer.connect()}catch(e){this.#logger?.error?.({message:`Failed to connect kafka producer for logs sink`,code:`KafkaProducerConnectionError`,category:`LogsSink`,error:e}),this.#producer=void 0;return}this.#logger?.info({message:`Logs sink kafka producer initialized`,category:`LogsSink`})}}async send(e,t,n){if(!n?.enabled){this.#logger?.debug({message:`Logs sink is disabled, skipping send to topic ${e}`,category:`KafkaSink`});return}if(!this.#producer)throw this.#logger?.error({message:`Kafka not initialized, dropping message for topic ${e}`,category:`KafkaSink`,code:`KafkaNotReady`}),Error(`Kafka client is not initialized`);let r=this.buildLog(t),i=u(r);this.#logger?.debug({message:`Sending to topic ${e}: ${i}`,category:`KafkaSink`});try{let t=await this.#producer.send({topic:e,messages:[{value:i}]});this.#logger?.debug({message:`Kafka producer response: ${JSON.stringify(t)}`,category:`KafkaSink`})}catch(t){throw this.#logger?.error({message:`Error sending to topic ${e}: ${t.message}`,category:`KafkaSink`,error:t,code:`KafkaSendError`}),t}}buildLog(e){if(this.isActionResult(e)){let t=Object.fromEntries(Object.entries({actionRunId:e.actionRunId,actionId:e.actionId,organizationId:e.organizationId,projectSecureId:e.projectSecureId,accountSecureId:e.accountSecureId,mode:e.mode,connectorKey:e.connectorKey,connectorVersion:e.connectorVersion,operationType:e.operationType,category:e.category,originOwnerId:e.originOwnerId,originOwnerName:e.originOwnerName,httpMethod:e.httpMethod,url:e.url,sourceId:e.sourceId,sourceType:e.sourceType,sourceValue:e.sourceValue,status:e.status,startTime:e.startTime,endTime:e.endTime,durationMs:this.calculateDuration(e.startTime,e.endTime),eventTime:new Date}).filter(([,e])=>e!==void 0));return t}else if(this.isStepResult(e)){let t=Object.fromEntries(Object.entries({actionRunId:e.actionRunId,stepId:e.stepId,skipped:e.skipped,status:e.status,message:e.message,startTime:e.startTime,endTime:e.endTime,durationMs:this.calculateDuration(e.startTime,e.endTime),eventTime:new Date}).filter(([,e])=>e!==void 0));return t}else throw this.#logger?.error({message:`Unknown result type, cannot build log`,category:`KafkaSink`,code:`UnknownResultType`}),Error(`Unknown result type`)}calculateDuration(e,t){if(!(e instanceof Date)||!(t instanceof Date))return;let n=e.getTime(),r=t.getTime();if(!(Number.isNaN(n)||Number.isNaN(r)||r<n))return r-n}isActionResult(e){return typeof e==`object`&&!!e&&`actionRunId`in e&&`actionId`in e}isStepResult(e){return typeof e==`object`&&!!e&&`actionRunId`in e&&`stepId`in e}};const h={logs:{enabled:!0},advanced:{enabled:!1,ttl:7,errorsOnly:!1}};function g(e){return{...h,...e}}var _=class{#kafkaClient;#s3Client;#logger;#logsSink;#advancedSink;name=`OlapClient`;constructor({getKafkaClient:e=p,getS3Client:t=f,kafkaClientConfig:n,s3ClientConfig:r,logger:i}={}){this.#kafkaClient=e(n,i),this.#s3Client=t(r,i),this.#logger=i,this.#logsSink=new m(this.#kafkaClient,this.#logger),this.#advancedSink=new d(this.#s3Client,this.#logger)}async initialize(){await this.#logsSink?.initialize(),await this.#advancedSink?.initialize()}async recordAction(e,t){let{logs:n,advanced:r}=g(t);if(n?.enabled)try{await this.#logsSink?.send(`actions`,e,n)}catch(e){this.#logger?.warning({message:`[OlapClient] Error sending to kafka: ${e.message}`,category:`OlapClient`,error:e})}if(r?.enabled)try{await this.#advancedSink?.send(`actions`,e,r)}catch(e){this.#logger?.warning({message:`[OlapClient] Error sending to s3: ${e.message}`,category:`OlapClient`,error:e})}}async recordStep(e,t){let{logs:n,advanced:r}=g(t);if(n?.enabled)try{await this.#logsSink?.send(`steps`,e,n)}catch(e){this.#logger?.warning({message:`[OlapClient] Error sending to kafka: ${e.message}`,category:`OlapClient`,error:e})}if(r?.enabled)try{await this.#advancedSink?.send(`steps`,e,r)}catch(e){this.#logger?.warning({message:`[OlapClient] Error sending to s3: ${e.message}`,category:`OlapClient`,error:e})}}};const v=async({getKafkaClient:e=p,getS3Client:t=f,kafkaClientConfig:n,s3ClientConfig:r,logger:i}={})=>{let a=new _({getKafkaClient:e,getS3Client:t,kafkaClientConfig:n,s3ClientConfig:r,logger:i});return await a.initialize(),a};var y=class{static olapClientPromise=null;static getInstance({getKafkaClient:e,getS3Client:t,kafkaClientConfig:n,s3ClientConfig:r,logger:i,getOlapClient:a=v}={}){return this.olapClientPromise||=a({getKafkaClient:e,getS3Client:t,kafkaClientConfig:n,s3ClientConfig:r,logger:i}),this.olapClientPromise}static resetInstance(){this.olapClientPromise=null}};exports.OlapClient=_,exports.OlapClientManager=y;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S3Client as e}from"@aws-sdk/client-s3";import{Kafka as t}from"kafkajs";var
|
|
1
|
+
import{S3Client as e}from"@aws-sdk/client-s3";import{Kafka as t,Partitioners as n}from"kafkajs";const r=e=>{try{return JSON.stringify(e)}catch{return`[Unserializable payload]`}};var i=class{#s3Client;#logger;constructor(e,t){this.#s3Client=e,this.#logger=t}async initialize(){if(!this.#s3Client){this.#logger?.warning({message:`No s3 client provided, advanced sink will not function`,category:`AdvancedSink`});return}}async send(e,t,n){if(!n?.enabled){this.#logger?.debug({message:`Logs sink is disabled, skipping send to bucket ${e}`,category:`AdvancedSink`});return}let i=r(t);this.#logger?.info({message:`[S3] Sent to bucket ${e}: ${i}`,context:{bucket:e,payload:t},category:`S3Sink`}),await Promise.resolve()}};const a=(t,n)=>{try{let n=new e(t);return n??void 0}catch(e){let t=e;n?.error({message:`Error building s3 client: ${t.message}`,error:t,code:`BuildS3ClientError`,category:`buildS3Client`});return}},o=(e,n)=>{try{let n=new t(e);return n??void 0}catch(e){let t=e;n?.error({message:`Error building kafka client: ${t.message}`,error:t,code:`BuildKafkaClientError`,category:`buildKafkaClient`});return}};var s=class{#kafka;#producer;#logger;constructor(e,t){this.#kafka=e,this.#logger=t}async initialize(){if(!this.#kafka){this.#logger?.warning({message:`No kafka client provided, logs sink cannot be initialized`,category:`LogsSink`});return}if(!this.#producer){try{this.#producer=this.#kafka.producer({createPartitioner:n.DefaultPartitioner})}catch(e){this.#logger?.error({message:`Failed to create kafka producer for logs sink`,code:`KafkaProducerCreationError`,category:`LogsSink`,error:e}),this.#producer=void 0;return}try{await this.#producer.connect()}catch(e){this.#logger?.error?.({message:`Failed to connect kafka producer for logs sink`,code:`KafkaProducerConnectionError`,category:`LogsSink`,error:e}),this.#producer=void 0;return}this.#logger?.info({message:`Logs sink kafka producer initialized`,category:`LogsSink`})}}async send(e,t,n){if(!n?.enabled){this.#logger?.debug({message:`Logs sink is disabled, skipping send to topic ${e}`,category:`KafkaSink`});return}if(!this.#producer)throw this.#logger?.error({message:`Kafka not initialized, dropping message for topic ${e}`,category:`KafkaSink`,code:`KafkaNotReady`}),Error(`Kafka client is not initialized`);let i=this.buildLog(t),a=r(i);this.#logger?.debug({message:`Sending to topic ${e}: ${a}`,category:`KafkaSink`});try{let t=await this.#producer.send({topic:e,messages:[{value:a}]});this.#logger?.debug({message:`Kafka producer response: ${JSON.stringify(t)}`,category:`KafkaSink`})}catch(t){throw this.#logger?.error({message:`Error sending to topic ${e}: ${t.message}`,category:`KafkaSink`,error:t,code:`KafkaSendError`}),t}}buildLog(e){if(this.isActionResult(e)){let t=Object.fromEntries(Object.entries({actionRunId:e.actionRunId,actionId:e.actionId,organizationId:e.organizationId,projectSecureId:e.projectSecureId,accountSecureId:e.accountSecureId,mode:e.mode,connectorKey:e.connectorKey,connectorVersion:e.connectorVersion,operationType:e.operationType,category:e.category,originOwnerId:e.originOwnerId,originOwnerName:e.originOwnerName,httpMethod:e.httpMethod,url:e.url,sourceId:e.sourceId,sourceType:e.sourceType,sourceValue:e.sourceValue,status:e.status,startTime:e.startTime,endTime:e.endTime,durationMs:this.calculateDuration(e.startTime,e.endTime),eventTime:new Date}).filter(([,e])=>e!==void 0));return t}else if(this.isStepResult(e)){let t=Object.fromEntries(Object.entries({actionRunId:e.actionRunId,stepId:e.stepId,skipped:e.skipped,status:e.status,message:e.message,startTime:e.startTime,endTime:e.endTime,durationMs:this.calculateDuration(e.startTime,e.endTime),eventTime:new Date}).filter(([,e])=>e!==void 0));return t}else throw this.#logger?.error({message:`Unknown result type, cannot build log`,category:`KafkaSink`,code:`UnknownResultType`}),Error(`Unknown result type`)}calculateDuration(e,t){if(!(e instanceof Date)||!(t instanceof Date))return;let n=e.getTime(),r=t.getTime();if(!(Number.isNaN(n)||Number.isNaN(r)||r<n))return r-n}isActionResult(e){return typeof e==`object`&&!!e&&`actionRunId`in e&&`actionId`in e}isStepResult(e){return typeof e==`object`&&!!e&&`actionRunId`in e&&`stepId`in e}};const c={logs:{enabled:!0},advanced:{enabled:!1,ttl:7,errorsOnly:!1}};function l(e){return{...c,...e}}var u=class{#kafkaClient;#s3Client;#logger;#logsSink;#advancedSink;name=`OlapClient`;constructor({getKafkaClient:e=o,getS3Client:t=a,kafkaClientConfig:n,s3ClientConfig:r,logger:c}={}){this.#kafkaClient=e(n,c),this.#s3Client=t(r,c),this.#logger=c,this.#logsSink=new s(this.#kafkaClient,this.#logger),this.#advancedSink=new i(this.#s3Client,this.#logger)}async initialize(){await this.#logsSink?.initialize(),await this.#advancedSink?.initialize()}async recordAction(e,t){let{logs:n,advanced:r}=l(t);if(n?.enabled)try{await this.#logsSink?.send(`actions`,e,n)}catch(e){this.#logger?.warning({message:`[OlapClient] Error sending to kafka: ${e.message}`,category:`OlapClient`,error:e})}if(r?.enabled)try{await this.#advancedSink?.send(`actions`,e,r)}catch(e){this.#logger?.warning({message:`[OlapClient] Error sending to s3: ${e.message}`,category:`OlapClient`,error:e})}}async recordStep(e,t){let{logs:n,advanced:r}=l(t);if(n?.enabled)try{await this.#logsSink?.send(`steps`,e,n)}catch(e){this.#logger?.warning({message:`[OlapClient] Error sending to kafka: ${e.message}`,category:`OlapClient`,error:e})}if(r?.enabled)try{await this.#advancedSink?.send(`steps`,e,r)}catch(e){this.#logger?.warning({message:`[OlapClient] Error sending to s3: ${e.message}`,category:`OlapClient`,error:e})}}};const d=async({getKafkaClient:e=o,getS3Client:t=a,kafkaClientConfig:n,s3ClientConfig:r,logger:i}={})=>{let s=new u({getKafkaClient:e,getS3Client:t,kafkaClientConfig:n,s3ClientConfig:r,logger:i});return await s.initialize(),s};var f=class{static olapClientPromise=null;static getInstance({getKafkaClient:e,getS3Client:t,kafkaClientConfig:n,s3ClientConfig:r,logger:i,getOlapClient:a=d}={}){return this.olapClientPromise||=a({getKafkaClient:e,getS3Client:t,kafkaClientConfig:n,s3ClientConfig:r,logger:i}),this.olapClientPromise}static resetInstance(){this.olapClientPromise=null}};export{u as OlapClient,f as OlapClientManager};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackone/olap",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -42,7 +42,8 @@
|
|
|
42
42
|
"license": "ISC",
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@aws-sdk/client-s3": "3.913.0",
|
|
45
|
-
"kafkajs": "2.2.4"
|
|
45
|
+
"kafkajs": "2.2.4",
|
|
46
|
+
"date-fns": "2.30.0"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"tsdown": "0.12.9"
|