silgi 0.19.25 → 0.19.26

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.25";
1
+ const version = "0.19.26";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^3.0.0",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -205,26 +205,31 @@ const run = defineCommand({
205
205
  alias: silgiConfig.alias
206
206
  });
207
207
  let cleanHandler = cmd.handler.handler.replace(/\n/g, "");
208
- const jsonReplacer = (key, value) => {
209
- return typeof value === "bigint" ? `${value.toString()}n` : value;
210
- };
208
+ global.__silgi_temp_obj = data?.result?.silgi;
211
209
  cleanHandler = `import { silgiCLICtx } from 'silgi/core'
212
210
 
211
+ // Access from global scope
212
+ const silgiObj = global.__silgi_temp_obj;
213
213
  if (silgiCLICtx.tryUse()) {
214
214
  silgiCLICtx.unset()
215
- silgiCLICtx.set(${JSON.stringify(data.result.silgi, jsonReplacer)})
215
+ silgiCLICtx.set(silgiObj)
216
216
  }
217
217
  else {
218
- silgiCLICtx.set(${JSON.stringify(data.result.silgi, jsonReplacer)})
219
- data.result.silgi.hook('close', () => silgiCLICtx.unset())
218
+ silgiCLICtx.set(silgiObj)
219
+ // Use the silgiObj directly
220
+ silgiObj.hook && silgiObj.hook('close', () => silgiCLICtx.unset())
220
221
  }
221
- ${cleanHandler}`;
222
+ ${cleanHandler}
223
+
224
+ // Clean up global scope
225
+ delete global.__silgi_temp_obj;`;
222
226
  await jiti.evalModule(cleanHandler, {
223
227
  filename: import.meta.url,
224
228
  async: true,
225
229
  conditions: silgiConfig.conditions,
226
230
  forceTranspile: true
227
231
  });
232
+ delete global.__silgi_temp_obj;
228
233
  }
229
234
  }
230
235
  }
@@ -1,4 +1,4 @@
1
- const version = "0.19.25";
1
+ const version = "0.19.26";
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.25";
1
+ const version = "0.19.26";
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.25",
4
+ "version": "0.19.26",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {