@hot-updater/cloudflare 0.17.0 → 0.18.0
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 +12362 -12838
- package/dist/iac/index.d.cts +8 -4
- package/dist/iac/index.d.ts +8 -4
- package/dist/iac/index.js +12364 -12847
- package/dist/index.cjs +8062 -7779
- package/dist/index.d.cts +14 -10
- package/dist/index.d.ts +14 -10
- package/dist/index.js +8063 -7775
- package/package.json +7 -7
- package/sql/bundles.sql +6 -2
- package/worker/dist/README.md +1 -1
- package/worker/dist/index.js +2047 -1969
- package/worker/dist/index.js.map +4 -4
- package/worker/migrations/0003_hot-updater_0.18.0.sql +38 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
-- Migration number: 0003 2025-05-18T16:25:12.486Z
|
|
2
|
+
-- HotUpdater.bundles
|
|
3
|
+
|
|
4
|
+
ALTER TABLE bundles ADD COLUMN fingerprint_hash TEXT;
|
|
5
|
+
ALTER TABLE bundles ADD COLUMN storage_uri TEXT;
|
|
6
|
+
ALTER TABLE bundles ADD COLUMN metadata JSONB DEFAULT '{}';
|
|
7
|
+
|
|
8
|
+
UPDATE bundles
|
|
9
|
+
SET storage_uri = 'r2://%%BUCKET_NAME%%/' || id || '/bundle.zip'
|
|
10
|
+
WHERE storage_uri IS NULL;
|
|
11
|
+
|
|
12
|
+
CREATE TABLE bundles_temp (
|
|
13
|
+
id TEXT PRIMARY KEY,
|
|
14
|
+
platform TEXT NOT NULL,
|
|
15
|
+
should_force_update INTEGER NOT NULL,
|
|
16
|
+
enabled INTEGER NOT NULL,
|
|
17
|
+
file_hash TEXT NOT NULL,
|
|
18
|
+
git_commit_hash TEXT,
|
|
19
|
+
message TEXT,
|
|
20
|
+
channel TEXT NOT NULL DEFAULT 'production',
|
|
21
|
+
storage_uri TEXT NOT NULL,
|
|
22
|
+
target_app_version TEXT,
|
|
23
|
+
fingerprint_hash TEXT,
|
|
24
|
+
metadata JSONB DEFAULT '{}',
|
|
25
|
+
CHECK ((target_app_version IS NOT NULL) OR (fingerprint_hash IS NOT NULL))
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
INSERT INTO bundles_temp
|
|
29
|
+
SELECT id, platform, should_force_update, enabled, file_hash, git_commit_hash, message, channel, storage_uri, target_app_version, fingerprint_hash, metadata
|
|
30
|
+
FROM bundles;
|
|
31
|
+
|
|
32
|
+
DROP TABLE bundles;
|
|
33
|
+
|
|
34
|
+
ALTER TABLE bundles_temp RENAME TO bundles;
|
|
35
|
+
|
|
36
|
+
CREATE INDEX bundles_target_app_version_idx ON bundles(target_app_version);
|
|
37
|
+
CREATE INDEX bundles_fingerprint_hash_idx ON bundles(fingerprint_hash);
|
|
38
|
+
CREATE INDEX bundles_channel_idx ON bundles(channel);
|