silgi 0.41.22 → 0.41.24

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.22";
4
+ const version = "0.41.24";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
@@ -1,4 +1,4 @@
1
- import { SilgiConfig, Silgi, SilgiEvent, HTTPMethod, SilgiSchema, RouteEntry, CustomRequestInit, SilgiRuntimeContext, BaseMethodSchema, MergeAll, Routers, ServiceSetup, MiddlewareSetup, SilgiRuntimeShareds, Resolvers, SilgiURL, StorageConfig, SilgiCLI, SilgiStorageBase, SilgiRuntimeConfig } from 'silgi/types';
1
+ import { SilgiConfig, Silgi, SilgiEvent, HTTPMethod, SilgiSchema, RouteEntry, CustomRequestInit, SilgiRuntimeContext, BaseMethodSchema, MergeAll, Routers, ServiceSetupsForMethods, ServiceSetup, MiddlewareSetup, SilgiRuntimeShareds, Resolvers, SilgiURL, StorageConfig, SilgiCLI, SilgiStorageBase, SilgiRuntimeConfig } from 'silgi/types';
2
2
  import { StandardSchemaV1 } from '@standard-schema/spec';
3
3
  import { Storage, StorageValue } from 'unstorage';
4
4
  import { UseContext } from 'unctx';
@@ -159,18 +159,7 @@ declare function deepMergeObjects<T extends readonly Record<string, any>[]>(sche
159
159
  * Tip güvenliğini artırmak için ServiceSetup objesini doğrudan döndürür.
160
160
  */
161
161
  declare function defineServiceSetup<Parent extends StandardSchemaV1, Path extends keyof Routers, 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>(setup: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>): ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
162
- type ServiceSetupsForMethods<Parent extends StandardSchemaV1, Path extends keyof Routers, 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> = {
163
- GET?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
164
- POST?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
165
- PUT?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
166
- PATCH?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
167
- DELETE?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
168
- OPTIONS?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
169
- HEAD?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
170
- CONNECT?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
171
- TRACE?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
172
- };
173
- declare function createService<Parent extends StandardSchemaV1, Path extends keyof Routers, 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: ServiceSetupsForMethods<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>): ServiceSetupsForMethods<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
162
+ declare function createService<Parent extends StandardSchemaV1 = StandardSchemaV1, Path extends keyof Routers = keyof Routers, 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: ServiceSetupsForMethods<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>): ServiceSetupsForMethods<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
174
163
 
175
164
  type WildcardVariants<Path extends string, Acc extends string = ''> = Path extends `${infer Head}/${infer Tail}` ? Tail extends '' ? `${Acc}${Head}` : `${Acc}${Head}/${Tail}` | `${Acc}${Head}/*` | `${Acc}${Head}/**` | WildcardVariants<Tail, `${Acc}${Head}/`> : `${Acc}${Path}`;
176
165
  type MiddlewarePath<S extends WildcardVariants<keyof Routers>> = S | 'global';
@@ -313,6 +313,17 @@ interface SilgiURL {
313
313
  pathParams?: Record<string, string | undefined>;
314
314
  queryParams?: Record<string, string>;
315
315
  }
316
+ type ServiceSetupsForMethods<Parent extends StandardSchemaV1 = StandardSchemaV1, Path extends keyof Routers = keyof Routers, 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> = {
317
+ GET?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
318
+ POST?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
319
+ PUT?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
320
+ PATCH?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
321
+ DELETE?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
322
+ OPTIONS?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
323
+ HEAD?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
324
+ CONNECT?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
325
+ TRACE?: ServiceSetup<Parent, Path, Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
326
+ };
316
327
 
317
328
  interface SilgiCLI {
318
329
  _ignore?: Ignore;
@@ -1228,4 +1239,4 @@ interface LoadConfigOptions {
1228
1239
  consola?: ConsolaInstance;
1229
1240
  }
1230
1241
 
1231
- export type { AllPaths, AllPrefixes, AppConfig, Awaitable, BaseMethodSchema, BuildSilgi, CaptureError, CapturedErrorContext, CommandType, Commands, CustomRequestInit, DeepPartial, DeepRequired, DefaultHooks, DefineFrameworkOptions, DotenvOptions, EnvOptions, EventHandlerResponse, EventProtocol, ExtendContext, ExtendShared, ExtractNamespace, ExtractPathParamKeys, ExtractPathParams, ExtractPrefix, ExtractRoute, GenImport, GenerateAppOptions, HTTPMethod, HasPathParams, HookResult, LoadConfigOptions, MergeAll, MergeRouteRules, MergedSilgiSchema, MetaData, MethodSchemas, MiddlewareHandler, 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, ServiceHandler, ServiceHandlerInput, ServiceSetup, 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, WithPathParams };
1242
+ export type { AllPaths, AllPrefixes, AppConfig, Awaitable, BaseMethodSchema, BuildSilgi, CaptureError, CapturedErrorContext, CommandType, Commands, CustomRequestInit, DeepPartial, DeepRequired, DefaultHooks, DefineFrameworkOptions, DotenvOptions, EnvOptions, EventHandlerResponse, EventProtocol, ExtendContext, ExtendShared, ExtractNamespace, ExtractPathParamKeys, ExtractPathParams, ExtractPrefix, ExtractRoute, GenImport, GenerateAppOptions, HTTPMethod, HasPathParams, HookResult, LoadConfigOptions, MergeAll, MergeRouteRules, MergedSilgiSchema, MetaData, MethodSchemas, MiddlewareHandler, 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, 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, WithPathParams };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.41.22",
4
+ "version": "0.41.24",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {