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.
@@ -1,6 +1,6 @@
1
1
  const name = "silgi";
2
2
  const type = "module";
3
- const version = "0.4.1";
3
+ const version = "0.4.2";
4
4
  const packageManager = "pnpm@9.15.1";
5
5
  const sideEffects = false;
6
6
  const exports = {
@@ -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
- const frameworkSetup = [h3Framework, nitroFramework];
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,
@@ -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"))
@@ -1,3 +1,3 @@
1
- const version = "0.4.1";
1
+ const version = "0.4.2";
2
2
 
3
3
  export { version };
@@ -1,3 +1,3 @@
1
- const version = "0.4.1";
1
+ const version = "0.4.2";
2
2
 
3
3
  export { version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.4.1",
4
+ "version": "0.4.2",
5
5
  "sideEffects": false,
6
6
  "exports": {
7
7
  "./cli": {