silgi 0.41.58 → 0.41.60

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,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
 
4
- const version = "0.41.58";
4
+ const version = "0.41.60";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
@@ -1,9 +1,8 @@
1
- import { SilgiRuntimeConfig, SilgiConfig, Silgi, SilgiEvent, SilgiRuntimeContext, WebSocketOptions, SilgiSchema, RouteEntry, CustomRequestInit, SilgiCLI, SilgiStorageBase, MergeAll, Resolvers, SilgiURL, BaseMethodSchema, HTTPMethod, ServiceSetupsForMethods, ServiceDefinitionByMethodAndPath, Routers, ServiceSetup, SilgiRuntimeShareds, StorageConfig } from 'silgi/types';
1
+ import { SilgiRuntimeConfig, SilgiConfig, Silgi, SilgiEvent, SilgiRuntimeContext, WebSocketOptions, SilgiSchema, RouteEntry, CustomRequestInit, SilgiCLI, SilgiStorageBase, MergeAll, Resolvers, SilgiURL, BaseMethodSchema, HTTPMethod, StandardSchemaV1, ServiceSetupsForMethods, ServiceDefinitionByMethodAndPath, Routers, ServiceSetup, SilgiRuntimeShareds, StorageConfig } from 'silgi/types';
2
2
  import { ServerRequest, ServerRuntimeContext } from 'srvx';
3
3
  import { UseContext } from 'unctx';
4
4
  import { Storage, StorageValue } from 'unstorage';
5
5
  export { c as createMiddleware } from '../shared/silgi.DTwQEdSr.mjs';
6
- import { StandardSchemaV1 } from '@standard-schema/spec';
7
6
 
8
7
  declare function updateRuntimeStorage(runtime: any): void;
9
8
  /**
package/dist/index.d.mts CHANGED
@@ -4,4 +4,3 @@ import 'silgi/types';
4
4
  import 'srvx';
5
5
  import 'unctx';
6
6
  import 'unstorage';
7
- import '@standard-schema/spec';
@@ -17,7 +17,6 @@ import { Session } from 'h3';
17
17
  import * as nitropack_types from 'nitropack/types';
18
18
  import { ESMImport, ESMCodeGenOptions } from 'knitwork';
19
19
  import { IResolvers } from '@graphql-tools/utils';
20
- import { StandardSchemaV1 } from '@standard-schema/spec';
21
20
  import { NitroApp } from 'nitropack';
22
21
  import { RouterContext } from 'rou3';
23
22
  import { TransactionOptions, BuiltinDriverName, StorageValue, Storage } from 'unstorage';
@@ -233,6 +232,63 @@ interface SilgiRuntimeSharedsExtend {
233
232
  interface ExtendShared {
234
233
  }
235
234
 
235
+ /** The Standard Schema interface. */
236
+ interface StandardSchemaV1<Input = unknown, Output = Input> {
237
+ /** The Standard Schema properties. */
238
+ readonly '~standard': StandardSchemaV1.Props<Input, Output>;
239
+ }
240
+ declare namespace StandardSchemaV1 {
241
+ /** The Standard Schema properties interface. */
242
+ export interface Props<Input = unknown, Output = Input> {
243
+ /** The version number of the standard. */
244
+ readonly version: 1;
245
+ /** The vendor name of the schema library. */
246
+ readonly vendor: string;
247
+ /** Validates unknown input values. */
248
+ readonly validate: (value: unknown) => Result<Output> | Promise<Result<Output>>;
249
+ /** Inferred types associated with the schema. */
250
+ readonly types?: Types<Input, Output> | undefined;
251
+ }
252
+ /** The result interface of the validate function. */
253
+ export type Result<Output> = SuccessResult<Output> | FailureResult;
254
+ /** The result interface if validation succeeds. */
255
+ export interface SuccessResult<Output> {
256
+ /** The typed output value. */
257
+ readonly value: Output;
258
+ /** The non-existent issues. */
259
+ readonly issues?: undefined;
260
+ }
261
+ /** The result interface if validation fails. */
262
+ export interface FailureResult {
263
+ /** The issues of failed validation. */
264
+ readonly issues: ReadonlyArray<Issue>;
265
+ }
266
+ /** The issue interface of the failure output. */
267
+ export interface Issue {
268
+ /** The error message of the issue. */
269
+ readonly message: string;
270
+ /** The path of the issue, if any. */
271
+ readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
272
+ }
273
+ /** The path segment interface of the issue. */
274
+ export interface PathSegment {
275
+ /** The key representing a path segment. */
276
+ readonly key: PropertyKey;
277
+ }
278
+ /** The Standard Schema types interface. */
279
+ export interface Types<Input = unknown, Output = Input> {
280
+ /** The input type of the schema. */
281
+ readonly input: Input;
282
+ /** The output type of the schema. */
283
+ readonly output: Output;
284
+ }
285
+ /** Infers the input type of a Standard Schema. */
286
+ export type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['input'];
287
+ /** Infers the output type of a Standard Schema. */
288
+ export type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['output'];
289
+ export {};
290
+ }
291
+
236
292
  interface ServicesObject {
237
293
  }
