@devrev/ts-adaas 1.0.0 → 1.0.1

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 CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Release Notes
4
4
 
5
+ #### v1.0.1
6
+
7
+ - Bug fixes and improvements in logging.
8
+
5
9
  #### v1.0.0
6
10
 
7
11
  - Allow extractions to use full lambda runtime and gracefully handle execution context timeout.
@@ -37,8 +37,6 @@ function createEvent({ eventType, externalSyncUnits = [], progress, error, delay
37
37
  progress,
38
38
  error,
39
39
  delay,
40
- }, extractor_state: {
41
- test_extractor_state_key: 'test_extractor_state_value',
42
40
  } }, payloadOverrides),
43
41
  execution_metadata: {
44
42
  devrev_endpoint: 'test_devrev_endpoint',
@@ -28,7 +28,6 @@ export interface LogRecord {
28
28
  */
29
29
  export interface AdapterUpdateParams {
30
30
  artifact?: Artifact;
31
- extractor_state?: object;
32
31
  }
33
32
  /**
34
33
  * InitialDomainMapping is an interface that defines the structure of the initial domain mapping.
@@ -147,7 +147,6 @@ export interface AirdropMessage {
147
147
  event_context: EventContextIn;
148
148
  event_type: EventType;
149
149
  event_data?: EventData;
150
- extractor_state?: any;
151
150
  }
152
151
  /**
153
152
  * ExtractorEvent is an interface that defines the structure of the event that is sent from the external extractor to ADaaS.
@@ -156,6 +155,5 @@ export interface AirdropMessage {
156
155
  export interface ExtractorEvent {
157
156
  event_type: string;
158
157
  event_context: EventContextOut;
159
- extractor_state?: string;
160
158
  event_data?: EventData;
161
159
  }
@@ -115,8 +115,8 @@ class Spawn {
115
115
  this.logger.info('Worker exited with exit code: ' + code + '.');
116
116
  if (this.timer) {
117
117
  clearTimeout(this.timer);
118
- await this.exitFromMainThread();
119
118
  }
119
+ await this.exitFromMainThread();
120
120
  });
121
121
  worker.on(workers_1.WorkerEvent.WorkerMessage, async (message) => {
122
122
  if ((message === null || message === void 0 ? void 0 : message.subject) === workers_1.WorkerMessageSubject.WorkerMessageEmitted) {
@@ -140,6 +140,7 @@ class Spawn {
140
140
  }
141
141
  async exitFromMainThread() {
142
142
  if (this.hasWorkerEmitted) {
143
+ this.resolve(true);
143
144
  return;
144
145
  }
145
146
  const timeoutEventType = (0, helpers_1.getErrorExtractorEventType)(this.event.payload.event_type);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devrev/ts-adaas",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Typescript library containing the ADaaS(AirDrop as a Service) control protocol.",
5
5
  "type": "commonjs",
6
6
  "main": "./dist/index.js",