@squadbase/vite-server 0.1.17-dev.24af54e → 0.1.17-dev.3b633bb
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/cli/index.js +1681 -449
- package/dist/connectors/airtable-oauth.js +28 -3
- package/dist/connectors/airtable.js +28 -3
- package/dist/connectors/amplitude.js +28 -3
- package/dist/connectors/asana.js +28 -3
- package/dist/connectors/attio.js +28 -3
- package/dist/connectors/aws-billing.js +28 -3
- package/dist/connectors/azure-sql.js +31 -6
- package/dist/connectors/backlog-api-key.js +28 -3
- package/dist/connectors/clickup.js +28 -3
- package/dist/connectors/cosmosdb.js +28 -3
- package/dist/connectors/customerio.js +29 -4
- package/dist/connectors/dbt.js +28 -3
- package/dist/connectors/freshdesk.js +28 -3
- package/dist/connectors/freshsales.js +28 -3
- package/dist/connectors/freshservice.js +28 -3
- package/dist/connectors/gamma.js +30 -5
- package/dist/connectors/github.js +28 -3
- package/dist/connectors/gmail-oauth.js +28 -3
- package/dist/connectors/gmail.js +28 -3
- package/dist/connectors/google-ads.js +28 -3
- package/dist/connectors/google-analytics-oauth.js +28 -3
- package/dist/connectors/google-analytics.js +227 -105
- package/dist/connectors/google-audit-log.js +28 -3
- package/dist/connectors/google-calendar-oauth.js +28 -3
- package/dist/connectors/google-calendar.js +28 -3
- package/dist/connectors/google-docs.js +28 -3
- package/dist/connectors/google-drive.js +28 -3
- package/dist/connectors/google-search-console-oauth.js +28 -3
- package/dist/connectors/google-sheets.js +28 -3
- package/dist/connectors/google-slides.js +28 -3
- package/dist/connectors/grafana.js +28 -3
- package/dist/connectors/hubspot-oauth.js +28 -3
- package/dist/connectors/hubspot.js +28 -3
- package/dist/connectors/influxdb.js +28 -3
- package/dist/connectors/intercom-oauth.js +28 -3
- package/dist/connectors/intercom.js +28 -3
- package/dist/connectors/jdbc.js +28 -3
- package/dist/connectors/jira-api-key.js +28 -3
- package/dist/connectors/kintone-api-token.js +28 -3
- package/dist/connectors/kintone.js +28 -3
- package/dist/connectors/linear.js +28 -3
- package/dist/connectors/linkedin-ads.js +28 -3
- package/dist/connectors/mailchimp-oauth.js +28 -3
- package/dist/connectors/mailchimp.js +28 -3
- package/dist/connectors/meta-ads-oauth.js +28 -3
- package/dist/connectors/meta-ads.js +28 -3
- package/dist/connectors/mixpanel.js +28 -3
- package/dist/connectors/monday.js +28 -3
- package/dist/connectors/mongodb.js +28 -3
- package/dist/connectors/notion-oauth.js +28 -3
- package/dist/connectors/notion.js +28 -3
- package/dist/connectors/oracle.js +54 -14
- package/dist/connectors/outlook-oauth.js +28 -3
- package/dist/connectors/powerbi-oauth.js +309 -37
- package/dist/connectors/salesforce.js +28 -3
- package/dist/connectors/semrush.js +366 -46
- package/dist/connectors/sentry.js +28 -3
- package/dist/connectors/shopify-oauth.js +28 -3
- package/dist/connectors/shopify.js +28 -3
- package/dist/connectors/sqlserver.js +31 -6
- package/dist/connectors/stripe-api-key.js +28 -3
- package/dist/connectors/stripe-oauth.js +28 -3
- package/dist/connectors/supabase.js +31 -6
- package/dist/connectors/tableau.js +246 -78
- package/dist/connectors/tiktok-ads.js +28 -3
- package/dist/connectors/wix-store.js +28 -3
- package/dist/connectors/zendesk-oauth.js +28 -3
- package/dist/connectors/zendesk.js +28 -3
- package/dist/index.js +1681 -449
- package/dist/main.js +1681 -449
- package/dist/vite-plugin.js +1681 -449
- package/package.json +1 -1
|
@@ -576,19 +576,34 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
576
576
|
};
|
|
577
577
|
let state = flow.initialState();
|
|
578
578
|
let answerIdx = 0;
|
|
579
|
+
const pendingParameterUpdates = [];
|
|
579
580
|
for (const step of flow.steps) {
|
|
580
581
|
const ans = ctx.answers[answerIdx];
|
|
581
582
|
if (ans && ans.questionSlug === step.slug) {
|
|
582
583
|
state = step.applyAnswer(state, ans.answer);
|
|
584
|
+
if (step.toParameterUpdates) {
|
|
585
|
+
pendingParameterUpdates.push(...step.toParameterUpdates(state));
|
|
586
|
+
}
|
|
583
587
|
answerIdx += 1;
|
|
584
588
|
continue;
|
|
585
589
|
}
|
|
590
|
+
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
586
591
|
if (step.type === "text") {
|
|
592
|
+
if (step.fetchOptions) {
|
|
593
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
594
|
+
if (options2.length === 0) {
|
|
595
|
+
continue;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
587
598
|
return {
|
|
588
599
|
type: "nextQuestion",
|
|
589
600
|
questionSlug: step.slug,
|
|
590
601
|
question: step.question[ctx.language],
|
|
591
|
-
questionType: "text"
|
|
602
|
+
questionType: "text",
|
|
603
|
+
allowFreeText: resolvedAllowFreeText,
|
|
604
|
+
...pendingParameterUpdates.length > 0 && {
|
|
605
|
+
parameterUpdates: pendingParameterUpdates
|
|
606
|
+
}
|
|
592
607
|
};
|
|
593
608
|
}
|
|
594
609
|
const options = step.fetchOptions ? await step.fetchOptions(state, runtime) : [];
|
|
@@ -600,11 +615,21 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
600
615
|
questionSlug: step.slug,
|
|
601
616
|
question: step.question[ctx.language],
|
|
602
617
|
questionType: step.type,
|
|
603
|
-
options
|
|
618
|
+
options,
|
|
619
|
+
allowFreeText: resolvedAllowFreeText,
|
|
620
|
+
...pendingParameterUpdates.length > 0 && {
|
|
621
|
+
parameterUpdates: pendingParameterUpdates
|
|
622
|
+
}
|
|
604
623
|
};
|
|
605
624
|
}
|
|
606
625
|
const dataInvestigationResult = await flow.finalize(state, runtime);
|
|
607
|
-
return {
|
|
626
|
+
return {
|
|
627
|
+
type: "fulfilled",
|
|
628
|
+
dataInvestigationResult,
|
|
629
|
+
...pendingParameterUpdates.length > 0 && {
|
|
630
|
+
parameterUpdates: pendingParameterUpdates
|
|
631
|
+
}
|
|
632
|
+
};
|
|
608
633
|
}
|
|
609
634
|
async function resolveSetupSelection(params) {
|
|
610
635
|
const { selected, allSentinel, fetchAll, limit } = params;
|
|
@@ -716,8 +741,8 @@ function buildFlow(options) {
|
|
|
716
741
|
slug: "tables",
|
|
717
742
|
type: "multiSelect",
|
|
718
743
|
question: {
|
|
719
|
-
ja: "\u5BFE\u8C61\u30C6\u30FC\u30D6\u30EB\u3092\u9078\u3093\u3067\u304F\u3060\u3055\u3044\uFF08\u8907\u6570\u9078\u629E\u53EF\uFF09",
|
|
720
|
-
en: "Select target tables (multi-select allowed)"
|
|
744
|
+
ja: "\u5BFE\u8C61\u30C6\u30FC\u30D6\u30EB\u30FB\u30D3\u30E5\u30FC\u3092\u9078\u3093\u3067\u304F\u3060\u3055\u3044\uFF08\u8907\u6570\u9078\u629E\u53EF\uFF09",
|
|
745
|
+
en: "Select target tables and views (multi-select allowed)"
|
|
721
746
|
},
|
|
722
747
|
async fetchOptions(state, rt) {
|
|
723
748
|
if (!state.schema) return [];
|
|
@@ -726,7 +751,7 @@ function buildFlow(options) {
|
|
|
726
751
|
return [
|
|
727
752
|
{
|
|
728
753
|
value: ALL_TABLES,
|
|
729
|
-
label: rt.language === "ja" ? "\u3059\u3079\u3066\u306E\u30C6\u30FC\u30D6\u30EB" : "All tables"
|
|
754
|
+
label: rt.language === "ja" ? "\u3059\u3079\u3066\u306E\u30C6\u30FC\u30D6\u30EB\u30FB\u30D3\u30E5\u30FC" : "All tables and views"
|
|
730
755
|
},
|
|
731
756
|
...tableOptions
|
|
732
757
|
];
|
|
@@ -258,19 +258,34 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
258
258
|
};
|
|
259
259
|
let state = flow.initialState();
|
|
260
260
|
let answerIdx = 0;
|
|
261
|
+
const pendingParameterUpdates = [];
|
|
261
262
|
for (const step of flow.steps) {
|
|
262
263
|
const ans = ctx.answers[answerIdx];
|
|
263
264
|
if (ans && ans.questionSlug === step.slug) {
|
|
264
265
|
state = step.applyAnswer(state, ans.answer);
|
|
266
|
+
if (step.toParameterUpdates) {
|
|
267
|
+
pendingParameterUpdates.push(...step.toParameterUpdates(state));
|
|
268
|
+
}
|
|
265
269
|
answerIdx += 1;
|
|
266
270
|
continue;
|
|
267
271
|
}
|
|
272
|
+
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
268
273
|
if (step.type === "text") {
|
|
274
|
+
if (step.fetchOptions) {
|
|
275
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
276
|
+
if (options2.length === 0) {
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
269
280
|
return {
|
|
270
281
|
type: "nextQuestion",
|
|
271
282
|
questionSlug: step.slug,
|
|
272
283
|
question: step.question[ctx.language],
|
|
273
|
-
questionType: "text"
|
|
284
|
+
questionType: "text",
|
|
285
|
+
allowFreeText: resolvedAllowFreeText,
|
|
286
|
+
...pendingParameterUpdates.length > 0 && {
|
|
287
|
+
parameterUpdates: pendingParameterUpdates
|
|
288
|
+
}
|
|
274
289
|
};
|
|
275
290
|
}
|
|
276
291
|
const options = step.fetchOptions ? await step.fetchOptions(state, runtime) : [];
|
|
@@ -282,11 +297,21 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
282
297
|
questionSlug: step.slug,
|
|
283
298
|
question: step.question[ctx.language],
|
|
284
299
|
questionType: step.type,
|
|
285
|
-
options
|
|
300
|
+
options,
|
|
301
|
+
allowFreeText: resolvedAllowFreeText,
|
|
302
|
+
...pendingParameterUpdates.length > 0 && {
|
|
303
|
+
parameterUpdates: pendingParameterUpdates
|
|
304
|
+
}
|
|
286
305
|
};
|
|
287
306
|
}
|
|
288
307
|
const dataInvestigationResult = await flow.finalize(state, runtime);
|
|
289
|
-
return {
|
|
308
|
+
return {
|
|
309
|
+
type: "fulfilled",
|
|
310
|
+
dataInvestigationResult,
|
|
311
|
+
...pendingParameterUpdates.length > 0 && {
|
|
312
|
+
parameterUpdates: pendingParameterUpdates
|
|
313
|
+
}
|
|
314
|
+
};
|
|
290
315
|
}
|
|
291
316
|
|
|
292
317
|
// ../connectors/src/auth-types.ts
|
|
@@ -180,19 +180,34 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
180
180
|
};
|
|
181
181
|
let state = flow.initialState();
|
|
182
182
|
let answerIdx = 0;
|
|
183
|
+
const pendingParameterUpdates = [];
|
|
183
184
|
for (const step of flow.steps) {
|
|
184
185
|
const ans = ctx.answers[answerIdx];
|
|
185
186
|
if (ans && ans.questionSlug === step.slug) {
|
|
186
187
|
state = step.applyAnswer(state, ans.answer);
|
|
188
|
+
if (step.toParameterUpdates) {
|
|
189
|
+
pendingParameterUpdates.push(...step.toParameterUpdates(state));
|
|
190
|
+
}
|
|
187
191
|
answerIdx += 1;
|
|
188
192
|
continue;
|
|
189
193
|
}
|
|
194
|
+
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
190
195
|
if (step.type === "text") {
|
|
196
|
+
if (step.fetchOptions) {
|
|
197
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
198
|
+
if (options2.length === 0) {
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
191
202
|
return {
|
|
192
203
|
type: "nextQuestion",
|
|
193
204
|
questionSlug: step.slug,
|
|
194
205
|
question: step.question[ctx.language],
|
|
195
|
-
questionType: "text"
|
|
206
|
+
questionType: "text",
|
|
207
|
+
allowFreeText: resolvedAllowFreeText,
|
|
208
|
+
...pendingParameterUpdates.length > 0 && {
|
|
209
|
+
parameterUpdates: pendingParameterUpdates
|
|
210
|
+
}
|
|
196
211
|
};
|
|
197
212
|
}
|
|
198
213
|
const options = step.fetchOptions ? await step.fetchOptions(state, runtime) : [];
|
|
@@ -204,11 +219,21 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
204
219
|
questionSlug: step.slug,
|
|
205
220
|
question: step.question[ctx.language],
|
|
206
221
|
questionType: step.type,
|
|
207
|
-
options
|
|
222
|
+
options,
|
|
223
|
+
allowFreeText: resolvedAllowFreeText,
|
|
224
|
+
...pendingParameterUpdates.length > 0 && {
|
|
225
|
+
parameterUpdates: pendingParameterUpdates
|
|
226
|
+
}
|
|
208
227
|
};
|
|
209
228
|
}
|
|
210
229
|
const dataInvestigationResult = await flow.finalize(state, runtime);
|
|
211
|
-
return {
|
|
230
|
+
return {
|
|
231
|
+
type: "fulfilled",
|
|
232
|
+
dataInvestigationResult,
|
|
233
|
+
...pendingParameterUpdates.length > 0 && {
|
|
234
|
+
parameterUpdates: pendingParameterUpdates
|
|
235
|
+
}
|
|
236
|
+
};
|
|
212
237
|
}
|
|
213
238
|
|
|
214
239
|
// ../connectors/src/auth-types.ts
|
|
@@ -272,19 +272,34 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
272
272
|
};
|
|
273
273
|
let state = flow.initialState();
|
|
274
274
|
let answerIdx = 0;
|
|
275
|
+
const pendingParameterUpdates = [];
|
|
275
276
|
for (const step of flow.steps) {
|
|
276
277
|
const ans = ctx.answers[answerIdx];
|
|
277
278
|
if (ans && ans.questionSlug === step.slug) {
|
|
278
279
|
state = step.applyAnswer(state, ans.answer);
|
|
280
|
+
if (step.toParameterUpdates) {
|
|
281
|
+
pendingParameterUpdates.push(...step.toParameterUpdates(state));
|
|
282
|
+
}
|
|
279
283
|
answerIdx += 1;
|
|
280
284
|
continue;
|
|
281
285
|
}
|
|
286
|
+
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
282
287
|
if (step.type === "text") {
|
|
288
|
+
if (step.fetchOptions) {
|
|
289
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
290
|
+
if (options2.length === 0) {
|
|
291
|
+
continue;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
283
294
|
return {
|
|
284
295
|
type: "nextQuestion",
|
|
285
296
|
questionSlug: step.slug,
|
|
286
297
|
question: step.question[ctx.language],
|
|
287
|
-
questionType: "text"
|
|
298
|
+
questionType: "text",
|
|
299
|
+
allowFreeText: resolvedAllowFreeText,
|
|
300
|
+
...pendingParameterUpdates.length > 0 && {
|
|
301
|
+
parameterUpdates: pendingParameterUpdates
|
|
302
|
+
}
|
|
288
303
|
};
|
|
289
304
|
}
|
|
290
305
|
const options = step.fetchOptions ? await step.fetchOptions(state, runtime) : [];
|
|
@@ -296,11 +311,21 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
296
311
|
questionSlug: step.slug,
|
|
297
312
|
question: step.question[ctx.language],
|
|
298
313
|
questionType: step.type,
|
|
299
|
-
options
|
|
314
|
+
options,
|
|
315
|
+
allowFreeText: resolvedAllowFreeText,
|
|
316
|
+
...pendingParameterUpdates.length > 0 && {
|
|
317
|
+
parameterUpdates: pendingParameterUpdates
|
|
318
|
+
}
|
|
300
319
|
};
|
|
301
320
|
}
|
|
302
321
|
const dataInvestigationResult = await flow.finalize(state, runtime);
|
|
303
|
-
return {
|
|
322
|
+
return {
|
|
323
|
+
type: "fulfilled",
|
|
324
|
+
dataInvestigationResult,
|
|
325
|
+
...pendingParameterUpdates.length > 0 && {
|
|
326
|
+
parameterUpdates: pendingParameterUpdates
|
|
327
|
+
}
|
|
328
|
+
};
|
|
304
329
|
}
|
|
305
330
|
async function resolveSetupSelection(params) {
|
|
306
331
|
const { selected, allSentinel, fetchAll, limit } = params;
|
|
@@ -413,8 +438,8 @@ var supabaseSetupFlow = {
|
|
|
413
438
|
slug: "tables",
|
|
414
439
|
type: "multiSelect",
|
|
415
440
|
question: {
|
|
416
|
-
ja: "\u5BFE\u8C61\u30C6\u30FC\u30D6\u30EB\u3092\u9078\u3093\u3067\u304F\u3060\u3055\u3044\uFF08\u8907\u6570\u9078\u629E\u53EF\uFF09",
|
|
417
|
-
en: "Select target tables (multi-select allowed)"
|
|
441
|
+
ja: "\u5BFE\u8C61\u30C6\u30FC\u30D6\u30EB\u30FB\u30D3\u30E5\u30FC\u3092\u9078\u3093\u3067\u304F\u3060\u3055\u3044\uFF08\u8907\u6570\u9078\u629E\u53EF\uFF09",
|
|
442
|
+
en: "Select target tables and views (multi-select allowed)"
|
|
418
443
|
},
|
|
419
444
|
async fetchOptions(state, rt) {
|
|
420
445
|
if (!state.schema) return [];
|
|
@@ -423,7 +448,7 @@ var supabaseSetupFlow = {
|
|
|
423
448
|
return [
|
|
424
449
|
{
|
|
425
450
|
value: ALL_TABLES,
|
|
426
|
-
label: rt.language === "ja" ? "\u3059\u3079\u3066\u306E\u30C6\u30FC\u30D6\u30EB" : "All tables"
|
|
451
|
+
label: rt.language === "ja" ? "\u3059\u3079\u3066\u306E\u30C6\u30FC\u30D6\u30EB\u30FB\u30D3\u30E5\u30FC" : "All tables and views"
|
|
427
452
|
},
|
|
428
453
|
...tableOptions
|
|
429
454
|
];
|