238
294
  interface WebSocketOptions {
@@ -1247,4 +1303,5 @@ interface LoadConfigOptions {
1247
1303
  consola?: ConsolaInstance;
1248
1304
  }
1249
1305
 
1306
+ export { StandardSchemaV1 };
1250
1307
  export type { AllPaths, AllPrefixes, AppConfig, Awaitable, BaseMethodSchema, BuildSilgi, CaptureError, CapturedErrorContext, CommandType, Commands, CreateMiddlewareParams, CustomRequestInit, DeepPartial, DeepRequired, DefaultHooks, DefineFrameworkOptions, DotenvOptions, EnvOptions, EventHandlerResponse, EventProtocol, ExtendContext, ExtendShared, ExtractNamespace, ExtractPathParamKeys, ExtractPathParams, ExtractPrefix, ExtractRoute, GenImport, GenerateAppOptions, HTTPMethod, HasPathParams, HookResult, LoadConfigOptions, Max4Slashes, MergeAll, MergeRouteRules, MergedSilgiSchema, MetaData, MethodSchemas, MiddlewareHandler, MiddlewarePath, MiddlewareSetup, ModuleDefinition, ModuleHookContext, ModuleMeta, ModuleOptionsCustom, ModuleSetupInstallResult, ModuleSetupReturn, NamespacesForPrefix, NitroBuildInfo, RequiredServiceType, ResolvedMiddlewareDefinition, ResolvedModuleMeta, ResolvedModuleOptions, ResolvedSchema, ResolvedSchemaDefinition, ResolvedServiceDefinition, ResolvedSilgiTemplate, Resolvers, RouteEntry, RouteRules, RouterParams, Routers, RoutesForPrefixAndNamespace, ScanFile, Schema, ServiceDefinitionByMethodAndPath, ServiceHandler, ServiceHandlerInput, ServiceSetup, ServiceSetupsForMethods, ServicesObject, SetupModuleOption, Silgi, SilgiAppPlugin, SilgiCLI, SilgiCLIConfig, SilgiCLIHooks, SilgiCLIOptions, SilgiCommands, SilgiCompatibility, SilgiCompatibilityIssue, SilgiCompatibilityIssues, SilgiConfig, SilgiEvent, SilgiFetchClient, SilgiFetchOptions, SilgiFrameworkInfo, SilgiHooks, SilgiModule, SilgiModuleInput, SilgiModuleOptions, SilgiOptions, SilgiPreset, SilgiPresetMeta, SilgiRoute, SilgiRouterTypes, SilgiRuntimeConfig, SilgiRuntimeContext, SilgiRuntimeDefaultConfig, SilgiRuntimeHooks, SilgiRuntimeMethods, SilgiRuntimeOptions, SilgiRuntimeShareds, SilgiRuntimeSharedsExtend, SilgiSchema, SilgiStorageBase, SilgiTemplate, SilgiURL, StandardHTTPMethod, StorageConfig, StorageKeyGenerator, StorageKeyParams, StorageMounts, TSReference, TrimAfterFourSlashes, WebSocketOptions, WildcardVariants, WithPathParams };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.41.58",
4
+ "version": "0.41.60",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {
@@ -100,7 +100,6 @@
100
100
  "@fastify/deepmerge": "^3.1.0",
101
101
  "@graphql-tools/utils": "^10.8.6",
102
102
  "@standard-community/standard-json": "^0.2.0",
103
- "@standard-schema/spec": "^1.0.0",
104
103
  "apiful": "^2.2.0",
105
104
  "c12": "^3.0.3",
106
105
  "chokidar": "^4.0.3",