site-config-stack 3.2.2 → 3.2.3
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.cjs +2 -2
- package/dist/index.d.cts +2 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -49,7 +49,7 @@ function createSiteConfigStack(options) {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
if (!input._context && debug) {
|
|
52
|
-
let lastFunctionName = new Error("tmp").stack?.split("\n")[2]
|
|
52
|
+
let lastFunctionName = new Error("tmp").stack?.split("\n")[2]?.split(" ")[5];
|
|
53
53
|
if (lastFunctionName?.includes("/"))
|
|
54
54
|
lastFunctionName = "anonymous";
|
|
55
55
|
input._context = lastFunctionName;
|
|
@@ -99,7 +99,7 @@ function createSiteConfigStack(options) {
|
|
|
99
99
|
|
|
100
100
|
function envSiteConfig(env) {
|
|
101
101
|
return Object.fromEntries(Object.entries(env).filter(([k]) => k.startsWith("NUXT_SITE_") || k.startsWith("NUXT_PUBLIC_SITE_")).map(([k, v]) => [
|
|
102
|
-
k.replace(/^NUXT_(PUBLIC_)?SITE_/, "").split("_").map((s, i) => i === 0 ? s.toLowerCase() : s[0]
|
|
102
|
+
k.replace(/^NUXT_(PUBLIC_)?SITE_/, "").split("_").map((s, i) => i === 0 ? s.toLowerCase() : s[0]?.toUpperCase() + s.slice(1).toLowerCase()).join(""),
|
|
103
103
|
v
|
|
104
104
|
]));
|
|
105
105
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -77,4 +77,5 @@ declare function envSiteConfig(env: Record<string, any>): {
|
|
|
77
77
|
[k: string]: any;
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
export {
|
|
80
|
+
export { createSiteConfigStack, envSiteConfig, normalizeSiteConfig, validateSiteConfigStack };
|
|
81
|
+
export type { GetSiteConfigOptions, MaybeComputedRef, MaybeComputedRefEntries, SiteConfig, SiteConfigInput, SiteConfigResolved, SiteConfigStack };
|
package/dist/index.d.mts
CHANGED
|
@@ -77,4 +77,5 @@ declare function envSiteConfig(env: Record<string, any>): {
|
|
|
77
77
|
[k: string]: any;
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
export {
|
|
80
|
+
export { createSiteConfigStack, envSiteConfig, normalizeSiteConfig, validateSiteConfigStack };
|
|
81
|
+
export type { GetSiteConfigOptions, MaybeComputedRef, MaybeComputedRefEntries, SiteConfig, SiteConfigInput, SiteConfigResolved, SiteConfigStack };
|
package/dist/index.d.ts
CHANGED
|
@@ -77,4 +77,5 @@ declare function envSiteConfig(env: Record<string, any>): {
|
|
|
77
77
|
[k: string]: any;
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
export {
|
|
80
|
+
export { createSiteConfigStack, envSiteConfig, normalizeSiteConfig, validateSiteConfigStack };
|
|
81
|
+
export type { GetSiteConfigOptions, MaybeComputedRef, MaybeComputedRefEntries, SiteConfig, SiteConfigInput, SiteConfigResolved, SiteConfigStack };
|
package/dist/index.mjs
CHANGED
|
@@ -47,7 +47,7 @@ function createSiteConfigStack(options) {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
if (!input._context && debug) {
|
|
50
|
-
let lastFunctionName = new Error("tmp").stack?.split("\n")[2]
|
|
50
|
+
let lastFunctionName = new Error("tmp").stack?.split("\n")[2]?.split(" ")[5];
|
|
51
51
|
if (lastFunctionName?.includes("/"))
|
|
52
52
|
lastFunctionName = "anonymous";
|
|
53
53
|
input._context = lastFunctionName;
|
|
@@ -97,7 +97,7 @@ function createSiteConfigStack(options) {
|
|
|
97
97
|
|
|
98
98
|
function envSiteConfig(env) {
|
|
99
99
|
return Object.fromEntries(Object.entries(env).filter(([k]) => k.startsWith("NUXT_SITE_") || k.startsWith("NUXT_PUBLIC_SITE_")).map(([k, v]) => [
|
|
100
|
-
k.replace(/^NUXT_(PUBLIC_)?SITE_/, "").split("_").map((s, i) => i === 0 ? s.toLowerCase() : s[0]
|
|
100
|
+
k.replace(/^NUXT_(PUBLIC_)?SITE_/, "").split("_").map((s, i) => i === 0 ? s.toLowerCase() : s[0]?.toUpperCase() + s.slice(1).toLowerCase()).join(""),
|
|
101
101
|
v
|
|
102
102
|
]));
|
|
103
103
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "site-config-stack",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.2.
|
|
4
|
+
"version": "3.2.3",
|
|
5
5
|
"description": "Shared site configuration utilities.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/harlan-zw",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"ufo": "^1.6.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"vue": "^3.5.
|
|
46
|
+
"vue": "^3.5.21"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"lint": "eslint . --fix",
|