@squadbase/vite-server 0.1.7-dev.0 → 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 +15 -22
- package/dist/connectors/google-sheets.js +20 -33
- package/dist/index.js +15 -22
- package/dist/main.js +15 -22
- package/dist/vite-plugin.js +15 -22
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -72736,21 +72736,6 @@ await drive.updateFile("fileId123", {}, "newFolderId", "oldFolderId");
|
|
|
72736
72736
|
|
|
72737
72737
|
// ../connectors/src/connectors/google-sheets/tools/request.ts
|
|
72738
72738
|
import { z as z27 } from "zod";
|
|
72739
|
-
|
|
72740
|
-
// ../connectors/src/connectors/google-sheets/parameters.ts
|
|
72741
|
-
var parameters18 = {
|
|
72742
|
-
spreadsheetId: new ParameterDefinition({
|
|
72743
|
-
slug: "spreadsheet-id",
|
|
72744
|
-
name: "Google Sheets Spreadsheet ID",
|
|
72745
|
-
description: "The spreadsheet ID from the Google Sheets URL (the segment between /d/ and /edit in https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit).",
|
|
72746
|
-
envVarBaseKey: "GOOGLE_SHEETS_SPREADSHEET_ID",
|
|
72747
|
-
type: "text",
|
|
72748
|
-
secret: false,
|
|
72749
|
-
required: true
|
|
72750
|
-
})
|
|
72751
|
-
};
|
|
72752
|
-
|
|
72753
|
-
// ../connectors/src/connectors/google-sheets/tools/request.ts
|
|
72754
72739
|
var SHEETS_BASE_URL = "https://sheets.googleapis.com/v4/spreadsheets";
|
|
72755
72740
|
var REQUEST_TIMEOUT_MS17 = 6e4;
|
|
72756
72741
|
var cachedToken13 = null;
|
|
@@ -72821,16 +72806,11 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
72821
72806
|
error: `Connection ${connectionId} not found`
|
|
72822
72807
|
};
|
|
72823
72808
|
}
|
|
72824
|
-
const spreadsheetIdParam = connection.parameters.find(
|
|
72825
|
-
(p6) => p6.parameterSlug === parameters18.spreadsheetId.slug
|
|
72826
|
-
);
|
|
72827
|
-
const spreadsheetId = spreadsheetIdParam?.value ?? void 0;
|
|
72828
|
-
const resolvedPath = spreadsheetId ? path5.replace(/\{spreadsheetId\}/g, spreadsheetId) : path5;
|
|
72829
72809
|
console.log(
|
|
72830
|
-
`[connector-request] google-sheets/${connection.name}: ${method} ${
|
|
72810
|
+
`[connector-request] google-sheets/${connection.name}: ${method} ${path5}`
|
|
72831
72811
|
);
|
|
72832
72812
|
try {
|
|
72833
|
-
let url = `${SHEETS_BASE_URL}${
|
|
72813
|
+
let url = `${SHEETS_BASE_URL}${path5 === "" || path5.startsWith("/") ? "" : "/"}${path5}`;
|
|
72834
72814
|
if (queryParams) {
|
|
72835
72815
|
const searchParams = new URLSearchParams(queryParams);
|
|
72836
72816
|
url += `?${searchParams.toString()}`;
|
|
@@ -72921,6 +72901,19 @@ var googleSheetsOnboarding = new ConnectorOnboarding({
|
|
|
72921
72901
|
}
|
|
72922
72902
|
});
|
|
72923
72903
|
|
|
72904
|
+
// ../connectors/src/connectors/google-sheets/parameters.ts
|
|
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
|
+
};
|
|
72916
|
+
|
|
72924
72917
|
// ../connectors/src/connectors/google-sheets/index.ts
|
|
72925
72918
|
var tools18 = { request: requestTool9 };
|
|
72926
72919
|
var googleSheetsConnector = new ConnectorPlugin({
|
|
@@ -42,34 +42,14 @@ var ParameterDefinition = class {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
// ../connectors/src/connectors/google-sheets/parameters.ts
|
|
46
|
-
var parameters = {
|
|
47
|
-
spreadsheetId: new ParameterDefinition({
|
|
48
|
-
slug: "spreadsheet-id",
|
|
49
|
-
name: "Google Sheets Spreadsheet ID",
|
|
50
|
-
description: "The spreadsheet ID from the Google Sheets URL (the segment between /d/ and /edit in https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit).",
|
|
51
|
-
envVarBaseKey: "GOOGLE_SHEETS_SPREADSHEET_ID",
|
|
52
|
-
type: "text",
|
|
53
|
-
secret: false,
|
|
54
|
-
required: true
|
|
55
|
-
})
|
|
56
|
-
};
|
|
57
|
-
|
|
58
45
|
// ../connectors/src/connectors/google-sheets/sdk/index.ts
|
|
59
46
|
var SHEETS_BASE_URL = "https://sheets.googleapis.com/v4/spreadsheets";
|
|
60
|
-
function createClient(
|
|
61
|
-
const spreadsheetId = params[parameters.spreadsheetId.slug];
|
|
62
|
-
if (!spreadsheetId) {
|
|
63
|
-
throw new Error(
|
|
64
|
-
`google-sheets: missing required parameter: ${parameters.spreadsheetId.slug}`
|
|
65
|
-
);
|
|
66
|
-
}
|
|
47
|
+
function createClient(_params, fetchFn = fetch) {
|
|
67
48
|
function request(path2, init) {
|
|
68
|
-
const
|
|
69
|
-
const url = `${SHEETS_BASE_URL}${resolvedPath === "" || resolvedPath.startsWith("/") ? "" : "/"}${resolvedPath}`;
|
|
49
|
+
const url = `${SHEETS_BASE_URL}${path2 === "" || path2.startsWith("/") ? "" : "/"}${path2}`;
|
|
70
50
|
return fetchFn(url, init);
|
|
71
51
|
}
|
|
72
|
-
async function getSpreadsheet() {
|
|
52
|
+
async function getSpreadsheet(spreadsheetId) {
|
|
73
53
|
const url = `${SHEETS_BASE_URL}/${spreadsheetId}?fields=spreadsheetId,properties,sheets.properties`;
|
|
74
54
|
const response = await fetchFn(url);
|
|
75
55
|
if (!response.ok) {
|
|
@@ -80,7 +60,7 @@ function createClient(params, fetchFn = fetch) {
|
|
|
80
60
|
}
|
|
81
61
|
return await response.json();
|
|
82
62
|
}
|
|
83
|
-
async function getValues(range) {
|
|
63
|
+
async function getValues(spreadsheetId, range) {
|
|
84
64
|
const url = `${SHEETS_BASE_URL}/${spreadsheetId}/values/${encodeURIComponent(range)}`;
|
|
85
65
|
const response = await fetchFn(url);
|
|
86
66
|
if (!response.ok) {
|
|
@@ -91,7 +71,7 @@ function createClient(params, fetchFn = fetch) {
|
|
|
91
71
|
}
|
|
92
72
|
return await response.json();
|
|
93
73
|
}
|
|
94
|
-
async function batchGetValues(ranges) {
|
|
74
|
+
async function batchGetValues(spreadsheetId, ranges) {
|
|
95
75
|
const searchParams = new URLSearchParams();
|
|
96
76
|
for (const range of ranges) {
|
|
97
77
|
searchParams.append("ranges", range);
|
|
@@ -107,7 +87,6 @@ function createClient(params, fetchFn = fetch) {
|
|
|
107
87
|
return await response.json();
|
|
108
88
|
}
|
|
109
89
|
return {
|
|
110
|
-
spreadsheetId,
|
|
111
90
|
request,
|
|
112
91
|
getSpreadsheet,
|
|
113
92
|
getValues,
|
|
@@ -334,16 +313,11 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
334
313
|
error: `Connection ${connectionId} not found`
|
|
335
314
|
};
|
|
336
315
|
}
|
|
337
|
-
const spreadsheetIdParam = connection2.parameters.find(
|
|
338
|
-
(p) => p.parameterSlug === parameters.spreadsheetId.slug
|
|
339
|
-
);
|
|
340
|
-
const spreadsheetId = spreadsheetIdParam?.value ?? void 0;
|
|
341
|
-
const resolvedPath = spreadsheetId ? path2.replace(/\{spreadsheetId\}/g, spreadsheetId) : path2;
|
|
342
316
|
console.log(
|
|
343
|
-
`[connector-request] google-sheets/${connection2.name}: ${method} ${
|
|
317
|
+
`[connector-request] google-sheets/${connection2.name}: ${method} ${path2}`
|
|
344
318
|
);
|
|
345
319
|
try {
|
|
346
|
-
let url = `${SHEETS_BASE_URL2}${
|
|
320
|
+
let url = `${SHEETS_BASE_URL2}${path2 === "" || path2.startsWith("/") ? "" : "/"}${path2}`;
|
|
347
321
|
if (queryParams) {
|
|
348
322
|
const searchParams = new URLSearchParams(queryParams);
|
|
349
323
|
url += `?${searchParams.toString()}`;
|
|
@@ -434,6 +408,19 @@ var googleSheetsOnboarding = new ConnectorOnboarding({
|
|
|
434
408
|
}
|
|
435
409
|
});
|
|
436
410
|
|
|
411
|
+
// ../connectors/src/connectors/google-sheets/parameters.ts
|
|
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
|
+
};
|
|
423
|
+
|
|
437
424
|
// ../connectors/src/connectors/google-sheets/index.ts
|
|
438
425
|
var tools = { request: requestTool };
|
|
439
426
|
var googleSheetsConnector = new ConnectorPlugin({
|
package/dist/index.js
CHANGED
|
@@ -72671,21 +72671,6 @@ await drive.updateFile("fileId123", {}, "newFolderId", "oldFolderId");
|
|
|
72671
72671
|
|
|
72672
72672
|
// ../connectors/src/connectors/google-sheets/tools/request.ts
|
|
72673
72673
|
import { z as z27 } from "zod";
|
|
72674
|
-
|
|
72675
|
-
// ../connectors/src/connectors/google-sheets/parameters.ts
|
|
72676
|
-
var parameters18 = {
|
|
72677
|
-
spreadsheetId: new ParameterDefinition({
|
|
72678
|
-
slug: "spreadsheet-id",
|
|
72679
|
-
name: "Google Sheets Spreadsheet ID",
|
|
72680
|
-
description: "The spreadsheet ID from the Google Sheets URL (the segment between /d/ and /edit in https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit).",
|
|
72681
|
-
envVarBaseKey: "GOOGLE_SHEETS_SPREADSHEET_ID",
|
|
72682
|
-
type: "text",
|
|
72683
|
-
secret: false,
|
|
72684
|
-
required: true
|
|
72685
|
-
})
|
|
72686
|
-
};
|
|
72687
|
-
|
|
72688
|
-
// ../connectors/src/connectors/google-sheets/tools/request.ts
|
|
72689
72674
|
var SHEETS_BASE_URL = "https://sheets.googleapis.com/v4/spreadsheets";
|
|
72690
72675
|
var REQUEST_TIMEOUT_MS17 = 6e4;
|
|
72691
72676
|
var cachedToken13 = null;
|
|
@@ -72756,16 +72741,11 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
72756
72741
|
error: `Connection ${connectionId} not found`
|
|
72757
72742
|
};
|
|
72758
72743
|
}
|
|
72759
|
-
const spreadsheetIdParam = connection2.parameters.find(
|
|
72760
|
-
(p6) => p6.parameterSlug === parameters18.spreadsheetId.slug
|
|
72761
|
-
);
|
|
72762
|
-
const spreadsheetId = spreadsheetIdParam?.value ?? void 0;
|
|
72763
|
-
const resolvedPath = spreadsheetId ? path5.replace(/\{spreadsheetId\}/g, spreadsheetId) : path5;
|
|
72764
72744
|
console.log(
|
|
72765
|
-
`[connector-request] google-sheets/${connection2.name}: ${method} ${
|
|
72745
|
+
`[connector-request] google-sheets/${connection2.name}: ${method} ${path5}`
|
|
72766
72746
|
);
|
|
72767
72747
|
try {
|
|
72768
|
-
let url = `${SHEETS_BASE_URL}${
|
|
72748
|
+
let url = `${SHEETS_BASE_URL}${path5 === "" || path5.startsWith("/") ? "" : "/"}${path5}`;
|
|
72769
72749
|
if (queryParams) {
|
|
72770
72750
|
const searchParams = new URLSearchParams(queryParams);
|
|
72771
72751
|
url += `?${searchParams.toString()}`;
|
|
@@ -72856,6 +72836,19 @@ var googleSheetsOnboarding = new ConnectorOnboarding({
|
|
|
72856
72836
|
}
|
|
72857
72837
|
});
|
|
72858
72838
|
|
|
72839
|
+
// ../connectors/src/connectors/google-sheets/parameters.ts
|
|
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
|
+
};
|
|
72851
|
+
|
|
72859
72852
|
// ../connectors/src/connectors/google-sheets/index.ts
|
|
72860
72853
|
var tools18 = { request: requestTool9 };
|
|
72861
72854
|
var googleSheetsConnector = new ConnectorPlugin({
|
package/dist/main.js
CHANGED
|
@@ -72671,21 +72671,6 @@ await drive.updateFile("fileId123", {}, "newFolderId", "oldFolderId");
|
|
|
72671
72671
|
|
|
72672
72672
|
// ../connectors/src/connectors/google-sheets/tools/request.ts
|
|
72673
72673
|
import { z as z27 } from "zod";
|
|
72674
|
-
|
|
72675
|
-
// ../connectors/src/connectors/google-sheets/parameters.ts
|
|
72676
|
-
var parameters18 = {
|
|
72677
|
-
spreadsheetId: new ParameterDefinition({
|
|
72678
|
-
slug: "spreadsheet-id",
|
|
72679
|
-
name: "Google Sheets Spreadsheet ID",
|
|
72680
|
-
description: "The spreadsheet ID from the Google Sheets URL (the segment between /d/ and /edit in https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit).",
|
|
72681
|
-
envVarBaseKey: "GOOGLE_SHEETS_SPREADSHEET_ID",
|
|
72682
|
-
type: "text",
|
|
72683
|
-
secret: false,
|
|
72684
|
-
required: true
|
|
72685
|
-
})
|
|
72686
|
-
};
|
|
72687
|
-
|
|
72688
|
-
// ../connectors/src/connectors/google-sheets/tools/request.ts
|
|
72689
72674
|
var SHEETS_BASE_URL = "https://sheets.googleapis.com/v4/spreadsheets";
|
|
72690
72675
|
var REQUEST_TIMEOUT_MS17 = 6e4;
|
|
72691
72676
|
var cachedToken13 = null;
|
|
@@ -72756,16 +72741,11 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
72756
72741
|
error: `Connection ${connectionId} not found`
|
|
72757
72742
|
};
|
|
72758
72743
|
}
|
|
72759
|
-
const spreadsheetIdParam = connection2.parameters.find(
|
|
72760
|
-
(p6) => p6.parameterSlug === parameters18.spreadsheetId.slug
|
|
72761
|
-
);
|
|
72762
|
-
const spreadsheetId = spreadsheetIdParam?.value ?? void 0;
|
|
72763
|
-
const resolvedPath = spreadsheetId ? path6.replace(/\{spreadsheetId\}/g, spreadsheetId) : path6;
|
|
72764
72744
|
console.log(
|
|
72765
|
-
`[connector-request] google-sheets/${connection2.name}: ${method} ${
|
|
72745
|
+
`[connector-request] google-sheets/${connection2.name}: ${method} ${path6}`
|
|
72766
72746
|
);
|
|
72767
72747
|
try {
|
|
72768
|
-
let url = `${SHEETS_BASE_URL}${
|
|
72748
|
+
let url = `${SHEETS_BASE_URL}${path6 === "" || path6.startsWith("/") ? "" : "/"}${path6}`;
|
|
72769
72749
|
if (queryParams) {
|
|
72770
72750
|
const searchParams = new URLSearchParams(queryParams);
|
|
72771
72751
|
url += `?${searchParams.toString()}`;
|
|
@@ -72856,6 +72836,19 @@ var googleSheetsOnboarding = new ConnectorOnboarding({
|
|
|
72856
72836
|
}
|
|
72857
72837
|
});
|
|
72858
72838
|
|
|
72839
|
+
// ../connectors/src/connectors/google-sheets/parameters.ts
|
|
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
|
+
};
|
|
72851
|
+
|
|
72859
72852
|
// ../connectors/src/connectors/google-sheets/index.ts
|
|
72860
72853
|
var tools18 = { request: requestTool9 };
|
|
72861
72854
|
var googleSheetsConnector = new ConnectorPlugin({
|
package/dist/vite-plugin.js
CHANGED
|
@@ -72672,21 +72672,6 @@ await drive.updateFile("fileId123", {}, "newFolderId", "oldFolderId");
|
|
|
72672
72672
|
|
|
72673
72673
|
// ../connectors/src/connectors/google-sheets/tools/request.ts
|
|
72674
72674
|
import { z as z27 } from "zod";
|
|
72675
|
-
|
|
72676
|
-
// ../connectors/src/connectors/google-sheets/parameters.ts
|
|
72677
|
-
var parameters18 = {
|
|
72678
|
-
spreadsheetId: new ParameterDefinition({
|
|
72679
|
-
slug: "spreadsheet-id",
|
|
72680
|
-
name: "Google Sheets Spreadsheet ID",
|
|
72681
|
-
description: "The spreadsheet ID from the Google Sheets URL (the segment between /d/ and /edit in https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit).",
|
|
72682
|
-
envVarBaseKey: "GOOGLE_SHEETS_SPREADSHEET_ID",
|
|
72683
|
-
type: "text",
|
|
72684
|
-
secret: false,
|
|
72685
|
-
required: true
|
|
72686
|
-
})
|
|
72687
|
-
};
|
|
72688
|
-
|
|
72689
|
-
// ../connectors/src/connectors/google-sheets/tools/request.ts
|
|
72690
72675
|
var SHEETS_BASE_URL = "https://sheets.googleapis.com/v4/spreadsheets";
|
|
72691
72676
|
var REQUEST_TIMEOUT_MS17 = 6e4;
|
|
72692
72677
|
var cachedToken13 = null;
|
|
@@ -72757,16 +72742,11 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
72757
72742
|
error: `Connection ${connectionId} not found`
|
|
72758
72743
|
};
|
|
72759
72744
|
}
|
|
72760
|
-
const spreadsheetIdParam = connection.parameters.find(
|
|
72761
|
-
(p6) => p6.parameterSlug === parameters18.spreadsheetId.slug
|
|
72762
|
-
);
|
|
72763
|
-
const spreadsheetId = spreadsheetIdParam?.value ?? void 0;
|
|
72764
|
-
const resolvedPath = spreadsheetId ? path4.replace(/\{spreadsheetId\}/g, spreadsheetId) : path4;
|
|
72765
72745
|
console.log(
|
|
72766
|
-
`[connector-request] google-sheets/${connection.name}: ${method} ${
|
|
72746
|
+
`[connector-request] google-sheets/${connection.name}: ${method} ${path4}`
|
|
72767
72747
|
);
|
|
72768
72748
|
try {
|
|
72769
|
-
let url = `${SHEETS_BASE_URL}${
|
|
72749
|
+
let url = `${SHEETS_BASE_URL}${path4 === "" || path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
72770
72750
|
if (queryParams) {
|
|
72771
72751
|
const searchParams = new URLSearchParams(queryParams);
|
|
72772
72752
|
url += `?${searchParams.toString()}`;
|
|
@@ -72857,6 +72837,19 @@ var googleSheetsOnboarding = new ConnectorOnboarding({
|
|
|
72857
72837
|
}
|
|
72858
72838
|
});
|
|
72859
72839
|
|
|
72840
|
+
// ../connectors/src/connectors/google-sheets/parameters.ts
|
|
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
|
+
};
|
|
72852
|
+
|
|
72860
72853
|
// ../connectors/src/connectors/google-sheets/index.ts
|
|
72861
72854
|
var tools18 = { request: requestTool9 };
|
|
72862
72855
|
var googleSheetsConnector = new ConnectorPlugin({
|