silgi 0.29.13 → 0.29.14
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 +1 -1
- package/dist/cli/silgi.mjs +22 -20
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
package/dist/cli/silgi.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { generateDTS } from 'apiful/openapi';
|
|
2
2
|
import consola$1, { consola } from 'consola';
|
|
3
3
|
import { join, resolve, dirname, isAbsolute, relative, basename, extname } from 'pathe';
|
|
4
|
-
import { hasSilgiModule, addTemplate, normalizeTemplate, useLogger, genEnsureSafeVar, toArray, hash, writeFile, relativeWithDot, isDirectory, resolveAlias as resolveAlias$1, directoryToURL, hasError, parseServices, resolveSilgiPath } from 'silgi/kit';
|
|
4
|
+
import { hasSilgiModule, addTemplate, normalizeTemplate, useLogger, genEnsureSafeVar, toArray, hash, writeFile, relativeWithDot, isDirectory, addCoreFile, resolveAlias as resolveAlias$1, directoryToURL, hasError, parseServices, resolveSilgiPath } from 'silgi/kit';
|
|
5
5
|
import { mkdirSync, existsSync, writeFileSync, promises, readFileSync } from 'node:fs';
|
|
6
6
|
import { readdir, readFile } from 'node:fs/promises';
|
|
7
7
|
import { genObjectFromRawEntries, genImport, genTypeImport, genObjectFromRaw, genObjectFromValues } from 'knitwork';
|
|
@@ -1063,26 +1063,28 @@ async function h3Framework(silgi, skip = false) {
|
|
|
1063
1063
|
""
|
|
1064
1064
|
);
|
|
1065
1065
|
});
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
errors
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
context.event.waitUntil
|
|
1066
|
+
addCoreFile({
|
|
1067
|
+
before: ({ silgiConfigs }) => {
|
|
1068
|
+
silgiConfigs.push({
|
|
1069
|
+
captureError: `(silgi, error, context = {}) => {
|
|
1070
|
+
const promise = silgi.hooks
|
|
1071
|
+
.callHookParallel('error', silgi, error, context)
|
|
1072
|
+
.catch((error_) => {
|
|
1073
|
+
console.error('Error while capturing another error', error_)
|
|
1074
|
+
})
|
|
1075
|
+
|
|
1076
|
+
if (context.event && isEvent(context.event)) {
|
|
1077
|
+
const errors = context.event.context.nitro?.errors
|
|
1078
|
+
if (errors) {
|
|
1079
|
+
errors.push({ error, context })
|
|
1080
|
+
}
|
|
1081
|
+
if (context.event.waitUntil) {
|
|
1082
|
+
context.event.waitUntil(promise)
|
|
1083
|
+
}
|
|
1082
1084
|
}
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1085
|
+
}`
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1086
1088
|
});
|
|
1087
1089
|
if (silgi.options.imports !== false) {
|
|
1088
1090
|
const h3Exports = await resolveModuleExportNames("h3", {
|