silgi 0.20.3 → 0.20.5

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.20.3";
1
+ const version = "0.20.5";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^3.0.0",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -126,7 +126,7 @@ const run = defineCommand({
126
126
  consola.error("Silgi not found");
127
127
  return;
128
128
  }
129
- const silgi = data?.result?.silgi;
129
+ const silgi = globalThis.__silgi_temp_obj;
130
130
  if (silgi) {
131
131
  if (silgiCLICtx.tryUse()) {
132
132
  silgiCLICtx.unset();
@@ -249,11 +249,10 @@ const run = defineCommand({
249
249
  alias: silgiConfig.alias
250
250
  });
251
251
  let cleanHandler = cmd.handler.handler.replace(/\n/g, "");
252
- global.__silgi_temp_obj = silgi;
253
252
  cleanHandler = `import { silgiCLICtx } from 'silgi/core'
254
253
 
255
254
  // Access from global scope
256
- const silgiObj = global.__silgi_temp_obj;
255
+ const silgiObj = globalThis.__silgi_temp_obj;
257
256
  if (silgiCLICtx.tryUse()) {
258
257
  silgiCLICtx.unset()
259
258
  silgiCLICtx.set(silgiObj)
@@ -264,16 +263,13 @@ const run = defineCommand({
264
263
  silgiObj.hook && silgiObj.hook('close', () => silgiCLICtx.unset())
265
264
  }
266
265
  ${cleanHandler}
267
-
268
- // Clean up global scope
269
- delete global.__silgi_temp_obj;`;
266
+ `;
270
267
  await jiti.evalModule(cleanHandler, {
271
268
  filename: import.meta.url,
272
269
  async: true,
273
270
  conditions: silgiConfig.conditions,
274
271
  forceTranspile: true
275
272
  });
276
- delete global.__silgi_temp_obj;
277
273
  }
278
274
  }
279
275
  }
@@ -331,10 +327,10 @@ const prepare = defineCommand({
331
327
  await silgi.callHook("close", silgi);
332
328
  consola$1.withTag("silgi").success("Prepare completed");
333
329
  await close();
330
+ globalThis.__silgi_temp_obj = silgi;
334
331
  if (!args.commands) {
335
332
  await runCommand(run, {
336
- rawArgs: ["--tag", "init", "--active", "false"],
337
- data: { silgi }
333
+ rawArgs: ["--tag", "init", "--active", "false"]
338
334
  });
339
335
  }
340
336
  return {
@@ -1,4 +1,4 @@
1
- const version = "0.20.3";
1
+ const version = "0.20.5";
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.20.3";
1
+ const version = "0.20.5";
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.20.3",
4
+ "version": "0.20.5",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {