@hot-updater/cloudflare 0.29.2 → 0.29.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.
@@ -67,8 +67,7 @@ const appVersionStrategy = async (
67
67
  cohort,
68
68
  }: AppVersionGetBundlesArgs,
69
69
  ) => {
70
- const appVersionList = await DB.prepare(
71
- /* sql */ `
70
+ const appVersionList = await DB.prepare(/* sql */ `
72
71
  SELECT
73
72
  target_app_version
74
73
  FROM bundles
@@ -78,8 +77,7 @@ const appVersionStrategy = async (
78
77
  AND id >= ?
79
78
  AND target_app_version IS NOT NULL
80
79
  GROUP BY target_app_version
81
- `,
82
- )
80
+ `)
83
81
  .bind(platform, channel, minBundleId)
84
82
  .all<{ target_app_version: string; count: number }>();
85
83
 
@@ -101,8 +99,7 @@ const appVersionStrategy = async (
101
99
  }
102
100
 
103
101
  const placeholders = targetAppVersionList.map(() => "?").join(", ");
104
- const rows = await DB.prepare(
105
- /* sql */ `
102
+ const rows = await DB.prepare(/* sql */ `
106
103
  SELECT
107
104
  id,
108
105
  platform,
@@ -123,8 +120,7 @@ const appVersionStrategy = async (
123
120
  AND id >= ?
124
121
  AND channel = ?
125
122
  AND target_app_version IN (${placeholders})
126
- `,
127
- )
123
+ `)
128
124
  .bind(platform, minBundleId, channel, ...targetAppVersionList)
129
125
  .all<BundleRow>();
130
126
 
@@ -150,8 +146,7 @@ export const fingerprintStrategy = async (
150
146
  cohort,
151
147
  }: FingerprintGetBundlesArgs,
152
148
  ) => {
153
- const rows = await DB.prepare(
154
- /* sql */ `
149
+ const rows = await DB.prepare(/* sql */ `
155
150
  SELECT
156
151
  id,
157
152
  platform,
@@ -172,8 +167,7 @@ export const fingerprintStrategy = async (
172
167
  AND id >= ?
173
168
  AND channel = ?
174
169
  AND fingerprint_hash = ?
175
- `,
176
- )
170
+ `)
177
171
  .bind(platform, minBundleId, channel, fingerprintHash)
178
172
  .all<BundleRow>();
179
173
 
@@ -1,7 +1,8 @@
1
- import { env } from "cloudflare:test";
2
1
  import { type Bundle, type GetBundlesArgs, NIL_UUID } from "@hot-updater/core";
3
2
  import { setupGetUpdateInfoTestSuite } from "@hot-updater/test-utils";
3
+ import { env } from "cloudflare:test";
4
4
  import { beforeAll, beforeEach, describe, expect, inject, it } from "vitest";
5
+
5
6
  import worker, { HOT_UPDATER_BASE_PATH } from "./index";
6
7
 
7
8
  declare module "vitest" {
@@ -1,5 +1,6 @@
1
1
  import { createHotUpdater } from "@hot-updater/server/runtime";
2
2
  import { Hono } from "hono";
3
+
3
4
  import {
4
5
  d1Database,
5
6
  type RequestEnvContext,