create-egg 4.1.0-beta.10 → 4.1.0-beta.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/templates/egg3-simple-js/package.json +1 -1
- package/dist/templates/egg3-simple-ts/package.json +1 -1
- package/dist/templates/egg3-tegg/package.json +1 -1
- package/dist/templates/simple-ts/config/config.default.ts +3 -3
- package/dist/templates/simple-ts/config/config.local.ts +4 -5
- package/dist/templates/simple-ts/config/config.prod.ts +4 -5
- package/dist/templates/simple-ts/package.json +1 -1
- package/dist/templates/simple-ts/test/app/controller/home.test.ts +1 -1
- package/dist/templates/simple-ts/test/app/service/Test.test.ts +1 -1
- package/dist/templates/simple-ts/test/setup.ts +5 -0
- package/dist/templates/simple-ts/vitest.config.ts +7 -0
- package/dist/templates/tegg/app/module/bar/controller/home.ts +1 -1
- package/dist/templates/tegg/app/module/bar/controller/user.ts +1 -1
- package/dist/templates/tegg/app/module/bar/package.json +2 -1
- package/dist/templates/tegg/app/module/foo/package.json +2 -1
- package/dist/templates/tegg/app/module/foo/service/HelloService.ts +1 -1
- package/dist/templates/tegg/config/config.default.ts +3 -3
- package/dist/templates/tegg/config/config.local.ts +4 -5
- package/dist/templates/tegg/config/config.prod.ts +4 -5
- package/dist/templates/tegg/config/config.unittest.ts +4 -5
- package/dist/templates/tegg/config/plugin.ts +1 -1
- package/dist/templates/tegg/package.json +16 -12
- package/dist/templates/tegg/test/app/module/foo/service/{HelloService.test.ts → HelloService.test.skip.ts} +2 -1
- package/dist/templates/tegg/test/setup.ts +5 -0
- package/dist/templates/tegg/tsconfig.json +0 -3
- package/dist/templates/tegg/vitest.config.ts +7 -0
- package/package.json +1 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineConfig, type
|
|
1
|
+
import { defineConfig, type PartialEggConfig } from 'egg';
|
|
2
2
|
|
|
3
|
-
export default defineConfig(
|
|
3
|
+
export default defineConfig(appInfo => {
|
|
4
4
|
const config = {
|
|
5
5
|
// use for cookie sign key, should change to your own and keep security
|
|
6
6
|
keys: appInfo.name + '_{{keys}}',
|
|
7
7
|
|
|
8
8
|
// add your egg config in here
|
|
9
9
|
middleware: [] as string[],
|
|
10
|
-
};
|
|
10
|
+
} as PartialEggConfig;
|
|
11
11
|
|
|
12
12
|
// add your special config in here
|
|
13
13
|
const bizConfig = {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PartialEggConfig } from 'egg';
|
|
2
2
|
|
|
3
|
-
export default
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
3
|
+
export default {
|
|
4
|
+
// add your config here
|
|
5
|
+
} as PartialEggConfig;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PartialEggConfig } from 'egg';
|
|
2
2
|
|
|
3
|
-
export default
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
3
|
+
export default {
|
|
4
|
+
// add your config here
|
|
5
|
+
} as PartialEggConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineConfig, type
|
|
1
|
+
import { defineConfig, type PartialEggConfig } from 'egg';
|
|
2
2
|
|
|
3
|
-
export default defineConfig(
|
|
3
|
+
export default defineConfig(appInfo => {
|
|
4
4
|
const config = {
|
|
5
5
|
// use for cookie sign key, should change to your own and keep security
|
|
6
6
|
keys: appInfo.name + '_{{keys}}',
|
|
@@ -13,7 +13,7 @@ export default defineConfig((appInfo: EggAppInfo) => {
|
|
|
13
13
|
multipart: {
|
|
14
14
|
mode: 'file' as const,
|
|
15
15
|
},
|
|
16
|
-
};
|
|
16
|
+
} as PartialEggConfig;
|
|
17
17
|
|
|
18
18
|
// add your special config in here
|
|
19
19
|
// Usage: `app.config.bizConfig.sourceUrl`
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { PartialEggConfig } from 'egg';
|
|
2
2
|
|
|
3
|
-
export default
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
3
|
+
export default {
|
|
4
|
+
// add your config here
|
|
5
|
+
} as PartialEggConfig;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { PartialEggConfig } from 'egg';
|
|
2
2
|
|
|
3
|
-
export default
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
3
|
+
export default {
|
|
4
|
+
// add your config here
|
|
5
|
+
} as PartialEggConfig;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { PartialEggConfig } from 'egg';
|
|
2
2
|
|
|
3
|
-
export default
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
3
|
+
export default {
|
|
4
|
+
// add your config here
|
|
5
|
+
} as PartialEggConfig;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"name": "{{name}}",
|
|
3
3
|
"description": "Hello Egg.js",
|
|
4
4
|
"private": true,
|
|
5
|
+
"type": "module",
|
|
5
6
|
"egg": {
|
|
6
7
|
"typescript": true
|
|
7
8
|
},
|
|
@@ -9,11 +10,11 @@
|
|
|
9
10
|
"start": "eggctl start --daemon --title=egg-server-{{name}}",
|
|
10
11
|
"stop": "eggctl stop --title=egg-server-{{name}}",
|
|
11
12
|
"dev": "egg-bin dev",
|
|
12
|
-
"test:local": "vitest run",
|
|
13
|
+
"test:local": "cross-env NODE_OPTIONS=\"--import @oxc-node/core/register\" vitest run",
|
|
13
14
|
"pretest": "npm run clean && npm run lint -- --fix",
|
|
14
|
-
"test": "
|
|
15
|
+
"test": "npm run test:local",
|
|
15
16
|
"preci": "npm run clean && npm run lint",
|
|
16
|
-
"ci": "
|
|
17
|
+
"ci": "npm run test:local -- --coverage",
|
|
17
18
|
"postci": "npm run prepublishOnly && npm start && sleep 10 && npm stop && npm run clean",
|
|
18
19
|
"lint": "oxlint --type-aware",
|
|
19
20
|
"tsc": "tsc",
|
|
@@ -22,13 +23,13 @@
|
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
24
25
|
"@eggjs/scripts": "^4.0.0",
|
|
25
|
-
"@eggjs/tegg": "
|
|
26
|
-
"@eggjs/tegg-aop-plugin": "
|
|
27
|
-
"@eggjs/tegg-config": "
|
|
28
|
-
"@eggjs/tegg-controller-plugin": "
|
|
29
|
-
"@eggjs/tegg-eventbus-plugin": "
|
|
30
|
-
"@eggjs/tegg-plugin": "
|
|
31
|
-
"@eggjs/tegg-schedule-plugin": "
|
|
26
|
+
"@eggjs/tegg": "beta",
|
|
27
|
+
"@eggjs/tegg-aop-plugin": "beta",
|
|
28
|
+
"@eggjs/tegg-config": "beta",
|
|
29
|
+
"@eggjs/tegg-controller-plugin": "beta",
|
|
30
|
+
"@eggjs/tegg-eventbus-plugin": "beta",
|
|
31
|
+
"@eggjs/tegg-plugin": "beta",
|
|
32
|
+
"@eggjs/tegg-schedule-plugin": "beta",
|
|
32
33
|
"@eggjs/tracer": "^3.0.0",
|
|
33
34
|
"egg": "beta"
|
|
34
35
|
},
|
|
@@ -36,14 +37,17 @@
|
|
|
36
37
|
"@eggjs/bin": "beta",
|
|
37
38
|
"@eggjs/mock": "beta",
|
|
38
39
|
"@eggjs/tsconfig": "beta",
|
|
40
|
+
"@oxc-node/core": "^0.0.32",
|
|
39
41
|
"@types/node": "24",
|
|
42
|
+
"cross-env": "10",
|
|
40
43
|
"oxlint": "1",
|
|
41
44
|
"oxlint-tsgolint": "^0.2.0",
|
|
42
45
|
"typescript": "5",
|
|
43
|
-
"vitest": "beta"
|
|
46
|
+
"vitest": "beta",
|
|
47
|
+
"@vitest/coverage-v8": "beta"
|
|
44
48
|
},
|
|
45
49
|
"engines": {
|
|
46
|
-
"node": ">=
|
|
50
|
+
"node": ">=22.18.0"
|
|
47
51
|
},
|
|
48
52
|
"homepage": "https://github.com/YOUR_USERNAME/YOUR_REPO#readme",
|
|
49
53
|
"bugs": {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { test, expect } from 'vitest';
|
|
2
2
|
import { app } from '@eggjs/mock/bootstrap';
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
import { HelloService } from '../../../../../app/module/foo/index.ts';
|
|
4
5
|
|
|
5
6
|
test('should hello() work', async () => {
|
|
6
7
|
const helloService = await app.getEggObject(HelloService);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-egg",
|
|
3
|
-
"version": "4.1.0-beta.
|
|
3
|
+
"version": "4.1.0-beta.12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
"type": "module",
|
|
9
9
|
"devDependencies": {
|
|
10
10
|
"@types/cross-spawn": "^6.0.6",
|
|
11
|
-
"@types/node": "24.5.2",
|
|
12
11
|
"execa": "^9.6.0",
|
|
13
12
|
"tsdown": "^0.15.4"
|
|
14
13
|
},
|