@hot-updater/plugin-core 1.2.0-rc.49 → 1.2.0-rc.50

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 (47) hide show
  1. package/dist/coreApi.d.cts +20 -1
  2. package/dist/coreApi.d.mts +20 -1
  3. package/dist/database/adapter.d.cts +12 -0
  4. package/dist/database/adapter.d.mts +12 -0
  5. package/dist/engine/core/schema.cjs +21 -2
  6. package/dist/engine/core/schema.d.cts +4 -0
  7. package/dist/engine/core/schema.d.mts +4 -0
  8. package/dist/engine/core/schema.mjs +21 -3
  9. package/dist/engine/database/engineTransaction.cjs +21 -1
  10. package/dist/engine/database/engineTransaction.d.cts +5 -1
  11. package/dist/engine/database/engineTransaction.d.mts +5 -1
  12. package/dist/engine/database/engineTransaction.mjs +21 -1
  13. package/dist/engine/database/kv/kvAdapter.cjs +80 -4
  14. package/dist/engine/database/kv/kvAdapter.mjs +80 -4
  15. package/dist/engine/database/sql/sqlSchema.cjs +6 -2
  16. package/dist/engine/database/sql/sqlSchema.d.cts +1 -1
  17. package/dist/engine/database/sql/sqlSchema.d.mts +1 -1
  18. package/dist/engine/database/sql/sqlSchema.mjs +6 -2
  19. package/dist/engine/db/coreDatabase.cjs +10 -5
  20. package/dist/engine/db/coreDatabase.d.cts +2 -1
  21. package/dist/engine/db/coreDatabase.d.mts +2 -1
  22. package/dist/engine/db/coreDatabase.mjs +10 -5
  23. package/dist/engine/db/engineMigrator.cjs +21 -16
  24. package/dist/engine/db/engineMigrator.mjs +22 -17
  25. package/dist/engine/db/engineSqlMigrator.cjs +23 -22
  26. package/dist/engine/db/engineSqlMigrator.d.cts +2 -0
  27. package/dist/engine/db/engineSqlMigrator.d.mts +2 -0
  28. package/dist/engine/db/engineSqlMigrator.mjs +25 -24
  29. package/dist/engine/db/schemaSettings.cjs +36 -5
  30. package/dist/engine/db/schemaSettings.d.cts +5 -2
  31. package/dist/engine/db/schemaSettings.d.mts +5 -2
  32. package/dist/engine/db/schemaSettings.mjs +36 -6
  33. package/dist/engine/db/settingsMigrator.cjs +92 -14
  34. package/dist/engine/db/settingsMigrator.d.cts +18 -8
  35. package/dist/engine/db/settingsMigrator.d.mts +18 -8
  36. package/dist/engine/db/settingsMigrator.mjs +89 -15
  37. package/dist/engine/db/sqlSchemaState.cjs +108 -0
  38. package/dist/engine/db/sqlSchemaState.mjs +104 -0
  39. package/dist/engine/db/types.d.cts +6 -0
  40. package/dist/engine/db/types.d.mts +6 -0
  41. package/dist/index.cjs +1 -1
  42. package/dist/index.mjs +1 -1
  43. package/dist/serverPlugin/coreReads.d.cts +10 -1
  44. package/dist/serverPlugin/coreReads.d.mts +10 -1
  45. package/dist/types/databaseConfig.d.cts +2 -1
  46. package/dist/types/databaseConfig.d.mts +2 -1
  47. package/package.json +2 -2
@@ -51,7 +51,16 @@ interface CoreReads {
51
51
  latestReleaseId(scopeKey: string): Promise<string | null>;
52
52
  getReleaseCatalogRow(scopeKey: string): Promise<ReleaseCatalogRow | null>;
53
53
  listReleaseCatalogs(input: KeysetInput): Promise<ReleaseCatalogRow[]>;
54
- listChannels(): Promise<ChannelRow[]>;
54
+ /**
55
+ * Every channel, by name. With `input`, one keyset page of them, whose
56
+ * cursor is the last channel's name.
57
+ */
58
+ listChannels(input?: KeysetInput): Promise<ChannelRow[]>;
59
+ /**
60
+ * The channels of these IDs, in their order, without the IDs no channel
61
+ * has: one batch read of their keys.
62
+ */
63
+ getChannels(ids: readonly string[]): Promise<ChannelRow[]>;
55
64
  findChannelByName(name: string): Promise<ChannelRow | null>;
56
65
  }
57
66
  //#endregion
@@ -51,7 +51,16 @@ interface CoreReads {
51
51
  latestReleaseId(scopeKey: string): Promise<string | null>;
52
52
  getReleaseCatalogRow(scopeKey: string): Promise<ReleaseCatalogRow | null>;
53
53
  listReleaseCatalogs(input: KeysetInput): Promise<ReleaseCatalogRow[]>;
54
- listChannels(): Promise<ChannelRow[]>;
54
+ /**
55
+ * Every channel, by name. With `input`, one keyset page of them, whose
56
+ * cursor is the last channel's name.
57
+ */
58
+ listChannels(input?: KeysetInput): Promise<ChannelRow[]>;
59
+ /**
60
+ * The channels of these IDs, in their order, without the IDs no channel
61
+ * has: one batch read of their keys.
62
+ */
63
+ getChannels(ids: readonly string[]): Promise<ChannelRow[]>;
55
64
  findChannelByName(name: string): Promise<ChannelRow | null>;
56
65
  }
57
66
  //#endregion
@@ -35,7 +35,8 @@ interface EngineDatabase {
35
35
  /**
36
36
  * How a transaction that conflicts with another write runs again. A store
37
37
  * many writers contend on, such as DynamoDB under a burst of events, can
38
- * take more attempts; `onRetry` observes each rerun.
38
+ * take more attempts; `onRetry` observes each rerun. An aggregate write
39
+ * that lost to another writer's commit is resent without spending one.
39
40
  */
40
41
  readonly retry?: RetryOptions;
41
42
  dispose?(): Promise<void>;
@@ -35,7 +35,8 @@ interface EngineDatabase {
35
35
  /**
36
36
  * How a transaction that conflicts with another write runs again. A store
37
37
  * many writers contend on, such as DynamoDB under a burst of events, can
38
- * take more attempts; `onRetry` observes each rerun.
38
+ * take more attempts; `onRetry` observes each rerun. An aggregate write
39
+ * that lost to another writer's commit is resent without spending one.
39
40
  */
40
41
  readonly retry?: RetryOptions;
41
42
  dispose?(): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/plugin-core",
3
- "version": "1.2.0-rc.49",
3
+ "version": "1.2.0-rc.50",
4
4
  "type": "module",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "sideEffects": false,
@@ -45,7 +45,7 @@
45
45
  "es-toolkit": "^1.32.0",
46
46
  "mime": "^4.0.4",
47
47
  "verkit": "0.4.0",
48
- "@hot-updater/protocol": "1.2.0-rc.49"
48
+ "@hot-updater/protocol": "1.2.0-rc.50"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@electric-sql/pglite": "0.4.1",