@hot-updater/cloudflare 1.0.0-rc.1 → 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.
- package/dist/iac/index.cjs +1 -1
- package/dist/iac/index.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/worker/index.cjs +1 -1
- package/dist/worker/index.mjs +1 -1
- package/package.json +5 -5
- package/src/d1Implementation.ts +1 -1
- package/src/d1Rows.spec.ts +3 -3
- package/src/worker/d1Database.spec.ts +1 -1
- package/worker/dist/README.md +1 -1
- package/worker/dist/index.js +319 -319
- package/worker/dist/index.js.map +4 -4
package/dist/iac/index.cjs
CHANGED
|
@@ -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 "
|
|
668
|
+
case "insights": return insertQuery({
|
|
669
669
|
model: "bundle_events",
|
|
670
670
|
data: change.row
|
|
671
671
|
}, guard);
|
package/dist/iac/index.mjs
CHANGED
|
@@ -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 "
|
|
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 "
|
|
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 "
|
|
614
|
+
case "insights": return insertQuery({
|
|
615
615
|
model: "bundle_events",
|
|
616
616
|
data: change.row
|
|
617
617
|
}, guard);
|
package/dist/worker/index.cjs
CHANGED
|
@@ -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 "
|
|
612
|
+
case "insights": return insertQuery({
|
|
613
613
|
model: "bundle_events",
|
|
614
614
|
data: change.row
|
|
615
615
|
}, guard);
|
package/dist/worker/index.mjs
CHANGED
|
@@ -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 "
|
|
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.
|
|
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.
|
|
63
|
+
"@hot-updater/cli-tools": "1.0.0-rc.1",
|
|
64
|
+
"@hot-updater/plugin-core": "1.0.0-rc.1",
|
|
64
65
|
"@hot-updater/core": "1.0.0-rc.0",
|
|
65
|
-
"@hot-updater/server": "1.0.0-rc.
|
|
66
|
-
"@hot-updater/plugin-core": "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.
|
|
82
|
+
"@hot-updater/test-utils": "1.0.0-rc.1"
|
|
83
83
|
},
|
|
84
84
|
"scripts": {
|
|
85
85
|
"build": "tsdown && pnpm build:worker",
|
package/src/d1Implementation.ts
CHANGED
|
@@ -439,7 +439,7 @@ const changeQuery = (change: DatabaseChange, guard: D1Guard): D1Statement => {
|
|
|
439
439
|
...guard.params,
|
|
440
440
|
],
|
|
441
441
|
};
|
|
442
|
-
case "
|
|
442
|
+
case "insights":
|
|
443
443
|
return insertQuery({ model: "bundle_events", data: change.row }, guard);
|
|
444
444
|
case "apiKeys":
|
|
445
445
|
return change.operation === "insert"
|
package/src/d1Rows.spec.ts
CHANGED
|
@@ -77,14 +77,14 @@ it.each(["null", "[]", "1", '"metadata"'])(
|
|
|
77
77
|
},
|
|
78
78
|
);
|
|
79
79
|
|
|
80
|
-
it("preserves explicit null Release ids on an
|
|
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
|
|
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
|
|
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
|
]);
|
package/worker/dist/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
This folder contains the built output assets for the worker "hot-updater" generated at 2026-08-
|
|
1
|
+
This folder contains the built output assets for the worker "hot-updater" generated at 2026-08-31T11:14:10.721Z.
|