one 2.6.22 → 2.7.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/cjs/useHeaderHeight.native.cjs +5 -23
- package/dist/cjs/useHeaderHeight.native.js +5 -23
- package/dist/cjs/useHeaderHeight.native.js.map +1 -1
- package/dist/cjs/vercel/build/buildVercelOutputDirectory.cjs +4 -7
- package/dist/cjs/vercel/build/buildVercelOutputDirectory.native.cjs +16 -19
- package/dist/cjs/vercel/build/buildVercelOutputDirectory.native.js +16 -19
- package/dist/cjs/vercel/build/buildVercelOutputDirectory.native.js.map +1 -1
- package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.cjs +6 -3
- package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.native.cjs +6 -3
- package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.native.js +6 -3
- package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.native.js.map +1 -1
- package/dist/cjs/vercel/build/getPathFromRoute.cjs +6 -1
- package/dist/cjs/vercel/build/getPathFromRoute.native.cjs +23 -1
- package/dist/cjs/vercel/build/getPathFromRoute.native.js +23 -1
- package/dist/cjs/vercel/build/getPathFromRoute.native.js.map +1 -1
- package/dist/esm/useHeaderHeight.native.js +3 -21
- package/dist/esm/useHeaderHeight.native.js.map +1 -1
- package/dist/esm/vercel/build/buildVercelOutputDirectory.mjs +4 -7
- package/dist/esm/vercel/build/buildVercelOutputDirectory.mjs.map +1 -1
- package/dist/esm/vercel/build/buildVercelOutputDirectory.native.js +16 -19
- package/dist/esm/vercel/build/buildVercelOutputDirectory.native.js.map +1 -1
- package/dist/esm/vercel/build/generate/createSsrServerlessFunction.mjs +6 -3
- package/dist/esm/vercel/build/generate/createSsrServerlessFunction.mjs.map +1 -1
- package/dist/esm/vercel/build/generate/createSsrServerlessFunction.native.js +6 -3
- package/dist/esm/vercel/build/generate/createSsrServerlessFunction.native.js.map +1 -1
- package/dist/esm/vercel/build/getPathFromRoute.mjs +6 -1
- package/dist/esm/vercel/build/getPathFromRoute.mjs.map +1 -1
- package/dist/esm/vercel/build/getPathFromRoute.native.js +23 -1
- package/dist/esm/vercel/build/getPathFromRoute.native.js.map +1 -1
- package/ios/Nitro/HybridOneImageManipulator.swift +1 -1
- package/package.json +27 -27
- package/src/useHeaderHeight.native.ts +7 -0
- package/src/vercel/build/buildVercelOutputDirectory.ts +7 -10
- package/src/vercel/build/generate/createSsrServerlessFunction.ts +6 -3
- package/src/vercel/build/getPathFromRoute.ts +10 -1
- package/types/useHeaderHeight.native.d.ts +2 -0
- package/types/useHeaderHeight.native.d.ts.map +1 -0
- package/types/vercel/build/buildVercelOutputDirectory.d.ts.map +1 -1
- package/types/vercel/build/generate/createSsrServerlessFunction.d.ts.map +1 -1
- package/types/vercel/build/getPathFromRoute.d.ts.map +1 -1
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { getPathnameFromFilePath } from '../../utils/getPathnameFromFilePath'
|
|
2
2
|
import type { RouteInfo } from '../../vite/types'
|
|
3
3
|
|
|
4
|
+
// the path of a route's function folder and of the rewrites that point at it. vercel
|
|
5
|
+
// reads no param syntax from the folder (config.json rewrites do the matching), so
|
|
6
|
+
// params stay as written ([id], [...slug]): windows can't create `:` or `*` in a path
|
|
4
7
|
export function getPathFromRoute(
|
|
5
8
|
route: RouteInfo<string>,
|
|
6
9
|
options: { includeIndex?: boolean } = {}
|
|
7
10
|
) {
|
|
8
|
-
|
|
11
|
+
const params: Record<string, string> = {}
|
|
12
|
+
for (const [param, inner] of route.file.matchAll(/\[([^\]]+)\]/g)) {
|
|
13
|
+
// getPathnameFromFilePath looks up a catch-all as ...slug in dirnames, slug in file names
|
|
14
|
+
params[inner] = param
|
|
15
|
+
params[inner.replace(/^\.\.\./, '')] = param
|
|
16
|
+
}
|
|
17
|
+
return getPathnameFromFilePath(route.file, params, false, {
|
|
9
18
|
...options,
|
|
10
19
|
preserveExtensions: true,
|
|
11
20
|
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHeaderHeight.native.d.ts","sourceRoot":"","sources":["../src/useHeaderHeight.native.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,IAAI,MAAM,CAExC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildVercelOutputDirectory.d.ts","sourceRoot":"","sources":["../../../src/vercel/build/buildVercelOutputDirectory.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAkC3C,eAAO,MAAM,0BAA0B,kFAMpC;IACD,SAAS,EAAE,cAAc,GAAG,IAAI,CAAA;IAChC,mBAAmB,EAAE,GAAG,CAAC,SAAS,CAAA;IAClC,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,EAAE,CAAA;CACxB,
|
|
1
|
+
{"version":3,"file":"buildVercelOutputDirectory.d.ts","sourceRoot":"","sources":["../../../src/vercel/build/buildVercelOutputDirectory.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAkC3C,eAAO,MAAM,0BAA0B,kFAMpC;IACD,SAAS,EAAE,cAAc,GAAG,IAAI,CAAA;IAChC,mBAAmB,EAAE,GAAG,CAAC,SAAS,CAAA;IAClC,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,EAAE,CAAA;CACxB,kBAuPA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSsrServerlessFunction.d.ts","sourceRoot":"","sources":["../../../../src/vercel/build/generate/createSsrServerlessFunction.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAOzD,wBAAsB,2BAA2B,CAC/C,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,EACxB,SAAS,EAAE,GAAG,CAAC,SAAS,EACxB,cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"createSsrServerlessFunction.d.ts","sourceRoot":"","sources":["../../../../src/vercel/build/generate/createSsrServerlessFunction.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAOzD,wBAAsB,2BAA2B,CAC/C,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,EACxB,SAAS,EAAE,GAAG,CAAC,SAAS,EACxB,cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,MAAM,EAAE,iBAsLxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPathFromRoute.d.ts","sourceRoot":"","sources":["../../../src/vercel/build/getPathFromRoute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"getPathFromRoute.d.ts","sourceRoot":"","sources":["../../../src/vercel/build/getPathFromRoute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAKjD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,EACxB,OAAO,GAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAO,UAczC"}
|