@whaly/connector-sdk 0.3.3 → 0.3.4
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 +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1836,6 +1836,7 @@ var semaphore = new Semaphore(1);
|
|
|
1836
1836
|
var ITarget = class _ITarget {
|
|
1837
1837
|
config;
|
|
1838
1838
|
syncedAtColumnName;
|
|
1839
|
+
syncedAtColumnUseLegacyStringType;
|
|
1839
1840
|
schemaHooks;
|
|
1840
1841
|
syncTime;
|
|
1841
1842
|
stateProvider;
|
|
@@ -1852,6 +1853,7 @@ var ITarget = class _ITarget {
|
|
|
1852
1853
|
constructor(config, stateProvider) {
|
|
1853
1854
|
this.config = config;
|
|
1854
1855
|
this.syncedAtColumnName = config.syncedAtColumnName ?? DEFAULT_SYNCED_AT_COLUMN;
|
|
1856
|
+
this.syncedAtColumnUseLegacyStringType = config.syncedAtColumnUseLegacyStringType ?? false;
|
|
1855
1857
|
this.stateProvider = stateProvider;
|
|
1856
1858
|
this.schemaHooks = [];
|
|
1857
1859
|
this.streams = {};
|
|
@@ -2014,10 +2016,7 @@ var ITarget = class _ITarget {
|
|
|
2014
2016
|
throw new MissingSchemaError(`Stream: ${streamId} - Received SCHEMA message before stream state was initialized.`, streamId);
|
|
2015
2017
|
}
|
|
2016
2018
|
const schema = flattenSchema(streamId, message.schema);
|
|
2017
|
-
schema[this.syncedAtColumnName] = {
|
|
2018
|
-
format: "date-time",
|
|
2019
|
-
type: ["null", "string"]
|
|
2020
|
-
};
|
|
2019
|
+
schema[this.syncedAtColumnName] = this.syncedAtColumnUseLegacyStringType ? { type: ["null", "string"] } : { format: "date-time", type: ["null", "string"] };
|
|
2021
2020
|
const dbSync = streamState.getDbSync();
|
|
2022
2021
|
Object.keys(schema).forEach((fieldUnsafeKey) => {
|
|
2023
2022
|
const fieldDef = schema[fieldUnsafeKey];
|