create-soda 0.2.0 → 0.2.1
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/dist/index.js +3 -3
- package/package.json +1 -1
- package/templates/demo/README.md +6 -2
- package/templates/demo/_oxlintrc.json +24 -0
- package/templates/demo/package.json +9 -1
- package/templates/minimal/README.md +6 -2
- package/templates/minimal/_oxlintrc.json +24 -0
- package/templates/minimal/package.json +9 -1
package/dist/index.js
CHANGED
|
@@ -1230,9 +1230,9 @@ import { stdin as stdin2, stdout as stdout2 } from "node:process";
|
|
|
1230
1230
|
import { fileURLToPath } from "node:url";
|
|
1231
1231
|
import { styleText as styleText3 } from "node:util";
|
|
1232
1232
|
// ../core/package.json
|
|
1233
|
-
var version = "0.2.
|
|
1233
|
+
var version = "0.2.1";
|
|
1234
1234
|
// package.json
|
|
1235
|
-
var version2 = "0.2.
|
|
1235
|
+
var version2 = "0.2.1";
|
|
1236
1236
|
|
|
1237
1237
|
// src/project.ts
|
|
1238
1238
|
import { existsSync } from "node:fs";
|
|
@@ -1242,7 +1242,7 @@ var TEMPLATES = [
|
|
|
1242
1242
|
{ name: "minimal", label: "Minimal", hint: "a module, a controller, a service and a test" },
|
|
1243
1243
|
{ name: "demo", label: "Demo", hint: "users with validation, a guard, logging and CORS" }
|
|
1244
1244
|
];
|
|
1245
|
-
var RENAMED = { _gitignore: ".gitignore" };
|
|
1245
|
+
var RENAMED = { _gitignore: ".gitignore", "_oxlintrc.json": ".oxlintrc.json" };
|
|
1246
1246
|
var formatTargetDir = (dir) => dir.trim().replace(/[<>:"\\|?*]/g, "").replace(/\/+$/, "");
|
|
1247
1247
|
var isValidPackageName = (name) => /^(?:@[a-z\d\-*~][a-z\d\-*._~]*\/)?[a-z\d\-~][a-z\d\-._~]*$/.test(name);
|
|
1248
1248
|
var toValidPackageName = (name) => name.trim().toLowerCase().replace(/\s+/g, "-").replace(/^[._]/, "").replace(/[^a-z\d\-~]+/g, "-");
|
package/package.json
CHANGED
package/templates/demo/README.md
CHANGED
|
@@ -4,9 +4,13 @@ Created with `create-soda`. Requires [Bun](https://bun.sh).
|
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
bun install
|
|
7
|
-
bun dev
|
|
8
|
-
bun
|
|
7
|
+
bun dev # bun --hot: reloads on change
|
|
8
|
+
bun debug # the same, with the inspector
|
|
9
|
+
bun test # test:watch, test:cov
|
|
9
10
|
bun typecheck
|
|
11
|
+
bun lint # oxlint; lint:fix
|
|
12
|
+
bun run build # bundles src/main.ts into dist/
|
|
13
|
+
bun start:prod # runs the bundle
|
|
10
14
|
```
|
|
11
15
|
|
|
12
16
|
- `src/main.ts`: creates the application, CORS, graceful shutdown.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"plugins": [
|
|
4
|
+
"typescript",
|
|
5
|
+
"unicorn",
|
|
6
|
+
"oxc",
|
|
7
|
+
"import"
|
|
8
|
+
],
|
|
9
|
+
"categories": {
|
|
10
|
+
"correctness": "error",
|
|
11
|
+
"suspicious": "warn"
|
|
12
|
+
},
|
|
13
|
+
"rules": {
|
|
14
|
+
"typescript/no-extraneous-class": [
|
|
15
|
+
"warn",
|
|
16
|
+
{
|
|
17
|
+
"allowWithDecorator": true
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"ignorePatterns": [
|
|
22
|
+
"dist"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -5,9 +5,16 @@
|
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "bun --hot src/main.ts",
|
|
8
|
+
"debug": "bun --inspect --hot src/main.ts",
|
|
8
9
|
"start": "bun src/main.ts",
|
|
10
|
+
"build": "bun build src/main.ts --target bun --outdir dist --minify --sourcemap=linked",
|
|
11
|
+
"start:prod": "bun dist/main.js",
|
|
9
12
|
"test": "bun test",
|
|
10
|
-
"
|
|
13
|
+
"test:watch": "bun test --watch",
|
|
14
|
+
"test:cov": "bun test --coverage",
|
|
15
|
+
"typecheck": "bun check",
|
|
16
|
+
"lint": "oxlint",
|
|
17
|
+
"lint:fix": "oxlint --fix"
|
|
11
18
|
},
|
|
12
19
|
"dependencies": {
|
|
13
20
|
"@getsoda/core": "workspace",
|
|
@@ -15,6 +22,7 @@
|
|
|
15
22
|
},
|
|
16
23
|
"devDependencies": {
|
|
17
24
|
"@types/bun": "latest",
|
|
25
|
+
"oxlint": "^1.93.0",
|
|
18
26
|
"typescript": "^7.0.2"
|
|
19
27
|
}
|
|
20
28
|
}
|
|
@@ -4,9 +4,13 @@ Created with `create-soda`. Requires [Bun](https://bun.sh).
|
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
bun install
|
|
7
|
-
bun dev
|
|
8
|
-
bun
|
|
7
|
+
bun dev # bun --hot: reloads on change
|
|
8
|
+
bun debug # the same, with the inspector
|
|
9
|
+
bun test # test:watch, test:cov
|
|
9
10
|
bun typecheck
|
|
11
|
+
bun lint # oxlint; lint:fix
|
|
12
|
+
bun run build # bundles src/main.ts into dist/
|
|
13
|
+
bun start:prod # runs the bundle
|
|
10
14
|
```
|
|
11
15
|
|
|
12
16
|
- `src/main.ts`: creates the application and starts listening.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"plugins": [
|
|
4
|
+
"typescript",
|
|
5
|
+
"unicorn",
|
|
6
|
+
"oxc",
|
|
7
|
+
"import"
|
|
8
|
+
],
|
|
9
|
+
"categories": {
|
|
10
|
+
"correctness": "error",
|
|
11
|
+
"suspicious": "warn"
|
|
12
|
+
},
|
|
13
|
+
"rules": {
|
|
14
|
+
"typescript/no-extraneous-class": [
|
|
15
|
+
"warn",
|
|
16
|
+
{
|
|
17
|
+
"allowWithDecorator": true
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"ignorePatterns": [
|
|
22
|
+
"dist"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -5,15 +5,23 @@
|
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "bun --hot src/main.ts",
|
|
8
|
+
"debug": "bun --inspect --hot src/main.ts",
|
|
8
9
|
"start": "bun src/main.ts",
|
|
10
|
+
"build": "bun build src/main.ts --target bun --outdir dist --minify --sourcemap=linked",
|
|
11
|
+
"start:prod": "bun dist/main.js",
|
|
9
12
|
"test": "bun test",
|
|
10
|
-
"
|
|
13
|
+
"test:watch": "bun test --watch",
|
|
14
|
+
"test:cov": "bun test --coverage",
|
|
15
|
+
"typecheck": "bun check",
|
|
16
|
+
"lint": "oxlint",
|
|
17
|
+
"lint:fix": "oxlint --fix"
|
|
11
18
|
},
|
|
12
19
|
"dependencies": {
|
|
13
20
|
"@getsoda/core": "workspace"
|
|
14
21
|
},
|
|
15
22
|
"devDependencies": {
|
|
16
23
|
"@types/bun": "latest",
|
|
24
|
+
"oxlint": "^1.93.0",
|
|
17
25
|
"typescript": "^7.0.2"
|
|
18
26
|
}
|
|
19
27
|
}
|