silgi 0.19.23 → 0.19.25

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,4 +1,4 @@
1
- const version = "0.19.23";
1
+ const version = "0.19.25";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^3.0.0",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -199,19 +199,23 @@ const run = defineCommand({
199
199
  if (cmd.handler.type === "command") {
200
200
  execSync(cmd.handler.handler, { stdio: "inherit" });
201
201
  }
202
+ console.log(data?.result.silgi.callHook);
202
203
  if (cmd.handler.type === "function") {
203
204
  const jiti = createJiti(import.meta.url, {
204
205
  alias: silgiConfig.alias
205
206
  });
206
207
  let cleanHandler = cmd.handler.handler.replace(/\n/g, "");
208
+ const jsonReplacer = (key, value) => {
209
+ return typeof value === "bigint" ? `${value.toString()}n` : value;
210
+ };
207
211
  cleanHandler = `import { silgiCLICtx } from 'silgi/core'
208
212
 
209
213
  if (silgiCLICtx.tryUse()) {
210
214
  silgiCLICtx.unset()
211
- silgiCLICtx.set(${JSON.stringify(data.result.silgi)})
215
+ silgiCLICtx.set(${JSON.stringify(data.result.silgi, jsonReplacer)})
212
216
  }
213
217
  else {
214
- silgiCLICtx.set(${JSON.stringify(data.result.silgi)})
218
+ silgiCLICtx.set(${JSON.stringify(data.result.silgi, jsonReplacer)})
215
219
  data.result.silgi.hook('close', () => silgiCLICtx.unset())
216
220
  }
217
221
  ${cleanHandler}`;
@@ -600,7 +600,8 @@ async function silgiGenerateType(silgi) {
600
600
  ]);
601
601
  const exclude = /* @__PURE__ */ new Set([
602
602
  // nitro generate output: https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/core/nitro.ts#L186
603
- relativeWithDot(silgi.options.build.dir, resolve(silgi.options.rootDir, "dist"))
603
+ relativeWithDot(tsconfigDir, "node_modules"),
604
+ relativeWithDot(tsconfigDir, "dist")
604
605
  ]);
605
606
  for (const dir of silgi.options.modulesDir) {
606
607
  exclude.add(relativeWithDot(silgi.options.build.dir, dir));
@@ -1,4 +1,4 @@
1
- const version = "0.19.23";
1
+ const version = "0.19.25";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^3.0.0",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -1,4 +1,4 @@
1
- const version = "0.19.23";
1
+ const version = "0.19.25";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^3.0.0",
4
4
  "@nuxt/kit": "^3.15.3",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.19.23",
4
+ "version": "0.19.25",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {