@adep/cli 0.1.11 → 0.1.12

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/vite.js CHANGED
@@ -2600,10 +2600,10 @@ function jsonStorage(cwd) {
2600
2600
  };
2601
2601
  }
2602
2602
  async function createSimRuntime(options) {
2603
- const db = createSimDbCapability({
2603
+ const db = options.driver === void 0 ? createSimDbCapability({
2604
2604
  storage: options.dbStorage ?? jsonStorage(options.cwd),
2605
2605
  ...options.log === void 0 ? {} : { log: options.log }
2606
- });
2606
+ }) : { bundle: createDbCapability(options.driver), driver: options.driver, engine: null };
2607
2607
  const storage = createSimStorageCapability({
2608
2608
  cwd: options.cwd,
2609
2609
  ...options.baseUrl === void 0 ? {} : { baseUrl: options.baseUrl },
@@ -2612,7 +2612,7 @@ async function createSimRuntime(options) {
2612
2612
  const simRealtime = createSimRealtimeCapability();
2613
2613
  const kvBundle = createKvCapability(db.driver);
2614
2614
  const bundle = mergeBundles([db.bundle, storage.bundle, kvBundle, simRealtime.bundle]);
2615
- await db.engine.load();
2615
+ if (db.engine !== null) await db.engine.load();
2616
2616
  return {
2617
2617
  bundle,
2618
2618
  realtime: simRealtime.realtime,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adep/cli",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "type": "module",
5
5
  "description": "`adep` 命令行工具包位:登录 / 初始化 / 本地调试 / 部署 / 数据库维护 / 云存储 / 静态托管 / 微前端组件(widget),实现见任务单 CLI-001 ~ CLI-003 与 FE-002;子路径 `@adep/cli/vite` 提供云函数 vite 插件(CLI-014)",
6
6
  "bin": {
@@ -24,8 +24,8 @@
24
24
  "@adep/vite-plugin": "0.1.5"
25
25
  },
26
26
  "devDependencies": {
27
- "@adep/runtime": "0.2.5",
28
- "@adep/types": "0.2.3"
27
+ "@adep/types": "0.2.3",
28
+ "@adep/runtime": "0.2.5"
29
29
  },
30
30
  "scripts": {
31
31
  "test": "vitest run",