vite-plugin-smart-prefetch 0.3.2 → 0.3.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/dist/index.cjs +7 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +1 -13
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +1 -13
- package/dist/react/index.js.map +1 -1
- package/dist/runtime/index.cjs +1 -13
- package/dist/runtime/index.cjs.map +1 -1
- package/dist/runtime/index.js +1 -13
- package/dist/runtime/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -39,9 +39,10 @@ var import_bigquery = require("@google-cloud/bigquery");
|
|
|
39
39
|
var import_fs = require("fs");
|
|
40
40
|
var import_path = require("path");
|
|
41
41
|
var BigQueryAnalyticsConnector = class {
|
|
42
|
-
constructor(projectId, datasetId, debug = false) {
|
|
42
|
+
constructor(projectId, datasetId, location = "asia-south1", debug = false) {
|
|
43
43
|
this.projectId = projectId;
|
|
44
44
|
this.datasetId = datasetId;
|
|
45
|
+
this.location = location;
|
|
45
46
|
this.debug = debug;
|
|
46
47
|
this.bigquery = new import_bigquery.BigQuery({
|
|
47
48
|
projectId
|
|
@@ -50,6 +51,7 @@ var BigQueryAnalyticsConnector = class {
|
|
|
50
51
|
console.log("\u2705 BigQuery Analytics connector initialized");
|
|
51
52
|
console.log(` Project ID: ${projectId}`);
|
|
52
53
|
console.log(` Dataset ID: ${datasetId}`);
|
|
54
|
+
console.log(` Location: ${location}`);
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
/**
|
|
@@ -108,7 +110,7 @@ var BigQueryAnalyticsConnector = class {
|
|
|
108
110
|
}
|
|
109
111
|
const [rows] = await this.bigquery.query({
|
|
110
112
|
query,
|
|
111
|
-
location:
|
|
113
|
+
location: this.location
|
|
112
114
|
});
|
|
113
115
|
if (this.debug) {
|
|
114
116
|
console.log(`\u2705 Query executed successfully`);
|
|
@@ -361,7 +363,7 @@ var BigQueryAnalyticsConnector = class {
|
|
|
361
363
|
}
|
|
362
364
|
const [rows] = await this.bigquery.query({
|
|
363
365
|
query,
|
|
364
|
-
location:
|
|
366
|
+
location: this.location
|
|
365
367
|
});
|
|
366
368
|
if (this.debug) {
|
|
367
369
|
console.log(`\u2705 Query executed successfully`);
|
|
@@ -422,7 +424,7 @@ var BigQueryAnalyticsConnector = class {
|
|
|
422
424
|
const query = `SELECT 1 as test_value`;
|
|
423
425
|
await this.bigquery.query({
|
|
424
426
|
query,
|
|
425
|
-
location:
|
|
427
|
+
location: this.location
|
|
426
428
|
});
|
|
427
429
|
if (this.debug) {
|
|
428
430
|
console.log("\u2705 BigQuery connection test successful");
|
|
@@ -1579,6 +1581,7 @@ function smartPrefetch(options = {}) {
|
|
|
1579
1581
|
const bqConnector = new BigQueryAnalyticsConnector(
|
|
1580
1582
|
analytics.credentials.projectId,
|
|
1581
1583
|
analytics.credentials.datasetId,
|
|
1584
|
+
analytics.credentials.region || "asia-south1",
|
|
1582
1585
|
debug
|
|
1583
1586
|
);
|
|
1584
1587
|
console.log("\n\u{1F3AF} Using real navigation data from BigQuery GA4 export...");
|