@milkio/template-milkio 1.3.71 → 1.3.73

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/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/akirarika/milkio"
6
6
  },
7
- "version": "1.3.71",
7
+ "version": "1.3.73",
8
8
  "keywords": [
9
9
  "template"
10
10
  ],
@@ -0,0 +1,10 @@
1
+ // fail-code: expected business rejection (warn level, no stack, data is returned to clients).
2
+ // fault-code: unexpected/internal failure (error level, stack kept, hidden from clients).
3
+
4
+ export interface Fail {
5
+ DATA_NOT_FOUND: undefined;
6
+ }
7
+
8
+ export interface Fault {
9
+ INTERNAL_EXAMPLE_FAULT: { message: string };
10
+ }
@@ -2,7 +2,7 @@ import { expect, test } from 'vitest';
2
2
  import { astra } from '../utils/astra.ts';
3
3
 
4
4
  test('basic', async () => {
5
- const [context, reject, world] = await astra.createMirrorWorld(import.meta.url);
5
+ const [context, fail, world] = await astra.createMirrorWorld(import.meta.url);
6
6
 
7
7
  // 每次显式调用都会新建一个随机测试库、完整迁移并 seed,然后切换过去。
8
8
  // 如果你的项目不使用数据库,可以删除这一行。
@@ -11,7 +11,7 @@ test('basic', async () => {
11
11
  const [error, result] = await world.execute('/', {
12
12
  generateParams: true,
13
13
  });
14
- if (error) throw reject('Milkio did not execute successfully', error);
14
+ if (error) throw fail('Milkio did not execute successfully', error);
15
15
 
16
16
  expect(result.message).toBe('Hello world! UwU');
17
17
  });
@@ -7,12 +7,11 @@
7
7
  "dev": "vite dev",
8
8
  "build": "vite build"
9
9
  },
10
- "trustedDependencies": [],
11
10
  "dependencies": {
12
- "@milkio/astra": "1.3.71",
13
- "@milkio/drizzle": "1.3.71",
14
- "@milkio/redis": "1.3.71",
15
- "@milkio/stargate": "1.3.71",
11
+ "@milkio/astra": "1.3.73",
12
+ "@milkio/drizzle": "1.3.73",
13
+ "@milkio/redis": "1.3.73",
14
+ "@milkio/stargate": "1.3.73",
16
15
  "drizzle-orm": "^0.43.1",
17
16
  "mysql2": "^3.11.0",
18
17
  "redis": "^4.7.0"