@shumai-one/shumai 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/bin/{chunk-dwswqq3g.js → chunk-0a0sdyta.js} +1 -1
  2. package/bin/{chunk-qmtvy2j4.js → chunk-0dcv6kpk.js} +2 -2
  3. package/bin/chunk-1cjgpspz.js +2 -0
  4. package/bin/chunk-1pgtq4rc.js +2 -0
  5. package/bin/chunk-1rsp4hc5.js +1 -0
  6. package/bin/{chunk-7eycsyk6.js → chunk-2475z7vk.js} +1 -1
  7. package/bin/chunk-25qj10ny.js +1 -0
  8. package/bin/{chunk-gn8snrnk.js → chunk-2fc5hk8r.js} +1 -1
  9. package/bin/{chunk-qc6dmzn0.js → chunk-2jvqhps9.js} +2 -2
  10. package/bin/{chunk-ve7v8wtv.js → chunk-3823qzr0.js} +2 -2
  11. package/bin/{chunk-zxpef55w.js → chunk-3g9g2c7h.js} +3 -3
  12. package/bin/chunk-3gcnj1eq.js +2 -0
  13. package/bin/chunk-41m51y08.js +2 -0
  14. package/bin/chunk-4g7h9qhr.js +8 -0
  15. package/bin/chunk-4v5ykazp.js +1 -0
  16. package/bin/{chunk-k20bhxed.js → chunk-525eypdk.js} +1 -1
  17. package/bin/{chunk-h2wsm7h3.js → chunk-57kgmgfs.js} +2 -2
  18. package/bin/{chunk-gvn079hy.js → chunk-5cm4vge8.js} +2 -2
  19. package/bin/{chunk-31mjcykb.js → chunk-5vwkfxy7.js} +2 -2
  20. package/bin/chunk-5x3vzer8.js +1 -0
  21. package/bin/chunk-67rr836p.js +3 -0
  22. package/bin/chunk-6jgq154r.js +2 -0
  23. package/bin/chunk-7436fyrg.js +2 -0
  24. package/bin/{chunk-s05f0v9t.js → chunk-749c09cw.js} +1 -1
  25. package/bin/{chunk-9p2d0mk1.js → chunk-7anqxx1z.js} +1 -1
  26. package/bin/{chunk-s7qpj715.js → chunk-7pjes19z.js} +2 -2
  27. package/bin/{chunk-f8cn9m28.js → chunk-7x7jtkh8.js} +1 -1
  28. package/bin/chunk-804ndet8.js +2 -0
  29. package/bin/chunk-8a75zqbz.js +2 -0
  30. package/bin/{chunk-tsncwscz.js → chunk-9a7a1p1j.js} +2 -2
  31. package/bin/chunk-9e99n265.js +12 -0
  32. package/bin/chunk-9g6vy76b.js +2 -0
  33. package/bin/{chunk-wap08p4j.js → chunk-9sdhdhv4.js} +2 -2
  34. package/bin/{chunk-g2dk56e7.js → chunk-9vgjhemh.js} +1 -1
  35. package/bin/{chunk-1dawjfk8.js → chunk-9zvteyz0.js} +2 -2
  36. package/bin/chunk-a8daqpfh.js +7 -0
  37. package/bin/{chunk-na2nympm.js → chunk-am1m29pv.js} +1 -1
  38. package/bin/{chunk-xawwxdq9.js → chunk-bd6x5ns9.js} +2 -2
  39. package/bin/{chunk-wr5byz6r.js → chunk-bn4ewsy8.js} +1 -1
  40. package/bin/{chunk-ss45w8ks.js → chunk-bw6wyw7k.js} +2 -2
  41. package/bin/{chunk-8yz1expv.js → chunk-c0c88nje.js} +48 -48
  42. package/bin/chunk-c7rj0f5r.js +3 -0
  43. package/bin/chunk-cdqvg03f.js +3 -0
  44. package/bin/{chunk-zs9b0f3z.js → chunk-d3kpqay2.js} +2 -2
  45. package/bin/chunk-d6v81kjj.js +1 -0
  46. package/bin/chunk-dfcrtdk2.js +1 -0
  47. package/bin/chunk-eczsk2xd.js +62 -0
  48. package/bin/{chunk-yahb7wan.js → chunk-ey7vty63.js} +2 -2
  49. package/bin/{chunk-nzy3pjjm.js → chunk-fwqpq2sy.js} +2 -2
  50. package/bin/{chunk-vnfmh5ke.js → chunk-g097058z.js} +2 -2
  51. package/bin/{chunk-a76c5r3c.js → chunk-g224r7mc.js} +2 -2
  52. package/bin/chunk-g5e93f59.js +2 -0
  53. package/bin/chunk-g5xkj9p3.js +2 -0
  54. package/bin/chunk-gaemak59.js +4 -0
  55. package/bin/{chunk-hrzm70wg.js → chunk-gh4w2bdg.js} +1 -1
  56. package/bin/chunk-gpeyctxd.js +2 -0
  57. package/bin/{chunk-nqh128dt.js → chunk-gpmaaca1.js} +2 -2
  58. package/bin/{chunk-1d22tysv.js → chunk-h4a3ms2b.js} +2 -2
  59. package/bin/chunk-h73653yp.js +1 -0
  60. package/bin/chunk-hp139z0j.js +2 -0
  61. package/bin/chunk-hz6s7by4.js +11 -0
  62. package/bin/chunk-j4y8c864.js +1 -0
  63. package/bin/chunk-jkh04dka.js +8 -0
  64. package/bin/chunk-m268vcdm.js +2 -0
  65. package/bin/{chunk-vy24ncn2.js → chunk-m6sssvg3.js} +1 -1
  66. package/bin/chunk-mggfc9ya.js +2 -0
  67. package/bin/chunk-mhwp74hh.js +3 -0
  68. package/bin/{chunk-vgb8bzcg.js → chunk-mm810jv7.js} +2 -2
  69. package/bin/chunk-p1bcbtmg.js +3 -0
  70. package/bin/chunk-p86w1eaw.js +45 -0
  71. package/bin/{chunk-1nh6xgek.js → chunk-p8enen2a.js} +1 -1
  72. package/bin/chunk-pbb1tdwt.js +1 -0
  73. package/bin/chunk-pbfkw90e.js +1 -0
  74. package/bin/chunk-pdajhyqm.js +2 -0
  75. package/bin/{chunk-ph3e1bpp.js → chunk-pqxh0cg7.js} +2 -2
  76. package/bin/chunk-q8me9zev.js +1 -0
  77. package/bin/chunk-qshm5vcn.js +2 -0
  78. package/bin/chunk-qx2mzv89.js +2 -0
  79. package/bin/{chunk-amsb41z5.js → chunk-r5jmnsqj.js} +1 -1
  80. package/bin/{chunk-arpna31w.js → chunk-rt0pvhdf.js} +1 -1
  81. package/bin/{chunk-kgb16ggd.css → chunk-s10v4b01.css} +1 -1
  82. package/bin/{chunk-vt4zpasm.js → chunk-s1b5kf34.js} +2 -2
  83. package/bin/{chunk-ws07a9kv.js → chunk-t15a1vp6.js} +1 -1
  84. package/bin/{chunk-3rcc5s99.js → chunk-tc7q988r.js} +2 -2
  85. package/bin/chunk-ts9f4zqh.js +5 -0
  86. package/bin/chunk-tzmzqmcg.js +7 -0
  87. package/bin/chunk-v0xbr5e6.js +2 -0
  88. package/bin/{chunk-08mxv0sm.js → chunk-v0yhkcj5.js} +2 -2
  89. package/bin/{chunk-3t7mjvdv.js → chunk-v75fanse.js} +2 -2
  90. package/bin/chunk-va6hxm7n.js +3 -0
  91. package/bin/chunk-vf3bg920.js +3 -0
  92. package/bin/{chunk-ejfmxjw6.js → chunk-vg6mkdj1.js} +2 -2
  93. package/bin/{chunk-j0p1peav.js → chunk-wkth5xwr.js} +2 -2
  94. package/bin/chunk-wpntb95k.js +2 -0
  95. package/bin/{chunk-mahxw48e.js → chunk-wtzkfwmx.js} +2 -2
  96. package/bin/{chunk-hfp4hpca.js → chunk-x0r8dcq0.js} +2 -2
  97. package/bin/{chunk-etces6ff.js → chunk-xcbb21j9.js} +2 -2
  98. package/bin/{chunk-mcxsk75h.js → chunk-xgb533n0.js} +3 -3
  99. package/bin/{chunk-7jjc175m.js → chunk-xn9cpax1.js} +3 -3
  100. package/bin/{chunk-5vqan9c4.js → chunk-xsw3pb5p.js} +2 -2
  101. package/bin/chunk-yedr4r8a.js +2 -0
  102. package/bin/chunk-yfjn4qn2.js +1 -0
  103. package/bin/chunk-yfkcv10v.js +2 -0
  104. package/bin/{chunk-20y3wte3.js → chunk-yj6tmjsc.js} +2 -2
  105. package/bin/chunk-z9560a6e.js +1 -0
  106. package/bin/chunk-zgsy3k3h.js +3 -0
  107. package/bin/shumai-app.html +1 -1
  108. package/bin/shumai-app.js +381 -330
  109. package/package.json +7 -7
  110. package/prisma/migrations/20260801065040_add_audit_log/migration.sql +33 -0
  111. package/prisma/migrations/20260805021613_add_asset_autofill_context/migration.sql +2 -0
  112. package/prisma/schema.prisma +25 -0
  113. package/bin/chunk-08dr94gp.js +0 -2
  114. package/bin/chunk-0ed7h2xm.js +0 -2
  115. package/bin/chunk-0t4z17qr.js +0 -2
  116. package/bin/chunk-2ynx0den.js +0 -8
  117. package/bin/chunk-31a3k77j.js +0 -2
  118. package/bin/chunk-3jdef7n4.js +0 -6
  119. package/bin/chunk-4ahve1nf.js +0 -2
  120. package/bin/chunk-4hdx2tv0.js +0 -2
  121. package/bin/chunk-4p7xpfey.js +0 -2
  122. package/bin/chunk-5e1xqaj4.js +0 -2
  123. package/bin/chunk-5f81c951.js +0 -1
  124. package/bin/chunk-5s7c0qww.js +0 -1
  125. package/bin/chunk-5zntjzxw.js +0 -3
  126. package/bin/chunk-6a2eb3b5.js +0 -3
  127. package/bin/chunk-6gy7c4d7.js +0 -1
  128. package/bin/chunk-7d4scsf6.js +0 -1
  129. package/bin/chunk-7d5kep8c.js +0 -2
  130. package/bin/chunk-7y8dng8t.js +0 -2
  131. package/bin/chunk-8m6zg15c.js +0 -4
  132. package/bin/chunk-8n60m9x3.js +0 -1
  133. package/bin/chunk-8qyke29r.js +0 -7
  134. package/bin/chunk-90et6bwm.js +0 -3
  135. package/bin/chunk-a10tf0d8.js +0 -3
  136. package/bin/chunk-a9t667xv.js +0 -1
  137. package/bin/chunk-b10meywb.js +0 -2
  138. package/bin/chunk-b1e3tec3.js +0 -62
  139. package/bin/chunk-bdjhb77e.js +0 -2
  140. package/bin/chunk-bmqw3j2d.js +0 -2
  141. package/bin/chunk-c3fvs0bv.js +0 -4
  142. package/bin/chunk-c5my1b3k.js +0 -7
  143. package/bin/chunk-dhekxndw.js +0 -3
  144. package/bin/chunk-dwaj1yn4.js +0 -2
  145. package/bin/chunk-er1rb6yj.js +0 -1
  146. package/bin/chunk-etqpzc9e.js +0 -3
  147. package/bin/chunk-fdpjw17x.js +0 -7
  148. package/bin/chunk-gqh4ttjh.js +0 -3
  149. package/bin/chunk-h270n69j.js +0 -7
  150. package/bin/chunk-hz31j0hk.js +0 -4
  151. package/bin/chunk-jm6bxtzt.js +0 -41
  152. package/bin/chunk-k9w6mk9d.js +0 -3
  153. package/bin/chunk-m4py21f3.js +0 -2
  154. package/bin/chunk-mqbxagfd.js +0 -2
  155. package/bin/chunk-nr89225z.js +0 -2
  156. package/bin/chunk-nrf5r23d.js +0 -1
  157. package/bin/chunk-nt9tfjx6.js +0 -12
  158. package/bin/chunk-p396vw9h.js +0 -8
  159. package/bin/chunk-p9xfyqh1.js +0 -2
  160. package/bin/chunk-pgae67hk.js +0 -3
  161. package/bin/chunk-ph11924k.js +0 -1
  162. package/bin/chunk-pj0fgb2x.js +0 -6
  163. package/bin/chunk-pp072ksj.js +0 -2
  164. package/bin/chunk-q5cdjzbv.js +0 -3
  165. package/bin/chunk-qgq96tbp.js +0 -2
  166. package/bin/chunk-qvgc9e08.js +0 -3
  167. package/bin/chunk-rfh4ppaa.js +0 -1
  168. package/bin/chunk-rrhq3t4s.js +0 -1
  169. package/bin/chunk-sf6fwvrs.js +0 -8
  170. package/bin/chunk-sr9bty78.js +0 -1
  171. package/bin/chunk-t2txvzkp.js +0 -3
  172. package/bin/chunk-td54rdfj.js +0 -8
  173. package/bin/chunk-vb9m47z9.js +0 -1
  174. package/bin/chunk-vf066xwh.js +0 -3
  175. package/bin/chunk-w3a50kz8.js +0 -3
  176. package/bin/chunk-w9w5301f.js +0 -4
  177. package/bin/chunk-wny0qagx.js +0 -3
  178. package/bin/chunk-wqhk76de.js +0 -14
  179. package/bin/chunk-wrz9e73c.js +0 -2
  180. package/bin/chunk-x5dcgk62.js +0 -6
  181. package/bin/chunk-y2nw8rbx.js +0 -4
  182. package/bin/chunk-y9ttm07y.js +0 -3
  183. package/bin/chunk-zg0vm233.js +0 -2
  184. package/bin/chunk-zhd2mkbr.js +0 -1
  185. package/bin/chunk-zx9cv3t8.js +0 -2
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{vd as Z,wd as v}from"./chunk-1d22tysv.js";import{he as $,ie as h}from"./chunk-f8cn9m28.js";import"./chunk-ws07a9kv.js";var F=class extends v{},G=class{#j;#z;constructor(j){this.#j={...j}}async init(){if(this.#z=new M(this.#j.database),this.#j.onCreateConnection)await this.#j.onCreateConnection(this.#z)}async acquireConnection(){return this.#z}async beginTransaction(){throw Error("D1 does not support interactive transactions. Use the D1 batch() API instead.")}async commitTransaction(){throw Error("D1 does not support interactive transactions. Use the D1 batch() API instead.")}async rollbackTransaction(){throw Error("D1 does not support interactive transactions. Use the D1 batch() API instead.")}async releaseConnection(){}async destroy(){}},M=class{#j;constructor(j){this.#j=j}async executeQuery(j){let z=await this.#j.prepare(j.sql).bind(...j.parameters).all(),J=z.meta.changes!=null?BigInt(z.meta.changes):void 0;return{insertId:z.meta.last_row_id===void 0||z.meta.last_row_id===null?void 0:BigInt(z.meta.last_row_id),rows:z?.results||[],numAffectedRows:J}}async*streamQuery(){throw Error("D1 does not support streaming queries.")}},N=class{#j;#z;constructor(j,z){this.#j=j,this.#z=z}async getSchemas(){return[]}async getTables(j={withInternalKyselyTables:!1}){let z=this.#j.selectFrom("sqlite_master").where("type","in",["table","view"]).where("name","not like","sqlite_%").where("name","not like","_cf_%").select(["name","type","sql"]).$castTo();if(!j.withInternalKyselyTables)z=z.where("name","!=",$).where("name","!=",h);let J=await z.execute();if(J.length===0)return[];let w=J.map((V)=>this.#z.prepare("SELECT * FROM pragma_table_info(?)").bind(V.name)),K=await this.#z.batch(w);return J.map((V,x)=>{let Y=K[x]?.results??[],W=V.sql?.split(/[(),]/)?.find((H)=>H.toLowerCase().includes("autoincrement"))?.split(/\s+/)?.filter(Boolean)?.[0]?.replace(/["`]/g,"");if(!W){let H=Y.filter((B)=>B.pk>0),X=H.length===1?H[0]:void 0;if(X&&X.type.toLowerCase()==="integer")W=X.name}return{name:V.name,isView:V.type==="view",columns:Y.map((H)=>({name:H.name,dataType:H.type,isNullable:!H.notnull,isAutoIncrementing:H.name===W,hasDefaultValue:H.dflt_value!=null}))}})}async getMetadata(j){return{tables:await this.getTables(j)}}},U=class extends Z{},P=class{#j;constructor(j){this.#j={...j}}createDriver(){return new G(this.#j)}createQueryCompiler(){return new U}createAdapter(){return new F}createIntrospector(j){return new N(j,this.#j.database)}};export{P as D1SqliteDialect};
2
+ import{Ac as v,zc as Z}from"./chunk-h4a3ms2b.js";import{ld as $,md as h}from"./chunk-7x7jtkh8.js";import"./chunk-t15a1vp6.js";var F=class extends v{},G=class{#j;#z;constructor(j){this.#j={...j}}async init(){if(this.#z=new M(this.#j.database),this.#j.onCreateConnection)await this.#j.onCreateConnection(this.#z)}async acquireConnection(){return this.#z}async beginTransaction(){throw Error("D1 does not support interactive transactions. Use the D1 batch() API instead.")}async commitTransaction(){throw Error("D1 does not support interactive transactions. Use the D1 batch() API instead.")}async rollbackTransaction(){throw Error("D1 does not support interactive transactions. Use the D1 batch() API instead.")}async releaseConnection(){}async destroy(){}},M=class{#j;constructor(j){this.#j=j}async executeQuery(j){let z=await this.#j.prepare(j.sql).bind(...j.parameters).all(),J=z.meta.changes!=null?BigInt(z.meta.changes):void 0;return{insertId:z.meta.last_row_id===void 0||z.meta.last_row_id===null?void 0:BigInt(z.meta.last_row_id),rows:z?.results||[],numAffectedRows:J}}async*streamQuery(){throw Error("D1 does not support streaming queries.")}},N=class{#j;#z;constructor(j,z){this.#j=j,this.#z=z}async getSchemas(){return[]}async getTables(j={withInternalKyselyTables:!1}){let z=this.#j.selectFrom("sqlite_master").where("type","in",["table","view"]).where("name","not like","sqlite_%").where("name","not like","_cf_%").select(["name","type","sql"]).$castTo();if(!j.withInternalKyselyTables)z=z.where("name","!=",$).where("name","!=",h);let J=await z.execute();if(J.length===0)return[];let w=J.map((V)=>this.#z.prepare("SELECT * FROM pragma_table_info(?)").bind(V.name)),K=await this.#z.batch(w);return J.map((V,x)=>{let Y=K[x]?.results??[],W=V.sql?.split(/[(),]/)?.find((H)=>H.toLowerCase().includes("autoincrement"))?.split(/\s+/)?.filter(Boolean)?.[0]?.replace(/["`]/g,"");if(!W){let H=Y.filter((B)=>B.pk>0),X=H.length===1?H[0]:void 0;if(X&&X.type.toLowerCase()==="integer")W=X.name}return{name:V.name,isView:V.type==="view",columns:Y.map((H)=>({name:H.name,dataType:H.type,isNullable:!H.notnull,isAutoIncrementing:H.name===W,hasDefaultValue:H.dflt_value!=null}))}})}async getMetadata(j){return{tables:await this.getTables(j)}}},U=class extends Z{},P=class{#j;constructor(j){this.#j={...j}}createDriver(){return new G(this.#j)}createQueryCompiler(){return new U}createAdapter(){return new F}createIntrospector(j){return new N(j,this.#j.database)}};export{P as D1SqliteDialect};