gitsheets 0.21.3 → 0.21.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/commands/singer-target.js +11 -9
- package/package.json +1 -1
|
@@ -101,11 +101,20 @@ exports.handler = async function singerTarget({
|
|
|
101
101
|
const clearedSheets = new Set();
|
|
102
102
|
const writtenStreams = new Set();
|
|
103
103
|
for await (const { type, stream, ...message} of readMessages({ jsonlFile })) {
|
|
104
|
-
const sheet = sheets[stream];
|
|
105
|
-
|
|
106
104
|
console.log(`${type}\t${stream}`, message);
|
|
107
105
|
|
|
108
106
|
|
|
107
|
+
// ignore state for now
|
|
108
|
+
if (type == 'STATE') {
|
|
109
|
+
console.warn('ignoring STATE message');
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
// get sheet
|
|
115
|
+
const sheet = sheets[stream];
|
|
116
|
+
|
|
117
|
+
|
|
109
118
|
// create schema if needed
|
|
110
119
|
if (!sheet) {
|
|
111
120
|
if (type == 'SCHEMA') {
|
|
@@ -129,13 +138,6 @@ exports.handler = async function singerTarget({
|
|
|
129
138
|
}
|
|
130
139
|
|
|
131
140
|
|
|
132
|
-
// ignore state for now
|
|
133
|
-
if (type == 'STATE') {
|
|
134
|
-
console.warn('ignoring STATE message');
|
|
135
|
-
continue;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
141
|
// handle record message
|
|
140
142
|
if (type == 'RECORD') {
|
|
141
143
|
if (deleteMissing && !clearedSheets.has(sheet)) {
|