silgi 0.0.12 → 0.0.14

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.
@@ -3,7 +3,7 @@ import consola from 'consola';
3
3
 
4
4
  const name = "silgi";
5
5
  const type = "module";
6
- const version = "0.0.12";
6
+ const version = "0.0.14";
7
7
  const exports = {
8
8
  ".": {
9
9
  "import": {
@@ -54,7 +54,7 @@ const scripts = {
54
54
  };
55
55
  const dependencies = {
56
56
  "@anatine/zod-openapi": "^2.2.6",
57
- "@antfu/eslint-config": "^3.12.1",
57
+ "@antfu/eslint-config": "^3.12.2",
58
58
  "@asteasolutions/zod-to-openapi": "^7.3.0",
59
59
  "@oxc-parser/wasm": "^0.44.0",
60
60
  c12: "^2.0.1",
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { c as createSilgi, d as defineService, a as defineSilgiPlugin, s as silgiCtx, e as useHook, u as useShared, b as useSilgi } from './shared/silgi.9QqTROsY.mjs';
1
+ export { c as createSilgi, d as defineService, a as defineSilgiPlugin, s as silgiCtx, e as useHook, u as useShared, b as useSilgi } from './shared/silgi.BMCYk2cR.mjs';
2
2
  import 'consola';
3
3
  import 'hookable';
4
4
  import 'node:buffer';
@@ -2,7 +2,7 @@ import { mkdir, writeFile } from 'node:fs/promises';
2
2
  import { join } from 'node:path';
3
3
  import { generateSchema } from '@anatine/zod-openapi';
4
4
  import consola from 'consola';
5
- import { a as defineSilgiPlugin } from '../shared/silgi.9QqTROsY.mjs';
5
+ import { a as defineSilgiPlugin } from '../shared/silgi.BMCYk2cR.mjs';
6
6
  import 'hookable';
7
7
  import 'node:buffer';
8
8
  import 'node:fs';
@@ -96,8 +96,8 @@ const createOpenAPIPlugin = defineSilgiPlugin({
96
96
  name: paramName,
97
97
  required: schema.input?.required?.includes(paramName) || false,
98
98
  schema: paramSchema,
99
- description: paramSchema.description || void 0,
100
- $ref: paramSchema.$ref || void 0
99
+ description: paramSchema.description || undefined,
100
+ $ref: paramSchema.$ref || undefined
101
101
  }));
102
102
  case "delete":
103
103
  return [{
@@ -1,7 +1,7 @@
1
1
  import { mkdir, writeFile } from 'node:fs/promises';
2
2
  import { join } from 'node:path';
3
3
  import { defineEventHandler } from 'h3';
4
- import { a as defineSilgiPlugin } from '../shared/silgi.9QqTROsY.mjs';
4
+ import { a as defineSilgiPlugin } from '../shared/silgi.BMCYk2cR.mjs';
5
5
  import 'consola';
6
6
  import 'hookable';
7
7
  import 'node:buffer';
@@ -48,7 +48,7 @@ Details: ${JSON.stringify(this.details, null, 2)}`;
48
48
  return new PergelError({
49
49
  code,
50
50
  message: error instanceof Error ? error.message : String(error),
51
- cause: error instanceof Error ? error : void 0
51
+ cause: error instanceof Error ? error : undefined
52
52
  });
53
53
  }
54
54
  static isPergelError(error) {
@@ -259,7 +259,7 @@ class PluginManager {
259
259
  throw new PergelError({
260
260
  code: "PLUGIN_SETUP_ERROR",
261
261
  message: `Failed to setup plugin ${String(plugin.name)}`,
262
- cause: error instanceof Error ? error : void 0
262
+ cause: error instanceof Error ? error : undefined
263
263
  });
264
264
  }
265
265
  }
@@ -269,8 +269,8 @@ class PluginManager {
269
269
  ...context
270
270
  };
271
271
  this.log(`Running hook: ${String(hookName)}`, {
272
- scope: context?.scope ? String(context.scope) : void 0,
273
- serviceName: context?.serviceName ? String(context.serviceName) : void 0,
272
+ scope: context?.scope ? String(context.scope) : undefined,
273
+ serviceName: context?.serviceName ? String(context.serviceName) : undefined,
274
274
  methodName: context?.methodName
275
275
  });
276
276
  const sortedPlugins = [...this.plugins.values()].sort((a, b) => {
@@ -325,8 +325,8 @@ class PluginManager {
325
325
  const errorContext = {
326
326
  plugin: pluginName,
327
327
  hook: hookName,
328
- scope: context.scope ? String(context.scope) : void 0,
329
- service: context.serviceName ? String(context.serviceName) : void 0,
328
+ scope: context.scope ? String(context.scope) : undefined,
329
+ service: context.serviceName ? String(context.serviceName) : undefined,
330
330
  method: context.methodName
331
331
  };
332
332
  this.log(`Plugin error in ${pluginName}.${String(hookName)}:`, {
@@ -655,7 +655,7 @@ function createServiceFactory() {
655
655
  scope: typedConfig.options.cache.scope || "request",
656
656
  key: typedConfig.options.cache.key,
657
657
  namespace: typedConfig.options.cache.namespace
658
- } : void 0,
658
+ } : undefined,
659
659
  plugins: methodPlugins[methodName]
660
660
  }
661
661
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.0.12",
4
+ "version": "0.0.14",
5
5
  "exports": {
6
6
  ".": {
7
7
  "import": {
@@ -46,7 +46,7 @@
46
46
  ],
47
47
  "dependencies": {
48
48
  "@anatine/zod-openapi": "^2.2.6",
49
- "@antfu/eslint-config": "^3.12.1",
49
+ "@antfu/eslint-config": "^3.12.2",
50
50
  "@asteasolutions/zod-to-openapi": "^7.3.0",
51
51
  "@oxc-parser/wasm": "^0.44.0",
52
52
  "c12": "^2.0.1",
@@ -66,7 +66,7 @@
66
66
  },
67
67
  "devDependencies": {
68
68
  "unbuild": "^3.2.0",
69
- "silgi": "0.0.12"
69
+ "silgi": "0.0.14"
70
70
  },
71
71
  "resolutions": {
72
72
  "silgi": "workspace:*"