@hot-updater/cloudflare 0.6.1-rc.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.
Files changed (36) hide show
  1. package/LICENSE +21 -0
  2. package/dist/chunk-6TTCZ657.js +7340 -0
  3. package/dist/index.cjs +7936 -0
  4. package/dist/index.d.cts +17 -0
  5. package/dist/index.d.ts +17 -0
  6. package/dist/index.js +615 -0
  7. package/dist/utils/index.cjs +11618 -0
  8. package/dist/utils/index.d.cts +24 -0
  9. package/dist/utils/index.d.ts +24 -0
  10. package/dist/utils/index.js +4296 -0
  11. package/package.json +67 -0
  12. package/sql/bundles.sql +15 -0
  13. package/sql/prepareSql.ts +11 -0
  14. package/worker/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/759949203d579584bba36edd66058bea53c5fd18bbd8f45f1cf14abf011c468f.sqlite +0 -0
  15. package/worker/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/759949203d579584bba36edd66058bea53c5fd18bbd8f45f1cf14abf011c468f.sqlite-shm +0 -0
  16. package/worker/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/759949203d579584bba36edd66058bea53c5fd18bbd8f45f1cf14abf011c468f.sqlite-wal +0 -0
  17. package/worker/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/e7352547963de7050bd7d94658afc4fe78b61811b7815da12d90be8e863abf4d.sqlite +0 -0
  18. package/worker/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/e7352547963de7050bd7d94658afc4fe78b61811b7815da12d90be8e863abf4d.sqlite-shm +0 -0
  19. package/worker/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/e7352547963de7050bd7d94658afc4fe78b61811b7815da12d90be8e863abf4d.sqlite-wal +0 -0
  20. package/worker/migrations/0001_hot-updater_init.sql +16 -0
  21. package/worker/node_modules/.bin/esbuild +17 -0
  22. package/worker/node_modules/.bin/sass +17 -0
  23. package/worker/node_modules/.bin/terser +17 -0
  24. package/worker/node_modules/.bin/tsc +17 -0
  25. package/worker/node_modules/.bin/tsserver +17 -0
  26. package/worker/node_modules/.bin/vite +17 -0
  27. package/worker/node_modules/.bin/vitest +17 -0
  28. package/worker/node_modules/.bin/wrangler +17 -0
  29. package/worker/node_modules/.bin/wrangler2 +17 -0
  30. package/worker/node_modules/.cache/wrangler/wrangler-account.json +6 -0
  31. package/worker/node_modules/.mf/cf.json +1 -0
  32. package/worker/src/getUpdateInfo.spec.ts +73 -0
  33. package/worker/src/getUpdateInfo.ts +115 -0
  34. package/worker/src/index.ts +50 -0
  35. package/worker/wrangler.json +19 -0
  36. package/worker/wrangler.test.json +16 -0
@@ -0,0 +1,17 @@
1
+ import { DatabasePluginHooks, BasePluginArgs, DatabasePlugin, StoragePluginHooks, StoragePlugin } from '@hot-updater/plugin-core';
2
+
3
+ interface D1DatabaseConfig {
4
+ databaseId: string;
5
+ accountId: string;
6
+ cloudflareApiToken: string;
7
+ }
8
+ declare const d1Database: (config: D1DatabaseConfig, hooks?: DatabasePluginHooks) => (_: BasePluginArgs) => DatabasePlugin;
9
+
10
+ interface R2StorageConfig {
11
+ cloudflareApiToken: string;
12
+ accountId: string;
13
+ bucketName: string;
14
+ }
15
+ declare const r2Storage: (config: R2StorageConfig, hooks?: StoragePluginHooks) => (_: BasePluginArgs) => StoragePlugin;
16
+
17
+ export { type D1DatabaseConfig, type R2StorageConfig, d1Database, r2Storage };
@@ -0,0 +1,17 @@
1
+ import { DatabasePluginHooks, BasePluginArgs, DatabasePlugin, StoragePluginHooks, StoragePlugin } from '@hot-updater/plugin-core';
2
+
3
+ interface D1DatabaseConfig {
4
+ databaseId: string;
5
+ accountId: string;
6
+ cloudflareApiToken: string;
7
+ }
8
+ declare const d1Database: (config: D1DatabaseConfig, hooks?: DatabasePluginHooks) => (_: BasePluginArgs) => DatabasePlugin;
9
+
10
+ interface R2StorageConfig {
11
+ cloudflareApiToken: string;
12
+ accountId: string;
13
+ bucketName: string;
14
+ }
15
+ declare const r2Storage: (config: R2StorageConfig, hooks?: StoragePluginHooks) => (_: BasePluginArgs) => StoragePlugin;
16
+
17
+ export { type D1DatabaseConfig, type R2StorageConfig, d1Database, r2Storage };