@hot-updater/server 0.33.2 → 0.34.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/_virtual/_rolldown/runtime.cjs +0 -2
- package/dist/adapters/drizzle.cjs +195 -2
- package/dist/adapters/drizzle.d.cts +7 -4
- package/dist/adapters/drizzle.d.mts +7 -4
- package/dist/adapters/drizzle.mjs +194 -2
- package/dist/adapters/drizzleLazyDB.cjs +53 -0
- package/dist/adapters/drizzleLazyDB.mjs +53 -0
- package/dist/adapters/kysely.cjs +154 -3
- package/dist/adapters/kysely.d.cts +18 -10
- package/dist/adapters/kysely.d.mts +18 -10
- package/dist/adapters/kysely.mjs +153 -3
- package/dist/adapters/mongodb.cjs +183 -2
- package/dist/adapters/mongodb.d.cts +5 -4
- package/dist/adapters/mongodb.d.mts +5 -4
- package/dist/adapters/mongodb.mjs +183 -2
- package/dist/adapters/prisma.cjs +200 -2
- package/dist/adapters/prisma.d.cts +9 -4
- package/dist/adapters/prisma.d.mts +9 -4
- package/dist/adapters/prisma.mjs +199 -2
- package/dist/db/bundleRows.cjs +82 -0
- package/dist/db/bundleRows.d.cts +33 -0
- package/dist/db/bundleRows.d.mts +33 -0
- package/dist/db/bundleRows.mjs +79 -0
- package/dist/db/fixedMigrator.cjs +136 -0
- package/dist/db/fixedMigrator.mjs +135 -0
- package/dist/db/index.cjs +17 -15
- package/dist/db/index.d.cts +3 -3
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +17 -15
- package/dist/db/pluginCore.cjs +13 -5
- package/dist/db/pluginCore.mjs +13 -5
- package/dist/db/schema/mongodb.cjs +17 -0
- package/dist/db/schema/mongodb.mjs +17 -0
- package/dist/db/schema/registry.cjs +23 -0
- package/dist/db/schema/registry.mjs +18 -0
- package/dist/db/schema/sql.cjs +84 -0
- package/dist/db/schema/sql.mjs +78 -0
- package/dist/db/schema/sqlMigrations.cjs +74 -0
- package/dist/db/schema/sqlMigrations.mjs +73 -0
- package/dist/db/schema/sqlOperations.cjs +27 -0
- package/dist/db/schema/sqlOperations.mjs +26 -0
- package/dist/db/schemaEnhancements.cjs +1 -152
- package/dist/db/schemaEnhancements.mjs +1 -149
- package/dist/db/schemaGenerators.cjs +222 -0
- package/dist/db/schemaGenerators.mjs +220 -0
- package/dist/db/schemaReadiness.cjs +23 -0
- package/dist/db/schemaReadiness.d.cts +8 -0
- package/dist/db/schemaReadiness.d.mts +8 -0
- package/dist/db/schemaReadiness.mjs +22 -0
- package/dist/db/types.cjs +10 -2
- package/dist/db/types.d.cts +58 -14
- package/dist/db/types.d.mts +58 -14
- package/dist/db/types.mjs +9 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +3 -2
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +2 -2
- package/dist/{packages/server/package.cjs → package.cjs} +1 -1
- package/dist/{packages/server/package.mjs → package.mjs} +1 -1
- package/dist/runtime.cjs +9 -2
- package/dist/runtime.mjs +9 -2
- package/dist/schema/dsl.cjs +86 -0
- package/dist/schema/dsl.mjs +73 -0
- package/dist/schema/index.cjs +13 -0
- package/dist/schema/index.mjs +13 -0
- package/dist/schema/settings.cjs +9 -0
- package/dist/schema/settings.mjs +9 -0
- package/dist/schema/types.cjs +6 -0
- package/dist/schema/types.mjs +5 -0
- package/dist/schema/v0_21_0.cjs +33 -18
- package/dist/schema/v0_21_0.mjs +32 -18
- package/dist/schema/v0_29_0.cjs +40 -20
- package/dist/schema/v0_29_0.mjs +39 -20
- package/dist/schema/v0_31_0.cjs +77 -43
- package/dist/schema/v0_31_0.mjs +75 -43
- package/dist/version.cjs +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +30 -16
- package/src/adapters/drizzle.spec.ts +75 -0
- package/src/adapters/drizzle.ts +328 -12
- package/src/adapters/drizzleLazyDB.ts +151 -0
- package/src/adapters/kysely.spec.ts +107 -0
- package/src/adapters/kysely.ts +349 -14
- package/src/adapters/mongodb.ts +298 -15
- package/src/adapters/prisma.ts +337 -12
- package/src/db/bundleRows.ts +140 -0
- package/src/db/fixedMigrator.spec.ts +89 -0
- package/src/db/fixedMigrator.ts +288 -0
- package/src/db/hotUpdaterSchema.ts +6 -0
- package/src/db/index.spec.ts +976 -13
- package/src/db/index.ts +37 -36
- package/src/db/pluginCore.spec.ts +17 -11
- package/src/db/pluginCore.ts +15 -6
- package/src/db/schema/definitions.ts +1 -0
- package/src/db/schema/mongodb.ts +26 -0
- package/src/db/schema/registry.ts +55 -0
- package/src/db/schema/sql.ts +200 -0
- package/src/db/schema/sqlMigrations.ts +219 -0
- package/src/db/schema/sqlOperations.ts +62 -0
- package/src/db/schema/types.ts +1 -0
- package/src/db/schemaEnhancements.ts +0 -405
- package/src/db/schemaGenerators.ts +382 -0
- package/src/db/schemaReadiness.ts +33 -0
- package/src/db/types.ts +69 -25
- package/src/runtime.spec.ts +70 -0
- package/src/runtime.ts +14 -2
- package/src/schema/dsl-all-versions.spec.ts +26 -0
- package/src/schema/dsl.ts +148 -0
- package/src/schema/index.ts +16 -0
- package/src/schema/settings.ts +15 -0
- package/src/schema/types.ts +73 -0
- package/src/schema/v0_21_0.ts +48 -18
- package/src/schema/v0_29_0.ts +58 -22
- package/src/schema/v0_31_0.spec.ts +73 -0
- package/src/schema/v0_31_0.ts +116 -54
- package/dist/_virtual/_rolldown/runtime.mjs +0 -6
- package/dist/calculatePagination.cjs +0 -25
- package/dist/calculatePagination.mjs +0 -25
- package/dist/db/ormCore.cjs +0 -577
- package/dist/db/ormCore.d.cts +0 -110
- package/dist/db/ormCore.d.mts +0 -110
- package/dist/db/ormCore.mjs +0 -575
- package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/_u64.cjs +0 -112
- package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/_u64.mjs +0 -108
- package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/cryptoNode.cjs +0 -22
- package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/cryptoNode.mjs +0 -18
- package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/sha3.cjs +0 -219
- package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/sha3.mjs +0 -214
- package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/utils.cjs +0 -275
- package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/utils.mjs +0 -270
- package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/index.cjs +0 -17
- package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/index.mjs +0 -13
- package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/src/index.cjs +0 -69
- package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/src/index.mjs +0 -65
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/column.cjs +0 -52
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/column.mjs +0 -52
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/entity.cjs +0 -16
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/entity.mjs +0 -15
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/pg-core/columns/enum.cjs +0 -7
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/pg-core/columns/enum.mjs +0 -7
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/sql/expressions/conditions.cjs +0 -92
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/sql/expressions/conditions.mjs +0 -78
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/sql/expressions/select.cjs +0 -11
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/sql/expressions/select.mjs +0 -10
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/sql/sql.cjs +0 -383
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/sql/sql.mjs +0 -366
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/subquery.cjs +0 -17
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/subquery.mjs +0 -17
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/table.cjs +0 -60
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/table.mjs +0 -59
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/table.utils.cjs +0 -4
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/table.utils.mjs +0 -4
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/tracing.cjs +0 -6
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/tracing.mjs +0 -6
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/view-common.cjs +0 -4
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/view-common.mjs +0 -4
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/drizzle/index.cjs +0 -383
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/drizzle/index.d.cts +0 -12
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/drizzle/index.d.mts +0 -12
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/drizzle/index.mjs +0 -383
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/kysely/index.cjs +0 -4
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/kysely/index.mjs +0 -5
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/prisma/index.cjs +0 -339
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/prisma/index.d.cts +0 -70
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/prisma/index.d.mts +0 -70
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/prisma/index.mjs +0 -339
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-7PZK4ONR.cjs +0 -57
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-7PZK4ONR.mjs +0 -56
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-C6OTUURW.cjs +0 -330
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-C6OTUURW.mjs +0 -326
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-CHTIKPQU.cjs +0 -166
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-CHTIKPQU.mjs +0 -163
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-GUE4GMNC.cjs +0 -14
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-GUE4GMNC.mjs +0 -13
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-LHHP6UVP.cjs +0 -24
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-LHHP6UVP.mjs +0 -24
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-LVCPMTAT.cjs +0 -1190
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-LVCPMTAT.mjs +0 -1189
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-PK2W2SQ7.cjs +0 -197
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-PK2W2SQ7.mjs +0 -197
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-ZEQMAIFI.cjs +0 -410
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-ZEQMAIFI.mjs +0 -400
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-ZOCGSAWS.cjs +0 -213
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-ZOCGSAWS.mjs +0 -212
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/create-tg0451Y_.d.cts +0 -285
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/create-tg0451Y_.d.mts +0 -285
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/index-CMqePMTF.d.cts +0 -45
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/index-CMqePMTF.d.mts +0 -45
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/index.cjs +0 -69
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/index.d.cts +0 -49
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/index.d.mts +0 -49
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/index.mjs +0 -67
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/query/index.d.cts +0 -156
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/query/index.d.mts +0 -156
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/schema/index.cjs +0 -1
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/schema/index.mjs +0 -2
- package/src/db/ormCore.ts +0 -1059
- package/src/db/ormUpdateCheck.bench.ts +0 -262
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
//#region src/schema/dsl.ts
|
|
2
|
+
const withDsl = (value, dsl) => Object.defineProperty(value, "dsl", {
|
|
3
|
+
enumerable: false,
|
|
4
|
+
value: dsl
|
|
5
|
+
});
|
|
6
|
+
const defaultValue = (value) => typeof value === "object" ? {
|
|
7
|
+
type: "json",
|
|
8
|
+
value
|
|
9
|
+
} : {
|
|
10
|
+
type: "literal",
|
|
11
|
+
value
|
|
12
|
+
};
|
|
13
|
+
const columnSchema = (column) => ({
|
|
14
|
+
ormName: column.ormName,
|
|
15
|
+
type: column.type,
|
|
16
|
+
...column.nullableValue ? { nullable: true } : {},
|
|
17
|
+
...column.primaryKeyValue ? { primaryKey: true } : {},
|
|
18
|
+
...column.default ? { default: column.default } : {}
|
|
19
|
+
});
|
|
20
|
+
const createColumn = (state) => ({
|
|
21
|
+
dsl: "column",
|
|
22
|
+
ormName: state.ormName,
|
|
23
|
+
type: state.type,
|
|
24
|
+
...state.nullableValue ? { nullableValue: true } : {},
|
|
25
|
+
...state.primaryKeyValue ? { primaryKeyValue: true } : {},
|
|
26
|
+
...state.default ? { default: state.default } : {},
|
|
27
|
+
nullable: () => createColumn({
|
|
28
|
+
...state,
|
|
29
|
+
nullableValue: true
|
|
30
|
+
}),
|
|
31
|
+
primaryKey: () => createColumn({
|
|
32
|
+
...state,
|
|
33
|
+
primaryKeyValue: true
|
|
34
|
+
}),
|
|
35
|
+
defaultTo: (value) => createColumn({
|
|
36
|
+
...state,
|
|
37
|
+
default: defaultValue(value)
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
const varchar = (length) => `varchar(${length})`;
|
|
41
|
+
const column = (ormName, type) => createColumn({
|
|
42
|
+
ormName,
|
|
43
|
+
type
|
|
44
|
+
});
|
|
45
|
+
const idColumn = (ormName, type) => column(ormName, type).primaryKey();
|
|
46
|
+
const uuid = (ormName) => column(ormName, "uuid");
|
|
47
|
+
const integer = (ormName) => column(ormName, "integer");
|
|
48
|
+
const bool = (ormName) => column(ormName, "bool");
|
|
49
|
+
const json = (ormName) => column(ormName, "json");
|
|
50
|
+
const stringColumn = (ormName) => column(ormName, "string");
|
|
51
|
+
const index = (name, columns, providers) => ({
|
|
52
|
+
name,
|
|
53
|
+
columns,
|
|
54
|
+
...providers ? { providers } : {}
|
|
55
|
+
});
|
|
56
|
+
const foreignKey = (name, columns, referencedTable, referencedColumns) => ({
|
|
57
|
+
name,
|
|
58
|
+
columns,
|
|
59
|
+
referencedTable,
|
|
60
|
+
referencedColumns,
|
|
61
|
+
onUpdate: "restrict",
|
|
62
|
+
onDelete: "cascade"
|
|
63
|
+
});
|
|
64
|
+
const check = (config) => config;
|
|
65
|
+
const relation = (config) => config;
|
|
66
|
+
const table = (ormName, columns, extras = {}) => withDsl({
|
|
67
|
+
ormName,
|
|
68
|
+
columns: Object.values(columns).map(columnSchema),
|
|
69
|
+
...extras
|
|
70
|
+
}, "table");
|
|
71
|
+
const schema = (value) => withDsl({ ...value }, "schema");
|
|
72
|
+
//#endregion
|
|
73
|
+
exports.bool = bool;
|
|
74
|
+
exports.check = check;
|
|
75
|
+
exports.column = column;
|
|
76
|
+
exports.foreignKey = foreignKey;
|
|
77
|
+
exports.idColumn = idColumn;
|
|
78
|
+
exports.index = index;
|
|
79
|
+
exports.integer = integer;
|
|
80
|
+
exports.json = json;
|
|
81
|
+
exports.relation = relation;
|
|
82
|
+
exports.schema = schema;
|
|
83
|
+
exports.stringColumn = stringColumn;
|
|
84
|
+
exports.table = table;
|
|
85
|
+
exports.uuid = uuid;
|
|
86
|
+
exports.varchar = varchar;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
//#region src/schema/dsl.ts
|
|
2
|
+
const withDsl = (value, dsl) => Object.defineProperty(value, "dsl", {
|
|
3
|
+
enumerable: false,
|
|
4
|
+
value: dsl
|
|
5
|
+
});
|
|
6
|
+
const defaultValue = (value) => typeof value === "object" ? {
|
|
7
|
+
type: "json",
|
|
8
|
+
value
|
|
9
|
+
} : {
|
|
10
|
+
type: "literal",
|
|
11
|
+
value
|
|
12
|
+
};
|
|
13
|
+
const columnSchema = (column) => ({
|
|
14
|
+
ormName: column.ormName,
|
|
15
|
+
type: column.type,
|
|
16
|
+
...column.nullableValue ? { nullable: true } : {},
|
|
17
|
+
...column.primaryKeyValue ? { primaryKey: true } : {},
|
|
18
|
+
...column.default ? { default: column.default } : {}
|
|
19
|
+
});
|
|
20
|
+
const createColumn = (state) => ({
|
|
21
|
+
dsl: "column",
|
|
22
|
+
ormName: state.ormName,
|
|
23
|
+
type: state.type,
|
|
24
|
+
...state.nullableValue ? { nullableValue: true } : {},
|
|
25
|
+
...state.primaryKeyValue ? { primaryKeyValue: true } : {},
|
|
26
|
+
...state.default ? { default: state.default } : {},
|
|
27
|
+
nullable: () => createColumn({
|
|
28
|
+
...state,
|
|
29
|
+
nullableValue: true
|
|
30
|
+
}),
|
|
31
|
+
primaryKey: () => createColumn({
|
|
32
|
+
...state,
|
|
33
|
+
primaryKeyValue: true
|
|
34
|
+
}),
|
|
35
|
+
defaultTo: (value) => createColumn({
|
|
36
|
+
...state,
|
|
37
|
+
default: defaultValue(value)
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
const varchar = (length) => `varchar(${length})`;
|
|
41
|
+
const column = (ormName, type) => createColumn({
|
|
42
|
+
ormName,
|
|
43
|
+
type
|
|
44
|
+
});
|
|
45
|
+
const idColumn = (ormName, type) => column(ormName, type).primaryKey();
|
|
46
|
+
const uuid = (ormName) => column(ormName, "uuid");
|
|
47
|
+
const integer = (ormName) => column(ormName, "integer");
|
|
48
|
+
const bool = (ormName) => column(ormName, "bool");
|
|
49
|
+
const json = (ormName) => column(ormName, "json");
|
|
50
|
+
const stringColumn = (ormName) => column(ormName, "string");
|
|
51
|
+
const index = (name, columns, providers) => ({
|
|
52
|
+
name,
|
|
53
|
+
columns,
|
|
54
|
+
...providers ? { providers } : {}
|
|
55
|
+
});
|
|
56
|
+
const foreignKey = (name, columns, referencedTable, referencedColumns) => ({
|
|
57
|
+
name,
|
|
58
|
+
columns,
|
|
59
|
+
referencedTable,
|
|
60
|
+
referencedColumns,
|
|
61
|
+
onUpdate: "restrict",
|
|
62
|
+
onDelete: "cascade"
|
|
63
|
+
});
|
|
64
|
+
const check = (config) => config;
|
|
65
|
+
const relation = (config) => config;
|
|
66
|
+
const table = (ormName, columns, extras = {}) => withDsl({
|
|
67
|
+
ormName,
|
|
68
|
+
columns: Object.values(columns).map(columnSchema),
|
|
69
|
+
...extras
|
|
70
|
+
}, "table");
|
|
71
|
+
const schema = (value) => withDsl({ ...value }, "schema");
|
|
72
|
+
//#endregion
|
|
73
|
+
export { bool, check, column, foreignKey, idColumn, index, integer, json, relation, schema, stringColumn, table, uuid, varchar };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require("./types.cjs");
|
|
2
|
+
require("./settings.cjs");
|
|
3
|
+
const require_v0_21_0 = require("./v0_21_0.cjs");
|
|
4
|
+
const require_v0_29_0 = require("./v0_29_0.cjs");
|
|
5
|
+
const require_v0_31_0 = require("./v0_31_0.cjs");
|
|
6
|
+
//#region src/schema/index.ts
|
|
7
|
+
const hotUpdaterSchemaVersions = [
|
|
8
|
+
require_v0_21_0.v0_21_0,
|
|
9
|
+
require_v0_29_0.v0_29_0,
|
|
10
|
+
require_v0_31_0.v0_31_0
|
|
11
|
+
];
|
|
12
|
+
//#endregion
|
|
13
|
+
exports.hotUpdaterSchemaVersions = hotUpdaterSchemaVersions;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./types.mjs";
|
|
2
|
+
import "./settings.mjs";
|
|
3
|
+
import { v0_21_0 } from "./v0_21_0.mjs";
|
|
4
|
+
import { v0_29_0 } from "./v0_29_0.mjs";
|
|
5
|
+
import { v0_31_0 } from "./v0_31_0.mjs";
|
|
6
|
+
//#region src/schema/index.ts
|
|
7
|
+
const hotUpdaterSchemaVersions = [
|
|
8
|
+
v0_21_0,
|
|
9
|
+
v0_29_0,
|
|
10
|
+
v0_31_0
|
|
11
|
+
];
|
|
12
|
+
//#endregion
|
|
13
|
+
export { hotUpdaterSchemaVersions };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const require_types = require("./types.cjs");
|
|
2
|
+
const require_dsl = require("./dsl.cjs");
|
|
3
|
+
//#region src/schema/settings.ts
|
|
4
|
+
const createSettingsTable = (version) => require_dsl.table(require_types.HOT_UPDATER_SETTINGS_TABLE, {
|
|
5
|
+
key: require_dsl.idColumn("key", require_dsl.varchar(255)),
|
|
6
|
+
value: require_dsl.stringColumn("value").defaultTo(version)
|
|
7
|
+
}, { internal: true });
|
|
8
|
+
//#endregion
|
|
9
|
+
exports.createSettingsTable = createSettingsTable;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HOT_UPDATER_SETTINGS_TABLE } from "./types.mjs";
|
|
2
|
+
import { idColumn, stringColumn, table, varchar } from "./dsl.mjs";
|
|
3
|
+
//#region src/schema/settings.ts
|
|
4
|
+
const createSettingsTable = (version) => table(HOT_UPDATER_SETTINGS_TABLE, {
|
|
5
|
+
key: idColumn("key", varchar(255)),
|
|
6
|
+
value: stringColumn("value").defaultTo(version)
|
|
7
|
+
}, { internal: true });
|
|
8
|
+
//#endregion
|
|
9
|
+
export { createSettingsTable };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/schema/types.ts
|
|
2
|
+
const HOT_UPDATER_SCHEMA_VERSION = "0.31.0";
|
|
3
|
+
const HOT_UPDATER_SETTINGS_TABLE = "private_hot_updater_settings";
|
|
4
|
+
//#endregion
|
|
5
|
+
exports.HOT_UPDATER_SCHEMA_VERSION = HOT_UPDATER_SCHEMA_VERSION;
|
|
6
|
+
exports.HOT_UPDATER_SETTINGS_TABLE = HOT_UPDATER_SETTINGS_TABLE;
|
package/dist/schema/v0_21_0.cjs
CHANGED
|
@@ -1,23 +1,38 @@
|
|
|
1
|
-
const
|
|
2
|
-
require("
|
|
1
|
+
const require_types = require("./types.cjs");
|
|
2
|
+
const require_dsl = require("./dsl.cjs");
|
|
3
|
+
const require_settings = require("./settings.cjs");
|
|
3
4
|
//#region src/schema/v0_21_0.ts
|
|
4
|
-
const
|
|
5
|
+
const bundlesV021 = require_dsl.table("bundles", {
|
|
6
|
+
id: require_dsl.idColumn("id", "uuid"),
|
|
7
|
+
platform: require_dsl.stringColumn("platform"),
|
|
8
|
+
should_force_update: require_dsl.bool("should_force_update"),
|
|
9
|
+
enabled: require_dsl.bool("enabled"),
|
|
10
|
+
file_hash: require_dsl.stringColumn("file_hash"),
|
|
11
|
+
git_commit_hash: require_dsl.stringColumn("git_commit_hash").nullable(),
|
|
12
|
+
message: require_dsl.stringColumn("message").nullable(),
|
|
13
|
+
channel: require_dsl.stringColumn("channel").defaultTo("production"),
|
|
14
|
+
storage_uri: require_dsl.stringColumn("storage_uri"),
|
|
15
|
+
target_app_version: require_dsl.stringColumn("target_app_version").nullable(),
|
|
16
|
+
fingerprint_hash: require_dsl.stringColumn("fingerprint_hash").nullable(),
|
|
17
|
+
metadata: require_dsl.json("metadata").defaultTo({})
|
|
18
|
+
}, {
|
|
19
|
+
indexes: [
|
|
20
|
+
require_dsl.index("bundles_target_app_version_idx", ["target_app_version"]),
|
|
21
|
+
require_dsl.index("bundles_fingerprint_hash_idx", ["fingerprint_hash"]),
|
|
22
|
+
require_dsl.index("bundles_channel_idx", ["channel"]),
|
|
23
|
+
require_dsl.index("bundles_platform_idx", ["platform"], ["mongodb"])
|
|
24
|
+
],
|
|
25
|
+
checks: [require_dsl.check({
|
|
26
|
+
name: "check_version_or_fingerprint",
|
|
27
|
+
expression: "(target_app_version is not null) or (fingerprint_hash is not null)",
|
|
28
|
+
sqliteInline: true
|
|
29
|
+
})]
|
|
30
|
+
});
|
|
31
|
+
const v0_21_0 = require_dsl.schema({
|
|
5
32
|
version: "0.21.0",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
platform: require_chunk_ZEQMAIFI.column("platform", "string"),
|
|
9
|
-
should_force_update: require_chunk_ZEQMAIFI.column("should_force_update", "bool"),
|
|
10
|
-
enabled: require_chunk_ZEQMAIFI.column("enabled", "bool"),
|
|
11
|
-
file_hash: require_chunk_ZEQMAIFI.column("file_hash", "string"),
|
|
12
|
-
git_commit_hash: require_chunk_ZEQMAIFI.column("git_commit_hash", "string").nullable(),
|
|
13
|
-
message: require_chunk_ZEQMAIFI.column("message", "string").nullable(),
|
|
14
|
-
channel: require_chunk_ZEQMAIFI.column("channel", "string").defaultTo("production"),
|
|
15
|
-
storage_uri: require_chunk_ZEQMAIFI.column("storage_uri", "string"),
|
|
16
|
-
target_app_version: require_chunk_ZEQMAIFI.column("target_app_version", "string").nullable(),
|
|
17
|
-
fingerprint_hash: require_chunk_ZEQMAIFI.column("fingerprint_hash", "string").nullable(),
|
|
18
|
-
metadata: require_chunk_ZEQMAIFI.column("metadata", "json")
|
|
19
|
-
}) },
|
|
20
|
-
relations: {}
|
|
33
|
+
settingsTable: require_types.HOT_UPDATER_SETTINGS_TABLE,
|
|
34
|
+
tables: [bundlesV021, require_settings.createSettingsTable("0.21.0")]
|
|
21
35
|
});
|
|
22
36
|
//#endregion
|
|
37
|
+
exports.bundlesV021 = bundlesV021;
|
|
23
38
|
exports.v0_21_0 = v0_21_0;
|
package/dist/schema/v0_21_0.mjs
CHANGED
|
@@ -1,23 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
1
|
+
import { HOT_UPDATER_SETTINGS_TABLE } from "./types.mjs";
|
|
2
|
+
import { bool, check, idColumn, index, json, schema, stringColumn, table } from "./dsl.mjs";
|
|
3
|
+
import { createSettingsTable } from "./settings.mjs";
|
|
3
4
|
//#region src/schema/v0_21_0.ts
|
|
5
|
+
const bundlesV021 = table("bundles", {
|
|
6
|
+
id: idColumn("id", "uuid"),
|
|
7
|
+
platform: stringColumn("platform"),
|
|
8
|
+
should_force_update: bool("should_force_update"),
|
|
9
|
+
enabled: bool("enabled"),
|
|
10
|
+
file_hash: stringColumn("file_hash"),
|
|
11
|
+
git_commit_hash: stringColumn("git_commit_hash").nullable(),
|
|
12
|
+
message: stringColumn("message").nullable(),
|
|
13
|
+
channel: stringColumn("channel").defaultTo("production"),
|
|
14
|
+
storage_uri: stringColumn("storage_uri"),
|
|
15
|
+
target_app_version: stringColumn("target_app_version").nullable(),
|
|
16
|
+
fingerprint_hash: stringColumn("fingerprint_hash").nullable(),
|
|
17
|
+
metadata: json("metadata").defaultTo({})
|
|
18
|
+
}, {
|
|
19
|
+
indexes: [
|
|
20
|
+
index("bundles_target_app_version_idx", ["target_app_version"]),
|
|
21
|
+
index("bundles_fingerprint_hash_idx", ["fingerprint_hash"]),
|
|
22
|
+
index("bundles_channel_idx", ["channel"]),
|
|
23
|
+
index("bundles_platform_idx", ["platform"], ["mongodb"])
|
|
24
|
+
],
|
|
25
|
+
checks: [check({
|
|
26
|
+
name: "check_version_or_fingerprint",
|
|
27
|
+
expression: "(target_app_version is not null) or (fingerprint_hash is not null)",
|
|
28
|
+
sqliteInline: true
|
|
29
|
+
})]
|
|
30
|
+
});
|
|
4
31
|
const v0_21_0 = schema({
|
|
5
32
|
version: "0.21.0",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
platform: column("platform", "string"),
|
|
9
|
-
should_force_update: column("should_force_update", "bool"),
|
|
10
|
-
enabled: column("enabled", "bool"),
|
|
11
|
-
file_hash: column("file_hash", "string"),
|
|
12
|
-
git_commit_hash: column("git_commit_hash", "string").nullable(),
|
|
13
|
-
message: column("message", "string").nullable(),
|
|
14
|
-
channel: column("channel", "string").defaultTo("production"),
|
|
15
|
-
storage_uri: column("storage_uri", "string"),
|
|
16
|
-
target_app_version: column("target_app_version", "string").nullable(),
|
|
17
|
-
fingerprint_hash: column("fingerprint_hash", "string").nullable(),
|
|
18
|
-
metadata: column("metadata", "json")
|
|
19
|
-
}) },
|
|
20
|
-
relations: {}
|
|
33
|
+
settingsTable: HOT_UPDATER_SETTINGS_TABLE,
|
|
34
|
+
tables: [bundlesV021, createSettingsTable("0.21.0")]
|
|
21
35
|
});
|
|
22
36
|
//#endregion
|
|
23
|
-
export { v0_21_0 };
|
|
37
|
+
export { bundlesV021, v0_21_0 };
|
package/dist/schema/v0_29_0.cjs
CHANGED
|
@@ -1,25 +1,45 @@
|
|
|
1
|
-
const
|
|
2
|
-
require("
|
|
1
|
+
const require_types = require("./types.cjs");
|
|
2
|
+
const require_dsl = require("./dsl.cjs");
|
|
3
|
+
const require_settings = require("./settings.cjs");
|
|
3
4
|
//#region src/schema/v0_29_0.ts
|
|
4
|
-
const
|
|
5
|
+
const bundlesV029 = require_dsl.table("bundles", {
|
|
6
|
+
id: require_dsl.idColumn("id", "uuid"),
|
|
7
|
+
platform: require_dsl.stringColumn("platform"),
|
|
8
|
+
should_force_update: require_dsl.bool("should_force_update"),
|
|
9
|
+
enabled: require_dsl.bool("enabled"),
|
|
10
|
+
file_hash: require_dsl.stringColumn("file_hash"),
|
|
11
|
+
git_commit_hash: require_dsl.stringColumn("git_commit_hash").nullable(),
|
|
12
|
+
message: require_dsl.stringColumn("message").nullable(),
|
|
13
|
+
channel: require_dsl.stringColumn("channel").defaultTo("production"),
|
|
14
|
+
storage_uri: require_dsl.stringColumn("storage_uri"),
|
|
15
|
+
target_app_version: require_dsl.stringColumn("target_app_version").nullable(),
|
|
16
|
+
fingerprint_hash: require_dsl.stringColumn("fingerprint_hash").nullable(),
|
|
17
|
+
metadata: require_dsl.json("metadata").defaultTo({}),
|
|
18
|
+
rollout_cohort_count: require_dsl.integer("rollout_cohort_count").defaultTo(1e3),
|
|
19
|
+
target_cohorts: require_dsl.json("target_cohorts").nullable()
|
|
20
|
+
}, {
|
|
21
|
+
indexes: [
|
|
22
|
+
require_dsl.index("bundles_target_app_version_idx", ["target_app_version"]),
|
|
23
|
+
require_dsl.index("bundles_fingerprint_hash_idx", ["fingerprint_hash"]),
|
|
24
|
+
require_dsl.index("bundles_channel_idx", ["channel"]),
|
|
25
|
+
require_dsl.index("bundles_platform_idx", ["platform"], ["mongodb"]),
|
|
26
|
+
require_dsl.index("bundles_rollout_idx", ["rollout_cohort_count"])
|
|
27
|
+
],
|
|
28
|
+
checks: [require_dsl.check({
|
|
29
|
+
name: "check_version_or_fingerprint",
|
|
30
|
+
expression: "(target_app_version is not null) or (fingerprint_hash is not null)",
|
|
31
|
+
sqliteInline: true
|
|
32
|
+
}), require_dsl.check({
|
|
33
|
+
name: "bundles_rollout_cohort_count_check",
|
|
34
|
+
expression: "rollout_cohort_count >= 0 and rollout_cohort_count <= 1000",
|
|
35
|
+
sqliteInline: true
|
|
36
|
+
})]
|
|
37
|
+
});
|
|
38
|
+
const v0_29_0 = require_dsl.schema({
|
|
5
39
|
version: "0.29.0",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
platform: require_chunk_ZEQMAIFI.column("platform", "string"),
|
|
9
|
-
should_force_update: require_chunk_ZEQMAIFI.column("should_force_update", "bool"),
|
|
10
|
-
enabled: require_chunk_ZEQMAIFI.column("enabled", "bool"),
|
|
11
|
-
file_hash: require_chunk_ZEQMAIFI.column("file_hash", "string"),
|
|
12
|
-
git_commit_hash: require_chunk_ZEQMAIFI.column("git_commit_hash", "string").nullable(),
|
|
13
|
-
message: require_chunk_ZEQMAIFI.column("message", "string").nullable(),
|
|
14
|
-
channel: require_chunk_ZEQMAIFI.column("channel", "string").defaultTo("production"),
|
|
15
|
-
storage_uri: require_chunk_ZEQMAIFI.column("storage_uri", "string"),
|
|
16
|
-
target_app_version: require_chunk_ZEQMAIFI.column("target_app_version", "string").nullable(),
|
|
17
|
-
fingerprint_hash: require_chunk_ZEQMAIFI.column("fingerprint_hash", "string").nullable(),
|
|
18
|
-
metadata: require_chunk_ZEQMAIFI.column("metadata", "json"),
|
|
19
|
-
rollout_cohort_count: require_chunk_ZEQMAIFI.column("rollout_cohort_count", "integer").defaultTo(1e3),
|
|
20
|
-
target_cohorts: require_chunk_ZEQMAIFI.column("target_cohorts", "json").nullable()
|
|
21
|
-
}) },
|
|
22
|
-
relations: {}
|
|
40
|
+
settingsTable: require_types.HOT_UPDATER_SETTINGS_TABLE,
|
|
41
|
+
tables: [bundlesV029, require_settings.createSettingsTable("0.29.0")]
|
|
23
42
|
});
|
|
24
43
|
//#endregion
|
|
44
|
+
exports.bundlesV029 = bundlesV029;
|
|
25
45
|
exports.v0_29_0 = v0_29_0;
|
package/dist/schema/v0_29_0.mjs
CHANGED
|
@@ -1,25 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
1
|
+
import { HOT_UPDATER_SETTINGS_TABLE } from "./types.mjs";
|
|
2
|
+
import { bool, check, idColumn, index, integer, json, schema, stringColumn, table } from "./dsl.mjs";
|
|
3
|
+
import { createSettingsTable } from "./settings.mjs";
|
|
3
4
|
//#region src/schema/v0_29_0.ts
|
|
5
|
+
const bundlesV029 = table("bundles", {
|
|
6
|
+
id: idColumn("id", "uuid"),
|
|
7
|
+
platform: stringColumn("platform"),
|
|
8
|
+
should_force_update: bool("should_force_update"),
|
|
9
|
+
enabled: bool("enabled"),
|
|
10
|
+
file_hash: stringColumn("file_hash"),
|
|
11
|
+
git_commit_hash: stringColumn("git_commit_hash").nullable(),
|
|
12
|
+
message: stringColumn("message").nullable(),
|
|
13
|
+
channel: stringColumn("channel").defaultTo("production"),
|
|
14
|
+
storage_uri: stringColumn("storage_uri"),
|
|
15
|
+
target_app_version: stringColumn("target_app_version").nullable(),
|
|
16
|
+
fingerprint_hash: stringColumn("fingerprint_hash").nullable(),
|
|
17
|
+
metadata: json("metadata").defaultTo({}),
|
|
18
|
+
rollout_cohort_count: integer("rollout_cohort_count").defaultTo(1e3),
|
|
19
|
+
target_cohorts: json("target_cohorts").nullable()
|
|
20
|
+
}, {
|
|
21
|
+
indexes: [
|
|
22
|
+
index("bundles_target_app_version_idx", ["target_app_version"]),
|
|
23
|
+
index("bundles_fingerprint_hash_idx", ["fingerprint_hash"]),
|
|
24
|
+
index("bundles_channel_idx", ["channel"]),
|
|
25
|
+
index("bundles_platform_idx", ["platform"], ["mongodb"]),
|
|
26
|
+
index("bundles_rollout_idx", ["rollout_cohort_count"])
|
|
27
|
+
],
|
|
28
|
+
checks: [check({
|
|
29
|
+
name: "check_version_or_fingerprint",
|
|
30
|
+
expression: "(target_app_version is not null) or (fingerprint_hash is not null)",
|
|
31
|
+
sqliteInline: true
|
|
32
|
+
}), check({
|
|
33
|
+
name: "bundles_rollout_cohort_count_check",
|
|
34
|
+
expression: "rollout_cohort_count >= 0 and rollout_cohort_count <= 1000",
|
|
35
|
+
sqliteInline: true
|
|
36
|
+
})]
|
|
37
|
+
});
|
|
4
38
|
const v0_29_0 = schema({
|
|
5
39
|
version: "0.29.0",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
platform: column("platform", "string"),
|
|
9
|
-
should_force_update: column("should_force_update", "bool"),
|
|
10
|
-
enabled: column("enabled", "bool"),
|
|
11
|
-
file_hash: column("file_hash", "string"),
|
|
12
|
-
git_commit_hash: column("git_commit_hash", "string").nullable(),
|
|
13
|
-
message: column("message", "string").nullable(),
|
|
14
|
-
channel: column("channel", "string").defaultTo("production"),
|
|
15
|
-
storage_uri: column("storage_uri", "string"),
|
|
16
|
-
target_app_version: column("target_app_version", "string").nullable(),
|
|
17
|
-
fingerprint_hash: column("fingerprint_hash", "string").nullable(),
|
|
18
|
-
metadata: column("metadata", "json"),
|
|
19
|
-
rollout_cohort_count: column("rollout_cohort_count", "integer").defaultTo(1e3),
|
|
20
|
-
target_cohorts: column("target_cohorts", "json").nullable()
|
|
21
|
-
}) },
|
|
22
|
-
relations: {}
|
|
40
|
+
settingsTable: HOT_UPDATER_SETTINGS_TABLE,
|
|
41
|
+
tables: [bundlesV029, createSettingsTable("0.29.0")]
|
|
23
42
|
});
|
|
24
43
|
//#endregion
|
|
25
|
-
export { v0_29_0 };
|
|
44
|
+
export { bundlesV029, v0_29_0 };
|
package/dist/schema/v0_31_0.cjs
CHANGED
|
@@ -1,48 +1,82 @@
|
|
|
1
|
-
const
|
|
2
|
-
require("
|
|
1
|
+
const require_types = require("./types.cjs");
|
|
2
|
+
const require_dsl = require("./dsl.cjs");
|
|
3
|
+
const require_settings = require("./settings.cjs");
|
|
3
4
|
//#region src/schema/v0_31_0.ts
|
|
4
|
-
const
|
|
5
|
+
const bundlesV031 = require_dsl.table("bundles", {
|
|
6
|
+
id: require_dsl.idColumn("id", "uuid"),
|
|
7
|
+
platform: require_dsl.stringColumn("platform"),
|
|
8
|
+
should_force_update: require_dsl.bool("should_force_update"),
|
|
9
|
+
enabled: require_dsl.bool("enabled"),
|
|
10
|
+
file_hash: require_dsl.stringColumn("file_hash"),
|
|
11
|
+
git_commit_hash: require_dsl.stringColumn("git_commit_hash").nullable(),
|
|
12
|
+
message: require_dsl.stringColumn("message").nullable(),
|
|
13
|
+
channel: require_dsl.stringColumn("channel").defaultTo("production"),
|
|
14
|
+
storage_uri: require_dsl.stringColumn("storage_uri"),
|
|
15
|
+
target_app_version: require_dsl.stringColumn("target_app_version").nullable(),
|
|
16
|
+
fingerprint_hash: require_dsl.stringColumn("fingerprint_hash").nullable(),
|
|
17
|
+
metadata: require_dsl.json("metadata").defaultTo({}),
|
|
18
|
+
rollout_cohort_count: require_dsl.integer("rollout_cohort_count").defaultTo(1e3),
|
|
19
|
+
target_cohorts: require_dsl.json("target_cohorts").nullable(),
|
|
20
|
+
manifest_storage_uri: require_dsl.stringColumn("manifest_storage_uri").nullable(),
|
|
21
|
+
manifest_file_hash: require_dsl.stringColumn("manifest_file_hash").nullable(),
|
|
22
|
+
asset_base_storage_uri: require_dsl.stringColumn("asset_base_storage_uri").nullable()
|
|
23
|
+
}, {
|
|
24
|
+
indexes: [
|
|
25
|
+
require_dsl.index("bundles_target_app_version_idx", ["target_app_version"]),
|
|
26
|
+
require_dsl.index("bundles_fingerprint_hash_idx", ["fingerprint_hash"]),
|
|
27
|
+
require_dsl.index("bundles_channel_idx", ["channel"]),
|
|
28
|
+
require_dsl.index("bundles_platform_idx", ["platform"], ["mongodb"]),
|
|
29
|
+
require_dsl.index("bundles_rollout_idx", ["rollout_cohort_count"])
|
|
30
|
+
],
|
|
31
|
+
checks: [require_dsl.check({
|
|
32
|
+
name: "check_version_or_fingerprint",
|
|
33
|
+
expression: "(target_app_version is not null) or (fingerprint_hash is not null)",
|
|
34
|
+
sqliteInline: true
|
|
35
|
+
}), require_dsl.check({
|
|
36
|
+
name: "bundles_rollout_cohort_count_check",
|
|
37
|
+
expression: "rollout_cohort_count >= 0 and rollout_cohort_count <= 1000",
|
|
38
|
+
sqliteInline: true
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
41
|
+
const bundlePatchesV031 = require_dsl.table("bundle_patches", {
|
|
42
|
+
id: require_dsl.idColumn("id", require_dsl.varchar(255)),
|
|
43
|
+
bundle_id: require_dsl.uuid("bundle_id"),
|
|
44
|
+
base_bundle_id: require_dsl.uuid("base_bundle_id"),
|
|
45
|
+
base_file_hash: require_dsl.column("base_file_hash", "string"),
|
|
46
|
+
patch_file_hash: require_dsl.column("patch_file_hash", "string"),
|
|
47
|
+
patch_storage_uri: require_dsl.column("patch_storage_uri", "string"),
|
|
48
|
+
order_index: require_dsl.integer("order_index").defaultTo(0)
|
|
49
|
+
}, {
|
|
50
|
+
indexes: [require_dsl.index("bundle_patches_bundle_id_idx", ["bundle_id"]), require_dsl.index("bundle_patches_base_bundle_id_idx", ["base_bundle_id"])],
|
|
51
|
+
foreignKeys: [require_dsl.foreignKey("bundle_patches_bundle_id_fk", ["bundle_id"], "bundles", ["id"]), require_dsl.foreignKey("bundle_patches_base_bundle_id_fk", ["base_bundle_id"], "bundles", ["id"])],
|
|
52
|
+
relations: [require_dsl.relation({
|
|
53
|
+
name: "bundle",
|
|
54
|
+
fieldName: "patches",
|
|
55
|
+
targetFieldName: "bundle",
|
|
56
|
+
relationName: "bundle_patches_bundles_patches",
|
|
57
|
+
columns: ["bundle_id"],
|
|
58
|
+
referencedTable: "bundles",
|
|
59
|
+
referencedColumns: ["id"]
|
|
60
|
+
}), require_dsl.relation({
|
|
61
|
+
name: "baseBundle",
|
|
62
|
+
fieldName: "baseForPatches",
|
|
63
|
+
targetFieldName: "baseBundle",
|
|
64
|
+
relationName: "bundle_patches_bundles_baseForPatches",
|
|
65
|
+
columns: ["base_bundle_id"],
|
|
66
|
+
referencedTable: "bundles",
|
|
67
|
+
referencedColumns: ["id"]
|
|
68
|
+
})]
|
|
69
|
+
});
|
|
70
|
+
const v0_31_0 = require_dsl.schema({
|
|
5
71
|
version: "0.31.0",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
file_hash: require_chunk_ZEQMAIFI.column("file_hash", "string"),
|
|
13
|
-
git_commit_hash: require_chunk_ZEQMAIFI.column("git_commit_hash", "string").nullable(),
|
|
14
|
-
message: require_chunk_ZEQMAIFI.column("message", "string").nullable(),
|
|
15
|
-
channel: require_chunk_ZEQMAIFI.column("channel", "string").defaultTo("production"),
|
|
16
|
-
storage_uri: require_chunk_ZEQMAIFI.column("storage_uri", "string"),
|
|
17
|
-
target_app_version: require_chunk_ZEQMAIFI.column("target_app_version", "string").nullable(),
|
|
18
|
-
fingerprint_hash: require_chunk_ZEQMAIFI.column("fingerprint_hash", "string").nullable(),
|
|
19
|
-
metadata: require_chunk_ZEQMAIFI.column("metadata", "json"),
|
|
20
|
-
manifest_storage_uri: require_chunk_ZEQMAIFI.column("manifest_storage_uri", "string").nullable(),
|
|
21
|
-
manifest_file_hash: require_chunk_ZEQMAIFI.column("manifest_file_hash", "string").nullable(),
|
|
22
|
-
asset_base_storage_uri: require_chunk_ZEQMAIFI.column("asset_base_storage_uri", "string").nullable(),
|
|
23
|
-
rollout_cohort_count: require_chunk_ZEQMAIFI.column("rollout_cohort_count", "integer").defaultTo(1e3),
|
|
24
|
-
target_cohorts: require_chunk_ZEQMAIFI.column("target_cohorts", "json").nullable()
|
|
25
|
-
}),
|
|
26
|
-
bundle_patches: require_chunk_ZEQMAIFI.table("bundle_patches", {
|
|
27
|
-
id: require_chunk_ZEQMAIFI.idColumn("id", "varchar(255)"),
|
|
28
|
-
bundle_id: require_chunk_ZEQMAIFI.column("bundle_id", "uuid"),
|
|
29
|
-
base_bundle_id: require_chunk_ZEQMAIFI.column("base_bundle_id", "uuid"),
|
|
30
|
-
base_file_hash: require_chunk_ZEQMAIFI.column("base_file_hash", "string"),
|
|
31
|
-
patch_file_hash: require_chunk_ZEQMAIFI.column("patch_file_hash", "string"),
|
|
32
|
-
patch_storage_uri: require_chunk_ZEQMAIFI.column("patch_storage_uri", "string"),
|
|
33
|
-
order_index: require_chunk_ZEQMAIFI.column("order_index", "integer").defaultTo(0)
|
|
34
|
-
})
|
|
35
|
-
},
|
|
36
|
-
relations: { bundle_patches: (builder) => ({
|
|
37
|
-
bundle: builder.one("bundles", ["bundle_id", "id"]).imply("patches").foreignKey({
|
|
38
|
-
name: "bundle_patches_bundle_id_fk",
|
|
39
|
-
onDelete: "CASCADE"
|
|
40
|
-
}),
|
|
41
|
-
baseBundle: builder.one("bundles", ["base_bundle_id", "id"]).imply("baseForPatches").foreignKey({
|
|
42
|
-
name: "bundle_patches_base_bundle_id_fk",
|
|
43
|
-
onDelete: "CASCADE"
|
|
44
|
-
})
|
|
45
|
-
}) }
|
|
72
|
+
settingsTable: require_types.HOT_UPDATER_SETTINGS_TABLE,
|
|
73
|
+
tables: [
|
|
74
|
+
bundlesV031,
|
|
75
|
+
bundlePatchesV031,
|
|
76
|
+
require_settings.createSettingsTable("0.31.0")
|
|
77
|
+
]
|
|
46
78
|
});
|
|
47
79
|
//#endregion
|
|
80
|
+
exports.bundlePatchesV031 = bundlePatchesV031;
|
|
81
|
+
exports.bundlesV031 = bundlesV031;
|
|
48
82
|
exports.v0_31_0 = v0_31_0;
|