silgi 0.25.6 → 0.25.8
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/cli/index.mjs
CHANGED
package/dist/cli/types.mjs
CHANGED
|
@@ -55,6 +55,14 @@ const SilgiCLIDefaults = {
|
|
|
55
55
|
vfsDir: "{{ silgi.serverDir }}/vfs",
|
|
56
56
|
typesDir: "{{ silgi.serverDir }}/types"
|
|
57
57
|
},
|
|
58
|
+
// Codegen
|
|
59
|
+
codegen: {
|
|
60
|
+
env: {
|
|
61
|
+
safeList: [
|
|
62
|
+
["silgi", "version"]
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
},
|
|
58
66
|
// Modules
|
|
59
67
|
_modules: [],
|
|
60
68
|
modules: [],
|
|
@@ -243,6 +243,7 @@ async function h3Framework(silgi, skip = false) {
|
|
|
243
243
|
});
|
|
244
244
|
silgi.hook("prepare:core.ts", (data) => {
|
|
245
245
|
data._silgiConfigs.push(`captureError: (error, context = {}) => {
|
|
246
|
+
const silgi = useSilgi()
|
|
246
247
|
const promise = silgi.hooks
|
|
247
248
|
.callHookParallel('error', error, context)
|
|
248
249
|
.catch((error_) => {
|
|
@@ -1594,6 +1595,13 @@ function useCLIRuntimeConfig(silgi) {
|
|
|
1594
1595
|
const flattenedConfig = flattenObject(safeRuntimeConfig);
|
|
1595
1596
|
const groupedVars = {};
|
|
1596
1597
|
Object.entries(flattenedConfig).forEach(([key, { value, originalPath }]) => {
|
|
1598
|
+
const shouldExclude = silgi.options.codegen.env.safeList.some((safePath) => {
|
|
1599
|
+
if (safePath.length !== originalPath.length)
|
|
1600
|
+
return false;
|
|
1601
|
+
return safePath.every((segment, index) => segment.toLowerCase() === originalPath[index].toLowerCase());
|
|
1602
|
+
});
|
|
1603
|
+
if (shouldExclude)
|
|
1604
|
+
return;
|
|
1597
1605
|
if (originalPath.length > 0) {
|
|
1598
1606
|
const firstKey = originalPath[0];
|
|
1599
1607
|
const categoryName = extractCategoryFromCamel(firstKey);
|
|
@@ -1827,6 +1835,10 @@ async function prepareCoreFile(data, frameworkContext, silgi) {
|
|
|
1827
1835
|
{
|
|
1828
1836
|
name: "createSilgi",
|
|
1829
1837
|
key: "createSilgi"
|
|
1838
|
+
},
|
|
1839
|
+
{
|
|
1840
|
+
name: "useSilgi",
|
|
1841
|
+
key: "useSilgi"
|
|
1830
1842
|
}
|
|
1831
1843
|
],
|
|
1832
1844
|
from: "silgi"
|
package/dist/types/index.d.mts
CHANGED
|
@@ -602,6 +602,11 @@ interface SilgiCLIOptions extends PresetOptions {
|
|
|
602
602
|
logLevel: LogLevel;
|
|
603
603
|
appConfig: AppConfig;
|
|
604
604
|
appConfigFiles: string[];
|
|
605
|
+
codegen: {
|
|
606
|
+
env: {
|
|
607
|
+
safeList: string[][];
|
|
608
|
+
};
|
|
609
|
+
};
|
|
605
610
|
storage: StorageMounts$1;
|
|
606
611
|
devStorage: StorageMounts$1;
|
|
607
612
|
workspaceDir: string;
|