@devrev/airsync-sdk 2.2.0-alpha.6 → 2.2.0-alpha.7
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-state.d.ts","sourceRoot":"","sources":["../../src/state/base-state.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAa,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGtE,OAAO,EAEL,QAAQ,EAER,cAAc,EAEf,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"base-state.d.ts","sourceRoot":"","sources":["../../src/state/base-state.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAa,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGtE,OAAO,EAEL,QAAQ,EAER,cAAc,EAEf,MAAM,oBAAoB,CAAC;AAuC5B;;;;GAIG;AACH,8BAAsB,SAAS,CAAC,cAAc;IAC5C,SAAS,CAAC,eAAe,EAAE,cAAc,CAAC;IAC1C,SAAS,CAAC,SAAS,EAAE,QAAQ,CAAC;IAC9B,SAAS,CAAC,gBAAgB,EAAE,eAAe,CAAM;IACjD,SAAS,CAAC,kBAAkB,EAAE,iBAAiB,CAAM;IACrD,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC;IAC7C,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IACvC,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,SAAS,CAAS;gBAGxB,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,cAAc,CAAC,cAAc,CAAC,EACvD,eAAe,EAAE,QAAQ;IAY3B,2EAA2E;IAC3E,IAAI,KAAK,IAAI,cAAc,CAE1B;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,cAAc,EAE9B;IAED,uEAAuE;IACvE,IAAI,QAAQ,IAAI,QAAQ,CAEvB;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAE3B;IAED,IAAI,iBAAiB,IAAI,iBAAiB,CAEzC;IAED,IAAI,eAAe,IAAI,eAAe,CAErC;IAED;;;;OAIG;IACG,mCAAmC,CACvC,oBAAoB,CAAC,EAAE,oBAAoB,GAC1C,OAAO,CAAC,IAAI,CAAC;IAwChB;;;;OAIG;IACG,IAAI,CAAC,YAAY,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAkGvD;;;;;OAKG;IACH,OAAO,CAAC,qBAAqB;IA4C7B,OAAO,CAAC,YAAY;IAkBpB;;;OAGG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IA0C1B,UAAU,IAAI,OAAO,CAAC;QAC1B,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CAsBH"}
|
package/dist/state/base-state.js
CHANGED
|
@@ -29,13 +29,16 @@ function parseExtractionScope(objects) {
|
|
|
29
29
|
(value.extract !== undefined && typeof value.extract !== 'boolean'))) {
|
|
30
30
|
throw new Error('Invalid extraction scope in worker response.');
|
|
31
31
|
}
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
return {
|
|
33
|
+
received: scope,
|
|
34
|
+
effective: Object.fromEntries(Object.entries(scope).map(([itemType, requirement]) => {
|
|
35
|
+
var _a;
|
|
36
|
+
return [
|
|
37
|
+
itemType,
|
|
38
|
+
Object.assign(Object.assign({}, requirement), { extract: (_a = requirement.extract) !== null && _a !== void 0 ? _a : false }),
|
|
39
|
+
];
|
|
40
|
+
})),
|
|
41
|
+
};
|
|
39
42
|
}
|
|
40
43
|
/**
|
|
41
44
|
* State lifecycle shared by all sync modes: connector/SDK state separation,
|
|
@@ -166,10 +169,10 @@ class BaseState {
|
|
|
166
169
|
}
|
|
167
170
|
}
|
|
168
171
|
else {
|
|
169
|
-
|
|
172
|
+
const { received, effective } = parseExtractionScope(objects);
|
|
173
|
+
this._extractionScope = effective;
|
|
170
174
|
if (requiresScope) {
|
|
171
|
-
console.log('Extraction requirements
|
|
172
|
-
console.log('Effective extraction requirements:', JSON.stringify(this._extractionScope));
|
|
175
|
+
console.log('Extraction requirements:', JSON.stringify({ received, effective }));
|
|
173
176
|
}
|
|
174
177
|
}
|
|
175
178
|
}
|