silgi 0.19.12 → 0.19.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.
- package/dist/_chunks/index.mjs +1 -1
- package/dist/cli/prepare.mjs +0 -1
- package/dist/cli/types.mjs +7 -9
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/types/index.d.mts +3 -3
- package/dist/types/index.d.ts +3 -3
- package/package.json +1 -1
package/dist/_chunks/index.mjs
CHANGED
package/dist/cli/prepare.mjs
CHANGED
package/dist/cli/types.mjs
CHANGED
|
@@ -339,8 +339,8 @@ async function resolvePathOptions(options) {
|
|
|
339
339
|
};
|
|
340
340
|
if (options.preset === "npm-package") {
|
|
341
341
|
options.alias = {
|
|
342
|
-
...options.alias
|
|
343
|
-
|
|
342
|
+
...options.alias
|
|
343
|
+
// '#silgi/app/': join(options.build.dir, '/'),
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
346
|
if (options.alias && typeof options.alias === "object") {
|
|
@@ -595,6 +595,7 @@ async function silgiGenerateType(silgi) {
|
|
|
595
595
|
/^(?=[^.])/,
|
|
596
596
|
"./"
|
|
597
597
|
),
|
|
598
|
+
silgi.options.preset === "npm-package" ? join(relativeWithDot(tsconfigDir, silgi.options.rootDir), "dist/moduleTypes.d.ts") : "",
|
|
598
599
|
join(relativeWithDot(tsconfigDir, silgi.options.rootDir), "**/*"),
|
|
599
600
|
...silgi.options.srcDir === silgi.options.rootDir ? [] : [join(relativeWithDot(tsconfigDir, silgi.options.srcDir), "**/*")]
|
|
600
601
|
]);
|
|
@@ -725,13 +726,10 @@ async function silgiGenerateType(silgi) {
|
|
|
725
726
|
);
|
|
726
727
|
}
|
|
727
728
|
const references = [];
|
|
728
|
-
await
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
const pkg = await readPackageJSON(id, { url: silgi.options.rootDir }).catch(() => null);
|
|
733
|
-
references.push({ types: pkg?.name || id });
|
|
734
|
-
}));
|
|
729
|
+
const pkg = await readPackageJSON(silgi.options.rootDir);
|
|
730
|
+
if (pkg.name && silgi.options.preset === "npm-package") {
|
|
731
|
+
references.push({ types: pkg.name });
|
|
732
|
+
}
|
|
735
733
|
const declarations = [];
|
|
736
734
|
await silgi.callHook("prepare:types", { references, declarations, tsConfig });
|
|
737
735
|
tsConfig.include = [...new Set(tsConfig.include.map((p) => isAbsolute(p) ? relativeWithDot(tsconfigDir, p) : p))];
|
package/dist/core/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SilgiConfig, Silgi, SilgiOperation, MergedSilgiSchema, ServiceType, SilgiSchema, RequiredServiceType,
|
|
1
|
+
import { SilgiConfig, Silgi, SilgiOperation, MergedSilgiSchema, ServiceType, SilgiSchema, RequiredServiceType, SilgiRuntimeSharedsExtend, SilgiEvents, SilgiRuntimeContext, DefaultNamespaces, BaseSchemaType, SilgiRuntimeShareds, StorageConfig, SilgiCLI, SilgiStorageBase } from 'silgi/types';
|
|
2
2
|
export { s as silgi } from '../shared/silgi.Cs0ZUUXV.mjs';
|
|
3
3
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
4
4
|
import { Storage, StorageValue } from 'unstorage';
|
|
@@ -19,7 +19,7 @@ declare function parseURI(uri: string, uris: Record<string, URITemplate>): Silgi
|
|
|
19
19
|
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
|
|
20
20
|
declare function mergeSchemas<T extends MergedSilgiSchema[]>(typesOrArray: [...T] | T): UnionToIntersection<T[number]>;
|
|
21
21
|
declare function mergeServices<T extends ServiceType<SilgiSchema>[]>(servicesOrArray: [...T] | T): RequiredServiceType<SilgiSchema>;
|
|
22
|
-
declare function mergeShared<T extends
|
|
22
|
+
declare function mergeShared<T extends SilgiRuntimeSharedsExtend[]>(sharedOrArray: [...T] | T): UnionToIntersection<T[number]>;
|
|
23
23
|
|
|
24
24
|
declare function getEvent<T extends SilgiEvents>(event?: SilgiEvents): T;
|
|
25
25
|
declare function getEventContext<T extends SilgiRuntimeContext>(event?: SilgiEvents): T;
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SilgiConfig, Silgi, SilgiOperation, MergedSilgiSchema, ServiceType, SilgiSchema, RequiredServiceType,
|
|
1
|
+
import { SilgiConfig, Silgi, SilgiOperation, MergedSilgiSchema, ServiceType, SilgiSchema, RequiredServiceType, SilgiRuntimeSharedsExtend, SilgiEvents, SilgiRuntimeContext, DefaultNamespaces, BaseSchemaType, SilgiRuntimeShareds, StorageConfig, SilgiCLI, SilgiStorageBase } from 'silgi/types';
|
|
2
2
|
export { s as silgi } from '../shared/silgi.Cs0ZUUXV.js';
|
|
3
3
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
4
4
|
import { Storage, StorageValue } from 'unstorage';
|
|
@@ -19,7 +19,7 @@ declare function parseURI(uri: string, uris: Record<string, URITemplate>): Silgi
|
|
|
19
19
|
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
|
|
20
20
|
declare function mergeSchemas<T extends MergedSilgiSchema[]>(typesOrArray: [...T] | T): UnionToIntersection<T[number]>;
|
|
21
21
|
declare function mergeServices<T extends ServiceType<SilgiSchema>[]>(servicesOrArray: [...T] | T): RequiredServiceType<SilgiSchema>;
|
|
22
|
-
declare function mergeShared<T extends
|
|
22
|
+
declare function mergeShared<T extends SilgiRuntimeSharedsExtend[]>(sharedOrArray: [...T] | T): UnionToIntersection<T[number]>;
|
|
23
23
|
|
|
24
24
|
declare function getEvent<T extends SilgiEvents>(event?: SilgiEvents): T;
|
|
25
25
|
declare function getEventContext<T extends SilgiRuntimeContext>(event?: SilgiEvents): T;
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED
package/dist/types/index.d.mts
CHANGED
|
@@ -885,12 +885,12 @@ interface StorageKeyParams<TInput = unknown> {
|
|
|
885
885
|
storageOptions?: Pick<StorageConfig<TInput>, 'base' | 'options' | 'scope'>;
|
|
886
886
|
}
|
|
887
887
|
|
|
888
|
-
interface SilgiRuntimeShareds extends
|
|
888
|
+
interface SilgiRuntimeShareds extends SilgiRuntimeSharedsExtend {
|
|
889
889
|
storage: <T extends StorageValue = StorageValue>(base: StorageConfig<T>['base']) => Storage<T>;
|
|
890
890
|
silgi: SilgiFunction;
|
|
891
891
|
runtimeConfig: SilgiRuntimeConfig;
|
|
892
892
|
}
|
|
893
|
-
interface
|
|
893
|
+
interface SilgiRuntimeSharedsExtend {
|
|
894
894
|
}
|
|
895
895
|
interface ExtendShared {
|
|
896
896
|
}
|
|
@@ -1137,4 +1137,4 @@ interface ServiceParseModule {
|
|
|
1137
1137
|
|
|
1138
1138
|
declare const autoImportTypes: string[];
|
|
1139
1139
|
|
|
1140
|
-
export { type AppConfig, type Awaitable, type BaseNamespaceType, type BaseSchemaType, type BaseSilgiMethodType, type CaptureError, type CapturedErrorContext, type CommandType, type CreateScope, type DeepPartial, type DefaultHooks, type DefaultNamespaces, type DefaultRouteConfig, type DefaultRouteRules, type DotenvOptions, type EnvOptions, type EventHandlerResponse, type ExtendContext, type ExtendShared, type ExtractInputFromURI, type ExtractOutputFromURI, type ExtractPathParamsFromURI, type ExtractQueryParamsFromURI, type ExtractSourceFromURI, type FrameworkContext, type GenerateAppOptions, type GraphQLJSON, type HookResult, type ImportItem, type LoadConfigOptions, type MergedSilgiSchema, type MethodHandlerType, type ModuleDefinition, type ModuleHookContext, type ModuleMeta, type ModuleOptionsCustom, type ModuleSetupInstallResult, type ModuleSetupReturn, type Namespaces, type NitroBuildInfo, type PrepareCore, type RequiredServiceType, type ResolvedMethodHandlerType, type ResolvedModuleMeta, type ResolvedModuleOptions, type ResolvedServiceType, type ResolvedSilgiTemplate, type RouteRules, type ScanFile, type SchemaPreparationOptions, type ServiceParse, type ServiceParseModule, type ServiceType, type Silgi, type SilgiAppPlugin, type SilgiCLI, type SilgiCLIConfig, type SilgiCLIDynamicConfig, type SilgiCLIHooks, type SilgiCLIOptions, type SilgiCompatibility, type SilgiCompatibilityIssue, type SilgiCompatibilityIssues, type SilgiConfig, type SilgiEvents, type SilgiFrameworkInfo, type SilgiFunction, type SilgiHooks, type SilgiModule, type SilgiModuleInput, type SilgiModuleOptions, type SilgiNamespaces, type SilgiOperation, type SilgiOptions, type SilgiPreset, type SilgiPresetMeta, type SilgiRouteRules, type SilgiRouterTypes, type SilgiRuntimeActions, type SilgiRuntimeConfig, type SilgiRuntimeContext, type SilgiRuntimeHooks, type SilgiRuntimeMethods, type SilgiRuntimeOptions, type SilgiRuntimeRouteRules, type SilgiRuntimeRouteRulesConfig, type SilgiRuntimeShareds, type
|
|
1140
|
+
export { type AppConfig, type Awaitable, type BaseNamespaceType, type BaseSchemaType, type BaseSilgiMethodType, type CaptureError, type CapturedErrorContext, type CommandType, type CreateScope, type DeepPartial, type DefaultHooks, type DefaultNamespaces, type DefaultRouteConfig, type DefaultRouteRules, type DotenvOptions, type EnvOptions, type EventHandlerResponse, type ExtendContext, type ExtendShared, type ExtractInputFromURI, type ExtractOutputFromURI, type ExtractPathParamsFromURI, type ExtractQueryParamsFromURI, type ExtractSourceFromURI, type FrameworkContext, type GenerateAppOptions, type GraphQLJSON, type HookResult, type ImportItem, type LoadConfigOptions, type MergedSilgiSchema, type MethodHandlerType, type ModuleDefinition, type ModuleHookContext, type ModuleMeta, type ModuleOptionsCustom, type ModuleSetupInstallResult, type ModuleSetupReturn, type Namespaces, type NitroBuildInfo, type PrepareCore, type RequiredServiceType, type ResolvedMethodHandlerType, type ResolvedModuleMeta, type ResolvedModuleOptions, type ResolvedServiceType, type ResolvedSilgiTemplate, type RouteRules, type ScanFile, type SchemaPreparationOptions, type ServiceParse, type ServiceParseModule, type ServiceType, type Silgi, type SilgiAppPlugin, type SilgiCLI, type SilgiCLIConfig, type SilgiCLIDynamicConfig, type SilgiCLIHooks, type SilgiCLIOptions, type SilgiCompatibility, type SilgiCompatibilityIssue, type SilgiCompatibilityIssues, type SilgiConfig, type SilgiEvents, type SilgiFrameworkInfo, type SilgiFunction, type SilgiHooks, type SilgiModule, type SilgiModuleInput, type SilgiModuleOptions, type SilgiNamespaces, type SilgiOperation, type SilgiOptions, type SilgiPreset, type SilgiPresetMeta, type SilgiRouteRules, type SilgiRouterTypes, type SilgiRuntimeActions, type SilgiRuntimeConfig, type SilgiRuntimeContext, type SilgiRuntimeHooks, type SilgiRuntimeMethods, type SilgiRuntimeOptions, type SilgiRuntimeRouteRules, type SilgiRuntimeRouteRulesConfig, type SilgiRuntimeShareds, type SilgiRuntimeSharedsExtend, type SilgiSchema, type SilgiServiceInterface, type SilgiStorageBase, type SilgiTemplate, type SilgiURIs, type StorageConfig, type StorageKeyGenerator, type StorageKeyParams, type StorageMounts, type TSReference, type URIsTypes, autoImportTypes };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -885,12 +885,12 @@ interface StorageKeyParams<TInput = unknown> {
|
|
|
885
885
|
storageOptions?: Pick<StorageConfig<TInput>, 'base' | 'options' | 'scope'>;
|
|
886
886
|
}
|
|
887
887
|
|
|
888
|
-
interface SilgiRuntimeShareds extends
|
|
888
|
+
interface SilgiRuntimeShareds extends SilgiRuntimeSharedsExtend {
|
|
889
889
|
storage: <T extends StorageValue = StorageValue>(base: StorageConfig<T>['base']) => Storage<T>;
|
|
890
890
|
silgi: SilgiFunction;
|
|
891
891
|
runtimeConfig: SilgiRuntimeConfig;
|
|
892
892
|
}
|
|
893
|
-
interface
|
|
893
|
+
interface SilgiRuntimeSharedsExtend {
|
|
894
894
|
}
|
|
895
895
|
interface ExtendShared {
|
|
896
896
|
}
|
|
@@ -1137,4 +1137,4 @@ interface ServiceParseModule {
|
|
|
1137
1137
|
|
|
1138
1138
|
declare const autoImportTypes: string[];
|
|
1139
1139
|
|
|
1140
|
-
export { type AppConfig, type Awaitable, type BaseNamespaceType, type BaseSchemaType, type BaseSilgiMethodType, type CaptureError, type CapturedErrorContext, type CommandType, type CreateScope, type DeepPartial, type DefaultHooks, type DefaultNamespaces, type DefaultRouteConfig, type DefaultRouteRules, type DotenvOptions, type EnvOptions, type EventHandlerResponse, type ExtendContext, type ExtendShared, type ExtractInputFromURI, type ExtractOutputFromURI, type ExtractPathParamsFromURI, type ExtractQueryParamsFromURI, type ExtractSourceFromURI, type FrameworkContext, type GenerateAppOptions, type GraphQLJSON, type HookResult, type ImportItem, type LoadConfigOptions, type MergedSilgiSchema, type MethodHandlerType, type ModuleDefinition, type ModuleHookContext, type ModuleMeta, type ModuleOptionsCustom, type ModuleSetupInstallResult, type ModuleSetupReturn, type Namespaces, type NitroBuildInfo, type PrepareCore, type RequiredServiceType, type ResolvedMethodHandlerType, type ResolvedModuleMeta, type ResolvedModuleOptions, type ResolvedServiceType, type ResolvedSilgiTemplate, type RouteRules, type ScanFile, type SchemaPreparationOptions, type ServiceParse, type ServiceParseModule, type ServiceType, type Silgi, type SilgiAppPlugin, type SilgiCLI, type SilgiCLIConfig, type SilgiCLIDynamicConfig, type SilgiCLIHooks, type SilgiCLIOptions, type SilgiCompatibility, type SilgiCompatibilityIssue, type SilgiCompatibilityIssues, type SilgiConfig, type SilgiEvents, type SilgiFrameworkInfo, type SilgiFunction, type SilgiHooks, type SilgiModule, type SilgiModuleInput, type SilgiModuleOptions, type SilgiNamespaces, type SilgiOperation, type SilgiOptions, type SilgiPreset, type SilgiPresetMeta, type SilgiRouteRules, type SilgiRouterTypes, type SilgiRuntimeActions, type SilgiRuntimeConfig, type SilgiRuntimeContext, type SilgiRuntimeHooks, type SilgiRuntimeMethods, type SilgiRuntimeOptions, type SilgiRuntimeRouteRules, type SilgiRuntimeRouteRulesConfig, type SilgiRuntimeShareds, type
|
|
1140
|
+
export { type AppConfig, type Awaitable, type BaseNamespaceType, type BaseSchemaType, type BaseSilgiMethodType, type CaptureError, type CapturedErrorContext, type CommandType, type CreateScope, type DeepPartial, type DefaultHooks, type DefaultNamespaces, type DefaultRouteConfig, type DefaultRouteRules, type DotenvOptions, type EnvOptions, type EventHandlerResponse, type ExtendContext, type ExtendShared, type ExtractInputFromURI, type ExtractOutputFromURI, type ExtractPathParamsFromURI, type ExtractQueryParamsFromURI, type ExtractSourceFromURI, type FrameworkContext, type GenerateAppOptions, type GraphQLJSON, type HookResult, type ImportItem, type LoadConfigOptions, type MergedSilgiSchema, type MethodHandlerType, type ModuleDefinition, type ModuleHookContext, type ModuleMeta, type ModuleOptionsCustom, type ModuleSetupInstallResult, type ModuleSetupReturn, type Namespaces, type NitroBuildInfo, type PrepareCore, type RequiredServiceType, type ResolvedMethodHandlerType, type ResolvedModuleMeta, type ResolvedModuleOptions, type ResolvedServiceType, type ResolvedSilgiTemplate, type RouteRules, type ScanFile, type SchemaPreparationOptions, type ServiceParse, type ServiceParseModule, type ServiceType, type Silgi, type SilgiAppPlugin, type SilgiCLI, type SilgiCLIConfig, type SilgiCLIDynamicConfig, type SilgiCLIHooks, type SilgiCLIOptions, type SilgiCompatibility, type SilgiCompatibilityIssue, type SilgiCompatibilityIssues, type SilgiConfig, type SilgiEvents, type SilgiFrameworkInfo, type SilgiFunction, type SilgiHooks, type SilgiModule, type SilgiModuleInput, type SilgiModuleOptions, type SilgiNamespaces, type SilgiOperation, type SilgiOptions, type SilgiPreset, type SilgiPresetMeta, type SilgiRouteRules, type SilgiRouterTypes, type SilgiRuntimeActions, type SilgiRuntimeConfig, type SilgiRuntimeContext, type SilgiRuntimeHooks, type SilgiRuntimeMethods, type SilgiRuntimeOptions, type SilgiRuntimeRouteRules, type SilgiRuntimeRouteRulesConfig, type SilgiRuntimeShareds, type SilgiRuntimeSharedsExtend, type SilgiSchema, type SilgiServiceInterface, type SilgiStorageBase, type SilgiTemplate, type SilgiURIs, type StorageConfig, type StorageKeyGenerator, type StorageKeyParams, type StorageMounts, type TSReference, type URIsTypes, autoImportTypes };
|