listpage_cli 0.0.295 → 0.0.296

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.
Files changed (29) hide show
  1. package/bin/adapters/cli-interaction.js +4 -15
  2. package/bin/adapters/dockerode-client.js +295 -0
  3. package/bin/app/parse-args.js +86 -0
  4. package/bin/cli.js +5 -1
  5. package/bin/commands/deploy-project-command.js +17 -2
  6. package/bin/commands/release-project-command.js +24 -0
  7. package/bin/ports/release-project-command.js +2 -0
  8. package/bin/services/{artifact-validator.js → build-artifact-validator.js} +2 -2
  9. package/bin/services/config-value-utils.js +44 -0
  10. package/bin/services/deploy-project-service.js +303 -150
  11. package/bin/services/filesystem-capability-service.js +0 -5
  12. package/bin/services/init-service.js +0 -7
  13. package/bin/services/release-project-service.js +239 -0
  14. package/bin/types/deploy-config.js +2 -0
  15. package/package.json +6 -4
  16. package/templates/backend-template/package.json.tmpl +1 -1
  17. package/templates/backend-template/tsconfig.build.json +12 -2
  18. package/templates/frontend-template/package.json.tmpl +2 -2
  19. package/templates/rush-template/listpage.config.json.tmpl +89 -0
  20. package/bin/copy.js +0 -40
  21. package/bin/prompts.js +0 -170
  22. package/templates/package-app-template/.gitignore.tmpl +0 -28
  23. package/templates/package-app-template/README.md +0 -33
  24. package/templates/package-app-template/package.json +0 -27
  25. package/templates/package-app-template/src/build.ts +0 -6
  26. package/templates/package-app-template/src/config.ts.tmpl +0 -45
  27. package/templates/package-app-template/src/package.ts +0 -5
  28. package/templates/package-app-template/src/publish.ts +0 -6
  29. package/templates/package-app-template/tsconfig.json +0 -25
@@ -1,27 +0,0 @@
1
- {
2
- "name": "package-app",
3
- "version": "1.0.0",
4
- "description": "",
5
- "main": "dist/build.js",
6
- "scripts": {
7
- "build": "ts-node src/build.ts",
8
- "package": "ts-node src/package.ts",
9
- "publish": "ts-node src/publish.ts"
10
- },
11
- "dependencies": {
12
- "listpage-next-deploy": "0.0.295"
13
- },
14
- "devDependencies": {
15
- "@types/node": "^20.0.0",
16
- "@types/archiver": "^6.0.0",
17
- "typescript": "^5.0.0",
18
- "ts-node": "^10.9.0"
19
- },
20
- "keywords": [
21
- "packaging",
22
- "build",
23
- "typescript"
24
- ],
25
- "author": "",
26
- "license": "MIT"
27
- }
@@ -1,6 +0,0 @@
1
- import { Builder } from "listpage-next-deploy";
2
- import { config } from "./config";
3
-
4
- const builder = new Builder(config);
5
-
6
- builder.run();
@@ -1,45 +0,0 @@
1
- import { Config } from "listpage-next-deploy";
2
- import path from "path";
3
-
4
- export const config = new Config({
5
- root: path.join(__dirname, "../../../../"),
6
- clean: true,
7
- outputBaseDir: "common/scripts/package-app/output",
8
- frontend: [
9
- {
10
- source: "apps/__FRONTEND_NAME__",
11
- output: "public/",
12
- outputName: "dist",
13
- outputNewName: "__APP_NAME__",
14
- },
15
- ],
16
- backend: {
17
- source: "servers/__BACKEND_NAME__",
18
- output: ".",
19
- outputName: "dist",
20
- outputNewName: "dist",
21
- },
22
- copyFiles: [
23
- {
24
- source: "servers/__BACKEND_NAME__/prisma",
25
- dest: "common/scripts/package-app/output/prisma",
26
- },
27
- {
28
- source: "servers/__BACKEND_NAME__/Dockerfile",
29
- dest: "common/scripts/package-app/output/Dockerfile",
30
- },
31
- ],
32
- docker: {
33
- imageName: "__APP_NAME__",
34
- imageTag: "0.0.1",
35
- containerName: "__APP_NAME__",
36
- // 需要和 dockerfile 中定义的 app 目录保持一致
37
- appName: "__APP_NAME__",
38
- registry: {
39
- url: "registry.cn-hangzhou.aliyuncs.com",
40
- namespace: "",
41
- username: "",
42
- password: "",
43
- },
44
- },
45
- });
@@ -1,5 +0,0 @@
1
- import { Packager } from "listpage-next-deploy";
2
- import { config } from "./config";
3
-
4
- const packager = new Packager(config);
5
- packager.run();
@@ -1,6 +0,0 @@
1
- import { Deployer } from "listpage-next-deploy";
2
- import { config } from "./config";
3
-
4
- const deployer = new Deployer(config);
5
-
6
- deployer.run();
@@ -1,25 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "commonjs",
5
- "lib": ["ES2020"],
6
- "types": ["node"],
7
- "outDir": "./dist",
8
- "rootDir": "./src",
9
- "strict": true,
10
- "esModuleInterop": true,
11
- "skipLibCheck": true,
12
- "forceConsistentCasingInFileNames": true,
13
- "resolveJsonModule": true,
14
- "declaration": true,
15
- "declarationMap": true,
16
- "sourceMap": true
17
- },
18
- "include": [
19
- "src/**/*"
20
- ],
21
- "exclude": [
22
- "node_modules",
23
- "dist"
24
- ]
25
- }