@squadbase/vite-server 0.1.7-dev.1 → 0.1.7-dev.2

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 CHANGED
@@ -72902,7 +72902,17 @@ var googleSheetsOnboarding = new ConnectorOnboarding({
72902
72902
  });
72903
72903
 
72904
72904
  // ../connectors/src/connectors/google-sheets/parameters.ts
72905
- var parameters18 = {};
72905
+ var parameters18 = {
72906
+ spreadsheetId: new ParameterDefinition({
72907
+ slug: "spreadsheet-id",
72908
+ name: "Google Sheets Spreadsheet ID",
72909
+ description: "The spreadsheet ID from the Google Sheets URL (the segment between /d/ and /edit in https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit). Collected during the setup flow.",
72910
+ envVarBaseKey: "GOOGLE_SHEETS_SPREADSHEET_ID",
72911
+ type: "text",
72912
+ secret: false,
72913
+ required: false
72914
+ })
72915
+ };
72906
72916
 
72907
72917
  // ../connectors/src/connectors/google-sheets/index.ts
72908
72918
  var tools18 = { request: requestTool9 };
@@ -1,3 +1,47 @@
1
+ // ../connectors/src/parameter-definition.ts
2
+ var ParameterDefinition = class {
3
+ slug;
4
+ name;
5
+ description;
6
+ envVarBaseKey;
7
+ type;
8
+ secret;
9
+ required;
10
+ constructor(config) {
11
+ this.slug = config.slug;
12
+ this.name = config.name;
13
+ this.description = config.description;
14
+ this.envVarBaseKey = config.envVarBaseKey;
15
+ this.type = config.type;
16
+ this.secret = config.secret;
17
+ this.required = config.required;
18
+ }
19
+ /**
20
+ * Get the parameter value from a ConnectorConnectionObject.
21
+ */
22
+ getValue(connection2) {
23
+ const param = connection2.parameters.find(
24
+ (p) => p.parameterSlug === this.slug
25
+ );
26
+ if (!param || param.value == null) {
27
+ throw new Error(
28
+ `Parameter "${this.slug}" not found or has no value in connection "${connection2.id}"`
29
+ );
30
+ }
31
+ return param.value;
32
+ }
33
+ /**
34
+ * Try to get the parameter value. Returns undefined if not found (for optional params).
35
+ */
36
+ tryGetValue(connection2) {
37
+ const param = connection2.parameters.find(
38
+ (p) => p.parameterSlug === this.slug
39
+ );
40
+ if (!param || param.value == null) return void 0;
41
+ return param.value;
42
+ }
43
+ };
44
+
1
45
  // ../connectors/src/connectors/google-sheets/sdk/index.ts
2
46
  var SHEETS_BASE_URL = "https://sheets.googleapis.com/v4/spreadsheets";
3
47
  function createClient(_params, fetchFn = fetch) {
@@ -365,7 +409,17 @@ var googleSheetsOnboarding = new ConnectorOnboarding({
365
409
  });
366
410
 
367
411
  // ../connectors/src/connectors/google-sheets/parameters.ts
368
- var parameters = {};
412
+ var parameters = {
413
+ spreadsheetId: new ParameterDefinition({
414
+ slug: "spreadsheet-id",
415
+ name: "Google Sheets Spreadsheet ID",
416
+ description: "The spreadsheet ID from the Google Sheets URL (the segment between /d/ and /edit in https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit). Collected during the setup flow.",
417
+ envVarBaseKey: "GOOGLE_SHEETS_SPREADSHEET_ID",
418
+ type: "text",
419
+ secret: false,
420
+ required: false
421
+ })
422
+ };
369
423
 
370
424
  // ../connectors/src/connectors/google-sheets/index.ts
371
425
  var tools = { request: requestTool };
package/dist/index.js CHANGED
@@ -72837,7 +72837,17 @@ var googleSheetsOnboarding = new ConnectorOnboarding({
72837
72837
  });
72838
72838
 
72839
72839
  // ../connectors/src/connectors/google-sheets/parameters.ts
72840
- var parameters18 = {};
72840
+ var parameters18 = {
72841
+ spreadsheetId: new ParameterDefinition({
72842
+ slug: "spreadsheet-id",
72843
+ name: "Google Sheets Spreadsheet ID",
72844
+ description: "The spreadsheet ID from the Google Sheets URL (the segment between /d/ and /edit in https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit). Collected during the setup flow.",
72845
+ envVarBaseKey: "GOOGLE_SHEETS_SPREADSHEET_ID",
72846
+ type: "text",
72847
+ secret: false,
72848
+ required: false
72849
+ })
72850
+ };
72841
72851
 
72842
72852
  // ../connectors/src/connectors/google-sheets/index.ts
72843
72853
  var tools18 = { request: requestTool9 };
package/dist/main.js CHANGED
@@ -72837,7 +72837,17 @@ var googleSheetsOnboarding = new ConnectorOnboarding({
72837
72837
  });
72838
72838
 
72839
72839
  // ../connectors/src/connectors/google-sheets/parameters.ts
72840
- var parameters18 = {};
72840
+ var parameters18 = {
72841
+ spreadsheetId: new ParameterDefinition({
72842
+ slug: "spreadsheet-id",
72843
+ name: "Google Sheets Spreadsheet ID",
72844
+ description: "The spreadsheet ID from the Google Sheets URL (the segment between /d/ and /edit in https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit). Collected during the setup flow.",
72845
+ envVarBaseKey: "GOOGLE_SHEETS_SPREADSHEET_ID",
72846
+ type: "text",
72847
+ secret: false,
72848
+ required: false
72849
+ })
72850
+ };
72841
72851
 
72842
72852
  // ../connectors/src/connectors/google-sheets/index.ts
72843
72853
  var tools18 = { request: requestTool9 };
@@ -72838,7 +72838,17 @@ var googleSheetsOnboarding = new ConnectorOnboarding({
72838
72838
  });
72839
72839
 
72840
72840
  // ../connectors/src/connectors/google-sheets/parameters.ts
72841
- var parameters18 = {};
72841
+ var parameters18 = {
72842
+ spreadsheetId: new ParameterDefinition({
72843
+ slug: "spreadsheet-id",
72844
+ name: "Google Sheets Spreadsheet ID",
72845
+ description: "The spreadsheet ID from the Google Sheets URL (the segment between /d/ and /edit in https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit). Collected during the setup flow.",
72846
+ envVarBaseKey: "GOOGLE_SHEETS_SPREADSHEET_ID",
72847
+ type: "text",
72848
+ secret: false,
72849
+ required: false
72850
+ })
72851
+ };
72842
72852
 
72843
72853
  // ../connectors/src/connectors/google-sheets/index.ts
72844
72854
  var tools18 = { request: requestTool9 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squadbase/vite-server",
3
- "version": "0.1.7-dev.1",
3
+ "version": "0.1.7-dev.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {