create-egg 3.0.0 → 4.1.0-beta.10
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/README.md +55 -16
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +11 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +254 -0
- package/dist/templates/egg3-simple-js/.eslintignore +1 -0
- package/dist/templates/egg3-simple-js/.eslintrc +4 -0
- package/dist/templates/egg3-simple-js/.vscode/launch.json +26 -0
- package/dist/templates/egg3-simple-js/README.md +31 -0
- package/dist/templates/egg3-simple-js/_.gitignore +15 -0
- package/dist/templates/egg3-simple-js/app/controller/home.js +10 -0
- package/dist/templates/egg3-simple-js/app/router.js +7 -0
- package/dist/templates/egg3-simple-js/config/config.default.js +28 -0
- package/dist/templates/egg3-simple-js/config/plugin.js +7 -0
- package/dist/templates/egg3-simple-js/package.json +38 -0
- package/dist/templates/egg3-simple-js/test/app/controller/home.test.js +20 -0
- package/dist/templates/egg3-simple-ts/.eslintignore +3 -0
- package/dist/templates/egg3-simple-ts/.eslintrc +6 -0
- package/dist/templates/egg3-simple-ts/README.md +33 -0
- package/dist/templates/egg3-simple-ts/_.gitignore +20 -0
- package/dist/templates/egg3-simple-ts/app/controller/home.ts +8 -0
- package/dist/templates/egg3-simple-ts/app/router.ts +7 -0
- package/dist/templates/egg3-simple-ts/app/service/Test.ts +14 -0
- package/dist/templates/egg3-simple-ts/config/config.default.ts +23 -0
- package/dist/templates/egg3-simple-ts/config/config.local.ts +6 -0
- package/dist/templates/egg3-simple-ts/config/config.prod.ts +6 -0
- package/dist/templates/egg3-simple-ts/config/plugin.ts +11 -0
- package/dist/templates/egg3-simple-ts/package.json +45 -0
- package/dist/templates/egg3-simple-ts/test/app/controller/home.test.ts +9 -0
- package/dist/templates/egg3-simple-ts/test/app/service/Test.test.ts +16 -0
- package/dist/templates/egg3-simple-ts/tsconfig.json +4 -0
- package/dist/templates/egg3-simple-ts/typings/index.d.ts +3 -0
- package/dist/templates/egg3-tegg/.vscode/launch.json +26 -0
- package/dist/templates/egg3-tegg/README.md +33 -0
- package/dist/templates/egg3-tegg/_.gitignore +21 -0
- package/dist/templates/egg3-tegg/app/module/bar/controller/home.ts +19 -0
- package/dist/templates/egg3-tegg/app/module/bar/controller/user.ts +18 -0
- package/dist/templates/egg3-tegg/app/module/bar/package.json +6 -0
- package/dist/templates/egg3-tegg/app/module/foo/index.ts +1 -0
- package/dist/templates/egg3-tegg/app/module/foo/package.json +6 -0
- package/dist/templates/egg3-tegg/app/module/foo/service/HelloService.ts +19 -0
- package/dist/templates/egg3-tegg/config/config.default.ts +30 -0
- package/dist/templates/egg3-tegg/config/config.local.ts +6 -0
- package/dist/templates/egg3-tegg/config/config.prod.ts +6 -0
- package/dist/templates/egg3-tegg/config/config.unittest.ts +6 -0
- package/dist/templates/egg3-tegg/config/plugin.ts +34 -0
- package/dist/templates/egg3-tegg/package.json +58 -0
- package/dist/templates/egg3-tegg/test/app/module/bar/controller/home.test.ts +11 -0
- package/dist/templates/egg3-tegg/test/app/module/bar/controller/user.test.ts +11 -0
- package/dist/templates/egg3-tegg/test/app/module/foo/service/HelloService.test.ts +14 -0
- package/dist/templates/egg3-tegg/tsconfig.json +13 -0
- package/dist/templates/simple-ts/README.md +33 -0
- package/dist/templates/simple-ts/_.gitignore +20 -0
- package/dist/templates/simple-ts/app/controller/home.ts +8 -0
- package/dist/templates/simple-ts/app/router.ts +7 -0
- package/dist/templates/simple-ts/app/service/Test.ts +14 -0
- package/dist/templates/simple-ts/config/config.default.ts +22 -0
- package/dist/templates/simple-ts/config/config.local.ts +6 -0
- package/dist/templates/simple-ts/config/config.prod.ts +6 -0
- package/dist/templates/simple-ts/config/plugin.ts +11 -0
- package/dist/templates/simple-ts/package.json +51 -0
- package/dist/templates/simple-ts/test/app/controller/home.test.ts +8 -0
- package/dist/templates/simple-ts/test/app/service/Test.test.ts +9 -0
- package/dist/templates/simple-ts/tsconfig.json +10 -0
- package/dist/templates/simple-ts/typings/index.d.ts +3 -0
- package/dist/templates/tegg/.vscode/launch.json +26 -0
- package/dist/templates/tegg/README.md +33 -0
- package/dist/templates/tegg/_.gitignore +21 -0
- package/dist/templates/tegg/app/module/bar/controller/home.ts +19 -0
- package/dist/templates/tegg/app/module/bar/controller/user.ts +18 -0
- package/dist/templates/tegg/app/module/bar/package.json +6 -0
- package/dist/templates/tegg/app/module/foo/index.ts +1 -0
- package/dist/templates/tegg/app/module/foo/package.json +6 -0
- package/dist/templates/tegg/app/module/foo/service/HelloService.ts +19 -0
- package/dist/templates/tegg/config/config.default.ts +29 -0
- package/dist/templates/tegg/config/config.local.ts +6 -0
- package/dist/templates/tegg/config/config.prod.ts +6 -0
- package/dist/templates/tegg/config/config.unittest.ts +6 -0
- package/dist/templates/tegg/config/plugin.ts +34 -0
- package/dist/templates/tegg/package.json +58 -0
- package/dist/templates/tegg/test/app/module/bar/controller/home.test.ts +8 -0
- package/dist/templates/tegg/test/app/module/bar/controller/user.test.ts +8 -0
- package/dist/templates/tegg/test/app/module/foo/service/HelloService.test.ts +9 -0
- package/dist/templates/tegg/tsconfig.json +13 -0
- package/package.json +38 -29
- package/bin/create-egg.js +0 -3
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{name}}",
|
|
3
|
+
"description": "Hello Egg.js",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": true,
|
|
6
|
+
"egg": {
|
|
7
|
+
"typescript": true
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"start": "eggctl start --daemon --title=egg-server-{{name}}",
|
|
11
|
+
"stop": "eggctl stop --title=egg-server-{{name}}",
|
|
12
|
+
"dev": "egg-bin dev",
|
|
13
|
+
"test:local": "vitest run",
|
|
14
|
+
"pretest": "npm run clean && npm run lint -- --fix",
|
|
15
|
+
"test": "vitest run",
|
|
16
|
+
"preci": "npm run clean && npm run lint",
|
|
17
|
+
"ci": "vitest run --coverage",
|
|
18
|
+
"postci": "npm run prepublishOnly && npm start && sleep 10 && npm stop && npm run clean",
|
|
19
|
+
"lint": "oxlint --type-aware",
|
|
20
|
+
"tsc": "tsc",
|
|
21
|
+
"clean": "tsc -b --clean",
|
|
22
|
+
"prepublishOnly": "npm run clean && npm run tsc"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@eggjs/scripts": "^4.0.0",
|
|
26
|
+
"egg": "beta"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@eggjs/bin": "beta",
|
|
30
|
+
"@eggjs/mock": "beta",
|
|
31
|
+
"@eggjs/tsconfig": "beta",
|
|
32
|
+
"@types/node": "24",
|
|
33
|
+
"oxlint": "1",
|
|
34
|
+
"oxlint-tsgolint": "^0.2.0",
|
|
35
|
+
"typescript": "5",
|
|
36
|
+
"vitest": "beta"
|
|
37
|
+
},
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=20.19.0"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://github.com/YOUR_USERNAME/YOUR_REPO#readme",
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/YOUR_USERNAME/YOUR_REPO/issues"
|
|
44
|
+
},
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "git+https://github.com/YOUR_USERNAME/YOUR_REPO.git"
|
|
48
|
+
},
|
|
49
|
+
"author": "Author Name <author.name@mail.com>",
|
|
50
|
+
"license": "MIT"
|
|
51
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { test, expect } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import { app } from '@eggjs/mock/bootstrap';
|
|
4
|
+
|
|
5
|
+
test('sayHi should return hi, egg', async () => {
|
|
6
|
+
const ctx = app.mockContext();
|
|
7
|
+
const result = await ctx.service.test.sayHi('egg');
|
|
8
|
+
expect(result).toBe('hi, egg');
|
|
9
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"type": "node",
|
|
9
|
+
"request": "launch",
|
|
10
|
+
"name": "Egg Debug",
|
|
11
|
+
"runtimeExecutable": "npm",
|
|
12
|
+
"runtimeArgs": ["run", "dev", "--", "--inspect-brk"],
|
|
13
|
+
"console": "integratedTerminal",
|
|
14
|
+
"restart": true,
|
|
15
|
+
"autoAttachChildProcesses": true
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "node",
|
|
19
|
+
"request": "launch",
|
|
20
|
+
"name": "Egg Test",
|
|
21
|
+
"runtimeExecutable": "npm",
|
|
22
|
+
"runtimeArgs": ["run", "test:local", "--", "--inspect-brk"],
|
|
23
|
+
"autoAttachChildProcesses": true
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# tegg app
|
|
2
|
+
|
|
3
|
+
[Hacker News](https://news.ycombinator.com/) showcase using [tegg](https://github.com/eggjs/tegg)
|
|
4
|
+
|
|
5
|
+
## QuickStart
|
|
6
|
+
|
|
7
|
+
### Development
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm i
|
|
11
|
+
npm run dev
|
|
12
|
+
open http://localhost:7001/
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Don't tsc compile at development mode, if you had run `tsc` then you need to `npm run clean` before `npm run dev`.
|
|
16
|
+
|
|
17
|
+
### Deploy
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm run tsc
|
|
21
|
+
npm start
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Npm Scripts
|
|
25
|
+
|
|
26
|
+
- Use `npm run lint` to check code style
|
|
27
|
+
- Use `npm test` to run unit test
|
|
28
|
+
- se `npm run clean` to clean compiled js at development mode once
|
|
29
|
+
|
|
30
|
+
### Requirement
|
|
31
|
+
|
|
32
|
+
- Node.js >= 18.x
|
|
33
|
+
- Typescript >= 5.x
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
logs/
|
|
2
|
+
npm-debug.log
|
|
3
|
+
node_modules/
|
|
4
|
+
coverage/
|
|
5
|
+
.idea/
|
|
6
|
+
run/
|
|
7
|
+
logs/
|
|
8
|
+
.DS_Store
|
|
9
|
+
.vscode
|
|
10
|
+
*.swp
|
|
11
|
+
*.lock
|
|
12
|
+
*.js
|
|
13
|
+
.eslintcache
|
|
14
|
+
|
|
15
|
+
app/**/*.js
|
|
16
|
+
test/**/*.js
|
|
17
|
+
config/**/*.js
|
|
18
|
+
app/**/*.map
|
|
19
|
+
test/**/*.map
|
|
20
|
+
config/**/*.map
|
|
21
|
+
.package-lock.json
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EggLogger } from 'egg';
|
|
2
|
+
import { Inject, HTTPController, HTTPMethod, HTTPMethodEnum } from '@eggjs/tegg';
|
|
3
|
+
|
|
4
|
+
@HTTPController({
|
|
5
|
+
path: '/',
|
|
6
|
+
})
|
|
7
|
+
export class HomeController {
|
|
8
|
+
@Inject()
|
|
9
|
+
private logger: EggLogger;
|
|
10
|
+
|
|
11
|
+
@HTTPMethod({
|
|
12
|
+
method: HTTPMethodEnum.GET,
|
|
13
|
+
path: '/',
|
|
14
|
+
})
|
|
15
|
+
async index() {
|
|
16
|
+
this.logger.info('hello egg logger');
|
|
17
|
+
return 'hello egg';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Inject, HTTPController, HTTPMethod, HTTPMethodEnum, HTTPQuery } from '@eggjs/tegg';
|
|
2
|
+
import { HelloService } from '@/module/foo';
|
|
3
|
+
|
|
4
|
+
@HTTPController({
|
|
5
|
+
path: '/bar',
|
|
6
|
+
})
|
|
7
|
+
export class UserController {
|
|
8
|
+
@Inject()
|
|
9
|
+
private helloService: HelloService;
|
|
10
|
+
|
|
11
|
+
@HTTPMethod({
|
|
12
|
+
method: HTTPMethodEnum.GET,
|
|
13
|
+
path: 'user',
|
|
14
|
+
})
|
|
15
|
+
async user(@HTTPQuery({ name: 'userId' }) userId: string) {
|
|
16
|
+
return await this.helloService.hello(userId);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { HelloService } from './service/HelloService.ts';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EggLogger } from 'egg';
|
|
2
|
+
import { SingletonProto, AccessLevel, Inject } from '@eggjs/tegg';
|
|
3
|
+
|
|
4
|
+
@SingletonProto({
|
|
5
|
+
// 如果需要在上层使用,需要把 accessLevel 显示声明为 public
|
|
6
|
+
accessLevel: AccessLevel.PUBLIC,
|
|
7
|
+
})
|
|
8
|
+
export class HelloService {
|
|
9
|
+
// 注入一个 logger
|
|
10
|
+
@Inject()
|
|
11
|
+
private logger: EggLogger;
|
|
12
|
+
|
|
13
|
+
// 封装业务
|
|
14
|
+
async hello(userId: string): Promise<string> {
|
|
15
|
+
const result = { userId, handledBy: 'foo module' };
|
|
16
|
+
this.logger.info('[hello] get result: %j', result);
|
|
17
|
+
return `hello, ${result.userId}`;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineConfig, type EggAppInfo } from 'egg';
|
|
2
|
+
|
|
3
|
+
export default defineConfig((appInfo: EggAppInfo) => {
|
|
4
|
+
const config = {
|
|
5
|
+
// use for cookie sign key, should change to your own and keep security
|
|
6
|
+
keys: appInfo.name + '_{{keys}}',
|
|
7
|
+
|
|
8
|
+
// add your egg config in here
|
|
9
|
+
middleware: [] as string[],
|
|
10
|
+
|
|
11
|
+
// change multipart mode to file
|
|
12
|
+
// @see https://github.com/eggjs/multipart/blob/master/src/config/config.default.ts#L104
|
|
13
|
+
multipart: {
|
|
14
|
+
mode: 'file' as const,
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// add your special config in here
|
|
19
|
+
// Usage: `app.config.bizConfig.sourceUrl`
|
|
20
|
+
const bizConfig = {
|
|
21
|
+
sourceUrl: `https://github.com/eggjs/examples/tree/master/${appInfo.name}`,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// the return config will combines to EggAppConfig
|
|
25
|
+
return {
|
|
26
|
+
...config,
|
|
27
|
+
bizConfig,
|
|
28
|
+
};
|
|
29
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { EggPlugin } from 'egg';
|
|
2
|
+
|
|
3
|
+
const plugin: EggPlugin = {
|
|
4
|
+
tegg: {
|
|
5
|
+
enable: true,
|
|
6
|
+
package: '@eggjs/tegg-plugin',
|
|
7
|
+
},
|
|
8
|
+
teggConfig: {
|
|
9
|
+
enable: true,
|
|
10
|
+
package: '@eggjs/tegg-config',
|
|
11
|
+
},
|
|
12
|
+
teggController: {
|
|
13
|
+
enable: true,
|
|
14
|
+
package: '@eggjs/tegg-controller-plugin',
|
|
15
|
+
},
|
|
16
|
+
teggSchedule: {
|
|
17
|
+
enable: true,
|
|
18
|
+
package: '@eggjs/tegg-schedule-plugin',
|
|
19
|
+
},
|
|
20
|
+
eventbusModule: {
|
|
21
|
+
enable: true,
|
|
22
|
+
package: '@eggjs/tegg-eventbus-plugin',
|
|
23
|
+
},
|
|
24
|
+
aopModule: {
|
|
25
|
+
enable: true,
|
|
26
|
+
package: '@eggjs/tegg-aop-plugin',
|
|
27
|
+
},
|
|
28
|
+
tracer: {
|
|
29
|
+
enable: true,
|
|
30
|
+
package: '@eggjs/tracer',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default plugin;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{name}}",
|
|
3
|
+
"description": "Hello Egg.js",
|
|
4
|
+
"private": true,
|
|
5
|
+
"egg": {
|
|
6
|
+
"typescript": true
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"start": "eggctl start --daemon --title=egg-server-{{name}}",
|
|
10
|
+
"stop": "eggctl stop --title=egg-server-{{name}}",
|
|
11
|
+
"dev": "egg-bin dev",
|
|
12
|
+
"test:local": "vitest run",
|
|
13
|
+
"pretest": "npm run clean && npm run lint -- --fix",
|
|
14
|
+
"test": "vitest run",
|
|
15
|
+
"preci": "npm run clean && npm run lint",
|
|
16
|
+
"ci": "vitest run --coverage",
|
|
17
|
+
"postci": "npm run prepublishOnly && npm start && sleep 10 && npm stop && npm run clean",
|
|
18
|
+
"lint": "oxlint --type-aware",
|
|
19
|
+
"tsc": "tsc",
|
|
20
|
+
"clean": "tsc -b --clean",
|
|
21
|
+
"prepublishOnly": "npm run clean && npm run tsc"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@eggjs/scripts": "^4.0.0",
|
|
25
|
+
"@eggjs/tegg": "^3.5.2",
|
|
26
|
+
"@eggjs/tegg-aop-plugin": "^3.5.2",
|
|
27
|
+
"@eggjs/tegg-config": "^3.5.2",
|
|
28
|
+
"@eggjs/tegg-controller-plugin": "^3.5.2",
|
|
29
|
+
"@eggjs/tegg-eventbus-plugin": "^3.5.2",
|
|
30
|
+
"@eggjs/tegg-plugin": "^3.5.2",
|
|
31
|
+
"@eggjs/tegg-schedule-plugin": "^3.5.2",
|
|
32
|
+
"@eggjs/tracer": "^3.0.0",
|
|
33
|
+
"egg": "beta"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@eggjs/bin": "beta",
|
|
37
|
+
"@eggjs/mock": "beta",
|
|
38
|
+
"@eggjs/tsconfig": "beta",
|
|
39
|
+
"@types/node": "24",
|
|
40
|
+
"oxlint": "1",
|
|
41
|
+
"oxlint-tsgolint": "^0.2.0",
|
|
42
|
+
"typescript": "5",
|
|
43
|
+
"vitest": "beta"
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=20.19.0"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://github.com/YOUR_USERNAME/YOUR_REPO#readme",
|
|
49
|
+
"bugs": {
|
|
50
|
+
"url": "https://github.com/YOUR_USERNAME/YOUR_REPO/issues"
|
|
51
|
+
},
|
|
52
|
+
"repository": {
|
|
53
|
+
"type": "git",
|
|
54
|
+
"url": "git+https://github.com/YOUR_USERNAME/YOUR_REPO.git"
|
|
55
|
+
},
|
|
56
|
+
"author": "Author Name <author.name@mail.com>",
|
|
57
|
+
"license": "MIT"
|
|
58
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { test, expect } from 'vitest';
|
|
2
|
+
import { app } from '@eggjs/mock/bootstrap';
|
|
3
|
+
|
|
4
|
+
test('should GET /bar/user status 200', async () => {
|
|
5
|
+
const res = await app.httpRequest().get('/bar/user').query({ userId: '20170901' });
|
|
6
|
+
expect(res.status).toBe(200);
|
|
7
|
+
expect(res.text).toBe('hello, 20170901');
|
|
8
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { test, expect } from 'vitest';
|
|
2
|
+
import { app } from '@eggjs/mock/bootstrap';
|
|
3
|
+
import { HelloService } from '@/module/foo/service/HelloService';
|
|
4
|
+
|
|
5
|
+
test('should hello() work', async () => {
|
|
6
|
+
const helloService = await app.getEggObject(HelloService);
|
|
7
|
+
const msg = await helloService.hello('123456');
|
|
8
|
+
expect(msg).toBe('hello, 123456');
|
|
9
|
+
});
|
package/package.json
CHANGED
|
@@ -1,44 +1,53 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-egg",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
"egg-init": "3"
|
|
3
|
+
"version": "4.1.0-beta.10",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
7
6
|
},
|
|
7
|
+
"description": "Scaffolding Your First Egg.js Project",
|
|
8
|
+
"type": "module",
|
|
8
9
|
"devDependencies": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"git-contributor": "^2.1.5"
|
|
10
|
+
"@types/cross-spawn": "^6.0.6",
|
|
11
|
+
"@types/node": "24.5.2",
|
|
12
|
+
"execa": "^9.6.0",
|
|
13
|
+
"tsdown": "^0.15.4"
|
|
14
14
|
},
|
|
15
|
-
"bin": "./bin/create-egg.js",
|
|
16
15
|
"engines": {
|
|
17
|
-
"node": ">=
|
|
16
|
+
"node": ">=20.19.0"
|
|
18
17
|
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"lint": "eslint .",
|
|
21
|
-
"test": "npm run lint -- --fix && npm run test-local",
|
|
22
|
-
"test-local": "egg-bin test",
|
|
23
|
-
"cov": "egg-bin cov",
|
|
24
|
-
"ci": "npm run lint && npm run cov",
|
|
25
|
-
"contributor": "git-contributor"
|
|
26
|
-
},
|
|
27
|
-
"eslintIgnore": [
|
|
28
|
-
"coverage",
|
|
29
|
-
"dist"
|
|
30
|
-
],
|
|
31
18
|
"repository": {
|
|
32
19
|
"type": "git",
|
|
33
|
-
"url": "git@github.com:eggjs/
|
|
20
|
+
"url": "git@github.com:eggjs/egg.git",
|
|
21
|
+
"directory": "tools/create-egg"
|
|
34
22
|
},
|
|
35
|
-
"
|
|
23
|
+
"bugs": {
|
|
36
24
|
"url": "https://github.com/eggjs/egg/issues"
|
|
37
25
|
},
|
|
38
|
-
"homepage": "https://github.com/eggjs/create-egg",
|
|
26
|
+
"homepage": "https://github.com/eggjs/egg/tree/next/tools/create-egg",
|
|
39
27
|
"files": [
|
|
40
|
-
"
|
|
28
|
+
"dist"
|
|
41
29
|
],
|
|
42
30
|
"author": "TZ <atian25@qq.com>",
|
|
43
|
-
"license": "MIT"
|
|
44
|
-
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"main": "./dist/index.js",
|
|
33
|
+
"module": "./dist/index.js",
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"exports": {
|
|
36
|
+
".": "./dist/index.js",
|
|
37
|
+
"./cli": "./dist/cli.js",
|
|
38
|
+
"./package.json": "./package.json"
|
|
39
|
+
},
|
|
40
|
+
"bin": {
|
|
41
|
+
"create-egg": "./dist/cli.js"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@clack/prompts": "^0.11.0",
|
|
45
|
+
"cross-spawn": "^7.0.6",
|
|
46
|
+
"mri": "^1.2.0",
|
|
47
|
+
"picocolors": "^1.1.1"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"test": "vitest run",
|
|
51
|
+
"build": "tsdown"
|
|
52
|
+
}
|
|
53
|
+
}
|
package/bin/create-egg.js
DELETED