silgi 0.43.6 → 0.43.8

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.
Files changed (71) hide show
  1. package/dist/build.d.mts +2 -2
  2. package/dist/cli/build/dev.d.mts +1 -1
  3. package/dist/cli/build/prepare.d.mts +1 -1
  4. package/dist/cli/commands/init.mjs +1 -1
  5. package/dist/cli/commands/run.mjs +83 -24
  6. package/dist/cli/config/index.d.mts +2 -2
  7. package/dist/cli/config/loader.d.mts +1 -1
  8. package/dist/cli/config/resolvers/compatibility.mjs +1 -1
  9. package/dist/cli/config/types.d.mts +1 -1
  10. package/dist/cli/core/app.mjs +1 -1
  11. package/dist/cli/index.mjs +1 -1
  12. package/dist/cli/module/install.mjs +1 -1
  13. package/dist/cli/module/scan.mjs +6 -6
  14. package/dist/cli/scan/prepareCommands.mjs +1 -1
  15. package/dist/cli/scan/scanExportFile.mjs +3 -3
  16. package/dist/cli/scan/writeTypesAndFiles.mjs +1 -1
  17. package/dist/cli/utils/compatibility.mjs +1 -1
  18. package/dist/core/context.d.mts +1 -1
  19. package/dist/core/createSilgi.d.mts +1 -1
  20. package/dist/core/error.d.mts +1 -1
  21. package/dist/core/event.d.mts +1 -1
  22. package/dist/core/index.d.mts +19 -19
  23. package/dist/core/index.mjs +1 -1
  24. package/dist/core/response.d.mts +2 -2
  25. package/dist/core/silgi.d.mts +1 -1
  26. package/dist/core/silgiApp.d.mts +1 -1
  27. package/dist/core/storage.d.mts +1 -1
  28. package/dist/core/unctx.d.mts +1 -1
  29. package/dist/core/utils/event-stream.d.mts +2 -2
  30. package/dist/core/utils/event.d.mts +1 -1
  31. package/dist/core/utils/internal/event-stream.d.mts +1 -1
  32. package/dist/core/utils/merge.d.mts +1 -1
  33. package/dist/core/utils/middleware.d.mts +1 -1
  34. package/dist/core/utils/resolver.d.mts +1 -1
  35. package/dist/core/utils/resolver.mjs +1 -1
  36. package/dist/core/utils/runtime.d.mts +1 -1
  37. package/dist/core/utils/schema.d.mts +1 -1
  38. package/dist/core/utils/service.d.mts +1 -1
  39. package/dist/core/utils/shared.d.mts +1 -1
  40. package/dist/core/utils/storage.d.mts +1 -1
  41. package/dist/index.d.mts +19 -19
  42. package/dist/index.mjs +1 -1
  43. package/dist/kit/add/add-commands.d.mts +1 -1
  44. package/dist/kit/add/add-core-file.d.mts +1 -1
  45. package/dist/kit/add/add-imports.d.mts +1 -1
  46. package/dist/kit/add/add-npm.d.mts +1 -1
  47. package/dist/kit/define.d.mts +1 -1
  48. package/dist/kit/errors.d.mts +1 -1
  49. package/dist/kit/esm.d.mts +1 -1
  50. package/dist/kit/fs.d.mts +1 -1
  51. package/dist/kit/function-utils.d.mts +1 -1
  52. package/dist/kit/function-utils.mjs +1 -1
  53. package/dist/kit/gen.d.mts +1 -1
  54. package/dist/kit/hash.d.mts +1 -1
  55. package/dist/kit/index.d.mts +21 -21
  56. package/dist/kit/isFramework.d.mts +1 -1
  57. package/dist/kit/logger.d.mts +1 -1
  58. package/dist/kit/migration.d.mts +1 -1
  59. package/dist/kit/migration.mjs +1 -1
  60. package/dist/kit/module.d.mts +1 -1
  61. package/dist/kit/path.d.mts +1 -1
  62. package/dist/kit/preset.d.mts +1 -1
  63. package/dist/kit/resolve.d.mts +1 -1
  64. package/dist/kit/template.d.mts +1 -1
  65. package/dist/kit/useRequest.d.mts +1 -1
  66. package/dist/kit/utils.d.mts +1 -1
  67. package/dist/package.mjs +11 -10
  68. package/dist/types/service.d.mts +1 -1
  69. package/dist/types/tree-kill.d.mts +18 -0
  70. package/dist/types/tree-kill.mjs +0 -0
  71. package/package.json +19 -18
package/dist/build.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { watchDev$1 as watchDev } from "./cli/build/dev.mjs";
2
- import { prepareBuild$1 as prepareBuild } from "./cli/build/prepare.mjs";
1
+ import { watchDev } from "./cli/build/dev.mjs";
2
+ import { prepareBuild } from "./cli/build/prepare.mjs";
3
3
  export { prepareBuild, watchDev };
@@ -6,4 +6,4 @@ declare function watchDev(): Promise<{
6
6
  close: () => Promise<void>;
7
7
  }>;
8
8
  //#endregion
9
- export { watchDev as watchDev$1 };
9
+ export { watchDev };
@@ -3,4 +3,4 @@ import { SilgiCLI, SilgiCLIConfig } from "silgi/types";
3
3
  //#region src/cli/build/prepare.d.ts
4
4
  declare function prepareBuild(config?: SilgiCLIConfig): Promise<SilgiCLI>;
5
5
  //#endregion
