@hot-updater/cloudflare 1.0.0-rc.0 → 1.0.0-rc.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.
@@ -665,7 +665,7 @@ const changeQuery = (change, guard) => {
665
665
  sql: `DELETE FROM channels WHERE id = json_extract(?, '$') AND NOT EXISTS (SELECT 1 FROM releases WHERE channel_id = json_extract(?, '$')) AND ${guard.sql}`,
666
666
  params: [...encodeD1Values([change.where.id, change.where.id]), ...guard.params]
667
667
  };
668
- case "analytics": return insertQuery({
668
+ case "insights": return insertQuery({
669
669
  model: "bundle_events",
670
670
  data: change.row
671
671
  }, guard);
@@ -657,7 +657,7 @@ const changeQuery = (change, guard) => {
657
657
  sql: `DELETE FROM channels WHERE id = json_extract(?, '$') AND NOT EXISTS (SELECT 1 FROM releases WHERE channel_id = json_extract(?, '$')) AND ${guard.sql}`,
658
658
  params: [...encodeD1Values([change.where.id, change.where.id]), ...guard.params]
659
659
  };
660
- case "analytics": return insertQuery({
660
+ case "insights": return insertQuery({
661
661
  model: "bundle_events",
662
662
  data: change.row
663
663
  }, guard);
package/dist/index.cjs CHANGED
@@ -635,7 +635,7 @@ const changeQuery = (change, guard) => {
635
635
  sql: `DELETE FROM channels WHERE id = json_extract(?, '$') AND NOT EXISTS (SELECT 1 FROM releases WHERE channel_id = json_extract(?, '$')) AND ${guard.sql}`,
636
636
  params: [...encodeD1Values([change.where.id, change.where.id]), ...guard.params]
637
637
  };
638
- case "analytics": return insertQuery({
638
+ case "insights": return insertQuery({
639
639
  model: "bundle_events",
640
640
  data: change.row
641
641
  }, guard);
package/dist/index.mjs CHANGED
@@ -611,7 +611,7 @@ const changeQuery = (change, guard) => {
611
611
  sql: `DELETE FROM channels WHERE id = json_extract(?, '$') AND NOT EXISTS (SELECT 1 FROM releases WHERE channel_id = json_extract(?, '$')) AND ${guard.sql}`,
612
612
  params: [...encodeD1Values([change.where.id, change.where.id]), ...guard.params]
613
613
  };
614
- case "analytics": return insertQuery({
614
+ case "insights": return insertQuery({
615
615
  model: "bundle_events",
616
616
  data: change.row
617
617
  }, guard);
@@ -609,7 +609,7 @@ const changeQuery = (change, guard) => {
609
609
  sql: `DELETE FROM channels WHERE id = json_extract(?, '$') AND NOT EXISTS (SELECT 1 FROM releases WHERE channel_id = json_extract(?, '$')) AND ${guard.sql}`,
610
610
  params: [...encodeD1Values([change.where.id, change.where.id]), ...guard.params]
611
611
  };
612
- case "analytics": return insertQuery({
612
+ case "insights": return insertQuery({
613
613
  model: "bundle_events",
614
614
  data: change.row
615
615
  }, guard);
@@ -608,7 +608,7 @@ const changeQuery = (change, guard) => {
608
608
  sql: `DELETE FROM channels WHERE id = json_extract(?, '$') AND NOT EXISTS (SELECT 1 FROM releases WHERE channel_id = json_extract(?, '$')) AND ${guard.sql}`,
609
609
  params: [...encodeD1Values([change.where.id, change.where.id]), ...guard.params]
610
610
  };
611
- case "analytics": return insertQuery({
611
+ case "insights": return insertQuery({
612
612
  model: "bundle_events",
613
613
  data: change.row
614
614
  }, guard);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hot-updater/cloudflare",
3
3
  "type": "module",
4
- "version": "1.0.0-rc.0",
4
+ "version": "1.0.0-rc.2",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "main": "dist/index.cjs",
7
7
  "module": "dist/index.mjs",
@@ -60,10 +60,10 @@
60
60
  "cloudflare": "4.2.0",
61
61
  "hono": "4.12.34",
62
62
  "uuidv7": "^1.0.2",
63
+ "@hot-updater/cli-tools": "1.0.0-rc.1",
64
+ "@hot-updater/plugin-core": "1.0.0-rc.1",
63
65
  "@hot-updater/core": "1.0.0-rc.0",
64
- "@hot-updater/plugin-core": "1.0.0-rc.0",
65
- "@hot-updater/server": "1.0.0-rc.0",
66
- "@hot-updater/cli-tools": "1.0.0-rc.0"
66
+ "@hot-updater/server": "1.0.0-rc.1"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@cloudflare/vitest-pool-workers": "0.13.0",
@@ -79,7 +79,7 @@
79
79
  "vitest": "4.1.4",
80
80
  "wrangler": "^4.69.0",
81
81
  "xdg-app-paths": "^8.3.0",
82
- "@hot-updater/test-utils": "1.0.0-rc.0"
82
+ "@hot-updater/test-utils": "1.0.0-rc.1"
83
83
  },
84
84
  "scripts": {
85
85
  "build": "tsdown && pnpm build:worker",
@@ -439,7 +439,7 @@ const changeQuery = (change: DatabaseChange, guard: D1Guard): D1Statement => {
439
439
  ...guard.params,
440
440
  ],
441
441
  };
442
- case "analytics":
442
+ case "insights":
443
443
  return insertQuery({ model: "bundle_events", data: change.row }, guard);
444
444
  case "apiKeys":
445
445
  return change.operation === "insert"
@@ -77,14 +77,14 @@ it.each(["null", "[]", "1", '"metadata"'])(
77
77
  },
78
78
  );
79
79
 
80
- it("preserves explicit null Release ids on an Analytics row", () => {
80
+ it("preserves explicit null Release ids on an Insights row", () => {
81
81
  expect(
82
82
  parseD1Row("bundle_events", createBundleEventRowFixture("1", 1)),
83
83
  ).toMatchObject({ from_release_id: null, to_release_id: null });
84
84
  });
85
85
 
86
86
  it.each(["from_release_id", "to_release_id"])(
87
- "rejects an omitted Analytics field: %s",
87
+ "rejects an omitted Insights field: %s",
88
88
  (field) => {
89
89
  const row: Record<string, unknown> = {
90
90
  ...createBundleEventRowFixture("1", 1),
@@ -101,7 +101,7 @@ it.each([
101
101
  { from_bundle_id: null },
102
102
  { to_bundle_id: null },
103
103
  { type: "UNCHANGED", from_bundle_id: "bundle-old", update_strategy: null },
104
- ])("rejects an invalid Analytics direction shape", (overrides) => {
104
+ ])("rejects an invalid Insights direction shape", (overrides) => {
105
105
  expect(() =>
106
106
  parseD1Row("bundle_events", {
107
107
  ...createBundleEventRowFixture("1", 1),
@@ -19,11 +19,11 @@ it("uses the D1 binding supplied at the Worker composition boundary", async () =
19
19
 
20
20
  expect(plugin.name).toBe("d1Database");
21
21
  expect(Object.keys(plugin.models).sort()).toEqual([
22
- "analytics",
23
22
  "apiKeys",
24
23
  "bundlePatches",
25
24
  "bundles",
26
25
  "channels",
26
+ "insights",
27
27
  "releaseCatalogs",
28
28
  "releases",
29
29
  ]);
@@ -1 +1 @@
1
- This folder contains the built output assets for the worker "hot-updater" generated at 2026-08-31T01:29:11.045Z.
1
+ This folder contains the built output assets for the worker "hot-updater" generated at 2026-08-31T11:14:10.721Z.