silgi 0.37.18 → 0.37.19

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/cli/dev.mjs CHANGED
@@ -16,10 +16,6 @@ async function prepareBuild(config) {
16
16
  commandType: config?.commandType || "prepare",
17
17
  ...config
18
18
  });
19
- globalThis.__nitro__ = globalThis.__nitro__ || {};
20
- globalThis.__nitro__.useRuntimeConfig = function() {
21
- return silgi?.options?.runtimeConfig || {};
22
- };
23
19
  await build(silgi);
24
20
  return silgi;
25
21
  }
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
 
4
- const version = "0.37.18";
4
+ const version = "0.37.19";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
@@ -70,8 +70,8 @@ const command$1 = defineCommand({
70
70
  throw new Error("Silgi is not initialized");
71
71
  }
72
72
  const commands = silgi.options.commands;
73
- globalThis.__nitro__ = globalThis.__nitro__ || {};
74
- globalThis.__nitro__.useRuntimeConfig = function() {
73
+ globalThis.__silgi__ = globalThis.__silgi__ || {};
74
+ globalThis.__silgi__.useRuntimeConfig = function() {
75
75
  return silgi?.options?.runtimeConfig || {};
76
76
  };
77
77
  const tags = args.tag?.split(",").map((t) => t.trim());
@@ -3,12 +3,12 @@ import consola from 'consola';
3
3
  import { version } from 'silgi/meta';
4
4
  import { w as watchDev } from './dev.mjs';
5
5
  import { b as commonArgs, a as command$1 } from './prepare.mjs';
6
- import { useSilgiCLI } from 'silgi';
7
6
  import 'chokidar';
8
7
  import 'pathe';
9
8
  import 'perfect-debounce';
10
9
  import '../_chunks/silgiApp.mjs';
11
10
  import 'unctx';
11
+ import 'silgi';
12
12
  import './build.mjs';
13
13
  import 'hookable';
14
14
  import 'silgi/kit';
@@ -69,14 +69,6 @@ const command = defineCommand({
69
69
  rawArgs: ["--commandType", "dev", "--dev", "true"]
70
70
  });
71
71
  const watch = await watchDev();
72
- const silgi = useSilgiCLI();
73
- if (!silgi) {
74
- throw new Error("Silgi is not initialized");
75
- }
76
- globalThis.__nitro__ = globalThis.__nitro__ || {};
77
- globalThis.__nitro__.useRuntimeConfig = function() {
78
- return silgi?.options?.runtimeConfig || {};
79
- };
80
72
  process.on("SIGINT", async () => {
81
73
  consola.withTag("silgi").info("Shutting down...");
82
74
  if (watch) {
@@ -282,6 +282,10 @@ async function createSilgi(config) {
282
282
  captureError: config.captureError ?? (() => {
283
283
  })
284
284
  };
285
+ globalThis.__silgi__ = globalThis.__silgi__ || {};
286
+ globalThis.__silgi__.useRuntimeConfig = function() {
287
+ return silgi?.options?.runtimeConfig || {};
288
+ };
285
289
  if (!silgi.router) {
286
290
  silgi.router = createRouter();
287
291
  }
@@ -3,7 +3,7 @@ import destr from "destr";
3
3
  import { klona } from "klona";
4
4
  import { snakeCase } from "scule";
5
5
  import { tryUseSilgi, useSilgi } from "silgi";
6
- let _inlineSilgiRuntimeConfig = globalThis.__nitro__?.useRuntimeConfig?.() || globalThis._silgi_runtime || process.env.RUNTIME_CONFIG;
6
+ let _inlineSilgiRuntimeConfig = globalThis.__silgi__?.useRuntimeConfig?.() || globalThis._silgi_runtime || process.env.RUNTIME_CONFIG;
7
7
  let envOptions = {
8
8
  prefix: "NITRO_",
9
9
  altPrefix: _inlineSilgiRuntimeConfig?.nitro?.envPrefix ?? process.env.NITRO_ENV_PREFIX ?? "_",
@@ -15,7 +15,7 @@ let _sharedRuntimeConfig = _deepFreeze(
15
15
  );
16
16
  export function useSilgiRuntimeConfig(event, inlineRuntimeConfig = {}) {
17
17
  if (!_inlineSilgiRuntimeConfig) {
18
- _inlineSilgiRuntimeConfig = globalThis.__nitro__?.useRuntimeConfig?.();
18
+ _inlineSilgiRuntimeConfig = globalThis.__silgi__?.useRuntimeConfig?.();
19
19
  envOptions = {
20
20
  prefix: "NITRO_",
21
21
  altPrefix: _inlineSilgiRuntimeConfig?.nitro?.envPrefix ?? process.env.NITRO_ENV_PREFIX ?? "_",
@@ -888,7 +888,7 @@ declare global {
888
888
  _silgi_runtime: SilgiRuntimeOptions;
889
889
  }
890
890
  }
891
- var __nitro__: {
891
+ var __silgi__: {
892
892
  useRuntimeConfig?: <T extends NitroRuntimeConfig = NitroRuntimeConfig>(event?: H3Event) => T;
893
893
  [key: string]: any;
894
894
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.37.18",
4
+ "version": "0.37.19",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {