@squadbase/vite-server 0.1.17-dev.24af54e → 0.1.17-dev.7408ec4

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.
Files changed (73) hide show
  1. package/dist/cli/index.js +1682 -425
  2. package/dist/connectors/airtable-oauth.js +22 -3
  3. package/dist/connectors/airtable.js +22 -3
  4. package/dist/connectors/amplitude.js +22 -3
  5. package/dist/connectors/asana.js +22 -3
  6. package/dist/connectors/attio.js +22 -3
  7. package/dist/connectors/aws-billing.js +22 -3
  8. package/dist/connectors/azure-sql.js +25 -6
  9. package/dist/connectors/backlog-api-key.js +22 -3
  10. package/dist/connectors/clickup.js +22 -3
  11. package/dist/connectors/cosmosdb.js +22 -3
  12. package/dist/connectors/customerio.js +23 -4
  13. package/dist/connectors/dbt.js +22 -3
  14. package/dist/connectors/freshdesk.js +22 -3
  15. package/dist/connectors/freshsales.js +22 -3
  16. package/dist/connectors/freshservice.js +22 -3
  17. package/dist/connectors/gamma.js +24 -5
  18. package/dist/connectors/github.js +22 -3
  19. package/dist/connectors/gmail-oauth.js +22 -3
  20. package/dist/connectors/gmail.js +22 -3
  21. package/dist/connectors/google-ads.js +22 -3
  22. package/dist/connectors/google-analytics-oauth.js +22 -3
  23. package/dist/connectors/google-analytics.js +222 -68
  24. package/dist/connectors/google-audit-log.js +22 -3
  25. package/dist/connectors/google-calendar-oauth.js +22 -3
  26. package/dist/connectors/google-calendar.js +22 -3
  27. package/dist/connectors/google-docs.js +22 -3
  28. package/dist/connectors/google-drive.js +22 -3
  29. package/dist/connectors/google-search-console-oauth.js +22 -3
  30. package/dist/connectors/google-sheets.js +22 -3
  31. package/dist/connectors/google-slides.js +22 -3
  32. package/dist/connectors/grafana.js +22 -3
  33. package/dist/connectors/hubspot-oauth.js +22 -3
  34. package/dist/connectors/hubspot.js +22 -3
  35. package/dist/connectors/influxdb.js +22 -3
  36. package/dist/connectors/intercom-oauth.js +22 -3
  37. package/dist/connectors/intercom.js +22 -3
  38. package/dist/connectors/jdbc.js +22 -3
  39. package/dist/connectors/jira-api-key.js +22 -3
  40. package/dist/connectors/kintone-api-token.js +22 -3
  41. package/dist/connectors/kintone.js +22 -3
  42. package/dist/connectors/linear.js +22 -3
  43. package/dist/connectors/linkedin-ads.js +22 -3
  44. package/dist/connectors/mailchimp-oauth.js +22 -3
  45. package/dist/connectors/mailchimp.js +22 -3
  46. package/dist/connectors/meta-ads-oauth.js +22 -3
  47. package/dist/connectors/meta-ads.js +22 -3
  48. package/dist/connectors/mixpanel.js +22 -3
  49. package/dist/connectors/monday.js +22 -3
  50. package/dist/connectors/mongodb.js +22 -3
  51. package/dist/connectors/notion-oauth.js +22 -3
  52. package/dist/connectors/notion.js +22 -3
  53. package/dist/connectors/oracle.js +48 -14
  54. package/dist/connectors/outlook-oauth.js +22 -3
  55. package/dist/connectors/powerbi-oauth.js +303 -37
  56. package/dist/connectors/salesforce.js +22 -3
  57. package/dist/connectors/semrush.js +360 -46
  58. package/dist/connectors/sentry.js +22 -3
  59. package/dist/connectors/shopify-oauth.js +22 -3
  60. package/dist/connectors/shopify.js +22 -3
  61. package/dist/connectors/sqlserver.js +25 -6
  62. package/dist/connectors/stripe-api-key.js +22 -3
  63. package/dist/connectors/stripe-oauth.js +22 -3
  64. package/dist/connectors/supabase.js +25 -6
  65. package/dist/connectors/tableau.js +240 -78
  66. package/dist/connectors/tiktok-ads.js +22 -3
  67. package/dist/connectors/wix-store.js +22 -3
  68. package/dist/connectors/zendesk-oauth.js +22 -3
  69. package/dist/connectors/zendesk.js +22 -3
  70. package/dist/index.js +1682 -425
  71. package/dist/main.js +1682 -425
  72. package/dist/vite-plugin.js +1682 -425
  73. package/package.json +1 -1