6
- export { prepareBuild as prepareBuild$1 };
6
+ export { prepareBuild };
@@ -45,7 +45,7 @@ const command = defineCommand({
45
45
  "",
46
46
  "export default defineSilgiConfig({",
47
47
  ` preset: '${framework}',`,
48
- ` compatibilityDate: '${new Date().toISOString().split("T")[0]}',`,
48
+ ` compatibilityDate: '${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}',`,
49
49
  "",
50
50
  "})",
51
51
  ""
@@ -5,7 +5,10 @@ import consola from "consola";
5
5
  import { useSilgiCLI } from "silgi";
6
6
  import { version } from "silgi/meta";
7
7
  import { defineCommand, runCommand } from "citty";
8
- import { x } from "tinyexec";
8
+ import { spawn } from "node:child_process";
9
+ import { platform } from "node:os";
10
+ import { promisify } from "node:util";
11
+ import treeKill from "tree-kill";
9
12
 
10
13
  //#region src/cli/commands/run.ts
11
14
  const command = defineCommand({
@@ -32,56 +35,112 @@ const command = defineCommand({
32
35
  const silgi = useSilgiCLI();
33
36
  const startCommand = args.command || rawArgs[0];
34
37
  let childPid = null;
38
+ let childProcess = null;
35
39
  let hasExited = false;
36
40
  let exitTimeout = null;
37
- const cleanupAndExit = (code = 0) => {
41
+ const signalHandlers = [];
42
+ const treeKillAsync = promisify(treeKill);
43
+ const cleanupResources = async () => {};
44
+ const cleanupAndExit = async (code = 0) => {
38
45
  if (hasExited) return;
39
46
  hasExited = true;
40
- if (exitTimeout) clearTimeout(exitTimeout);
41
- process.exit(code);
47
+ if (exitTimeout) {
48
+ clearTimeout(exitTimeout);
49
+ exitTimeout = null;
50
+ }
51
+ try {
52
+ await cleanupResources();
53
+ } catch (error) {
54
+ consola.warn("Error during cleanup:", error instanceof Error ? error.message : String(error));
55
+ } finally {
56
+ signalHandlers.forEach((removeHandler) => removeHandler());
57
+ signalHandlers.length = 0;
58
+ process.exit(code);
59
+ }
60
+ };
61
+ const killProcessTree = async (pid, signal = "SIGTERM") => {
62
+ try {
63
+ await treeKillAsync(pid, signal);
64
+ return true;
65
+ } catch (error) {
66
+ consola.warn(`Failed to kill process tree for PID ${pid}:`, error instanceof Error ? error.message : String(error));
67
+ return false;
68
+ }
42
69
  };
43
70
  const handleSignal = async (signal, watcher) => {
71
+ if (hasExited) return;
44
72
  consola.info(`Received ${signal}, terminating process...`);
45
73
  if (watcher && typeof watcher.close === "function") try {
46
74
  await watcher.close();
47
- } catch {}
48
- if (childPid) {
49
- try {
50
- process.kill(childPid, signal);
51
- } catch (err) {
52
- consola.error(`Failed to kill process: ${err instanceof Error ? err.message : err}`);
53
- }
54
- exitTimeout = setTimeout(() => {
75
+ } catch (error) {
76
+ consola.warn("Error closing watcher:", error instanceof Error ? error.message : String(error));
77
+ }
78
+ if (childPid) try {
79
+ await killProcessTree(childPid, signal);
80
+ exitTimeout = setTimeout(async () => {
81
+ if (hasExited) return;
55
82
  consola.warn("Process did not exit gracefully, forcing termination...");
56
83
  try {
57
- if (childPid) process.kill(childPid, "SIGKILL");
58
- } catch {}
59
- cleanupAndExit(1);
84
+ await killProcessTree(childPid, "SIGKILL");
85
+ } finally {
86
+ await cleanupAndExit(1);
87
+ }
60
88
  }, 3e3);
61
- } else cleanupAndExit(0);
89
+ if (childProcess) await new Promise((resolve) => {
90
+ childProcess.on("exit", () => resolve());
91
+ childProcess.on("error", () => resolve());
92
+ });
93
+ clearTimeout(exitTimeout);
94
+ exitTimeout = null;
95
+ await cleanupAndExit(0);
96
+ } catch (error) {
97
+ consola.error("Error during process termination:", error instanceof Error ? error.message : String(error));
98
+ await cleanupAndExit(1);
99
+ }
100
+ else await cleanupAndExit(0);
62
101
  };
63
102
  const setupSignalHandlers = (watcher) => {
64
- [
103
+ const signals = [
65
104
  "SIGINT",
66
105
  "SIGTERM",
67
106
  "SIGHUP"
68
- ].forEach((signal) => {
69
- process.on(signal, () => {
70
- handleSignal(signal, watcher);
107
+ ];
108
+ signals.forEach((signal) => {
109
+ const handler = () => {
110
+ process.off(signal, handler);
111
+ handleSignal(signal, watcher).catch((error) => {
112
+ consola.error("Error in signal handler:", error instanceof Error ? error.message : String(error));
113
+ process.exit(1);
114
+ });
115
+ };
116
+ signalHandlers.push(() => {
117
+ process.off(signal, handler);
71
118
  });
119
+ process.on(signal, handler);
72
120
  });
73
121
  };
74
122
  try {
75
123
  const watcher = await watchDev();
76
124
  setupSignalHandlers(watcher);
77
125
  consola.info(`Starting command: nr ${startCommand}`);
78
- const proc = x("nr", [startCommand], { nodeOptions: {
126
+ const isWindows = platform() === "win32";
127
+ const proc = spawn("nr", [startCommand], {
79
128
  stdio: "inherit",
80
129
  shell: true,
81
130
  cwd: process.cwd(),
82
- killSignal: "SIGINT"
83
- } });
84
- if (proc && typeof proc.pid === "number") childPid = proc.pid;
131
+ ...!isWindows && { detached: true }
132
+ });
133
+ childProcess = proc;
134
+ childPid = proc.pid ?? null;
135
+ if (!childPid) throw new Error("Failed to start child process: no PID assigned");
136
+ proc.on("error", (error) => {
137
+ consola.error("Process error:", error.message);
138
+ if (!hasExited) cleanupAndExit(1).catch(() => {});
139
+ });
140
+ proc.on("exit", (code) => {
141
+ if (code !== null && code !== 0) consola.error(`Process exited with code ${code}`);
142
+ if (!hasExited) cleanupAndExit(code || 0).catch(() => {});
143
+ });
85
144
  try {
86
145
  await proc;
87
146
  consola.success(`Process exited successfully.`);
@@ -1,3 +1,3 @@
1
- import { loadOptions$1 as loadOptions } from "./loader.mjs";
2
- import { silgiGenerateType$1 as silgiGenerateType } from "./types.mjs";
1
+ import { loadOptions } from "./loader.mjs";
2
+ import { silgiGenerateType } from "./types.mjs";
3
3
  export { loadOptions, silgiGenerateType };
@@ -3,4 +3,4 @@ import { LoadConfigOptions, SilgiCLIConfig, SilgiCLIOptions } from "silgi/types"
3
3
  //#region src/cli/config/loader.d.ts
4
4
  declare function loadOptions(configOverrides?: SilgiCLIConfig, opts?: LoadConfigOptions): Promise<SilgiCLIOptions>;
5
5
  //#endregion
6
- export { loadOptions as loadOptions$1 };
6
+ export { loadOptions };
@@ -12,7 +12,7 @@ async function resolveCompatibilityOptions(options) {
12
12
  let _fallbackInfoShown = false;
13
13
  let _promptedUserToUpdate = false;
14
14
  async function _resolveDefault(options) {
15
- const _todayDate = formatDate(new Date());
15
+ const _todayDate = formatDate(/* @__PURE__ */ new Date());
16
16
  const consola$2 = consola.withTag("silgi");
17
17
  consola$2.warn(`No valid compatibility date is specified.`);
18
18
  const onFallback = () => {
@@ -11,4 +11,4 @@ declare function silgiGenerateType(silgi: SilgiCLI): Promise<{
11
11
  tsConfig: TSConfig;
12
12
  }>;
13
13
  //#endregion
14
- export { silgiGenerateType as silgiGenerateType$1 };
14
+ export { silgiGenerateType };
@@ -42,7 +42,7 @@ async function generateApp(app, options = {}) {
42
42
  }
43
43
  const templateContext = { app };
44
44
  const writes = [];
45
- const dirs = new Set();
45
+ const dirs = /* @__PURE__ */ new Set();
46
46
  const changedTemplates = [];
47
47
  async function processTemplate(template) {
48
48
  let dir;
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { package_default } from "../package.mjs";
2
+ import package_default from "../package.mjs";
3
3
  import { defineCommand, runMain } from "citty";
4
4
 
5
5
  //#region src/cli/index.ts
@@ -1,4 +1,4 @@
1
- import { hasInstalledModule$1 as hasInstalledModule } from "../utils/compatibility.mjs";
1
+ import { hasInstalledModule } from "../utils/compatibility.mjs";
2
2
  import { useSilgiCLI } from "silgi";
3
3
  import { createJiti } from "dev-jiti";
4
4
 
@@ -103,12 +103,12 @@ async function scanModules(silgi) {
103
103
  silgi.scanModules = modules;
104
104
  }
105
105
  function createDependencyGraph(modules) {
106
- const graph = new Map();
107
- const inDegree = new Map();
106
+ const graph = /* @__PURE__ */ new Map();
107
+ const inDegree = /* @__PURE__ */ new Map();
108
108
  modules.forEach((module) => {
109
109
  const key = module.meta?.configKey;
110
110
  if (key) {
111
- graph.set(key, new Set());
111
+ graph.set(key, /* @__PURE__ */ new Set());
112
112
  inDegree.set(key, 0);
113
113
  }
114
114
  });
@@ -118,7 +118,7 @@ function createDependencyGraph(modules) {
118
118
  const requiredDeps = module.meta?.requiredDependencies || [];
119
119
  const beforeDeps = module.meta?.beforeDependencies || [];
120
120
  const afterDeps = module.meta?.afterDependencies || [];
121
- const processedDeps = new Set();
121
+ const processedDeps = /* @__PURE__ */ new Set();
122
122
  requiredDeps.forEach((dep) => {
123
123
  if (!graph.has(dep)) throw new Error(`Required dependency "${dep}" for module "${key}" is missing`);
124
124
  graph.get(dep)?.add(key);
@@ -143,8 +143,8 @@ function createDependencyGraph(modules) {
143
143
  };
144
144
  }
145
145
  function findCyclicDependencies(graph) {
146
- const visited = new Set();
147
- const recursionStack = new Set();
146
+ const visited = /* @__PURE__ */ new Set();
147
+ const recursionStack = /* @__PURE__ */ new Set();
148
148
  const cycles = [];
149
149
  function dfs(node, path = []) {
150
150
  visited.add(node);
@@ -19,7 +19,7 @@ async function prepareCommands(silgi = useSilgiCLI()) {
19
19
  if (command.tags) command.tags.forEach((tag) => acc.add(tag));
20
20
  });
21
21
  return acc;
22
- }, new Set());
22
+ }, /* @__PURE__ */ new Set());
23
23
  const data = [
24
24
  genAugmentation("silgi/types", { SilgiCommands: { ...Object.fromEntries(Array.from(allTags.values()).map((tag) => [tag, "string"])) } }),
25
25
  "",
@@ -152,7 +152,7 @@ async function extractExportEntitiesFromFile(absoluteFilePath, functionExportNam
152
152
  const exportEntities = [];
153
153
  const fileContent = await readFile(absoluteFilePath, "utf-8");
154
154
  const parsed = await parseAsync(absoluteFilePath, fileContent);
155
- const variableDeclarations = new Map();
155
+ const variableDeclarations = /* @__PURE__ */ new Map();
156
156
  for (const node of parsed.program.body) {
157
157
  if (node.type === "VariableDeclaration" && Array.isArray(node.declarations)) {
158
158
  for (const decl of node.declarations) if (decl.type === "VariableDeclarator" && decl.id.type === "Identifier") variableDeclarations.set(decl.id.name, decl);
@@ -224,7 +224,7 @@ async function extractExportEntitiesFromFile(absoluteFilePath, functionExportNam
224
224
  return exportEntities;
225
225
  }
226
226
  async function scanSilgiExports(path, packageName, silgiInstance = useSilgiCLI(), scanOptions = {}) {
227
- const processedFilePaths = new Set();
227
+ const processedFilePaths = /* @__PURE__ */ new Set();
228
228
  const alreadyScannedPaths = [];
229
229
  const serverDirectory = path || silgiInstance.options.serverDir;
230
230
  const functionExportNames = scanOptions.functionExportNames ?? DEFAULT_FUNCTION_EXPORT_NAMES;
@@ -263,7 +263,7 @@ async function scanSilgiExports(path, packageName, silgiInstance = useSilgiCLI()
263
263
  if (!silgiInstance.options.extensions?.includes(fileExtension)) continue;
264
264
  try {
265
265
  const exportEntities = await extractExportEntitiesFromFile(absoluteFilePath, functionExportNames, interfaceExtendsNames);
266
- const seenServiceSignatures = new Map();
266
+ const seenServiceSignatures = /* @__PURE__ */ new Map();
267
267
  for (const entity of exportEntities) if ((entity.funcName === "createService" || entity.funcName === "createWebSocket") && entity.servicePath && entity.serviceMethod) {
268
268
  const key = `${entity.serviceMethod}:${entity.servicePath}`;
269
269
  if (seenServiceSignatures.has(key)) throw new Error(`Duplicate ${entity.funcName} detected for path "${entity.servicePath}" and method "${entity.serviceMethod}".\nFirst found in: ${seenServiceSignatures.get(key)}\nDuplicate in: ${absoluteFilePath}\nPlease ensure each service path/method combination is unique.`);
@@ -24,7 +24,7 @@ async function writeTypesAndFiles(silgi) {
24
24
  await silgi.unimport.init();
25
25
  const allImports = await silgi.unimport.getImports();
26
26
  autoImportExports = toExports(allImports).replace(/#internal\/nitro/g, relative(typesDir, runtimeDir));
27
- const resolvedImportPathMap = new Map();
27
+ const resolvedImportPathMap = /* @__PURE__ */ new Map();
28
28
  for (const i of allImports.filter((i$1) => !i$1.type)) {
29
29
  if (resolvedImportPathMap.has(i.from)) continue;
30
30
  let path = resolveAlias$1(i.from, silgi.options.alias);
@@ -30,4 +30,4 @@ function hasInstalledModule(moduleKey, silgi = useSilgiCLI()) {
30
30
  }
31
31
 
32
32
  //#endregion
33
- export { checkSilgiCompatibility, hasInstalledModule as hasInstalledModule$1 };
33
+ export { checkSilgiCompatibility, hasInstalledModule };
@@ -27,4 +27,4 @@ declare function useRuntime(): SilgiRuntimeConfig;
27
27
  * ```
28
28
  */
29
29
  //#endregion
30
- export { updateRuntimeStorage as updateRuntimeStorage$1, useRuntime as useRuntime$1 };
30
+ export { updateRuntimeStorage, useRuntime };
@@ -3,4 +3,4 @@ import { Silgi, SilgiConfig } from "silgi/types";
3
3
  //#region src/core/createSilgi.d.ts
4
4
  declare function createSilgi(config: SilgiConfig): Promise<Silgi>;
5
5
  //#endregion
6
- export { createSilgi as createSilgi$1 };
6
+ export { createSilgi };
@@ -62,4 +62,4 @@ declare function createError<DataT = unknown>(input: string | (Partial<SilgiErro
62
62
  */
63
63
  declare function isError<DataT = unknown>(input: any): input is SilgiError<DataT>;
64
64
  //#endregion
65
- export { SilgiError as SilgiError$1, createError as createError$1, isError as isError$1 };
65
+ export { SilgiError, createError, isError };
@@ -23,4 +23,4 @@ declare class SilgiEventResponse {
23
23
  get headers(): Headers;
24
24
  }
25
25
  //#endregion
26
- export { SilgiHttpEvent as SilgiHttpEvent$1 };
26
+ export { SilgiHttpEvent };
@@ -1,22 +1,22 @@
1
- import { updateRuntimeStorage$1 as updateRuntimeStorage, useRuntime$1 as useRuntime } from "./context.mjs";
2
- import { createSilgi$1 as createSilgi } from "./createSilgi.mjs";
3
- import { SilgiError$1 as SilgiError, createError$1 as createError, isError$1 as isError } from "./error.mjs";
4
- import { SilgiHttpEvent$1 as SilgiHttpEvent } from "./event.mjs";
5
- import { handleResponse$1 as handleResponse, kHandled$1 as kHandled, kNotFound$1 as kNotFound } from "./response.mjs";
6
- import { getWebsocket$1 as getWebsocket, handler$1 as handler, middleware$1 as middleware, silgiFetch$1 as silgiFetch } from "./silgi.mjs";
7
- import { silgiCLICtx$1 as silgiCLICtx, tryUseSilgiCLI$1 as tryUseSilgiCLI, useSilgiCLI$1 as useSilgiCLI } from "./silgiApp.mjs";
8
- import { storageMount$1 as storageMount } from "./storage.mjs";
9
- import { silgiCtx$1 as silgiCtx, tryUseSilgi$1 as tryUseSilgi, useSilgi$1 as useSilgi } from "./unctx.mjs";
10
- import { createEventStream$1 as createEventStream } from "./utils/event-stream.mjs";
11
- import { getEvent$1 as getEvent, getEventContext$1 as getEventContext } from "./utils/event.mjs";
12
- import { deepMergeObjects$1 as deepMergeObjects } from "./utils/merge.mjs";
13
- import { createMiddleware$1 as createMiddleware } from "./utils/middleware.mjs";
14
- import { createResolver$3 as createResolver, getUrlPrefix$1 as getUrlPrefix } from "./utils/resolver.mjs";
15
- import { replaceRuntimeValues$1 as replaceRuntimeValues } from "./utils/runtime.mjs";
16
- import { createSchema$1 as createSchema } from "./utils/schema.mjs";
17
- import { createService$1 as createService, createWebSocket$1 as createWebSocket, defineServiceSetup$1 as defineServiceSetup } from "./utils/service.mjs";
18
- import { createShared$1 as createShared } from "./utils/shared.mjs";
19
- import { createStorage$1 as createStorage, useSilgiStorage$1 as useSilgiStorage } from "./utils/storage.mjs";
1
+ import { updateRuntimeStorage, useRuntime } from "./context.mjs";
2
+ import { createSilgi } from "./createSilgi.mjs";
3
+ import { SilgiError, createError, isError } from "./error.mjs";
4
+ import { SilgiHttpEvent } from "./event.mjs";
5
+ import { handleResponse, kHandled, kNotFound } from "./response.mjs";
6
+ import { getWebsocket, handler, middleware, silgiFetch } from "./silgi.mjs";
7
+ import { silgiCLICtx, tryUseSilgiCLI, useSilgiCLI } from "./silgiApp.mjs";
8
+ import { storageMount } from "./storage.mjs";
9
+ import { silgiCtx, tryUseSilgi, useSilgi } from "./unctx.mjs";
10
+ import { createEventStream } from "./utils/event-stream.mjs";
11
+ import { getEvent, getEventContext } from "./utils/event.mjs";
12
+ import { deepMergeObjects } from "./utils/merge.mjs";
13
+ import { createMiddleware } from "./utils/middleware.mjs";
14
+ import { createResolver, getUrlPrefix } from "./utils/resolver.mjs";
15
+ import { replaceRuntimeValues } from "./utils/runtime.mjs";
16
+ import { createSchema } from "./utils/schema.mjs";
17
+ import { createService, createWebSocket, defineServiceSetup } from "./utils/service.mjs";
18
+ import { createShared } from "./utils/shared.mjs";
19
+ import { createStorage, useSilgiStorage } from "./utils/storage.mjs";
20
20
 
21
21
  //#region src/core/index.d.ts
22
22
  // TODO: bunlari yinede destekle.
@@ -7,7 +7,7 @@ import { createStorage, useSilgiStorage } from "./utils/storage.mjs";
7
7
  import { createSilgi } from "./createSilgi.mjs";
8
8
  import { SilgiHttpEvent } from "./event.mjs";
9
9
  import { handleResponse, kHandled, kNotFound } from "./response.mjs";
10
- import { createResolver$1 as createResolver, getUrlPrefix } from "./utils/resolver.mjs";
10
+ import { createResolver, getUrlPrefix } from "./utils/resolver.mjs";
11
11
  import { getWebsocket, handler, middleware, silgiFetch } from "./silgi.mjs";
12
12
  import { storageMount } from "./storage.mjs";
13
13
  import { createEventStream } from "./utils/event-stream.mjs";
@@ -1,4 +1,4 @@
1
- import { SilgiError$1 as SilgiError } from "./error.mjs";
1
+ import { SilgiError } from "./error.mjs";
2
2
  import { SilgiEvent } from "silgi/types";
3
3
 
4
4
  //#region src/core/response.d.ts
@@ -17,4 +17,4 @@ declare const kNotFound: symbol;
17
17
  declare const kHandled: symbol;
18
18
  declare function handleResponse(val: unknown, event: SilgiEvent, config: SilgiHandlerConfig): Response | Promise<Response>;
19
19
  //#endregion
20
- export { handleResponse as handleResponse$1, kHandled as kHandled$1, kNotFound as kNotFound$1 };
20
+ export { handleResponse, kHandled, kNotFound };
@@ -16,4 +16,4 @@ declare function middleware(event: SilgiEvent): Promise<any>;
16
16
  declare function handler(event: SilgiEvent): Promise<any>;
17
17
  declare function getWebsocket(silgi?: Silgi): WebSocketOptions;
18
18
  //#endregion
19
- export { getWebsocket as getWebsocket$1, handler as handler$1, middleware as middleware$1, silgiFetch as silgiFetch$1 };
19
+ export { getWebsocket, handler, middleware, silgiFetch };
@@ -6,4 +6,4 @@ declare const silgiCLICtx: UseContext<SilgiCLI>;
6
6
  declare function useSilgiCLI(): SilgiCLI;
7
7
  declare function tryUseSilgiCLI(): SilgiCLI | null;
8
8
  //#endregion
9
- export { silgiCLICtx as silgiCLICtx$1, tryUseSilgiCLI as tryUseSilgiCLI$1, useSilgiCLI as useSilgiCLI$1 };
9
+ export { silgiCLICtx, tryUseSilgiCLI, useSilgiCLI };
@@ -4,4 +4,4 @@ import { Silgi, SilgiStorageBase } from "silgi/types";
4
4
  //#region src/core/storage.d.ts
5
5
  declare function storageMount<T extends Storage = Storage>(silgi?: Silgi): (base: keyof SilgiStorageBase, driver: Parameters<Storage["mount"]>[1]) => T;
6
6
  //#endregion
7
- export { storageMount as storageMount$1 };
7
+ export { storageMount };
@@ -18,4 +18,4 @@ declare function useSilgi(): Silgi;
18
18
  */
19
19
  declare function tryUseSilgi(): Silgi | null;
20
20
  //#endregion
21
- export { silgiCtx as silgiCtx$1, tryUseSilgi as tryUseSilgi$1, useSilgi as useSilgi$1 };
21
+ export { silgiCtx, tryUseSilgi, useSilgi };
@@ -1,4 +1,4 @@
1
- import { EventStream$1 as EventStream } from "./internal/event-stream.mjs";
1
+ import { EventStream } from "./internal/event-stream.mjs";
2
2
  import { SilgiEvent } from "silgi/types";
3
3
 
4
4
  //#region src/core/utils/event-stream.d.ts
@@ -50,4 +50,4 @@ interface EventStreamMessage {
50
50
  */
51
51
  declare function createEventStream(event: SilgiEvent, opts?: EventStreamOptions): EventStream;
52
52
  //#endregion
53
- export { EventStreamMessage, EventStreamOptions, createEventStream as createEventStream$1 };
53
+ export { EventStreamMessage, EventStreamOptions, createEventStream };
@@ -5,4 +5,4 @@ import { SilgiEvent, SilgiRuntimeContext } from "silgi/types";
5
5
  declare function getEvent<T extends SilgiEvent>(event?: SilgiEvent): T;
6
6
  declare function getEventContext<T extends SilgiRuntimeContext>(event?: SilgiEvent): T;
7
7
  //#endregion
8
- export { getEvent as getEvent$1, getEventContext as getEventContext$1 };
8
+ export { getEvent, getEventContext };
@@ -42,4 +42,4 @@ declare class EventStream {
42
42
  send(): Promise<BodyInit>;
43
43
  }
44
44
  //#endregion
45
- export { EventStream as EventStream$1 };
45
+ export { EventStream };
@@ -11,4 +11,4 @@ import { MergeAll } from "silgi/types";
11
11
  */
12
12
  declare function deepMergeObjects<T extends readonly Record<string, any>[]>(schemas: [...T]): MergeAll<T>;
13
13
  //#endregion
14
- export { deepMergeObjects as deepMergeObjects$1 };
14
+ export { deepMergeObjects };
@@ -11,4 +11,4 @@ declare function createMiddleware<S extends WildcardVariants<keyof Routers>, Use
11
11
  path: Path;
12
12
  }): CreateMiddlewareResult<Path, UsedMethod, Key>;
13
13
  //#endregion
14
- export { CreateMiddlewareResult, createMiddleware as createMiddleware$1 };
14
+ export { CreateMiddlewareResult, createMiddleware };
@@ -4,4 +4,4 @@ import { Resolvers, SilgiURL } from "silgi/types";
4
4
  declare function createResolver(resolver: Resolvers): Resolvers;
5
5
  declare function getUrlPrefix(path: string, method?: string): SilgiURL;
6
6
  //#endregion
7
- export { createResolver as createResolver$3, getUrlPrefix as getUrlPrefix$1 };
7
+ export { createResolver, getUrlPrefix };
@@ -26,4 +26,4 @@ function getUrlPrefix(path, method) {
26
26
  }
27
27
 
28
28
  //#endregion
29
- export { createResolver as createResolver$1, getUrlPrefix };
29
+ export { createResolver, getUrlPrefix };
@@ -4,4 +4,4 @@
4
4
  */
5
5
  declare function replaceRuntimeValues(obj: any, runtime: any): any;
6
6
  //#endregion
7
- export { replaceRuntimeValues as replaceRuntimeValues$1 };
7
+ export { replaceRuntimeValues };
@@ -31,4 +31,4 @@ declare function createSchema<Key extends string, Schema extends BaseMethodSchem
31
31
  key: Key;
32
32
  } & Schema): { [K in Key]: Schema };
33
33
  //#endregion
34
- export { createSchema as createSchema$1 };
34
+ export { createSchema };
@@ -10,4 +10,4 @@ declare function defineServiceSetup<Method extends HTTPMethod, Path extends keyo
10
10
  declare function createService<Path extends string, Method extends HTTPMethod, Input extends StandardSchemaV1 = StandardSchemaV1, Output extends StandardSchemaV1 = StandardSchemaV1, PathParams extends StandardSchemaV1 | undefined | never = undefined, QueryParams extends StandardSchemaV1 | undefined | never = undefined, Resolved extends boolean = false, HiddenParameters extends boolean = false>(params: ServiceSetup<Method, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>): Record<`http:${Method}:${Path}`, ServiceSetup<Method, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>>;
11
11
  declare function createWebSocket<Path extends string, Method extends HTTPMethod>(params: WebSocketServiceSetup<Method, Path>): Record<`websocket:${Method}:${Path}`, WebSocketServiceSetup<Method, Path>>;
12
12
  //#endregion
13
- export { createService as createService$1, createWebSocket as createWebSocket$1, defineServiceSetup as defineServiceSetup$1 };
13
+ export { createService, createWebSocket, defineServiceSetup };
@@ -3,4 +3,4 @@ import { SilgiRuntimeShareds } from "silgi/types";
3
3
  //#region src/core/utils/shared.d.ts
4
4
  declare function createShared(shared: Partial<SilgiRuntimeShareds>): SilgiRuntimeShareds;
5
5
  //#endregion
6
- export { createShared as createShared$1 };
6
+ export { createShared };
@@ -21,4 +21,4 @@ declare function createStorage$1(silgi: Silgi): Promise<Storage<StorageValue>>;
21
21
  // }
22
22
  declare function useSilgiStorage<T extends StorageValue = StorageValue>(base?: StorageConfig<T>["base"] | (string & {})): Storage<T>;
23
23
  //#endregion
24
- export { createStorage$1, useSilgiStorage as useSilgiStorage$1 };
24
+ export { createStorage$1 as createStorage, useSilgiStorage };
package/dist/index.d.mts CHANGED
@@ -1,21 +1,21 @@
1
- import { updateRuntimeStorage$1 as updateRuntimeStorage, useRuntime$1 as useRuntime } from "./core/context.mjs";
2
- import { createSilgi$1 as createSilgi } from "./core/createSilgi.mjs";
3
- import { SilgiError$1 as SilgiError, createError$1 as createError, isError$1 as isError } from "./core/error.mjs";
4
- import { SilgiHttpEvent$1 as SilgiHttpEvent } from "./core/event.mjs";
5
- import { handleResponse$1 as handleResponse, kHandled$1 as kHandled, kNotFound$1 as kNotFound } from "./core/response.mjs";
6
- import { getWebsocket$1 as getWebsocket, handler$1 as handler, middleware$1 as middleware, silgiFetch$1 as silgiFetch } from "./core/silgi.mjs";
7
- import { silgiCLICtx$1 as silgiCLICtx, tryUseSilgiCLI$1 as tryUseSilgiCLI, useSilgiCLI$1 as useSilgiCLI } from "./core/silgiApp.mjs";
8
- import { storageMount$1 as storageMount } from "./core/storage.mjs";
9
- import { silgiCtx$1 as silgiCtx, tryUseSilgi$1 as tryUseSilgi, useSilgi$1 as useSilgi } from "./core/unctx.mjs";
10
- import { createEventStream$1 as createEventStream } from "./core/utils/event-stream.mjs";
11
- import { getEvent$1 as getEvent, getEventContext$1 as getEventContext } from "./core/utils/event.mjs";
12
- import { deepMergeObjects$1 as deepMergeObjects } from "./core/utils/merge.mjs";
13
- import { createMiddleware$1 as createMiddleware } from "./core/utils/middleware.mjs";
14
- import { createResolver$3 as createResolver, getUrlPrefix$1 as getUrlPrefix } from "./core/utils/resolver.mjs";
15
- import { replaceRuntimeValues$1 as replaceRuntimeValues } from "./core/utils/runtime.mjs";
16
- import { createSchema$1 as createSchema } from "./core/utils/schema.mjs";
17
- import { createService$1 as createService, createWebSocket$1 as createWebSocket, defineServiceSetup$1 as defineServiceSetup } from "./core/utils/service.mjs";
18
- import { createShared$1 as createShared } from "./core/utils/shared.mjs";
19
- import { createStorage$1 as createStorage, useSilgiStorage$1 as useSilgiStorage } from "./core/utils/storage.mjs";
1
+ import { updateRuntimeStorage, useRuntime } from "./core/context.mjs";
2
+ import { createSilgi } from "./core/createSilgi.mjs";
3
+ import { SilgiError, createError, isError } from "./core/error.mjs";
4
+ import { SilgiHttpEvent } from "./core/event.mjs";
5
+ import { handleResponse, kHandled, kNotFound } from "./core/response.mjs";
6
+ import { getWebsocket, handler, middleware, silgiFetch } from "./core/silgi.mjs";
7
+ import { silgiCLICtx, tryUseSilgiCLI, useSilgiCLI } from "./core/silgiApp.mjs";
8
+ import { storageMount } from "./core/storage.mjs";
9
+ import { silgiCtx, tryUseSilgi, useSilgi } from "./core/unctx.mjs";
10
+ import { createEventStream } from "./core/utils/event-stream.mjs";
11
+ import { getEvent, getEventContext } from "./core/utils/event.mjs";
12
+ import { deepMergeObjects } from "./core/utils/merge.mjs";
13
+ import { createMiddleware } from "./core/utils/middleware.mjs";
14
+ import { createResolver, getUrlPrefix } from "./core/utils/resolver.mjs";
15
+ import { replaceRuntimeValues } from "./core/utils/runtime.mjs";
16
+ import { createSchema } from "./core/utils/schema.mjs";
17
+ import { createService, createWebSocket, defineServiceSetup } from "./core/utils/service.mjs";
18
+ import { createShared } from "./core/utils/shared.mjs";
19
+ import { createStorage, useSilgiStorage } from "./core/utils/storage.mjs";
20
20
  import { autoImportTypes } from "./core/index.mjs";
21
21
  export { SilgiError, SilgiHttpEvent, autoImportTypes, createError, createEventStream, createMiddleware, createResolver, createSchema, createService, createShared, createSilgi, createStorage, createWebSocket, deepMergeObjects, defineServiceSetup, getEvent, getEventContext, getUrlPrefix, getWebsocket, handleResponse, handler, isError, kHandled, kNotFound, middleware, replaceRuntimeValues, silgiCLICtx, silgiCtx, silgiFetch, storageMount, tryUseSilgi, tryUseSilgiCLI, updateRuntimeStorage, useRuntime, useSilgi, useSilgiCLI, useSilgiStorage };
package/dist/index.mjs CHANGED
@@ -7,7 +7,7 @@ import { createStorage, useSilgiStorage } from "./core/utils/storage.mjs";
7
7
  import { createSilgi } from "./core/createSilgi.mjs";
8
8
  import { SilgiHttpEvent } from "./core/event.mjs";
9
9
  import { handleResponse, kHandled, kNotFound } from "./core/response.mjs";
10
- import { createResolver$1 as createResolver, getUrlPrefix } from "./core/utils/resolver.mjs";
10
+ import { createResolver, getUrlPrefix } from "./core/utils/resolver.mjs";
11
11
  import { getWebsocket, handler, middleware, silgiFetch } from "./core/silgi.mjs";
12
12
  import { storageMount } from "./core/storage.mjs";
13
13
  import { createEventStream } from "./core/utils/event-stream.mjs";
@@ -3,4 +3,4 @@ import { Commands } from "silgi/types";
3
3
  //#region src/kit/add/add-commands.d.ts
4
4
  declare function addCommands(data: Commands | Commands[]): Promise<void>;
5
5
  //#endregion
6
- export { addCommands as addCommands$1 };
6
+ export { addCommands };
@@ -6,4 +6,4 @@ declare function addCoreFile(data: {
6
6
  after?: SilgiCLIHooks["after:core.ts"];
7
7
  }): Promise<void>;
8
8
  //#endregion
9
- export { addCoreFile as addCoreFile$1 };
9
+ export { addCoreFile };
@@ -11,4 +11,4 @@ declare function addImports(data?: {
11
11
  addImportItemType: (data: GenImport | GenImport[]) => void;
12
12
  };
13
13
  //#endregion
14
- export { addImports as addImports$1 };
14
+ export { addImports };
@@ -11,4 +11,4 @@ declare function addNPMPackage(data: {
11
11
  when?: boolean;
12
12
  }): Promise<void>;
13
13
  //#endregion
14
- export { addNPMPackage as addNPMPackage$1 };
14
+ export { addNPMPackage };
@@ -25,4 +25,4 @@ declare function defineFramework<T extends PresetName>(preset: T): {
25
25
  build(callback: (options: DefineFrameworkOptions<T>) => void | Promise<void>): (options: DefineFrameworkOptions<T>) => Promise<void>;
26
26
  };
27
27
  //#endregion
28
- export { defineFramework as defineFramework$1 };
28
+ export { defineFramework };
@@ -3,4 +3,4 @@ import { SilgiCLI } from "silgi/types";
3
3
  //#region src/kit/errors.d.ts
4
4
  declare function hasError(type: SilgiCLI["errors"][0]["type"], silgi?: SilgiCLI): boolean;
5
5
  //#endregion
6
- export { hasError as hasError$1 };
6
+ export { hasError };
@@ -8,4 +8,4 @@ declare function directoryToURL(dir: string): URL;
8
8
  */
9
9
  declare function tryResolveModule(id: string, url?: string | string[]): Promise<string | undefined>;
10
10
  //#endregion
11
- export { directoryToURL as directoryToURL$1, tryResolveModule as tryResolveModule$1 };
11
+ export { directoryToURL, tryResolveModule };
package/dist/kit/fs.d.mts CHANGED
@@ -4,4 +4,4 @@ import { Buffer } from "node:buffer";
4
4
  declare function writeFile(file: string, contents: Buffer | string, log?: boolean): Promise<void>;
5
5
  declare function isDirectory(path: string): Promise<boolean>;
6
6
  //#endregion
7
- export { isDirectory as isDirectory$1, writeFile as writeFile$1 };
7
+ export { isDirectory, writeFile };
@@ -24,4 +24,4 @@ declare function createFunction(name: string, args?: any): FunctionConfig;
24
24
  */
25
25
  declare function formatFunctions(configs: FunctionConfig[], indentation?: number, specialVars?: string[], deduplicateArgs?: boolean): string;
26
26
  //#endregion
27
- export { FunctionConfig, createFunction as createFunction$1, createFunctionConfigs as createFunctionConfigs$1, formatFunctions as formatFunctions$1 };
27
+ export { FunctionConfig, createFunction, createFunctionConfigs, formatFunctions };
@@ -24,7 +24,7 @@ function createFunction(name, args = {}) {
24
24
  */
25
25
  function formatFunctions(configs, indentation = 4, specialVars = [], deduplicateArgs = false) {
26
26
  const indent = " ".repeat(indentation);
27
- const argMap = new Map();
27
+ const argMap = /* @__PURE__ */ new Map();
28
28
  const argVarDeclarations = [];
29
29
  let argCounter = 0;
30
30
  if (deduplicateArgs) configs.forEach((config) => {
@@ -2,4 +2,4 @@
2
2
  declare function genEnsureSafeVar(name: string | any): string;
3
3
  declare function getAllEntries(obj: object): [string, any][];
4
4
  //#endregion
5
- export { genEnsureSafeVar as genEnsureSafeVar$1, getAllEntries as getAllEntries$1 };
5
+ export { genEnsureSafeVar, getAllEntries };
@@ -1,4 +1,4 @@
1
1
  //#region src/kit/hash.d.ts
2
2
  declare function hash(data: any): string;
3
3
  //#endregion
4
- export { hash as hash$1 };
4
+ export { hash };
@@ -1,22 +1,22 @@
1
- import { addCommands$1 as addCommands } from "./add/add-commands.mjs";
2
- import { addCoreFile$1 as addCoreFile } from "./add/add-core-file.mjs";
3
- import { addImports$1 as addImports } from "./add/add-imports.mjs";
4
- import { addNPMPackage$1 as addNPMPackage } from "./add/add-npm.mjs";
5
- import { defineFramework$1 as defineFramework } from "./define.mjs";
6
- import { hasError$1 as hasError } from "./errors.mjs";
7
- import { directoryToURL$1 as directoryToURL, tryResolveModule$1 as tryResolveModule } from "./esm.mjs";
8
- import { isDirectory$1 as isDirectory, writeFile$1 as writeFile } from "./fs.mjs";
9
- import { FunctionConfig, createFunction$1 as createFunction, createFunctionConfigs$1 as createFunctionConfigs, formatFunctions$1 as formatFunctions } from "./function-utils.mjs";
10
- import { genEnsureSafeVar$1 as genEnsureSafeVar, getAllEntries$1 as getAllEntries } from "./gen.mjs";
11
- import { hash$1 as hash } from "./hash.mjs";
12
- import { isH3$1 as isH3, isNitro$1 as isNitro, isNuxt$1 as isNuxt } from "./isFramework.mjs";
13
- import { useLogger$1 as useLogger } from "./logger.mjs";
14
- import { JsonPatch, MigrationData, MigrationInfo, MigrationOptions, MigrationResult, MigrationStatus$1 as MigrationStatus, generateMigration$1 as generateMigration, getMigration$1 as getMigration, listMigrations$1 as listMigrations, migrationDown$1 as migrationDown, migrationUp$1 as migrationUp } from "./migration.mjs";
15
- import { defineSilgiModule$1 as defineSilgiModule } from "./module.mjs";
16
- import { prettyPath$1 as prettyPath, resolveSilgiPath$1 as resolveSilgiPath } from "./path.mjs";
17
- import { defineSilgiPreset$1 as defineSilgiPreset } from "./preset.mjs";
18
- import { createResolver$2 as createResolver, resolveAlias$1 as resolveAlias, resolvePath$1 as resolvePath, resolveSilgiModule$1 as resolveSilgiModule } from "./resolve.mjs";
19
- import { addTemplate$1 as addTemplate, normalizeTemplate$1 as normalizeTemplate } from "./template.mjs";
20
- import { getIpAddress$1 as getIpAddress, useRequest$1 as useRequest } from "./useRequest.mjs";
21
- import { MODE_RE$1 as MODE_RE, baseHeaderBannerComment$1 as baseHeaderBannerComment, filterInPlace$1 as filterInPlace, getServicePath$1 as getServicePath, hasInstalledModule$2 as hasInstalledModule, hasSilgiModule$1 as hasSilgiModule, isPresents$1 as isPresents, isRuntimePresents$1 as isRuntimePresents, processFilePath$1 as processFilePath, relativeWithDot$1 as relativeWithDot, removeExtension$1 as removeExtension, toArray$1 as toArray } from "./utils.mjs";
1
+ import { addCommands } from "./add/add-commands.mjs";
2
+ import { addCoreFile } from "./add/add-core-file.mjs";
3
+ import { addImports } from "./add/add-imports.mjs";
4
+ import { addNPMPackage } from "./add/add-npm.mjs";
5
+ import { defineFramework } from "./define.mjs";
6
+ import { hasError } from "./errors.mjs";
7
+ import { directoryToURL, tryResolveModule } from "./esm.mjs";
8
+ import { isDirectory, writeFile } from "./fs.mjs";
9
+ import { FunctionConfig, createFunction, createFunctionConfigs, formatFunctions } from "./function-utils.mjs";
10
+ import { genEnsureSafeVar, getAllEntries } from "./gen.mjs";
11
+ import { hash } from "./hash.mjs";
12
+ import { isH3, isNitro, isNuxt } from "./isFramework.mjs";
13
+ import { useLogger } from "./logger.mjs";
14
+ import { JsonPatch, MigrationData, MigrationInfo, MigrationOptions, MigrationResult, MigrationStatus, generateMigration, getMigration, listMigrations, migrationDown, migrationUp } from "./migration.mjs";
15
+ import { defineSilgiModule } from "./module.mjs";
16
+ import { prettyPath, resolveSilgiPath } from "./path.mjs";
17
+ import { defineSilgiPreset } from "./preset.mjs";
18
+ import { createResolver, resolveAlias, resolvePath, resolveSilgiModule } from "./resolve.mjs";
19
+ import { addTemplate, normalizeTemplate } from "./template.mjs";
20
+ import { getIpAddress, useRequest } from "./useRequest.mjs";
21
+ import { MODE_RE, baseHeaderBannerComment, filterInPlace, getServicePath, hasInstalledModule, hasSilgiModule, isPresents, isRuntimePresents, processFilePath, relativeWithDot, removeExtension, toArray } from "./utils.mjs";
22
22
  export { FunctionConfig, JsonPatch, MODE_RE, MigrationData, MigrationInfo, MigrationOptions, MigrationResult, MigrationStatus, addCommands, addCoreFile, addImports, addNPMPackage, addTemplate, baseHeaderBannerComment, createFunction, createFunctionConfigs, createResolver, defineFramework, defineSilgiModule, defineSilgiPreset, directoryToURL, filterInPlace, formatFunctions, genEnsureSafeVar, generateMigration, getAllEntries, getIpAddress, getMigration, getServicePath, hasError, hasInstalledModule, hasSilgiModule, hash, isDirectory, isH3, isNitro, isNuxt, isPresents, isRuntimePresents, listMigrations, migrationDown, migrationUp, normalizeTemplate, prettyPath, processFilePath, relativeWithDot, removeExtension, resolveAlias, resolvePath, resolveSilgiModule, resolveSilgiPath, toArray, tryResolveModule, useLogger, useRequest, writeFile };
@@ -3,4 +3,4 @@ declare function isNuxt(): boolean;
3
3
  declare function isNitro(): boolean;
4
4
  declare function isH3(): boolean;
5
5
  //#endregion
6
- export { isH3 as isH3$1, isNitro as isNitro$1, isNuxt as isNuxt$1 };
6
+ export { isH3, isNitro, isNuxt };
@@ -3,4 +3,4 @@ import { ConsolaInstance, ConsolaOptions } from "consola";
3
3
  //#region src/kit/logger.d.ts
4
4
  declare function useLogger(tag?: string, options?: Partial<ConsolaOptions>): ConsolaInstance;
5
5
  //#endregion
6
- export { useLogger as useLogger$1 };
6
+ export { useLogger };
@@ -110,4 +110,4 @@ declare function migrationUp(migrationsDir: string, targetTimestamp?: number): P
110
110
  */
111
111
  declare function migrationDown(migrationsDir: string, targetTimestamp?: number): Promise<MigrationResult>;
112
112
  //#endregion
113
- export { JsonPatch, MigrationData, MigrationInfo, MigrationOptions, MigrationResult, MigrationStatus as MigrationStatus$1, generateMigration as generateMigration$1, getMigration as getMigration$1, listMigrations as listMigrations$1, migrationDown as migrationDown$1, migrationUp as migrationUp$1 };
113
+ export { JsonPatch, MigrationData, MigrationInfo, MigrationOptions, MigrationResult, MigrationStatus, generateMigration, getMigration, listMigrations, migrationDown, migrationUp };
@@ -79,7 +79,7 @@ async function generateMigration(data, directoryPath, fileNamePrefix = "data_",
79
79
  const latestInfo = {
80
80
  timestamp,
81
81
  file: fileName,
82
- created: new Date().toISOString(),
82
+ created: (/* @__PURE__ */ new Date()).toISOString(),
83
83
  description,
84
84
  isPatch
85
85
  };
@@ -11,4 +11,4 @@ declare function defineSilgiModule<TOptions extends ModuleOptionsCustom>(): {
11
11
  with: <TOptionsDefaults extends Partial<TOptions>>(definition: ModuleDefinition<TOptions, TOptionsDefaults, true> | SilgiModule<TOptions, TOptionsDefaults, true>) => SilgiModule<TOptions, TOptionsDefaults, true>;
12
12
  };
13
13
  //#endregion
14
- export { defineSilgiModule as defineSilgiModule$1 };
14
+ export { defineSilgiModule };
@@ -4,4 +4,4 @@ import { SilgiCLI } from "silgi/types";
4
4
  declare function prettyPath(p: string, highlight?: boolean): string;
5
5
  declare function resolveSilgiPath(path: string, silgiCLIOptions: SilgiCLI["options"], base?: string): string;
6
6
  //#endregion
7
- export { prettyPath as prettyPath$1, resolveSilgiPath as resolveSilgiPath$1 };
7
+ export { prettyPath, resolveSilgiPath };
@@ -5,4 +5,4 @@ declare function defineSilgiPreset<P extends SilgiPreset, M extends SilgiPresetM
5
5
  _meta: SilgiPresetMeta;
6
6
  };
7
7
  //#endregion
8
- export { defineSilgiPreset as defineSilgiPreset$1 };
8
+ export { defineSilgiPreset };
@@ -34,4 +34,4 @@ interface Resolver {
34
34
  declare function createResolver(base: string | URL): Resolver;
35
35
  declare function resolveSilgiModule(base: string, paths: string[]): Promise<string[]>;
36
36
  //#endregion
37
- export { createResolver as createResolver$2, resolveAlias as resolveAlias$1, resolvePath as resolvePath$1, resolveSilgiModule as resolveSilgiModule$1 };
37
+ export { createResolver, resolveAlias, resolvePath, resolveSilgiModule };
@@ -11,4 +11,4 @@ declare function addTemplate<T>(_template: SilgiTemplate<T> | string): ResolvedS
11
11
  */
12
12
  declare function normalizeTemplate<T>(template: SilgiTemplate<T> | string, buildDir?: string): ResolvedSilgiTemplate<T>;
13
13
  //#endregion
14
- export { addTemplate as addTemplate$1, normalizeTemplate as normalizeTemplate$1 };
14
+ export { addTemplate, normalizeTemplate };
@@ -16,4 +16,4 @@ declare function useRequest<T extends IncomingMessage>(event: SilgiEvent): T | (
16
16
  */
17
17
  declare function getIpAddress(req: Request): string;
18
18
  //#endregion
19
- export { getIpAddress as getIpAddress$1, useRequest as useRequest$1 };
19
+ export { getIpAddress, useRequest };
@@ -31,4 +31,4 @@ declare function getServicePath(_route: string): {
31
31
  route: string;
32
32
  };
33
33
  //#endregion
34
- export { MODE_RE as MODE_RE$1, baseHeaderBannerComment as baseHeaderBannerComment$1, filterInPlace as filterInPlace$1, getServicePath as getServicePath$1, hasInstalledModule as hasInstalledModule$2, hasSilgiModule as hasSilgiModule$1, isPresents as isPresents$1, isRuntimePresents as isRuntimePresents$1, processFilePath as processFilePath$1, relativeWithDot as relativeWithDot$1, removeExtension as removeExtension$1, toArray as toArray$1 };
34
+ export { MODE_RE, baseHeaderBannerComment, filterInPlace, getServicePath, hasInstalledModule, hasSilgiModule, isPresents, isRuntimePresents, processFilePath, relativeWithDot, removeExtension, toArray };
package/dist/package.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  //#region package.json
2
2
  var name = "silgi";
3
3
  var type = "module";
4
- var version = "0.43.6";
4
+ var version = "0.43.8";
5
5
  var private$1 = false;
6
- var packageManager = "pnpm@10.11.0";
6
+ var packageManager = "pnpm@10.12.2";
7
7
  var sideEffects = false;
8
8
  var exports = {
9
9
  "./package.json": "./package.json",
@@ -77,7 +77,7 @@ var dependencies = {
77
77
  "@fastify/deepmerge": "catalog:",
78
78
  "@graphql-tools/utils": "^10.8.6",
79
79
  "@standard-community/standard-json": "^0.2.0",
80
- "apiful": "^3.1.2",
80
+ "apiful": "^3.4.0",
81
81
  "c12": "catalog:",
82
82
  "chokidar": "catalog:",
83
83
  "citty": "catalog:",
@@ -90,7 +90,7 @@ var dependencies = {
90
90
  "dot-prop": "catalog:",
91
91
  "dotenv": "catalog:",
92
92
  "escape-string-regexp": "catalog:",
93
- "exsolve": "^1.0.5",
93
+ "exsolve": "^1.0.7",
94
94
  "graphql": "^16.11.0",
95
95
  "hookable": "catalog:",
96
96
  "ignore": "catalog:",
@@ -101,19 +101,20 @@ var dependencies = {
101
101
  "mlly": "catalog:",
102
102
  "ofetch": "catalog:",
103
103
  "ohash": "catalog:",
104
- "oxc-parser": "^0.72.1",
104
+ "oxc-parser": "^0.74.0",
105
105
  "pathe": "catalog:",
106
106
  "perfect-debounce": "^1.0.0",
107
107
  "picocolors": "catalog:",
108
108
  "pkg-types": "catalog:",
109
109
  "rfc6902": "^5.1.2",
110
- "rou3": "^0.6.1",
110
+ "rou3": "^0.7.2",
111
111
  "scule": "catalog:",
112
112
  "semver": "catalog:",
113
- "srvx": "^0.7.2",
113
+ "srvx": "^0.8.0",
114
114
  "std-env": "catalog:",
115
115
  "tinyexec": "^1.0.1",
116
116
  "tinyglobby": "^0.2.14",
117
+ "tree-kill": "^1.2.2",
117
118
  "ufo": "catalog:",
118
119
  "unadapter": "^0.1.2",
119
120
  "unctx": "catalog:",
@@ -131,10 +132,10 @@ var devDependencies = {
131
132
  "@types/semver": "catalog:",
132
133
  "@vitest/coverage-v8": "catalog:",
133
134
  "eslint": "catalog:",
134
- "h3": "catalog:",
135
+ "h3": "^2.0.0-beta.0",
135
136
  "nitropack": "catalog:",
136
137
  "nuxt": "catalog:",
137
- "tsdown": "^0.12.4",
138
+ "tsdown": "^0.12.8",
138
139
  "typescript": "catalog:",
139
140
  "vitest": "catalog:",
140
141
  "vue": "catalog:",
@@ -173,4 +174,4 @@ var package_default = {
173
174
  };
174
175
 
175
176
  //#endregion
176
- export { package_default };
177
+ export { package_default as default };
@@ -80,7 +80,7 @@ interface WebSocketServiceSetup<Method extends HTTPMethod = HTTPMethod, Path ext
80
80
  *
81
81
  * Format: "routePath" => setup + methods + input + output + queryParams
82
82
  */
83
- interface ResolvedServiceDefinition {
83
+ interface ResolvedServiceDefinition extends ServicesObject {
84
84
  [key: string]: ServiceSetup<any, any, any, any, any, any, any, any>;
85
85
  }
86
86
  interface ResolvedWebSocketServiceDefinition {
@@ -0,0 +1,18 @@
1
+ //#region src/types/tree-kill.d.ts
2
+ declare module "tree-kill" {
3
+ type Callback = (error?: Error) => void;
4
+ /**
5
+ * Kills the process with the given `pid` and all its children.
6
+ * @param pid Process ID to kill
7
+ * @param signal Signal to send (default: 'SIGTERM')
8
+ * @param callback Callback function (optional)
9
+ */
10
+ function treeKill(pid: number, signal?: NodeJS.Signals | number | string, callback?: Callback): void;
11
+ /**
12
+ * Kills the process with the given `pid` and all its children.
13
+ * @param pid Process ID to kill
14
+ * @param callback Callback function
15
+ */
16
+ function treeKill(pid: number, callback: Callback): void;
17
+ export default treeKill;
18
+ }
File without changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.43.6",
4
+ "version": "0.43.8",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {
@@ -86,7 +86,7 @@
86
86
  "@fastify/deepmerge": "^3.1.0",
87
87
  "@graphql-tools/utils": "^10.8.6",
88
88
  "@standard-community/standard-json": "^0.2.0",
89
- "apiful": "^3.1.2",
89
+ "apiful": "^3.4.0",
90
90
  "c12": "^3.0.4",
91
91
  "chokidar": "^4.0.3",
92
92
  "citty": "^0.1.6",
@@ -99,10 +99,10 @@
99
99
  "dot-prop": "^9.0.0",
100
100
  "dotenv": "^16.5.0",
101
101
  "escape-string-regexp": "^5.0.0",
102
- "exsolve": "^1.0.5",
102
+ "exsolve": "^1.0.7",
103
103
  "graphql": "^16.11.0",
104
104
  "hookable": "^5.5.3",
105
- "ignore": "^7.0.4",
105
+ "ignore": "^7.0.5",
106
106
  "klona": "^2.0.6",
107
107
  "knitwork": "^1.2.0",
108
108
  "magicast": "^0.3.5",
@@ -110,19 +110,20 @@
110
110
  "mlly": "^1.7.4",
111
111
  "ofetch": "^1.4.1",
112
112
  "ohash": "^2.0.11",
113
- "oxc-parser": "^0.72.1",
113
+ "oxc-parser": "^0.74.0",
114
114
  "pathe": "^2.0.3",
115
115
  "perfect-debounce": "^1.0.0",
116
116
  "picocolors": "^1.1.1",
117
117
  "pkg-types": "^2.1.0",
118
118
  "rfc6902": "^5.1.2",
119
- "rou3": "^0.6.1",
119
+ "rou3": "^0.7.2",
120
120
  "scule": "^1.3.0",
121
121
  "semver": "^7.7.2",
122
- "srvx": "^0.7.2",
122
+ "srvx": "^0.8.0",
123
123
  "std-env": "^3.9.0",
124
124
  "tinyexec": "^1.0.1",
125
125
  "tinyglobby": "^0.2.14",
126
+ "tree-kill": "^1.2.2",
126
127
  "ufo": "^1.6.1",
127
128
  "unadapter": "^0.1.2",
128
129
  "unctx": "^2.4.1",
@@ -131,23 +132,23 @@
131
132
  "untyped": "^2.0.0"
132
133
  },
133
134
  "devDependencies": {
134
- "@antfu/eslint-config": "^4.13.2",
135
- "@nuxt/kit": "^3.17.4",
136
- "@nuxt/schema": "^3.17.4",
135
+ "@antfu/eslint-config": "^4.16.1",
136
+ "@nuxt/kit": "^3.17.5",
137
+ "@nuxt/schema": "^3.17.5",
137
138
  "@silgi/ecosystem": "^0.7.2",
138
139
  "@types/micromatch": "^4.0.9",
139
- "@types/node": "^22.15.24",
140
+ "@types/node": "^24.0.3",
140
141
  "@types/semver": "^7.7.0",
141
142
  "@vitest/coverage-v8": "3.0.5",
142
- "eslint": "^9.27.0",
143
- "h3": "^1.15.3",
143
+ "eslint": "^9.29.0",
144
+ "h3": "^2.0.0-beta.0",
144
145
  "nitropack": "^2.11.12",
145
- "nuxt": "^3.17.4",
146
- "tsdown": "^0.12.4",
146
+ "nuxt": "^3.17.5",
147
+ "tsdown": "^0.12.8",
147
148
  "typescript": "^5.8.3",
148
- "vitest": "^3.1.4",
149
- "vue": "^3.5.15",
150
- "zod": "^3.25.32"
149
+ "vitest": "^3.2.4",
150
+ "vue": "^3.5.17",
151
+ "zod": "^3.25.67"
151
152
  },
152
153
  "resolutions": {
153
154
  "silgi": "link:."