@vesk/adapter 0.2.85 → 0.2.86
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-function.d.ts","sourceRoot":"","sources":["../src/api-function.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAOhF,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,kBAAkB,GAC3B;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"api-function.d.ts","sourceRoot":"","sources":["../src/api-function.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAOhF,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,kBAAkB,GAC3B;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CA0QtD"}
|
package/dist/api-function.js
CHANGED
|
@@ -41,7 +41,15 @@ export function generateApiFunction(apiNode, _apiDir, outDir, options) {
|
|
|
41
41
|
// fall back to original source if stripping fails
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
// fullPath carries the leading "/api" mount prefix; the request's urlParts
|
|
45
|
+
// is built from url.pathname with "/api" already removed. Drop it here so
|
|
46
|
+
// segment indices line up for dynamic and catch-all extraction. Without this,
|
|
47
|
+
// a catch-all like `/api/auth/[...path]` matched against `/api/auth/signin/
|
|
48
|
+
// credentials` produced params.path="credentials" instead of
|
|
49
|
+
// "signin/credentials", so the auth catch-all could never route a
|
|
50
|
+
// multi-segment path and returned "Unknown auth endpoint."
|
|
51
|
+
const routeParts = apiNode.fullPath.split('/').filter(Boolean);
|
|
52
|
+
const urlParts = routeParts[0] === 'api' ? routeParts.slice(1) : routeParts;
|
|
45
53
|
const extracts = [];
|
|
46
54
|
let partIdx = 0;
|
|
47
55
|
for (let i = 0; i < urlParts.length; i++) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vesk/adapter",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.86",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vesk adapter — builds deployable .vesk/ output for Deno and Node serverless",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"sharp": "^0.35.3"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@vesk/compiler": "^0.2.
|
|
27
|
-
"@vesk/runtime": "^0.2.
|
|
28
|
-
"@vesk/types": "^0.2.
|
|
26
|
+
"@vesk/compiler": "^0.2.86",
|
|
27
|
+
"@vesk/runtime": "^0.2.86",
|
|
28
|
+
"@vesk/types": "^0.2.86"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/ws": "^8.18.1",
|