@pracht/cli 1.2.2 → 1.3.0
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @pracht/cli
|
|
2
2
|
|
|
3
|
+
## 1.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#133](https://github.com/JoviDeCroock/pracht/pull/133) [`f8c5c1f`](https://github.com/JoviDeCroock/pracht/commit/f8c5c1fe1a7c7b5d7accd8028e8c12929a218081) Thanks [@JoviDeCroock](https://github.com/JoviDeCroock)! - API routes now support catch-all segments (e.g. `src/api/files/[...path].ts` → `/api/files/*`), matching the existing page-routing convention. The matched rest-path is exposed on the route params as `"*"`. Previously `[...param]` was silently turned into a `:...param` dynamic segment with a broken name.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`f8c5c1f`](https://github.com/JoviDeCroock/pracht/commit/f8c5c1fe1a7c7b5d7accd8028e8c12929a218081)]:
|
|
12
|
+
- @pracht/core@0.4.0
|
|
13
|
+
|
|
3
14
|
## 1.2.2
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/index.mjs
CHANGED
|
@@ -31,10 +31,10 @@ runMain(defineCommand({
|
|
|
31
31
|
subCommands: {
|
|
32
32
|
build: () => import("./build-DkP2ffu9.mjs").then((m) => m.default),
|
|
33
33
|
dev: () => import("./dev-BCFe3g38.mjs").then((m) => m.default),
|
|
34
|
-
doctor: () => import("./doctor-
|
|
34
|
+
doctor: () => import("./doctor-B5qYLJF8.mjs").then((m) => m.default),
|
|
35
35
|
generate: () => import("./generate-C9AMSGsv.mjs").then((m) => m.default),
|
|
36
36
|
inspect: () => import("./inspect-MseHPU9s.mjs").then((m) => m.default),
|
|
37
|
-
verify: () => import("./verify-
|
|
37
|
+
verify: () => import("./verify-Do8bG-fq.mjs").then((m) => m.default)
|
|
38
38
|
}
|
|
39
39
|
}));
|
|
40
40
|
//#endregion
|
|
@@ -42,6 +42,7 @@ function resolveApiRoutePath(apiDir, file) {
|
|
|
42
42
|
relativePath = relativePath.replace(/\.(ts|tsx|js|jsx)$/, "");
|
|
43
43
|
if (relativePath === "index") relativePath = "";
|
|
44
44
|
else relativePath = relativePath.replace(/\/index$/, "");
|
|
45
|
+
relativePath = relativePath.replace(/\[\.\.\.[^\]]+\]/g, "*");
|
|
45
46
|
relativePath = relativePath.replace(/\[([^\]]+)\]/g, ":$1");
|
|
46
47
|
return normalizeRoutePath(relativePath ? `/api/${relativePath}` : "/api");
|
|
47
48
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pracht/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://github.com/JoviDeCroock/pracht/tree/main/packages/cli",
|
|
6
6
|
"bugs": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"citty": "^0.1.6",
|
|
30
|
-
"@pracht/core": "0.
|
|
30
|
+
"@pracht/core": "0.4.0"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "tsdown"
|