silgi 0.4.1 → 0.4.2
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/_chunks/index.mjs +1 -1
- package/dist/cli/prepare.mjs +13 -2
- package/dist/core/index.mjs +1 -1
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/_chunks/index.mjs
CHANGED
package/dist/cli/prepare.mjs
CHANGED
|
@@ -41,6 +41,12 @@ async function h3Framework(silgi, skip = false) {
|
|
|
41
41
|
],
|
|
42
42
|
from: "nitropack/types"
|
|
43
43
|
};
|
|
44
|
+
data.events.push({
|
|
45
|
+
key: "H3Event",
|
|
46
|
+
value: "H3Event",
|
|
47
|
+
extends: true,
|
|
48
|
+
isSilgiContext: false
|
|
49
|
+
});
|
|
44
50
|
});
|
|
45
51
|
silgi.hook("after:prepare:schema.ts", (data) => {
|
|
46
52
|
data.unshift("type FrameworkContextExtends = NitroApp");
|
|
@@ -84,7 +90,13 @@ async function nitroFramework(silgi, skip = false) {
|
|
|
84
90
|
await h3Framework(silgi, true);
|
|
85
91
|
}
|
|
86
92
|
|
|
87
|
-
|
|
93
|
+
async function nuxtFramework(silgi, skip = false) {
|
|
94
|
+
if (silgi.options.preset !== "nuxt" && skip === false)
|
|
95
|
+
return;
|
|
96
|
+
await nitroFramework(silgi, true);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const frameworkSetup = [h3Framework, nitroFramework, nuxtFramework];
|
|
88
100
|
|
|
89
101
|
async function prepare$1(silgi) {
|
|
90
102
|
await prepareDir(silgi.options.output.dir);
|
|
@@ -1276,7 +1288,6 @@ async function createSilgiCLI(config = {}, opts = {}) {
|
|
|
1276
1288
|
close: () => silgi.hooks.callHook("close", silgi),
|
|
1277
1289
|
storage: undefined,
|
|
1278
1290
|
scanModules: [],
|
|
1279
|
-
_modules: [],
|
|
1280
1291
|
callHook: hooks.callHook,
|
|
1281
1292
|
addHooks: hooks.addHooks,
|
|
1282
1293
|
hook: hooks.hook,
|
package/dist/core/index.mjs
CHANGED
|
@@ -656,7 +656,7 @@ async function silgiGenerateType(silgi) {
|
|
|
656
656
|
jsxFactory: "h",
|
|
657
657
|
jsxFragmentFactory: "Fragment",
|
|
658
658
|
allowImportingTsExtensions: true,
|
|
659
|
-
customConditions: ["silgiTypes"],
|
|
659
|
+
...silgi.options.typescript.customConditions ? { customConditions: ["silgiTypes"] } : {},
|
|
660
660
|
paths: {
|
|
661
661
|
"#imports": [
|
|
662
662
|
relativeWithDot(tsconfigDir, join(silgi.options.build.typesDir, "silgi-imports"))
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED