listpage_cli 0.0.187
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/bin/cli.js +219 -0
- package/package.json +25 -0
- package/templates/.gitattributes +14 -0
- package/templates/.github/workflows/ci.yml +27 -0
- package/templates/app-templates/backend-tempalte/.prettierrc +4 -0
- package/templates/app-templates/backend-tempalte/README.md +98 -0
- package/templates/app-templates/backend-tempalte/nest-cli.json +8 -0
- package/templates/app-templates/backend-tempalte/package.json.tmpl +41 -0
- package/templates/app-templates/backend-tempalte/src/app.controller.ts +12 -0
- package/templates/app-templates/backend-tempalte/src/app.module.ts +10 -0
- package/templates/app-templates/backend-tempalte/src/app.service.ts +8 -0
- package/templates/app-templates/backend-tempalte/src/main.ts +8 -0
- package/templates/app-templates/backend-tempalte/tsconfig.build.json +4 -0
- package/templates/app-templates/backend-tempalte/tsconfig.json +25 -0
- package/templates/app-templates/frontend-template/.prettierignore +4 -0
- package/templates/app-templates/frontend-template/.prettierrc +3 -0
- package/templates/app-templates/frontend-template/AGENTS.md +20 -0
- package/templates/app-templates/frontend-template/README.md +36 -0
- package/templates/app-templates/frontend-template/package.json.tmpl +36 -0
- package/templates/app-templates/frontend-template/public/favicon.png +0 -0
- package/templates/app-templates/frontend-template/rsbuild.config.ts +9 -0
- package/templates/app-templates/frontend-template/src/App.css +6 -0
- package/templates/app-templates/frontend-template/src/App.tsx +8 -0
- package/templates/app-templates/frontend-template/src/Layout.tsx +12 -0
- package/templates/app-templates/frontend-template/src/api/config.tsx +25 -0
- package/templates/app-templates/frontend-template/src/api/index.ts +0 -0
- package/templates/app-templates/frontend-template/src/env.d.ts +11 -0
- package/templates/app-templates/frontend-template/src/index.tsx +13 -0
- package/templates/app-templates/frontend-template/src/router/index.tsx +12 -0
- package/templates/app-templates/frontend-template/tsconfig.json +25 -0
- package/templates/common/config/rush/.npmrc-publish +26 -0
- package/templates/common/config/rush/.pnpmfile.cjs +38 -0
- package/templates/common/config/rush/artifactory.json +109 -0
- package/templates/common/config/rush/build-cache.json +160 -0
- package/templates/common/config/rush/cobuild.json +22 -0
- package/templates/common/config/rush/command-line.json +407 -0
- package/templates/common/config/rush/common-versions.json +77 -0
- package/templates/common/config/rush/custom-tips.json +29 -0
- package/templates/common/config/rush/experiments.json +121 -0
- package/templates/common/config/rush/pnpm-config.json +363 -0
- package/templates/common/config/rush/rush-plugins.json +29 -0
- package/templates/common/config/rush/subspaces.json +35 -0
- package/templates/common/config/rush/version-policies.json +102 -0
- package/templates/common/git-hooks/commit-msg.sample +25 -0
- package/templates/rush.json +444 -0
package/bin/cli.js
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const child_process_1 = require("child_process");
|
|
10
|
+
const enquirer_1 = require("enquirer");
|
|
11
|
+
function printHelp() {
|
|
12
|
+
const h = [
|
|
13
|
+
"用法:rush_project_cli init",
|
|
14
|
+
"说明:进入中文引导式交互,按提示填写即可",
|
|
15
|
+
].join("\n");
|
|
16
|
+
console.log(h);
|
|
17
|
+
}
|
|
18
|
+
function safePkgName(name) {
|
|
19
|
+
return name
|
|
20
|
+
.toLowerCase()
|
|
21
|
+
.replace(/\s+/g, "-")
|
|
22
|
+
.replace(/[^a-z0-9-_.]/g, "-");
|
|
23
|
+
}
|
|
24
|
+
function listFilesRecursive(root) {
|
|
25
|
+
const out = [];
|
|
26
|
+
const stack = [root];
|
|
27
|
+
while (stack.length) {
|
|
28
|
+
const d = stack.pop();
|
|
29
|
+
const items = fs_1.default.readdirSync(d);
|
|
30
|
+
items.forEach((name) => {
|
|
31
|
+
const p = path_1.default.join(d, name);
|
|
32
|
+
const stat = fs_1.default.statSync(p);
|
|
33
|
+
if (stat.isDirectory())
|
|
34
|
+
stack.push(p);
|
|
35
|
+
else
|
|
36
|
+
out.push(p);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return out;
|
|
40
|
+
}
|
|
41
|
+
function ensureDir(dir) {
|
|
42
|
+
if (!fs_1.default.existsSync(dir))
|
|
43
|
+
fs_1.default.mkdirSync(dir, { recursive: true });
|
|
44
|
+
}
|
|
45
|
+
function isDirEmpty(dir) {
|
|
46
|
+
return !fs_1.default.existsSync(dir) || fs_1.default.readdirSync(dir).length === 0;
|
|
47
|
+
}
|
|
48
|
+
async function initCmd() {
|
|
49
|
+
const projectName = await askProjectPath();
|
|
50
|
+
const targetDir = path_1.default.resolve(process.cwd(), projectName);
|
|
51
|
+
if (!isDirEmpty(targetDir)) {
|
|
52
|
+
const { ok } = await (0, enquirer_1.prompt)({
|
|
53
|
+
type: "confirm",
|
|
54
|
+
name: "ok",
|
|
55
|
+
message: "目标目录非空,是否覆盖?",
|
|
56
|
+
initial: false,
|
|
57
|
+
});
|
|
58
|
+
if (!ok) {
|
|
59
|
+
console.error("已取消");
|
|
60
|
+
process.exit(1);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
ensureDir(targetDir);
|
|
64
|
+
return initRush(targetDir, projectName);
|
|
65
|
+
}
|
|
66
|
+
async function askRushQuestions() {
|
|
67
|
+
const { name: frontendName } = await (0, enquirer_1.prompt)({
|
|
68
|
+
type: "input",
|
|
69
|
+
name: "name",
|
|
70
|
+
message: "请输入前端项目名称,为空表示不创建前端项目",
|
|
71
|
+
initial: "",
|
|
72
|
+
});
|
|
73
|
+
const { name: backendName } = await (0, enquirer_1.prompt)({
|
|
74
|
+
type: "input",
|
|
75
|
+
name: "name",
|
|
76
|
+
message: "请输入后端项目名称,为空表示不创建后端项目",
|
|
77
|
+
initial: "",
|
|
78
|
+
});
|
|
79
|
+
return { frontendName, backendName };
|
|
80
|
+
}
|
|
81
|
+
function copyRushSkeleton(targetDir) {
|
|
82
|
+
const srcRoot = path_1.default.join(__dirname, "..", "templates");
|
|
83
|
+
const exclude = new Set(["vanilla-js", "app-templates"]);
|
|
84
|
+
const entries = fs_1.default.readdirSync(srcRoot);
|
|
85
|
+
entries.forEach((name) => {
|
|
86
|
+
if (exclude.has(name))
|
|
87
|
+
return;
|
|
88
|
+
const srcPath = path_1.default.join(srcRoot, name);
|
|
89
|
+
const destPath = path_1.default.join(targetDir, name);
|
|
90
|
+
const stat = fs_1.default.statSync(srcPath);
|
|
91
|
+
if (stat.isDirectory()) {
|
|
92
|
+
copyDir(srcPath, destPath);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
ensureDir(path_1.default.dirname(destPath));
|
|
96
|
+
fs_1.default.copyFileSync(srcPath, destPath);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function copyDir(src, dest) {
|
|
101
|
+
ensureDir(dest);
|
|
102
|
+
for (const entry of fs_1.default.readdirSync(src)) {
|
|
103
|
+
const s = path_1.default.join(src, entry);
|
|
104
|
+
const d = path_1.default.join(dest, entry);
|
|
105
|
+
const stat = fs_1.default.statSync(s);
|
|
106
|
+
if (stat.isDirectory())
|
|
107
|
+
copyDir(s, d);
|
|
108
|
+
else {
|
|
109
|
+
ensureDir(path_1.default.dirname(d));
|
|
110
|
+
fs_1.default.copyFileSync(s, d);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function readJsonWithComments(str) {
|
|
115
|
+
const noBlock = str.replace(/\/\*[\s\S]*?\*\//g, "");
|
|
116
|
+
const noLine = noBlock.replace(/(^|\s)\/\/.*$/gm, "");
|
|
117
|
+
const noTrailingComma = noLine.replace(/,\s*([}\]])/g, "$1");
|
|
118
|
+
return JSON.parse(noTrailingComma);
|
|
119
|
+
}
|
|
120
|
+
function initGit(targetDir) {
|
|
121
|
+
try {
|
|
122
|
+
(0, child_process_1.execSync)("git init", { stdio: "inherit", cwd: targetDir });
|
|
123
|
+
(0, child_process_1.execSync)("git add -A", { stdio: "inherit", cwd: targetDir });
|
|
124
|
+
(0, child_process_1.execSync)('git commit -m "init"', { stdio: "inherit", cwd: targetDir });
|
|
125
|
+
}
|
|
126
|
+
catch { }
|
|
127
|
+
}
|
|
128
|
+
async function initRush(targetDir, projectName) {
|
|
129
|
+
copyRushSkeleton(targetDir);
|
|
130
|
+
const cfgPath = path_1.default.join(targetDir, "rush.json");
|
|
131
|
+
const rushCfg = readJsonWithComments(fs_1.default.readFileSync(cfgPath, "utf8"));
|
|
132
|
+
const { frontendName, backendName } = await askRushQuestions();
|
|
133
|
+
const projects = rushCfg.projects || [];
|
|
134
|
+
if (frontendName) {
|
|
135
|
+
const pkg = composePkgName(frontendName);
|
|
136
|
+
scaffoldApp(targetDir, "frontend", frontendName, pkg);
|
|
137
|
+
projects.push({
|
|
138
|
+
packageName: pkg,
|
|
139
|
+
projectFolder: `apps/${frontendName}`,
|
|
140
|
+
reviewCategory: "production",
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
if (backendName) {
|
|
144
|
+
const pkg = composePkgName(backendName);
|
|
145
|
+
scaffoldApp(targetDir, "backend", backendName, pkg);
|
|
146
|
+
projects.push({
|
|
147
|
+
packageName: pkg,
|
|
148
|
+
projectFolder: `servers/${backendName}`,
|
|
149
|
+
reviewCategory: "production",
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
rushCfg.projects = projects;
|
|
153
|
+
fs_1.default.writeFileSync(cfgPath, JSON.stringify(rushCfg, null, 2));
|
|
154
|
+
initGit(targetDir);
|
|
155
|
+
if (fs_1.default.existsSync(path_1.default.join(targetDir, "common"))) {
|
|
156
|
+
console.log("Skipping rush update in CLI; install manually if needed.");
|
|
157
|
+
}
|
|
158
|
+
console.log(`Rush repo created at ${targetDir}`);
|
|
159
|
+
console.log("Next:");
|
|
160
|
+
if (projectName !== ".")
|
|
161
|
+
console.log(` cd ${projectName}`);
|
|
162
|
+
console.log(" # then run: rush update && rush build");
|
|
163
|
+
}
|
|
164
|
+
async function askProjectPath() {
|
|
165
|
+
const ans = await (0, enquirer_1.prompt)({
|
|
166
|
+
type: "input",
|
|
167
|
+
name: "path",
|
|
168
|
+
message: "请填写项目名称或路径,如果填.表示直接把项目放到当前目录下",
|
|
169
|
+
initial: ".",
|
|
170
|
+
});
|
|
171
|
+
const p = (ans.path || ".").trim();
|
|
172
|
+
return p || ".";
|
|
173
|
+
}
|
|
174
|
+
function composePkgName(name) {
|
|
175
|
+
const n = safePkgName(name);
|
|
176
|
+
return `${n}`;
|
|
177
|
+
}
|
|
178
|
+
function scaffoldApp(repoDir, kind, appName, pkgName) {
|
|
179
|
+
const tplBase = path_1.default.join(__dirname, "..", "templates", "app-templates");
|
|
180
|
+
const dir = kind === "frontend"
|
|
181
|
+
? "frontend-template"
|
|
182
|
+
: kind === "backend"
|
|
183
|
+
? "backend-tempalte"
|
|
184
|
+
: undefined;
|
|
185
|
+
if (!dir)
|
|
186
|
+
throw new Error(`Unknown kind: ${kind}`);
|
|
187
|
+
const srcDir = path_1.default.join(tplBase, dir);
|
|
188
|
+
const destBase = kind === "frontend" ? "apps" : "servers";
|
|
189
|
+
const destDir = path_1.default.join(repoDir, destBase, appName);
|
|
190
|
+
copyTemplateDir(srcDir, destDir, { APP_NAME: appName, PKG_NAME: pkgName });
|
|
191
|
+
}
|
|
192
|
+
function copyTemplateDir(srcDir, destDir, vars) {
|
|
193
|
+
const files = listFilesRecursive(srcDir);
|
|
194
|
+
files.forEach((src) => {
|
|
195
|
+
const rel = path_1.default.relative(srcDir, src);
|
|
196
|
+
const isTmpl = rel.endsWith(".tmpl");
|
|
197
|
+
const outRel = isTmpl ? rel.slice(0, -5) : rel;
|
|
198
|
+
const dest = path_1.default.join(destDir, outRel);
|
|
199
|
+
ensureDir(path_1.default.dirname(dest));
|
|
200
|
+
const buf = fs_1.default.readFileSync(src, "utf8");
|
|
201
|
+
const content = isTmpl ? renderVars(buf, vars) : buf;
|
|
202
|
+
fs_1.default.writeFileSync(dest, content);
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
function renderVars(str, vars) {
|
|
206
|
+
let out = str;
|
|
207
|
+
for (const [k, v] of Object.entries(vars)) {
|
|
208
|
+
const re = new RegExp(`__${k}__`, "g");
|
|
209
|
+
out = out.replace(re, v);
|
|
210
|
+
}
|
|
211
|
+
return out;
|
|
212
|
+
}
|
|
213
|
+
async function main() {
|
|
214
|
+
const cmd = process.argv[2];
|
|
215
|
+
if (cmd === "init")
|
|
216
|
+
return initCmd();
|
|
217
|
+
printHelp();
|
|
218
|
+
}
|
|
219
|
+
main();
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "listpage_cli",
|
|
3
|
+
"version": "0.0.187",
|
|
4
|
+
"private": false,
|
|
5
|
+
"bin": {
|
|
6
|
+
"listpage_cli": "bin/cli.js"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc -p tsconfig.json",
|
|
10
|
+
"prepublishOnly": "npm run build",
|
|
11
|
+
"start": "node bin/cli.js",
|
|
12
|
+
"test": "node bin/cli.js --help"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"bin",
|
|
16
|
+
"templates"
|
|
17
|
+
],
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"typescript": "^5.6.2",
|
|
20
|
+
"@types/node": "^22.8.6"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"enquirer": "^2.4.1"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Don't allow people to merge changes to these generated files, because the result
|
|
2
|
+
# may be invalid. You need to run "rush update" again.
|
|
3
|
+
pnpm-lock.yaml merge=text
|
|
4
|
+
shrinkwrap.yaml merge=binary
|
|
5
|
+
npm-shrinkwrap.json merge=binary
|
|
6
|
+
yarn.lock merge=binary
|
|
7
|
+
|
|
8
|
+
# Rush's JSON config files use JavaScript-style code comments. The rule below prevents pedantic
|
|
9
|
+
# syntax highlighters such as GitHub's from highlighting these comments as errors. Your text editor
|
|
10
|
+
# may also require a special configuration to allow comments in JSON.
|
|
11
|
+
#
|
|
12
|
+
# For more information, see this issue: https://github.com/microsoft/rushstack/issues/1088
|
|
13
|
+
#
|
|
14
|
+
*.json linguist-language=JSON-with-Comments
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [ "main" ]
|
|
5
|
+
pull_request:
|
|
6
|
+
branches: [ "main" ]
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v3
|
|
12
|
+
with:
|
|
13
|
+
fetch-depth: 2
|
|
14
|
+
- name: Git config user
|
|
15
|
+
uses: snow-actions/git-config-user@v1.0.0
|
|
16
|
+
with:
|
|
17
|
+
name: # Service Account's Name
|
|
18
|
+
email: # Service Account's Email Address
|
|
19
|
+
- uses: actions/setup-node@v3
|
|
20
|
+
with:
|
|
21
|
+
node-version: 16
|
|
22
|
+
- name: Verify Change Logs
|
|
23
|
+
run: node common/scripts/install-run-rush.js change --verify
|
|
24
|
+
- name: Rush Install
|
|
25
|
+
run: node common/scripts/install-run-rush.js install
|
|
26
|
+
- name: Rush rebuild
|
|
27
|
+
run: node common/scripts/install-run-rush.js rebuild --verbose --production
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
|
|
6
|
+
[circleci-url]: https://circleci.com/gh/nestjs/nest
|
|
7
|
+
|
|
8
|
+
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
|
|
11
|
+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
|
|
12
|
+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
|
|
13
|
+
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
|
|
14
|
+
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
|
|
15
|
+
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
|
|
16
|
+
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
|
|
17
|
+
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg" alt="Donate us"/></a>
|
|
18
|
+
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
|
|
19
|
+
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow" alt="Follow us on Twitter"></a>
|
|
20
|
+
</p>
|
|
21
|
+
<!--[](https://opencollective.com/nest#backer)
|
|
22
|
+
[](https://opencollective.com/nest#sponsor)-->
|
|
23
|
+
|
|
24
|
+
## Description
|
|
25
|
+
|
|
26
|
+
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
|
|
27
|
+
|
|
28
|
+
## Project setup
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
$ pnpm install
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Compile and run the project
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# development
|
|
38
|
+
$ pnpm run start
|
|
39
|
+
|
|
40
|
+
# watch mode
|
|
41
|
+
$ pnpm run start:dev
|
|
42
|
+
|
|
43
|
+
# production mode
|
|
44
|
+
$ pnpm run start:prod
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Run tests
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# unit tests
|
|
51
|
+
$ pnpm run test
|
|
52
|
+
|
|
53
|
+
# e2e tests
|
|
54
|
+
$ pnpm run test:e2e
|
|
55
|
+
|
|
56
|
+
# test coverage
|
|
57
|
+
$ pnpm run test:cov
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Deployment
|
|
61
|
+
|
|
62
|
+
When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the [deployment documentation](https://docs.nestjs.com/deployment) for more information.
|
|
63
|
+
|
|
64
|
+
If you are looking for a cloud-based platform to deploy your NestJS application, check out [Mau](https://mau.nestjs.com), our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
$ pnpm install -g @nestjs/mau
|
|
68
|
+
$ mau deploy
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
With Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.
|
|
72
|
+
|
|
73
|
+
## Resources
|
|
74
|
+
|
|
75
|
+
Check out a few resources that may come in handy when working with NestJS:
|
|
76
|
+
|
|
77
|
+
- Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework.
|
|
78
|
+
- For questions and support, please visit our [Discord channel](https://discord.gg/G7Qnnhy).
|
|
79
|
+
- To dive deeper and get more hands-on experience, check out our official video [courses](https://courses.nestjs.com/).
|
|
80
|
+
- Deploy your application to AWS with the help of [NestJS Mau](https://mau.nestjs.com) in just a few clicks.
|
|
81
|
+
- Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com).
|
|
82
|
+
- Need help with your project (part-time to full-time)? Check out our official [enterprise support](https://enterprise.nestjs.com).
|
|
83
|
+
- To stay in the loop and get updates, follow us on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs).
|
|
84
|
+
- Looking for a job, or have a job to offer? Check out our official [Jobs board](https://jobs.nestjs.com).
|
|
85
|
+
|
|
86
|
+
## Support
|
|
87
|
+
|
|
88
|
+
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
|
|
89
|
+
|
|
90
|
+
## Stay in touch
|
|
91
|
+
|
|
92
|
+
- Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec)
|
|
93
|
+
- Website - [https://nestjs.com](https://nestjs.com/)
|
|
94
|
+
- Twitter - [@nestframework](https://twitter.com/nestframework)
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE).
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "__PKG_NAME__",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"author": "",
|
|
6
|
+
"private": true,
|
|
7
|
+
"license": "UNLICENSED",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "nest build",
|
|
10
|
+
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
11
|
+
"start": "nest start",
|
|
12
|
+
"start:dev": "nest start --watch",
|
|
13
|
+
"start:debug": "nest start --debug --watch",
|
|
14
|
+
"start:prod": "node dist/main"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@nestjs/common": "^11.0.1",
|
|
18
|
+
"@nestjs/core": "^11.0.1",
|
|
19
|
+
"@nestjs/platform-express": "^11.0.1",
|
|
20
|
+
"@prisma/client": "^6.0.0",
|
|
21
|
+
"prisma": "^6.0.0",
|
|
22
|
+
"@nestjs/config": "^4.0.0",
|
|
23
|
+
"reflect-metadata": "^0.2.2",
|
|
24
|
+
"class-transformer": "^0.5.1",
|
|
25
|
+
"class-validator": "~0.14.2",
|
|
26
|
+
"rxjs": "^7.8.1",
|
|
27
|
+
"listpage-next-nest": "~0.0.163"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@nestjs/schematics": "^11.0.0",
|
|
31
|
+
"@types/express": "^5.0.0",
|
|
32
|
+
"@types/node": "^22.10.7",
|
|
33
|
+
"globals": "^16.0.0",
|
|
34
|
+
"prettier": "^3.4.2",
|
|
35
|
+
"source-map-support": "^0.5.21",
|
|
36
|
+
"ts-loader": "^9.5.2",
|
|
37
|
+
"ts-node": "^10.9.2",
|
|
38
|
+
"tsconfig-paths": "^4.2.0",
|
|
39
|
+
"typescript": "^5.7.3"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Controller, Get } from '@nestjs/common';
|
|
2
|
+
import { AppService } from './app.service';
|
|
3
|
+
|
|
4
|
+
@Controller()
|
|
5
|
+
export class AppController {
|
|
6
|
+
constructor(private readonly appService: AppService) {}
|
|
7
|
+
|
|
8
|
+
@Get()
|
|
9
|
+
getHello(): string {
|
|
10
|
+
return this.appService.getHello();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "nodenext",
|
|
4
|
+
"moduleResolution": "nodenext",
|
|
5
|
+
"resolvePackageJsonExports": true,
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"isolatedModules": true,
|
|
8
|
+
"declaration": true,
|
|
9
|
+
"removeComments": true,
|
|
10
|
+
"emitDecoratorMetadata": true,
|
|
11
|
+
"experimentalDecorators": true,
|
|
12
|
+
"allowSyntheticDefaultImports": true,
|
|
13
|
+
"target": "ES2023",
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"outDir": "./dist",
|
|
16
|
+
"baseUrl": "./",
|
|
17
|
+
"incremental": true,
|
|
18
|
+
"skipLibCheck": true,
|
|
19
|
+
"strictNullChecks": true,
|
|
20
|
+
"forceConsistentCasingInFileNames": true,
|
|
21
|
+
"noImplicitAny": false,
|
|
22
|
+
"strictBindCallApply": false,
|
|
23
|
+
"noFallthroughCasesInSwitch": false
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
You are an expert in JavaScript, Rsbuild, and web application development. You write maintainable, performant, and accessible code.
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
- `npm run dev` - Start the dev server
|
|
8
|
+
- `npm run build` - Build the app for production
|
|
9
|
+
- `npm run preview` - Preview the production build locally
|
|
10
|
+
|
|
11
|
+
## Docs
|
|
12
|
+
|
|
13
|
+
- Rsbuild: <https://rsbuild.rs/llms.txt>
|
|
14
|
+
- Rspack: <https://rspack.rs/llms.txt>
|
|
15
|
+
|
|
16
|
+
## Tools
|
|
17
|
+
|
|
18
|
+
### Prettier
|
|
19
|
+
|
|
20
|
+
- Run `npm run format` to format your code
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Rsbuild project
|
|
2
|
+
|
|
3
|
+
## Setup
|
|
4
|
+
|
|
5
|
+
Install the dependencies:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm install
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Get started
|
|
12
|
+
|
|
13
|
+
Start the dev server, and the app will be available at [http://localhost:3000](http://localhost:3000).
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm dev
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Build the app for production:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm build
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Preview the production build locally:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pnpm preview
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Learn more
|
|
32
|
+
|
|
33
|
+
To learn more about Rsbuild, check out the following resources:
|
|
34
|
+
|
|
35
|
+
- [Rsbuild documentation](https://rsbuild.rs) - explore Rsbuild features and APIs.
|
|
36
|
+
- [Rsbuild GitHub repository](https://github.com/web-infra-dev/rsbuild) - your feedback and contributions are welcome!
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "__PKG_NAME__",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "rsbuild build",
|
|
8
|
+
"dev": "rsbuild dev --open",
|
|
9
|
+
"format": "prettier --write .",
|
|
10
|
+
"preview": "rsbuild preview"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"react": "^19.2.0",
|
|
14
|
+
"react-dom": "^19.2.0",
|
|
15
|
+
"listpage-next": "~0.0.187",
|
|
16
|
+
"react-router-dom": ">=6.0.0",
|
|
17
|
+
"@ant-design/v5-patch-for-react-19": "~1.0.3",
|
|
18
|
+
"ahooks": "^3.9.5",
|
|
19
|
+
"antd": "^5.27.3",
|
|
20
|
+
"axios": "^1.12.2",
|
|
21
|
+
"dayjs": "^1.11.18",
|
|
22
|
+
"lodash": "^4.17.21",
|
|
23
|
+
"styled-components": "^6.1.19",
|
|
24
|
+
"mobx": "~6.15.0",
|
|
25
|
+
"@ant-design/icons": "~6.0.2",
|
|
26
|
+
"mobx-react-lite": "~4.1.1"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@rsbuild/core": "^1.6.0",
|
|
30
|
+
"@rsbuild/plugin-react": "^1.4.1",
|
|
31
|
+
"@types/react": "^19.2.2",
|
|
32
|
+
"@types/react-dom": "^19.2.2",
|
|
33
|
+
"prettier": "^3.6.2",
|
|
34
|
+
"typescript": "^5.9.3"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
Binary file
|