@stacksjs/config 0.70.148 → 0.70.149
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/overrides.d.ts +1 -0
- package/dist/overrides.js +42 -35
- package/package.json +3 -3
package/dist/overrides.d.ts
CHANGED
package/dist/overrides.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
import { pathToFileURL } from "node:url";
|
|
1
3
|
import { validateConfig } from "./validators";
|
|
2
4
|
const skipConfigLoading = process.env.SKIP_CONFIG_LOADING === "true", skipConfigValidation = process.env.SKIP_CONFIG_VALIDATION === "true", OVERRIDES_KEY = Symbol.for("@stacksjs/config:overrides"), READY_KEY = Symbol.for("@stacksjs/config:overridesReady");
|
|
3
5
|
function defaultsForOverrides() {
|
|
@@ -44,42 +46,47 @@ export const overrides = sharedOverrides ?? (() => {
|
|
|
44
46
|
return created;
|
|
45
47
|
})();
|
|
46
48
|
const userConfigs = [
|
|
47
|
-
["ai", "
|
|
48
|
-
["analytics", "
|
|
49
|
-
["app", "
|
|
50
|
-
["auth", "
|
|
51
|
-
["cache", "
|
|
52
|
-
["cli", "
|
|
53
|
-
["cloud", "
|
|
54
|
-
["cms", "
|
|
55
|
-
["commerce", "
|
|
56
|
-
["dashboard", "
|
|
57
|
-
["database", "
|
|
58
|
-
["dns", "
|
|
59
|
-
["email", "
|
|
60
|
-
["errors", "
|
|
61
|
-
["featureFlags", "
|
|
62
|
-
["git", "
|
|
63
|
-
["hashing", "
|
|
64
|
-
["library", "
|
|
65
|
-
["logging", "
|
|
66
|
-
["marketing", "
|
|
67
|
-
["monitoring", "
|
|
68
|
-
["notification", "
|
|
69
|
-
["payment", "
|
|
70
|
-
["ports", "
|
|
71
|
-
["queue", "
|
|
72
|
-
["realtime", "
|
|
73
|
-
["saas", "
|
|
74
|
-
["searchEngine", "
|
|
75
|
-
["security", "
|
|
76
|
-
["services", "
|
|
77
|
-
["filesystems", "
|
|
78
|
-
["team", "
|
|
79
|
-
["ui", "
|
|
80
|
-
]
|
|
49
|
+
["ai", "ai"],
|
|
50
|
+
["analytics", "analytics"],
|
|
51
|
+
["app", "app"],
|
|
52
|
+
["auth", "auth"],
|
|
53
|
+
["cache", "cache"],
|
|
54
|
+
["cli", "cli"],
|
|
55
|
+
["cloud", "cloud"],
|
|
56
|
+
["cms", "cms"],
|
|
57
|
+
["commerce", "commerce"],
|
|
58
|
+
["dashboard", "dashboard"],
|
|
59
|
+
["database", "database"],
|
|
60
|
+
["dns", "dns"],
|
|
61
|
+
["email", "email"],
|
|
62
|
+
["errors", "errors"],
|
|
63
|
+
["featureFlags", "feature-flags"],
|
|
64
|
+
["git", "git"],
|
|
65
|
+
["hashing", "hashing"],
|
|
66
|
+
["library", "library"],
|
|
67
|
+
["logging", "logging"],
|
|
68
|
+
["marketing", "marketing"],
|
|
69
|
+
["monitoring", "monitoring"],
|
|
70
|
+
["notification", "notification"],
|
|
71
|
+
["payment", "payment"],
|
|
72
|
+
["ports", "ports"],
|
|
73
|
+
["queue", "queue"],
|
|
74
|
+
["realtime", "realtime"],
|
|
75
|
+
["saas", "saas"],
|
|
76
|
+
["searchEngine", "search-engine"],
|
|
77
|
+
["security", "security"],
|
|
78
|
+
["services", "services"],
|
|
79
|
+
["filesystems", "filesystems"],
|
|
80
|
+
["team", "team"],
|
|
81
|
+
["ui", "ui"]
|
|
82
|
+
];
|
|
83
|
+
export function userConfigUrl(name, cwd = process.cwd()) {
|
|
84
|
+
return pathToFileURL(resolve(cwd, "config", `${name}.ts`)).href;
|
|
85
|
+
}
|
|
86
|
+
const sharedReady = globalScope[READY_KEY];
|
|
81
87
|
export const overridesReady = sharedReady ?? (() => {
|
|
82
|
-
const promise = skipConfigLoading ? Promise.resolve(overrides) : Promise.all(userConfigs.map(async ([key,
|
|
88
|
+
const promise = skipConfigLoading ? Promise.resolve(overrides) : Promise.all(userConfigs.map(async ([key, name]) => {
|
|
89
|
+
const modulePath = userConfigUrl(name);
|
|
83
90
|
try {
|
|
84
91
|
const mod = await import(modulePath);
|
|
85
92
|
if (mod?.default !== void 0)
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/config",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.70.
|
|
5
|
+
"version": "0.70.149",
|
|
6
6
|
"description": "The Stacks config helper methods.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"ts-pantry": "^0.10.11"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@stacksjs/alias": "0.70.
|
|
56
|
+
"@stacksjs/alias": "0.70.149",
|
|
57
57
|
"better-dx": "^0.2.17",
|
|
58
|
-
"@stacksjs/types": "0.70.
|
|
58
|
+
"@stacksjs/types": "0.70.149",
|
|
59
59
|
"bunfig": "^0.15.11"
|
|
60
60
|
}
|
|
61
61
|
}
|