@milkio/template-milkio 1.3.21 → 1.3.26

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.21",
7
+ "version": "1.3.26",
8
8
  "keywords": [
9
9
  "template"
10
10
  ],
@@ -1,9 +1,12 @@
1
- import { test } from "vitest";
2
- import { astra } from "../utils/astra";
1
+ import { expect, test } from 'vitest';
2
+ import { astra } from '../utils/astra.ts';
3
3
 
4
- test("adjust", async () => {
4
+ test('basic', async () => {
5
5
  const [context, reject, world] = await astra.createMirrorWorld(import.meta.url);
6
- await world.execute("/", {
7
- generateParams: true
6
+ const [error, result] = await world.execute('/', {
7
+ generateParams: true,
8
8
  });
9
- });
9
+ if (error) throw reject('Milkio did not execute successfully', error);
10
+
11
+ expect(result.message).toBe('Hello world! UwU');
12
+ });
@@ -1,19 +1,15 @@
1
- import type { MilkioContext, MilkioMeta } from "../../.milkio/declares";
1
+ import type { MilkioContext, MilkioMeta } from '../../.milkio/declares.ts';
2
2
 
3
- export const meta: MilkioMeta = {
4
- onlyVip: true,
5
- }
3
+ export const meta: MilkioMeta = {};
6
4
 
7
5
  type Params = {};
6
+
8
7
  type Result = { message: string };
9
8
 
10
- export async function handler(
11
- context: MilkioContext,
12
- params: Params,
13
- ) {
14
- const message = `Hello world! UwU`;
9
+ export async function handler(context: MilkioContext, params: Params): Promise<Result> {
10
+ const message = 'Hello world! UwU';
15
11
 
16
12
  return {
17
- message
18
- }
19
- };
13
+ message,
14
+ };
15
+ }
@@ -1,14 +1,13 @@
1
1
  {
2
- "name": "@milkio/milkio",
3
- "exports": "./index.ts",
2
+ "name": "REPLACE-YOUR-REPOSITORY-NAME",
4
3
  "type": "module",
5
4
  "private": true,
5
+ "module": "index.ts",
6
6
  "scripts": {
7
7
  "dev": "vite dev",
8
8
  "build": "vite build"
9
9
  },
10
- "devDependencies": {},
11
- "peerDependencies": {
12
- "typescript": ">=7.0.0"
13
- }
10
+ "trustedDependencies": [],
11
+ "dependencies": {},
12
+ "devDependencies": {}
14
13
  }
@@ -1,29 +1,18 @@
1
1
  {
2
2
  "compilerOptions": {
3
- // Environment setup & latest features
4
- "lib": ["ESNext", "DOM"],
5
3
  "target": "ESNext",
6
- "module": "Preserve",
7
- "moduleDetection": "force",
8
- "jsx": "react-jsx",
9
- "allowJs": true,
10
-
11
- // Bundler mode
12
- "moduleResolution": "bundler",
13
- "allowImportingTsExtensions": true,
4
+ "lib": ["ESNext", "DOM"],
5
+ "module": "NodeNext",
6
+ "moduleResolution": "NodeNext",
14
7
  "verbatimModuleSyntax": true,
15
- "noEmit": true,
16
-
17
- // Best practices
8
+ "erasableSyntaxOnly": true,
9
+ "allowImportingTsExtensions": true,
10
+ "allowJs": true,
18
11
  "strict": true,
12
+ "noImplicitAny": false,
19
13
  "skipLibCheck": true,
20
- "noFallthroughCasesInSwitch": true,
21
- "noUncheckedIndexedAccess": true,
22
- "noImplicitOverride": true,
23
-
24
- // Some stricter flags (disabled by default)
25
- "noUnusedLocals": false,
26
- "noUnusedParameters": false,
27
- "noPropertyAccessFromIndexSignature": false
28
- }
14
+ "forceConsistentCasingInFileNames": true,
15
+ "noEmit": true
16
+ },
17
+ "include": ["./**/*", "./.milkio/**/*"]
29
18
  }
@@ -1,17 +1,17 @@
1
- import { defineConfig } from "vite";
2
- import { useVitePluginMilkio } from "@milkio/vite-plugin-milkio";
1
+ import { defineConfig } from 'vite';
2
+ import { useVitePluginMilkio } from '@milkio/vite-plugin-milkio';
3
3
 
4
4
  export default defineConfig(async () => {
5
5
  return {
6
6
  server: {
7
+ host: '0.0.0.0',
7
8
  port: 9000,
8
9
  },
9
10
  build: {
10
11
  manifest: true,
11
12
  sourcemap: true,
12
13
  },
13
- resolve: {
14
- },
15
- plugins: [useVitePluginMilkio()],
14
+ resolve: {},
15
+ plugins: [useVitePluginMilkio({ outputFormat: 'esm' })],
16
16
  };
17
17
  });
@@ -1,5 +1,11 @@
1
- import { defineProject } from 'vitest/config'
1
+ import { defineProject } from 'vitest/config';
2
2
 
3
3
  export default defineProject({
4
- test: {},
5
- })
4
+ test: {
5
+ testTimeout: 60000,
6
+ fileParallelism: false,
7
+ sequence: {
8
+ concurrent: false,
9
+ },
10
+ },
11
+ });