@bryanchu10/create-template-ts 1.3.0 → 1.3.2
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 +1 -0
- package/README.zh-TW.md +1 -0
- package/dist/index.js +6 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,6 +30,7 @@ Follow the prompts to choose a project name and template. The CLI will fetch the
|
|
|
30
30
|
|----------|-------------|
|
|
31
31
|
| `ts-script` | TypeScript script/tooling with neverthrow, ts-pattern, eslint, tsx, and rolldown |
|
|
32
32
|
| `ts-library` | TypeScript library with tsdown, vitest, eslint, and release-it |
|
|
33
|
+
| `hono` | Hono API server with Drizzle ORM (SQLite), OpenAPI docs via Scalar, pino logging, and neverthrow |
|
|
33
34
|
|
|
34
35
|
## Development
|
|
35
36
|
|
package/README.zh-TW.md
CHANGED
|
@@ -30,6 +30,7 @@ npx @bryanchu10/create-template-ts
|
|
|
30
30
|
|------|------|
|
|
31
31
|
| `ts-script` | TypeScript 腳本/工具專案,內含 neverthrow、ts-pattern、eslint、tsx、rolldown |
|
|
32
32
|
| `ts-library` | TypeScript 函式庫專案,內含 tsdown、vitest、eslint、release-it |
|
|
33
|
+
| `hono` | Hono API 伺服器,內含 Drizzle ORM(SQLite)、Scalar OpenAPI 文件、pino 日誌、neverthrow |
|
|
33
34
|
|
|
34
35
|
## 開發
|
|
35
36
|
|
package/dist/index.js
CHANGED
|
@@ -1975,26 +1975,24 @@ function resolveNewDir(projectName) {
|
|
|
1975
1975
|
const { withPeerDependencies, deps, devDeps } = TEMPLATES[template];
|
|
1976
1976
|
const s = ft();
|
|
1977
1977
|
s.start("Fetching latest package versions");
|
|
1978
|
-
return import_index_cjs.ResultAsync.combine([import_index_cjs.ResultAsync.combine([...deps].map((dep) => getLatestVer(dep))), import_index_cjs.ResultAsync.combine([...devDeps].map((dep) => getLatestVer(dep)))]).map(([
|
|
1978
|
+
return import_index_cjs.ResultAsync.combine([import_index_cjs.ResultAsync.combine([...deps].map((dep) => getLatestVer(dep).map((ver) => [dep, ver]))), import_index_cjs.ResultAsync.combine([...devDeps].map((dep) => getLatestVer(dep).map((ver) => [dep, ver])))]).map(([depEntries, devDepEntries]) => {
|
|
1979
1979
|
s.stop("Fetched latest package versions");
|
|
1980
1980
|
return {
|
|
1981
1981
|
projectName,
|
|
1982
1982
|
template,
|
|
1983
1983
|
targetDir,
|
|
1984
1984
|
withPeerDependencies,
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
depVers,
|
|
1988
|
-
devDepVers
|
|
1985
|
+
depEntries,
|
|
1986
|
+
devDepEntries
|
|
1989
1987
|
};
|
|
1990
1988
|
}).mapErr((error) => {
|
|
1991
1989
|
s.stop("Failed to fetch package versions");
|
|
1992
1990
|
return error;
|
|
1993
1991
|
});
|
|
1994
|
-
}).andThen(({ projectName, template, targetDir, withPeerDependencies,
|
|
1995
|
-
const depsMap = Object.fromEntries(
|
|
1992
|
+
}).andThen(({ projectName, template, targetDir, withPeerDependencies, depEntries, devDepEntries }) => {
|
|
1993
|
+
const depsMap = Object.fromEntries(depEntries);
|
|
1996
1994
|
const devDepsMap = {
|
|
1997
|
-
...Object.fromEntries(
|
|
1995
|
+
...Object.fromEntries(devDepEntries),
|
|
1998
1996
|
"@types/node": `^${version.match(/^v(\d+)/)?.[1]}`
|
|
1999
1997
|
};
|
|
2000
1998
|
const templateDir = join(import.meta.dirname, "../templates", template);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bryanchu10/create-template-ts",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.2",
|
|
5
5
|
"description": "Scaffold a modular TypeScript project for scripts and tooling",
|
|
6
6
|
"author": "Bryan Chu <bryanchu10@gmail.com> (https://github.com/bryanchu10)",
|
|
7
7
|
"license": "MIT",
|