create-qs 0.0.0 → 0.8.21

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 (59) hide show
  1. package/README.md +48 -2
  2. package/README.zh-CN.md +36 -0
  3. package/README.zh-TW.md +36 -0
  4. package/index.js +1883 -0
  5. package/package.json +33 -5
  6. package/template/default/.quicksilver/.gitattributes +4 -0
  7. package/template/default/.quicksilver/manual/en-US/00-setup.md +197 -0
  8. package/template/default/.quicksilver/manual/zh-CN/00-setup.md +197 -0
  9. package/template/default/.quicksilver/manual/zh-TW/00-setup.md +197 -0
  10. package/template/default/AGENTS.md +322 -0
  11. package/template/default/README.md +5 -0
  12. package/template/default/_gitignore +70 -0
  13. package/template/default/build.gradle.kts +5 -0
  14. package/template/default/eslint.config.js +137 -0
  15. package/template/default/gradle/repo.settings.gradle.kts +90 -0
  16. package/template/default/gradle/wrapper/gradle-wrapper.jar +0 -0
  17. package/template/default/gradle/wrapper/gradle-wrapper.properties +7 -0
  18. package/template/default/gradle.properties +15 -0
  19. package/template/default/gradlew +248 -0
  20. package/template/default/gradlew.bat +93 -0
  21. package/template/default/modules/{{MODULE_DIRECTORY}}/api/build.gradle.kts +8 -0
  22. package/template/default/modules/{{MODULE_DIRECTORY}}/api/src/main/kotlin/{{API_PACKAGE}}/AutoConfiguration.kt +25 -0
  23. package/template/default/modules/{{MODULE_DIRECTORY}}/api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +1 -0
  24. package/template/default/modules/{{MODULE_DIRECTORY}}/api/src/main/resources/QUICKSILVER-INF/data/init.jsons +2 -0
  25. package/template/default/modules/{{MODULE_DIRECTORY}}/api/src/test/kotlin/{{API_PACKAGE}}/SmokeTests.kt +58 -0
  26. package/template/default/modules/{{MODULE_DIRECTORY}}/api/src/test/kotlin/{{API_PACKAGE}}/TestConfiguration.kt +6 -0
  27. package/template/default/modules/{{MODULE_DIRECTORY}}/module.yaml +8 -0
  28. package/template/default/modules/{{MODULE_DIRECTORY}}/web/package.json +25 -0
  29. package/template/default/modules/{{MODULE_DIRECTORY}}/web/src/module.ts +16 -0
  30. package/template/default/modules/{{MODULE_DIRECTORY}}/web/src/vite-env.d.ts +10 -0
  31. package/template/default/modules/{{MODULE_DIRECTORY}}/web/tsconfig.app.json +7 -0
  32. package/template/default/modules/{{MODULE_DIRECTORY}}/web/tsconfig.json +7 -0
  33. package/template/default/modules/{{MODULE_DIRECTORY}}/web/tsconfig.node.json +7 -0
  34. package/template/default/modules/{{MODULE_DIRECTORY}}/web/vite.config.ts +11 -0
  35. package/template/default/package.json +76 -0
  36. package/template/default/pnpm-workspace.yaml +35 -0
  37. package/template/default/publishing.yaml +49 -0
  38. package/template/default/quicksilver.yaml +13 -0
  39. package/template/default/run/api/build.gradle.kts +8 -0
  40. package/template/default/run/api/config/README.md +67 -0
  41. package/template/default/run/api/config/application-dev.yaml +25 -0
  42. package/template/default/run/api/config/application-h2.yaml +22 -0
  43. package/template/default/run/api/config/application-mariadb.yaml +22 -0
  44. package/template/default/run/api/config/application-mssql.yaml +22 -0
  45. package/template/default/run/api/config/application-oracle.yaml +22 -0
  46. package/template/default/run/api/config/application-postgresql.yaml +22 -0
  47. package/template/default/run/api/config/application-test.yaml +28 -0
  48. package/template/default/run/api/config/application.yaml +84 -0
  49. package/template/default/run/api/config/logback-test.xml +141 -0
  50. package/template/default/run/api/config/logback.xml +142 -0
  51. package/template/default/run/web/index.html +14 -0
  52. package/template/default/run/web/index.ts +6 -0
  53. package/template/default/run/web/package.json +18 -0
  54. package/template/default/run/web/static/config.js +15 -0
  55. package/template/default/run/web/tsconfig.app.json +4 -0
  56. package/template/default/run/web/tsconfig.json +7 -0
  57. package/template/default/run/web/tsconfig.node.json +4 -0
  58. package/template/default/run/web/vite.config.ts +21 -0
  59. package/template/default/settings.gradle.kts +19 -0