@@ -576,19 +576,28 @@ 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") {
587
592
  return {
588
593
  type: "nextQuestion",
589
594
  questionSlug: step.slug,
590
595
  question: step.question[ctx.language],
591
- questionType: "text"
596
+ questionType: "text",
597
+ allowFreeText: resolvedAllowFreeText,
598
+ ...pendingParameterUpdates.length > 0 && {
599
+ parameterUpdates: pendingParameterUpdates
600
+ }
592
601
  };
593
602
  }
594
603
  const options = step.fetchOptions ? await step.fetchOptions(state, runtime) : [];
@@ -600,11 +609,21 @@ async function runSetupFlow(flow, params, ctx, config) {
600
609
  questionSlug: step.slug,
601
610
  question: step.question[ctx.language],
602
611
  questionType: step.type,
603
- options
612
+ options,
613
+ allowFreeText: resolvedAllowFreeText,
614
+ ...pendingParameterUpdates.length > 0 && {
615
+ parameterUpdates: pendingParameterUpdates
616
+ }
604
617
  };
605
618
  }
606
619
  const dataInvestigationResult = await flow.finalize(state, runtime);
607
- return { type: "fulfilled", dataInvestigationResult };
620
+ return {
621
+ type: "fulfilled",
622
+ dataInvestigationResult,
623
+ ...pendingParameterUpdates.length > 0 && {
624
+ parameterUpdates: pendingParameterUpdates
625
+ }
626
+ };
608
627
  }
609
628
  async function resolveSetupSelection(params) {
610
629
  const { selected, allSentinel, fetchAll, limit } = params;
@@ -716,8 +735,8 @@ function buildFlow(options) {
716
735
  slug: "tables",
717
736
  type: "multiSelect",
718
737
  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)"
738
+ 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",
739
+ en: "Select target tables and views (multi-select allowed)"
721
740
  },
722
741
  async fetchOptions(state, rt) {
723
742
  if (!state.schema) return [];
@@ -726,7 +745,7 @@ function buildFlow(options) {
726
745
  return [
727
746
  {
728
747
  value: ALL_TABLES,
729
- label: rt.language === "ja" ? "\u3059\u3079\u3066\u306E\u30C6\u30FC\u30D6\u30EB" : "All tables"
748
+ label: rt.language === "ja" ? "\u3059\u3079\u3066\u306E\u30C6\u30FC\u30D6\u30EB\u30FB\u30D3\u30E5\u30FC" : "All tables and views"
730
749
  },
731
750
  ...tableOptions
732
751
  ];
@@ -258,19 +258,28 @@ 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") {
269
274
  return {
270
275
  type: "nextQuestion",
271
276
  questionSlug: step.slug,
272
277
  question: step.question[ctx.language],
273
- questionType: "text"
278
+ questionType: "text",
279
+ allowFreeText: resolvedAllowFreeText,
280
+ ...pendingParameterUpdates.length > 0 && {
281
+ parameterUpdates: pendingParameterUpdates
282
+ }
274
283
  };
275
284
  }
276
285
  const options = step.fetchOptions ? await step.fetchOptions(state, runtime) : [];
@@ -282,11 +291,21 @@ async function runSetupFlow(flow, params, ctx, config) {
282
291
  questionSlug: step.slug,
283
292
  question: step.question[ctx.language],
284
293
  questionType: step.type,
285
- options
294
+ options,
295
+ allowFreeText: resolvedAllowFreeText,
296
+ ...pendingParameterUpdates.length > 0 && {
297
+ parameterUpdates: pendingParameterUpdates
298
+ }
286
299
  };
287
300
  }
288
301
  const dataInvestigationResult = await flow.finalize(state, runtime);
289
- return { type: "fulfilled", dataInvestigationResult };
302
+ return {
303
+ type: "fulfilled",
304
+ dataInvestigationResult,
305
+ ...pendingParameterUpdates.length > 0 && {
306
+ parameterUpdates: pendingParameterUpdates
307
+ }
308
+ };
290
309
  }
