@hot-updater/server 0.32.0 → 0.33.1
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/adapters/drizzle.cjs +1 -1
- package/dist/adapters/drizzle.d.cts +1 -1
- package/dist/adapters/drizzle.d.mts +1 -1
- package/dist/adapters/drizzle.mjs +1 -1
- package/dist/adapters/kysely.cjs +2 -2
- package/dist/adapters/kysely.d.cts +1 -1
- package/dist/adapters/kysely.d.mts +1 -1
- package/dist/adapters/kysely.mjs +2 -2
- package/dist/adapters/prisma.cjs +1 -1
- package/dist/adapters/prisma.d.cts +1 -1
- package/dist/adapters/prisma.d.mts +1 -1
- package/dist/adapters/prisma.mjs +1 -1
- package/dist/db/index.cjs +7 -10
- package/dist/db/index.mjs +7 -10
- package/dist/db/ormCore.cjs +1 -1
- package/dist/db/ormCore.d.cts +2 -2
- package/dist/db/ormCore.d.mts +2 -2
- package/dist/db/ormCore.mjs +1 -1
- package/dist/db/pluginCore.cjs +9 -2
- package/dist/db/pluginCore.mjs +10 -3
- package/dist/db/types.cjs +1 -1
- package/dist/db/types.d.cts +1 -1
- package/dist/db/types.d.mts +1 -1
- package/dist/db/types.mjs +1 -1
- package/dist/node_modules/.pnpm/{drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7 → 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 +1 -1
- package/dist/node_modules/.pnpm/{drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7 → 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 +1 -1
- package/dist/node_modules/.pnpm/{drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7 → 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 +1 -1
- package/dist/node_modules/.pnpm/{drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7 → 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 +1 -1
- package/dist/node_modules/.pnpm/{drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7 → 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 +1 -1
- package/dist/node_modules/.pnpm/{drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7 → 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 +1 -1
- package/dist/node_modules/.pnpm/{drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7 → 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 +1 -1
- package/dist/node_modules/.pnpm/{drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7 → 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 +1 -1
- package/dist/node_modules/.pnpm/{drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7 → 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 +1 -1
- package/dist/node_modules/.pnpm/{drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7 → 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 +1 -1
- package/dist/node_modules/.pnpm/{drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7 → 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 +1 -1
- package/dist/node_modules/.pnpm/{drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7 → 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 +1 -1
- package/dist/node_modules/.pnpm/{drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7 → 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 +1 -1
- package/dist/node_modules/.pnpm/{drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7 → 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 +1 -1
- package/dist/node_modules/.pnpm/{drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7 → 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 +1 -1
- package/dist/node_modules/.pnpm/{drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7 → 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 +1 -1
- 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 +4 -0
- 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 +4 -0
- 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 +6 -0
- 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 +6 -0
- 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 +4 -0
- 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 +4 -0
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +4 -4
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +4 -4
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 +1 -1
- package/dist/packages/server/package.cjs +1 -1
- package/dist/packages/server/package.mjs +1 -1
- package/dist/runtime.cjs +10 -12
- package/dist/runtime.mjs +10 -12
- package/dist/schema/v0_21_0.cjs +2 -2
- package/dist/schema/v0_21_0.mjs +2 -2
- package/dist/schema/v0_29_0.cjs +2 -2
- package/dist/schema/v0_29_0.mjs +2 -2
- package/dist/schema/v0_31_0.cjs +2 -2
- package/dist/schema/v0_31_0.mjs +2 -2
- package/package.json +14 -11
- package/src/db/index.spec.ts +32 -0
- package/src/db/index.ts +6 -10
- package/src/db/pluginCore.spec.ts +423 -0
- package/src/db/pluginCore.ts +21 -7
- package/src/runtime.spec.ts +35 -0
- package/src/runtime.ts +10 -12
- package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/table.utils.cjs +0 -4
- package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/table.utils.mjs +0 -4
- package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/tracing.cjs +0 -6
- package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/tracing.mjs +0 -6
- package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/view-common.cjs +0 -4
- package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/view-common.mjs +0 -4
- /package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 -0
- /package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 -0
- /package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 -0
- /package/dist/node_modules/.pnpm/{fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f → 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 -0
|
@@ -4,6 +4,7 @@ import type {
|
|
|
4
4
|
DatabasePlugin,
|
|
5
5
|
RequestEnvContext,
|
|
6
6
|
} from "@hot-updater/plugin-core";
|
|
7
|
+
import { createDatabasePluginGetUpdateInfo } from "@hot-updater/plugin-core";
|
|
7
8
|
import { describe, expect, it, vi } from "vitest";
|
|
8
9
|
|
|
9
10
|
import { createPluginDatabaseCore } from "./pluginCore";
|
|
@@ -195,6 +196,428 @@ describe("createPluginDatabaseCore", () => {
|
|
|
195
196
|
});
|
|
196
197
|
});
|
|
197
198
|
|
|
199
|
+
it("uses request bundle identity map for manifest artifact lookups", async () => {
|
|
200
|
+
const currentBundle = {
|
|
201
|
+
...baseBundle,
|
|
202
|
+
id: "00000000-0000-0000-0000-000000000001",
|
|
203
|
+
manifestStorageUri: "r2://bucket/current/manifest.json",
|
|
204
|
+
manifestFileHash: "sig:current-manifest",
|
|
205
|
+
assetBaseStorageUri: "r2://bucket/current/files",
|
|
206
|
+
};
|
|
207
|
+
const targetBundle = {
|
|
208
|
+
...baseBundle,
|
|
209
|
+
id: "00000000-0000-0000-0000-000000000002",
|
|
210
|
+
fileHash: "hash-2",
|
|
211
|
+
manifestStorageUri: "r2://bucket/target/manifest.json",
|
|
212
|
+
manifestFileHash: "sig:target-manifest",
|
|
213
|
+
assetBaseStorageUri: "r2://bucket/target/files",
|
|
214
|
+
};
|
|
215
|
+
const manifests = new Map([
|
|
216
|
+
[
|
|
217
|
+
currentBundle.manifestStorageUri,
|
|
218
|
+
JSON.stringify({
|
|
219
|
+
bundleId: currentBundle.id,
|
|
220
|
+
assets: {
|
|
221
|
+
"index.ios.bundle": {
|
|
222
|
+
fileHash: "old-bundle-hash",
|
|
223
|
+
},
|
|
224
|
+
"shared.png": {
|
|
225
|
+
fileHash: "same-image-hash",
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
}),
|
|
229
|
+
],
|
|
230
|
+
[
|
|
231
|
+
targetBundle.manifestStorageUri,
|
|
232
|
+
JSON.stringify({
|
|
233
|
+
bundleId: targetBundle.id,
|
|
234
|
+
assets: {
|
|
235
|
+
"index.ios.bundle": {
|
|
236
|
+
fileHash: "target-bundle-hash",
|
|
237
|
+
},
|
|
238
|
+
"shared.png": {
|
|
239
|
+
fileHash: "same-image-hash",
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
}),
|
|
243
|
+
],
|
|
244
|
+
]);
|
|
245
|
+
const getBundleById = vi.fn<DatabasePlugin<TestContext>["getBundleById"]>(
|
|
246
|
+
async (bundleId) => {
|
|
247
|
+
if (bundleId === currentBundle.id) return currentBundle;
|
|
248
|
+
if (bundleId === targetBundle.id) return targetBundle;
|
|
249
|
+
return null;
|
|
250
|
+
},
|
|
251
|
+
);
|
|
252
|
+
const getUpdateInfo = vi.fn<
|
|
253
|
+
NonNullable<DatabasePlugin<TestContext>["getUpdateInfo"]>
|
|
254
|
+
>(async () => ({
|
|
255
|
+
fileHash: targetBundle.fileHash,
|
|
256
|
+
id: targetBundle.id,
|
|
257
|
+
message: targetBundle.message,
|
|
258
|
+
shouldForceUpdate: targetBundle.shouldForceUpdate,
|
|
259
|
+
status: "UPDATE",
|
|
260
|
+
storageUri: targetBundle.storageUri,
|
|
261
|
+
}));
|
|
262
|
+
|
|
263
|
+
const plugin: DatabasePlugin<TestContext> = {
|
|
264
|
+
name: "identity-map-plugin",
|
|
265
|
+
async appendBundle() {},
|
|
266
|
+
async commitBundle() {},
|
|
267
|
+
async deleteBundle() {},
|
|
268
|
+
getBundleById,
|
|
269
|
+
getUpdateInfo,
|
|
270
|
+
async getBundles() {
|
|
271
|
+
return {
|
|
272
|
+
data: [targetBundle],
|
|
273
|
+
pagination: {
|
|
274
|
+
currentPage: 1,
|
|
275
|
+
hasNextPage: false,
|
|
276
|
+
hasPreviousPage: false,
|
|
277
|
+
total: 1,
|
|
278
|
+
totalPages: 1,
|
|
279
|
+
},
|
|
280
|
+
};
|
|
281
|
+
},
|
|
282
|
+
async getChannels() {
|
|
283
|
+
return ["production"];
|
|
284
|
+
},
|
|
285
|
+
async updateBundle() {},
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
const core = createPluginDatabaseCore(
|
|
289
|
+
() => plugin,
|
|
290
|
+
async (storageUri) => {
|
|
291
|
+
if (!storageUri) return null;
|
|
292
|
+
const url = new URL(storageUri);
|
|
293
|
+
return `https://assets.example.com/${url.host}${url.pathname}`;
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
readStorageText: async (storageUri) =>
|
|
297
|
+
manifests.get(storageUri) ?? null,
|
|
298
|
+
},
|
|
299
|
+
);
|
|
300
|
+
|
|
301
|
+
const updateInfo = await core.api.getAppUpdateInfo({
|
|
302
|
+
...updateArgs,
|
|
303
|
+
bundleId: currentBundle.id,
|
|
304
|
+
});
|
|
305
|
+
expect(updateInfo).not.toBeNull();
|
|
306
|
+
if (!updateInfo) {
|
|
307
|
+
throw new Error("expected app update info");
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
expect(updateInfo).toMatchObject({
|
|
311
|
+
changedAssets: {
|
|
312
|
+
"index.ios.bundle": {
|
|
313
|
+
file: {
|
|
314
|
+
compression: "br",
|
|
315
|
+
url: "https://assets.example.com/bucket/target/files/index.ios.bundle.br",
|
|
316
|
+
},
|
|
317
|
+
fileHash: "target-bundle-hash",
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
manifestFileHash: "sig:target-manifest",
|
|
321
|
+
manifestUrl: "https://assets.example.com/bucket/target/manifest.json",
|
|
322
|
+
});
|
|
323
|
+
expect(updateInfo.changedAssets).not.toHaveProperty("shared.png");
|
|
324
|
+
expect(getUpdateInfo).toHaveBeenCalledOnce();
|
|
325
|
+
expect(getBundleById).toHaveBeenCalledTimes(2);
|
|
326
|
+
expect(getBundleById).toHaveBeenCalledWith(targetBundle.id, undefined);
|
|
327
|
+
expect(getBundleById).toHaveBeenCalledWith(currentBundle.id, undefined);
|
|
328
|
+
expect(Object.keys(updateInfo)).not.toContain("__hotUpdaterBundle");
|
|
329
|
+
expect(Object.keys(updateInfo)).not.toContain("__hotUpdaterCurrentBundle");
|
|
330
|
+
expect(JSON.stringify(updateInfo)).not.toContain("__hotUpdaterBundle");
|
|
331
|
+
expect(JSON.stringify(updateInfo)).not.toContain(
|
|
332
|
+
"__hotUpdaterCurrentBundle",
|
|
333
|
+
);
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
it("dedupes manifest artifact bundle lookups without request context", async () => {
|
|
337
|
+
const targetBundle = {
|
|
338
|
+
...baseBundle,
|
|
339
|
+
id: "00000000-0000-0000-0000-000000000002",
|
|
340
|
+
fileHash: "hash-2",
|
|
341
|
+
manifestStorageUri: "s3://bucket/target/manifest.json",
|
|
342
|
+
manifestFileHash: "sig:target-manifest",
|
|
343
|
+
assetBaseStorageUri: "s3://bucket/target/files",
|
|
344
|
+
};
|
|
345
|
+
const manifests = new Map([
|
|
346
|
+
[
|
|
347
|
+
targetBundle.manifestStorageUri,
|
|
348
|
+
JSON.stringify({
|
|
349
|
+
bundleId: targetBundle.id,
|
|
350
|
+
assets: {
|
|
351
|
+
"index.ios.bundle": {
|
|
352
|
+
fileHash: "target-bundle-hash",
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
}),
|
|
356
|
+
],
|
|
357
|
+
]);
|
|
358
|
+
const getBundleById = vi.fn<DatabasePlugin<TestContext>["getBundleById"]>(
|
|
359
|
+
async (bundleId) => (bundleId === targetBundle.id ? targetBundle : null),
|
|
360
|
+
);
|
|
361
|
+
const getUpdateInfo = vi.fn<
|
|
362
|
+
NonNullable<DatabasePlugin<TestContext>["getUpdateInfo"]>
|
|
363
|
+
>(async () => ({
|
|
364
|
+
fileHash: targetBundle.fileHash,
|
|
365
|
+
id: targetBundle.id,
|
|
366
|
+
message: targetBundle.message,
|
|
367
|
+
shouldForceUpdate: targetBundle.shouldForceUpdate,
|
|
368
|
+
status: "UPDATE",
|
|
369
|
+
storageUri: targetBundle.storageUri,
|
|
370
|
+
}));
|
|
371
|
+
|
|
372
|
+
const plugin: DatabasePlugin<TestContext> = {
|
|
373
|
+
name: "undefined-context-identity-map-plugin",
|
|
374
|
+
async appendBundle() {},
|
|
375
|
+
async commitBundle() {},
|
|
376
|
+
async deleteBundle() {},
|
|
377
|
+
getBundleById,
|
|
378
|
+
getUpdateInfo,
|
|
379
|
+
async getBundles() {
|
|
380
|
+
return {
|
|
381
|
+
data: [targetBundle],
|
|
382
|
+
pagination: {
|
|
383
|
+
currentPage: 1,
|
|
384
|
+
hasNextPage: false,
|
|
385
|
+
hasPreviousPage: false,
|
|
386
|
+
total: 1,
|
|
387
|
+
totalPages: 1,
|
|
388
|
+
},
|
|
389
|
+
};
|
|
390
|
+
},
|
|
391
|
+
async getChannels() {
|
|
392
|
+
return ["production"];
|
|
393
|
+
},
|
|
394
|
+
async updateBundle() {},
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
const core = createPluginDatabaseCore(
|
|
398
|
+
() => plugin,
|
|
399
|
+
async (storageUri) => {
|
|
400
|
+
if (!storageUri) return null;
|
|
401
|
+
const url = new URL(storageUri);
|
|
402
|
+
return `https://assets.example.com/${url.host}${url.pathname}`;
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
readStorageText: async (storageUri) =>
|
|
406
|
+
manifests.get(storageUri) ?? null,
|
|
407
|
+
},
|
|
408
|
+
);
|
|
409
|
+
|
|
410
|
+
const updateInfo = await core.api.getAppUpdateInfo({
|
|
411
|
+
...updateArgs,
|
|
412
|
+
bundleId: targetBundle.id,
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
expect(updateInfo).toMatchObject({
|
|
416
|
+
changedAssets: {},
|
|
417
|
+
id: targetBundle.id,
|
|
418
|
+
manifestFileHash: "sig:target-manifest",
|
|
419
|
+
manifestUrl: "https://assets.example.com/bucket/target/manifest.json",
|
|
420
|
+
});
|
|
421
|
+
expect(getBundleById).toHaveBeenCalledOnce();
|
|
422
|
+
expect(getBundleById).toHaveBeenCalledWith(targetBundle.id, undefined);
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
it("seeds request bundle identity map from provider update lookups", async () => {
|
|
426
|
+
const targetBundle = {
|
|
427
|
+
...baseBundle,
|
|
428
|
+
id: "00000000-0000-0000-0000-000000000002",
|
|
429
|
+
fileHash: "hash-2",
|
|
430
|
+
manifestStorageUri: "s3://bucket/target/manifest.json",
|
|
431
|
+
manifestFileHash: "sig:target-manifest",
|
|
432
|
+
assetBaseStorageUri: "s3://bucket/target/files",
|
|
433
|
+
};
|
|
434
|
+
const manifests = new Map([
|
|
435
|
+
[
|
|
436
|
+
targetBundle.manifestStorageUri,
|
|
437
|
+
JSON.stringify({
|
|
438
|
+
bundleId: targetBundle.id,
|
|
439
|
+
assets: {
|
|
440
|
+
"index.ios.bundle": {
|
|
441
|
+
fileHash: "target-bundle-hash",
|
|
442
|
+
},
|
|
443
|
+
},
|
|
444
|
+
}),
|
|
445
|
+
],
|
|
446
|
+
]);
|
|
447
|
+
const getBundleById = vi.fn<DatabasePlugin<TestContext>["getBundleById"]>(
|
|
448
|
+
async () => {
|
|
449
|
+
throw new Error("unexpected provider bundle reread");
|
|
450
|
+
},
|
|
451
|
+
);
|
|
452
|
+
const getUpdateInfo = createDatabasePluginGetUpdateInfo<TestContext>({
|
|
453
|
+
getBundlesByFingerprint: async () => [],
|
|
454
|
+
getBundlesByTargetAppVersions: async () => [targetBundle],
|
|
455
|
+
listTargetAppVersions: async () => ["1.0.0"],
|
|
456
|
+
});
|
|
457
|
+
const plugin: DatabasePlugin<TestContext> = {
|
|
458
|
+
name: "seeded-fast-path-plugin",
|
|
459
|
+
async appendBundle() {},
|
|
460
|
+
async commitBundle() {},
|
|
461
|
+
async deleteBundle() {},
|
|
462
|
+
getBundleById,
|
|
463
|
+
async getBundles() {
|
|
464
|
+
return {
|
|
465
|
+
data: [targetBundle],
|
|
466
|
+
pagination: {
|
|
467
|
+
currentPage: 1,
|
|
468
|
+
hasNextPage: false,
|
|
469
|
+
hasPreviousPage: false,
|
|
470
|
+
total: 1,
|
|
471
|
+
totalPages: 1,
|
|
472
|
+
},
|
|
473
|
+
};
|
|
474
|
+
},
|
|
475
|
+
getUpdateInfo,
|
|
476
|
+
async getChannels() {
|
|
477
|
+
return ["production"];
|
|
478
|
+
},
|
|
479
|
+
async updateBundle() {},
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
const core = createPluginDatabaseCore(
|
|
483
|
+
() => plugin,
|
|
484
|
+
async (storageUri) => {
|
|
485
|
+
if (!storageUri) return null;
|
|
486
|
+
const url = new URL(storageUri);
|
|
487
|
+
return `https://assets.example.com/${url.host}${url.pathname}`;
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
readStorageText: async (storageUri) =>
|
|
491
|
+
manifests.get(storageUri) ?? null,
|
|
492
|
+
},
|
|
493
|
+
);
|
|
494
|
+
const context: TestContext = {
|
|
495
|
+
env: {
|
|
496
|
+
assetHost: "https://assets.example.com",
|
|
497
|
+
},
|
|
498
|
+
request: new Request("https://updates.example.com"),
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
const updateInfo = await core.api.getAppUpdateInfo(updateArgs, context);
|
|
502
|
+
|
|
503
|
+
expect(updateInfo).toMatchObject({
|
|
504
|
+
changedAssets: {
|
|
505
|
+
"index.ios.bundle": {
|
|
506
|
+
file: {
|
|
507
|
+
compression: "br",
|
|
508
|
+
url: "https://assets.example.com/bucket/target/files/index.ios.bundle.br",
|
|
509
|
+
},
|
|
510
|
+
fileHash: "target-bundle-hash",
|
|
511
|
+
},
|
|
512
|
+
},
|
|
513
|
+
id: targetBundle.id,
|
|
514
|
+
manifestFileHash: "sig:target-manifest",
|
|
515
|
+
manifestUrl: "https://assets.example.com/bucket/target/manifest.json",
|
|
516
|
+
});
|
|
517
|
+
expect(getBundleById).not.toHaveBeenCalled();
|
|
518
|
+
});
|
|
519
|
+
|
|
520
|
+
it("does not reread providers for current bundles outside direct update lookup results", async () => {
|
|
521
|
+
const targetBundle = {
|
|
522
|
+
...baseBundle,
|
|
523
|
+
id: "00000000-0000-0000-0000-000000000003",
|
|
524
|
+
fileHash: "hash-3",
|
|
525
|
+
manifestStorageUri: "s3://bucket/target/manifest.json",
|
|
526
|
+
manifestFileHash: "sig:target-manifest",
|
|
527
|
+
assetBaseStorageUri: "s3://bucket/target/files",
|
|
528
|
+
};
|
|
529
|
+
const manifests = new Map([
|
|
530
|
+
[
|
|
531
|
+
targetBundle.manifestStorageUri,
|
|
532
|
+
JSON.stringify({
|
|
533
|
+
bundleId: targetBundle.id,
|
|
534
|
+
assets: {
|
|
535
|
+
"index.ios.bundle": {
|
|
536
|
+
fileHash: "target-bundle-hash",
|
|
537
|
+
},
|
|
538
|
+
"image.png": {
|
|
539
|
+
fileHash: "target-image-hash",
|
|
540
|
+
},
|
|
541
|
+
},
|
|
542
|
+
}),
|
|
543
|
+
],
|
|
544
|
+
]);
|
|
545
|
+
const getBundleById = vi.fn<DatabasePlugin<TestContext>["getBundleById"]>(
|
|
546
|
+
async () => {
|
|
547
|
+
throw new Error("unexpected provider current bundle reread");
|
|
548
|
+
},
|
|
549
|
+
);
|
|
550
|
+
const getUpdateInfo = createDatabasePluginGetUpdateInfo<TestContext>({
|
|
551
|
+
getBundlesByFingerprint: async () => [],
|
|
552
|
+
getBundlesByTargetAppVersions: async () => [targetBundle],
|
|
553
|
+
listTargetAppVersions: async () => ["1.0.0"],
|
|
554
|
+
});
|
|
555
|
+
const plugin: DatabasePlugin<TestContext> = {
|
|
556
|
+
name: "seeded-current-miss-plugin",
|
|
557
|
+
async appendBundle() {},
|
|
558
|
+
async commitBundle() {},
|
|
559
|
+
async deleteBundle() {},
|
|
560
|
+
getBundleById,
|
|
561
|
+
async getBundles() {
|
|
562
|
+
throw new Error("unexpected provider scan");
|
|
563
|
+
},
|
|
564
|
+
getUpdateInfo,
|
|
565
|
+
async getChannels() {
|
|
566
|
+
return ["production"];
|
|
567
|
+
},
|
|
568
|
+
async updateBundle() {},
|
|
569
|
+
};
|
|
570
|
+
|
|
571
|
+
const core = createPluginDatabaseCore(
|
|
572
|
+
() => plugin,
|
|
573
|
+
async (storageUri) => {
|
|
574
|
+
if (!storageUri) return null;
|
|
575
|
+
const url = new URL(storageUri);
|
|
576
|
+
return `https://assets.example.com/${url.host}${url.pathname}`;
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
readStorageText: async (storageUri) =>
|
|
580
|
+
manifests.get(storageUri) ?? null,
|
|
581
|
+
},
|
|
582
|
+
);
|
|
583
|
+
const context: TestContext = {
|
|
584
|
+
env: {
|
|
585
|
+
assetHost: "https://assets.example.com",
|
|
586
|
+
},
|
|
587
|
+
request: new Request("https://updates.example.com"),
|
|
588
|
+
};
|
|
589
|
+
|
|
590
|
+
const updateInfo = await core.api.getAppUpdateInfo(
|
|
591
|
+
{
|
|
592
|
+
...updateArgs,
|
|
593
|
+
bundleId: "00000000-0000-0000-0000-0000000000aa",
|
|
594
|
+
},
|
|
595
|
+
context,
|
|
596
|
+
);
|
|
597
|
+
|
|
598
|
+
expect(updateInfo).toMatchObject({
|
|
599
|
+
changedAssets: {
|
|
600
|
+
"image.png": {
|
|
601
|
+
file: {
|
|
602
|
+
url: "https://assets.example.com/bucket/target/files/image.png",
|
|
603
|
+
},
|
|
604
|
+
fileHash: "target-image-hash",
|
|
605
|
+
},
|
|
606
|
+
"index.ios.bundle": {
|
|
607
|
+
file: {
|
|
608
|
+
compression: "br",
|
|
609
|
+
url: "https://assets.example.com/bucket/target/files/index.ios.bundle.br",
|
|
610
|
+
},
|
|
611
|
+
fileHash: "target-bundle-hash",
|
|
612
|
+
},
|
|
613
|
+
},
|
|
614
|
+
id: targetBundle.id,
|
|
615
|
+
manifestFileHash: "sig:target-manifest",
|
|
616
|
+
manifestUrl: "https://assets.example.com/bucket/target/manifest.json",
|
|
617
|
+
});
|
|
618
|
+
expect(getBundleById).not.toHaveBeenCalled();
|
|
619
|
+
});
|
|
620
|
+
|
|
198
621
|
it("resolves manifest changed assets from deterministic content-addressed storage", async () => {
|
|
199
622
|
const currentBundle = {
|
|
200
623
|
...baseBundle,
|
package/src/db/pluginCore.ts
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
type DatabaseBundleQueryOrder,
|
|
14
14
|
type DatabaseBundleQueryWhere,
|
|
15
15
|
type DatabasePlugin,
|
|
16
|
+
createRequestUpdateBundleResolver,
|
|
16
17
|
type HotUpdaterContext,
|
|
17
18
|
semverSatisfies,
|
|
18
19
|
} from "@hot-updater/plugin-core";
|
|
@@ -347,9 +348,7 @@ export function createPluginDatabaseCore<TContext = unknown>(
|
|
|
347
348
|
if (!info) {
|
|
348
349
|
return null;
|
|
349
350
|
}
|
|
350
|
-
const { storageUri, ...rest } = info
|
|
351
|
-
storageUri: string | null;
|
|
352
|
-
};
|
|
351
|
+
const { storageUri, ...rest } = info;
|
|
353
352
|
|
|
354
353
|
const readStorageText = options?.readStorageText;
|
|
355
354
|
if (info.id === NIL_UUID || !readStorageText) {
|
|
@@ -358,12 +357,27 @@ export function createPluginDatabaseCore<TContext = unknown>(
|
|
|
358
357
|
return baseResponse;
|
|
359
358
|
}
|
|
360
359
|
|
|
360
|
+
const requestBundles = createRequestUpdateBundleResolver(context);
|
|
361
|
+
const getCurrentBundle = () => {
|
|
362
|
+
if (args.bundleId === NIL_UUID) {
|
|
363
|
+
return null;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
const seededCurrentBundle = requestBundles.peek(args.bundleId);
|
|
367
|
+
if (seededCurrentBundle || requestBundles.hasSeededBundles()) {
|
|
368
|
+
return seededCurrentBundle;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
return requestBundles.getById(args.bundleId, () =>
|
|
372
|
+
getPlugin().getBundleById(args.bundleId, context),
|
|
373
|
+
);
|
|
374
|
+
};
|
|
361
375
|
const [fileUrl, targetBundle, currentBundle] = await Promise.all([
|
|
362
376
|
resolveFileUrl(storageUri ?? null, context),
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
377
|
+
requestBundles.getById(info.id, () =>
|
|
378
|
+
getPlugin().getBundleById(info.id, context),
|
|
379
|
+
),
|
|
380
|
+
getCurrentBundle(),
|
|
367
381
|
]);
|
|
368
382
|
const baseResponse: AppUpdateAvailableInfo = { ...rest, fileUrl };
|
|
369
383
|
const manifestArtifacts = await resolveManifestArtifacts({
|
package/src/runtime.spec.ts
CHANGED
|
@@ -706,6 +706,41 @@ describe("runtime createHotUpdater", () => {
|
|
|
706
706
|
});
|
|
707
707
|
});
|
|
708
708
|
|
|
709
|
+
it("keeps optional maintenance capabilities lazy", () => {
|
|
710
|
+
const factory = vi.fn(() => ({
|
|
711
|
+
async getBundleById() {
|
|
712
|
+
return null;
|
|
713
|
+
},
|
|
714
|
+
async getBundles() {
|
|
715
|
+
return {
|
|
716
|
+
data: [],
|
|
717
|
+
pagination: {
|
|
718
|
+
hasNextPage: false,
|
|
719
|
+
hasPreviousPage: false,
|
|
720
|
+
currentPage: 1,
|
|
721
|
+
totalPages: 1,
|
|
722
|
+
total: 0,
|
|
723
|
+
},
|
|
724
|
+
};
|
|
725
|
+
},
|
|
726
|
+
async getChannels() {
|
|
727
|
+
return [];
|
|
728
|
+
},
|
|
729
|
+
async commitBundle() {},
|
|
730
|
+
}));
|
|
731
|
+
const database = createDatabasePlugin({
|
|
732
|
+
name: "lazyRuntimePlugin",
|
|
733
|
+
factory,
|
|
734
|
+
})({});
|
|
735
|
+
|
|
736
|
+
createHotUpdater({
|
|
737
|
+
database,
|
|
738
|
+
basePath: "/api/check-update",
|
|
739
|
+
});
|
|
740
|
+
|
|
741
|
+
expect(factory).not.toHaveBeenCalled();
|
|
742
|
+
});
|
|
743
|
+
|
|
709
744
|
it("clears pending plugin changes after a failed mutation commit", async () => {
|
|
710
745
|
const committedBundles = new Map<string, Bundle>();
|
|
711
746
|
let commitAttempt = 0;
|
package/src/runtime.ts
CHANGED
|
@@ -73,14 +73,10 @@ export function createHotUpdater<TContext = unknown>(
|
|
|
73
73
|
: { readStorageText },
|
|
74
74
|
);
|
|
75
75
|
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
routes: options.routes,
|
|
81
|
-
}),
|
|
82
|
-
adapterName: core.adapterName,
|
|
83
|
-
};
|
|
76
|
+
const internalHandler = createHandler(core.api, {
|
|
77
|
+
basePath,
|
|
78
|
+
routes: options.routes,
|
|
79
|
+
});
|
|
84
80
|
|
|
85
81
|
// Some framework adapters strip the mounted base path or pass extra
|
|
86
82
|
// bindings/execution context arguments. Ignore those extras here so the
|
|
@@ -91,17 +87,19 @@ export function createHotUpdater<TContext = unknown>(
|
|
|
91
87
|
...extraArgs: unknown[]
|
|
92
88
|
) => {
|
|
93
89
|
if (extraArgs.length > 0) {
|
|
94
|
-
return
|
|
90
|
+
return internalHandler(request);
|
|
95
91
|
}
|
|
96
92
|
|
|
97
|
-
return
|
|
93
|
+
return internalHandler(request, context);
|
|
98
94
|
};
|
|
99
95
|
|
|
100
|
-
|
|
101
|
-
...api,
|
|
96
|
+
const api = {
|
|
102
97
|
basePath,
|
|
98
|
+
adapterName: core.adapterName,
|
|
103
99
|
handler,
|
|
104
100
|
};
|
|
101
|
+
Object.defineProperties(api, Object.getOwnPropertyDescriptors(core.api));
|
|
102
|
+
return api as HotUpdaterAPI<TContext>;
|
|
105
103
|
}
|
|
106
104
|
|
|
107
105
|
export { createHandler };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare+workers-types@4.20260313.1_@electric-sql+pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/table.utils.js
|
|
2
|
-
const TableName = Symbol.for("drizzle:Name");
|
|
3
|
-
//#endregion
|
|
4
|
-
exports.TableName = TableName;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare+workers-types@4.20260313.1_@electric-sql+pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/table.utils.js
|
|
2
|
-
const TableName = Symbol.for("drizzle:Name");
|
|
3
|
-
//#endregion
|
|
4
|
-
export { TableName };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare+workers-types@4.20260313.1_@electric-sql+pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/tracing.js
|
|
2
|
-
const tracer = { startActiveSpan(name, fn) {
|
|
3
|
-
return fn();
|
|
4
|
-
} };
|
|
5
|
-
//#endregion
|
|
6
|
-
exports.tracer = tracer;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare+workers-types@4.20260313.1_@electric-sql+pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/tracing.js
|
|
2
|
-
const tracer = { startActiveSpan(name, fn) {
|
|
3
|
-
return fn();
|
|
4
|
-
} };
|
|
5
|
-
//#endregion
|
|
6
|
-
export { tracer };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare+workers-types@4.20260313.1_@electric-sql+pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/view-common.js
|
|
2
|
-
const ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig");
|
|
3
|
-
//#endregion
|
|
4
|
-
exports.ViewBaseConfig = ViewBaseConfig;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare+workers-types@4.20260313.1_@electric-sql+pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/view-common.js
|
|
2
|
-
const ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig");
|
|
3
|
-
//#endregion
|
|
4
|
-
export { ViewBaseConfig };
|