package/README.md CHANGED
@@ -1,5 +1,51 @@
1
1
  # create-qs
2
2
 
3
- Name placeholder for the Quicksilver scaffolding CLI (`pnpm create qs`).
3
+ English | [简体中文](README.zh-CN.md) | [繁體中文](README.zh-TW.md)
4
4
 
5
- No functionality is published yet.
5
+ Create a full-stack Quicksilver project with a single command.
6
+
7
+ ```bash
8
+ npm create qs
9
+ ```
10
+
11
+ Use npm for this one command, not pnpm. Since pnpm 11, `pnpm create` skips any version published
12
+ less than 24 hours ago (`minimumReleaseAge`) and does not report it, so a scaffolder released the
13
+ same day is silently replaced by an older one. npm applies no such delay by default. Everything
14
+ after scaffolding uses pnpm.
15
+
16
+ The scaffolder is published on the public npm registry, so it runs on a clean machine with no
17
+ registry to configure first. It asks a few questions about the project and its first module, then
18
+ writes out a full-stack project that runs as-is: a Kotlin/Spring Boot backend, a Preact/TypeScript
19
+ frontend, the Gradle wrapper, and a file-based H2 development database.
20
+
21
+ ## Requirements
22
+
23
+ - **JDK 25.** The backend compiles for Java 25, and a lower version fails to compile.
24
+ - **Node.js `>=22.13.0`**, the minimum that pnpm 11 accepts.
25
+ - **pnpm 11** for all development after scaffolding. Workspaces and catalogs depend on it, so npm
26
+ and yarn are not supported.
27
+ - **Access to the internal Nexus server**, described in the next section.
28
+
29
+ ## Before the first install
30
+
31
+ `create-qs` is the only package published publicly. The rest of the platform, namely the
32
+ `@qs-platform/*`, `@qs-elements/*` and `@qs-charts/*` npm packages, the Quicksilver Gradle plugin
33
+ and every Maven artifact, is on the internal Nexus server. Its address is not made public, so the
34
+ generated project ships no address. Get the address and a login from whoever provides you with
35
+ Quicksilver, then configure them once per machine: the npm scopes in `~/.npmrc`, and the Gradle
36
+ repository and login in `~/.gradle/gradle.properties`.
37
+
38
+ The exact lines are in the setup chapter of the handbook, `.quicksilver/manual/en-US/00-setup.md`
39
+ in the generated project. It is committed with the project, so it is there before the first
40
+ install, and the scaffolder points to it when it finishes.
41
+
42
+ Then start the project:
43
+
44
+ ```bash
45
+ cd <project-name>
46
+ pnpm install
47
+ pnpm dev
48
+ ```
49
+
50
+ Open <http://localhost:6286> and sign in as `admin` / `123456`. `pnpm install` also writes the
51
+ other chapters of the handbook next to `00-setup.md`.
@@ -0,0 +1,36 @@
1
+ # create-qs
2
+
3
+ [English](README.md) | 简体中文 | [繁體中文](README.zh-TW.md)
4
+
5
+ 用一条命令创建全栈 Quicksilver 项目。
6
+
7
+ ```bash
8
+ npm create qs
9
+ ```
10
+
11
+ 这一条命令请使用 npm,不要使用 pnpm。自 pnpm 11 起,`pnpm create` 会跳过发布不足 24 小时的版本(`minimumReleaseAge`),且不给出任何提示,当天发布的脚手架会被静默替换为较早的版本。npm 默认没有这一限制。项目创建完成后,其余操作一律使用 pnpm。
12
+
13
+ 脚手架发布在公网 npmjs 上,未做任何配置的机器即可直接运行。它会询问项目及其第一个模块的若干问题,然后生成一个可以直接运行的全栈项目,包括 Kotlin/Spring Boot 后端、Preact/TypeScript 前端、Gradle Wrapper,以及文件型 H2 开发数据库。
14
+
15
+ ## 环境要求
16
+
17
+ - **JDK 25**。后端按 Java 25 编译,版本更低时无法编译。
18
+ - **Node.js `>=22.13.0`**,这是 pnpm 11 要求的最低版本。
19
+ - **pnpm 11**,创建项目之后的所有开发工作都使用它。workspace 与 catalog 均依赖 pnpm,因此不支持 npm 与 yarn。
20
+ - **能够访问内部 Nexus**,见下一节。
21
+
22
+ ## 首次安装依赖之前
23
+
24
+ `create-qs` 是唯一发布到公网的包。平台的其余部分,包括 `@qs-platform/*`、`@qs-elements/*`、`@qs-charts/*` 三组 npm 包、Quicksilver 的 Gradle 插件以及全部 Maven 构件,都发布在内部 Nexus 上。内部 Nexus 的地址不对外公开,因此生成的项目不预置任何地址。请先向提供 Quicksilver 的一方获取地址与账户,然后在每台机器上配置一次。npm 的三个 scope 配置在 `~/.npmrc` 中,Gradle 的仓库地址与账户配置在 `~/.gradle/gradle.properties` 中。
25
+
26
+ 具体写法见生成项目中开发手册的环境准备一章,即 `.quicksilver/manual/zh-CN/00-setup.md`。该章随项目提交,首次安装依赖之前即可阅读,脚手架执行完毕时也会提示它的位置。
27
+
28
+ 然后启动项目:
29
+
30
+ ```bash
31
+ cd <项目名>
32
+ pnpm install
33
+ pnpm dev
34
+ ```
35
+
36
+ 在浏览器中访问 <http://localhost:6286>,使用 `admin` / `123456` 登录。`pnpm install` 同时会在 `00-setup.md` 所在目录写入开发手册的其余章节。
@@ -0,0 +1,36 @@
1
+ # create-qs
2
+
3
+ [English](README.md) | [简体中文](README.zh-CN.md) | 繁體中文
4
+
5
+ 用一個指令建立全端 Quicksilver 專案。
6
+
7
+ ```bash
8
+ npm create qs
9
+ ```
10
+
11
+ 這一個指令請使用 npm,不要使用 pnpm。自 pnpm 11 起,`pnpm create` 會略過發布不足 24 小時的版本(`minimumReleaseAge`),且不會給出任何提示,當天發布的鷹架會被默默替換為較早的版本。npm 預設沒有這項限制。專案建立完成後,其餘操作一律使用 pnpm。
12
+
13
+ 鷹架發布在公開的 npmjs 上,未做任何設定的電腦即可直接執行。它會詢問專案及其第一個模組的幾個問題,然後產生一個可以直接執行的全端專案,包括 Kotlin/Spring Boot 後端、Preact/TypeScript 前端、Gradle Wrapper,以及檔案型 H2 開發資料庫。
14
+
15
+ ## 環境需求
16
+
17
+ - **JDK 25**。後端依 Java 25 編譯,版本較低時無法編譯。
18
+ - **Node.js `>=22.13.0`**,這是 pnpm 11 要求的最低版本。
19
+ - **pnpm 11**,建立專案之後的所有開發工作都使用它。workspace 與 catalog 均依賴 pnpm,因此不支援 npm 與 yarn。
20
+ - **能夠存取內部 Nexus**,請參閱下一節。
21
+
22
+ ## 首次安裝相依套件之前
23
+
24
+ `create-qs` 是唯一發布到公開 npmjs 的套件。平台的其餘部分,包括 `@qs-platform/*`、`@qs-elements/*`、`@qs-charts/*` 三組 npm 套件、Quicksilver 的 Gradle 外掛程式以及全部 Maven 構件,都發布在內部 Nexus 上。內部 Nexus 的位址不對外公開,因此產生的專案不預設任何位址。請先向提供 Quicksilver 的一方取得位址與帳號,然後在每台電腦上設定一次。npm 的三個 scope 設定在 `~/.npmrc` 中,Gradle 的儲存庫位址與帳號設定在 `~/.gradle/gradle.properties` 中。
25
+
26
+ 具體寫法請參閱產生的專案中開發手冊的環境準備一章,即 `.quicksilver/manual/zh-TW/00-setup.md`。該章隨專案提交,首次安裝相依套件之前即可閱讀,鷹架執行完畢時也會提示它的位置。
27
+
28
+ 然後啟動專案:
29
+
30
+ ```bash
31
+ cd <專案名稱>
32
+ pnpm install
33
+ pnpm dev
34
+ ```
35
+
36
+ 在瀏覽器中開啟 <http://localhost:6286>,使用 `admin` / `123456` 登入。`pnpm install` 同時會在 `00-setup.md` 所在目錄寫入開發手冊的其餘章節。