291
310
 
292
311
  // ../connectors/src/auth-types.ts
@@ -180,19 +180,28 @@ 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") {
191
196
  return {
192
197
  type: "nextQuestion",
193
198
  questionSlug: step.slug,
194
199
  question: step.question[ctx.language],
195
- questionType: "text"
200
+ questionType: "text",
201
+ allowFreeText: resolvedAllowFreeText,
202
+ ...pendingParameterUpdates.length > 0 && {
203
+ parameterUpdates: pendingParameterUpdates
204
+ }
196
205
  };
197
206
  }
198
207
  const options = step.fetchOptions ? await step.fetchOptions(state, runtime) : [];
@@ -204,11 +213,21 @@ async function runSetupFlow(flow, params, ctx, config) {
204
213
  questionSlug: step.slug,
205
214
  question: step.question[ctx.language],
206
215
  questionType: step.type,
207
- options
216
+ options,
217
+ allowFreeText: resolvedAllowFreeText,
218
+ ...pendingParameterUpdates.length > 0 && {
219
+ parameterUpdates: pendingParameterUpdates
220
+ }
208
221
  };
209
222
  }
210
223
  const dataInvestigationResult = await flow.finalize(state, runtime);
211
- return { type: "fulfilled", dataInvestigationResult };
224
+ return {
225
+ type: "fulfilled",
226
+ dataInvestigationResult,
227
+ ...pendingParameterUpdates.length > 0 && {
228
+ parameterUpdates: pendingParameterUpdates
229
+ }
230
+ };
212
231
  }
213
232
 
214
233
  // ../connectors/src/auth-types.ts
@@ -272,19 +272,28 @@ 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") {
283
288
  return {
284
289
  type: "nextQuestion",
285
290
  questionSlug: step.slug,
286
291
  question: step.question[ctx.language],
287
- questionType: "text"
292
+ questionType: "text",
293
+ allowFreeText: resolvedAllowFreeText,
294
+ ...pendingParameterUpdates.length > 0 && {
295
+ parameterUpdates: pendingParameterUpdates
296
+ }
288
297
  };
289
298
  }
290
299
  const options = step.fetchOptions ? await step.fetchOptions(state, runtime) : [];
@@ -296,11 +305,21 @@ async function runSetupFlow(flow, params, ctx, config) {
296
305
  questionSlug: step.slug,
297
306
  question: step.question[ctx.language],
298
307
  questionType: step.type,
299
- options
308
+ options,
309
+ allowFreeText: resolvedAllowFreeText,
310
+ ...pendingParameterUpdates.length > 0 && {
311
+ parameterUpdates: pendingParameterUpdates
312
+ }
300
313
  };
301
314
  }
302
315
  const dataInvestigationResult = await flow.finalize(state, runtime);
303
- return { type: "fulfilled", dataInvestigationResult };
316
+ return {
317
+ type: "fulfilled",
318
+ dataInvestigationResult,
319
+ ...pendingParameterUpdates.length > 0 && {
320
+ parameterUpdates: pendingParameterUpdates
321
+ }
322
+ };
304
323
  }
305
324
  async function resolveSetupSelection(params) {
306
325
  const { selected, allSentinel, fetchAll, limit } = params;
@@ -413,8 +432,8 @@ var supabaseSetupFlow = {
413
432
  slug: "tables",
414
433
  type: "multiSelect",
415
434
  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)"
435
+ 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",
436
+ en: "Select target tables and views (multi-select allowed)"
418
437
  },
419
438
  async fetchOptions(state, rt) {
420
439
  if (!state.schema) return [];
@@ -423,7 +442,7 @@ var supabaseSetupFlow = {
423
442
  return [
424
443
  {
425
444
  value: ALL_TABLES,
426
- label: rt.language === "ja" ? "\u3059\u3079\u3066\u306E\u30C6\u30FC\u30D6\u30EB" : "All tables"
445
+ label: rt.language === "ja" ? "\u3059\u3079\u3066\u306E\u30C6\u30FC\u30D6\u30EB\u30FB\u30D3\u30E5\u30FC" : "All tables and views"
427
446
  },
428
447
  ...tableOptions
429
448
  ];