Skip to content

Commit

Permalink
fix(cloudflare): cloudflare 4.1.0 api b.c
Browse files Browse the repository at this point in the history
  • Loading branch information
gronxb committed Feb 13, 2025
1 parent 51cde5b commit 6b487ae
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/v0.77.0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@hot-updater/aws": "0.6.5",
"@hot-updater/cloudflare": "0.6.0",
"@hot-updater/cloudflare": "0.6.5",
"@hot-updater/metro": "0.6.5",
"@hot-updater/supabase": "0.6.5",
"@react-native-community/cli": "15.0.1",
Expand Down
2 changes: 1 addition & 1 deletion plugins/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@hot-updater/core": "0.6.5",
"@hot-updater/js": "0.6.5",
"@hot-updater/plugin-core": "0.6.5",
"cloudflare": "^4.0.0"
"cloudflare": "4.1.0"
},
"devDependencies": {
"@cloudflare/vitest-pool-workers": "^0.6.4",
Expand Down
12 changes: 6 additions & 6 deletions plugins/cloudflare/src/d1Database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ export const d1Database =
/* sql */ `
SELECT * FROM bundles WHERE id = ? LIMIT 1`,
);
const [response] = await cf.d1.database.query(config.databaseId, {
const singlePage = await cf.d1.database.query(config.databaseId, {
account_id: config.accountId,
sql,
params: [bundleId],
});

if (!response.success) {
const response = singlePage.result[0];
if (!response) {
return null;
}

Expand Down Expand Up @@ -163,13 +163,13 @@ export const d1Database =
`,
);

const [response] = await cf.d1.database.query(config.databaseId, {
const singlePage = await cf.d1.database.query(config.databaseId, {
account_id: config.accountId,
sql,
params: [],
});

if (!response.success) {
const response = singlePage.result[0];
if (!response) {
bundles = [];
return bundles;
}
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6b487ae

Please sign in to comment.