silgi 0.7.1 → 0.7.3
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 +5 -0
- package/dist/cli/{utils/compatibility.mjs → compatibility.mjs} +1 -1
- package/dist/cli/config/index.d.mts +11 -0
- package/dist/cli/config/index.d.ts +11 -0
- package/dist/{core/config/types.mjs → cli/config/index.mjs} +19 -2
- package/dist/cli/index.mjs +3 -3
- package/dist/cli/loader.mjs +581 -0
- package/dist/cli/prepare.mjs +1621 -0
- package/dist/core/index.d.mts +2 -37
- package/dist/core/index.d.ts +2 -37
- package/dist/core/index.mjs +809 -16
- package/dist/ecosystem/nitro/index.mjs +62 -1
- package/dist/ecosystem/nuxt/module.mjs +1 -1
- package/dist/kit/index.mjs +299 -10
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/meta/index.mjs +1 -1
- package/package.json +5 -1
- package/dist/cli/build/framework/h3.mjs +0 -46
- package/dist/cli/build/framework/index.mjs +0 -7
- package/dist/cli/build/framework/nitro.mjs +0 -28
- package/dist/cli/build/framework/nuxt.mjs +0 -9
- package/dist/cli/build/prepare.mjs +0 -7
- package/dist/cli/build/scanURIs.mjs +0 -27
- package/dist/cli/build/template/framework.mjs +0 -91
- package/dist/cli/build/template/schema.mjs +0 -115
- package/dist/cli/build/template/silgi.mjs +0 -149
- package/dist/cli/build/types.mjs +0 -130
- package/dist/cli/commands/prepare.mjs +0 -49
- package/dist/cli/common.mjs +0 -13
- package/dist/cli/core/app.mjs +0 -89
- package/dist/cli/core/scan.mjs +0 -40
- package/dist/cli/core/silgi.mjs +0 -77
- package/dist/cli/core/storage.mjs +0 -11
- package/dist/cli/core/templates.mjs +0 -29
- package/dist/cli/module/exportScan.mjs +0 -69
- package/dist/cli/module/install.mjs +0 -52
- package/dist/cli/module/scan.mjs +0 -141
- package/dist/cli/utils/generateRouterDTS.mjs +0 -84
- package/dist/cli/utils/ignore.mjs +0 -46
- package/dist/cli/utils/readCoreFile.mjs +0 -47
- package/dist/cli/utils/scan.mjs +0 -147
- package/dist/cli/utils/storage.mjs +0 -21
- package/dist/cli/utils/uri.mjs +0 -71
- package/dist/core/config/defaults.mjs +0 -96
- package/dist/core/config/loader.mjs +0 -98
- package/dist/core/config/resolvers/compatibility.mjs +0 -90
- package/dist/core/config/resolvers/imports.mjs +0 -96
- package/dist/core/config/resolvers/paths.mjs +0 -194
- package/dist/core/config/resolvers/storage.mjs +0 -25
- package/dist/core/config/resolvers/url.mjs +0 -7
- package/dist/core/createSilgi.mjs +0 -84
- package/dist/core/error.mjs +0 -227
- package/dist/core/fetch/ofetch.mjs +0 -35
- package/dist/core/parser.mjs +0 -136
- package/dist/core/silgi.mjs +0 -114
- package/dist/core/silgiApp.mjs +0 -15
- package/dist/core/unctx.mjs +0 -27
- package/dist/core/uris/uri.mjs +0 -33
- package/dist/core/uris/utils.mjs +0 -127
- package/dist/core/utils/event.mjs +0 -5
- package/dist/core/utils/global.mjs +0 -12
- package/dist/core/utils/merge.mjs +0 -25
- package/dist/core/utils/schema.mjs +0 -5
- package/dist/core/utils/service.mjs +0 -5
- package/dist/core/utils/shared.mjs +0 -5
- package/dist/core/utils/storage.mjs +0 -70
- package/dist/ecosystem/nitro/module.mjs +0 -62
- package/dist/kit/esm.mjs +0 -10
- package/dist/kit/fs.mjs +0 -25
- package/dist/kit/isFramework.mjs +0 -25
- package/dist/kit/logger.mjs +0 -8
- package/dist/kit/module.mjs +0 -73
- package/dist/kit/path.mjs +0 -34
- package/dist/kit/preset.mjs +0 -6
- package/dist/kit/resolve.mjs +0 -78
- package/dist/kit/template.mjs +0 -47
- package/dist/kit/utils.mjs +0 -20
- package/dist/package.json.mjs +0 -5
- package/dist/schema/common.mjs +0 -43
- package/dist/schema/index.mjs +0 -9
- package/dist/schema/internal.mjs +0 -22
- /package/dist/cli/{commands/init.mjs → init.mjs} +0 -0
package/dist/core/index.d.mts
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TSConfig } from 'pkg-types';
|
|
1
|
+
import { SilgiConfig, Silgi, SilgiRouterTypes, SilgiOperation, MergedSilgiSchema, ServiceType, SilgiSchema, RequiredServiceType, ModuleRuntimeShared, SilgiEvent, DefaultNamespaces, BaseSchemaType, SilgiCLI } from 'silgi/types';
|
|
3
2
|
import { FetchOptions } from 'ofetch';
|
|
4
3
|
export { c as createStorage, s as silgi, u as useSilgiStorage } from '../shared/silgi.BFbL2aof.mjs';
|
|
5
4
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
6
5
|
import * as unctx from 'unctx';
|
|
7
6
|
import 'unstorage';
|
|
8
7
|
|
|
9
|
-
declare function loadOptions(configOverrides?: SilgiCLIConfig, opts?: LoadConfigOptions): Promise<SilgiCLIOptions>;
|
|
10
|
-
|
|
11
|
-
declare function silgiGenerateType(silgi: SilgiCLI): Promise<{
|
|
12
|
-
declarations: string[];
|
|
13
|
-
tsConfig: TSConfig;
|
|
14
|
-
}>;
|
|
15
|
-
|
|
16
8
|
declare function createSilgi(config: SilgiConfig): Promise<Silgi>;
|
|
17
9
|
|
|
18
10
|
type TrimAfterFourSlashes<T extends string> = T extends `/${infer S1}/${infer S2}/${infer S3}/${infer S4}/${infer _}` ? `/${S1}/${S2}/${S3}/${S4}` : T;
|
|
@@ -45,33 +37,6 @@ type SilgiFetchOptions<R extends ValidRoute, M extends Method<R>> = {
|
|
|
45
37
|
type SilgiFetchClient = <R extends ValidRoute, M extends Method<R> = 'get' extends Method<R> ? 'get' : Method<R>>(url: R, options: SilgiFetchOptions<R, M>) => Promise<FetchResponseData<R, M>>;
|
|
46
38
|
declare function createSilgiFetch(options: FetchOptions | ((options: FetchOptions) => FetchOptions), localFetch?: typeof globalThis.$fetch): SilgiFetchClient;
|
|
47
39
|
|
|
48
|
-
interface Options {
|
|
49
|
-
debug?: boolean;
|
|
50
|
-
}
|
|
51
|
-
interface DataType {
|
|
52
|
-
exportName: string;
|
|
53
|
-
options: {
|
|
54
|
-
type: boolean;
|
|
55
|
-
pluginName?: string;
|
|
56
|
-
};
|
|
57
|
-
path: string;
|
|
58
|
-
}
|
|
59
|
-
declare class SchemaParser {
|
|
60
|
-
options: Options;
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
*/
|
|
64
|
-
constructor(options?: Options);
|
|
65
|
-
parseExports(content: string, filePath: string): {
|
|
66
|
-
exportVariables: (search: string, path: string) => DataType[];
|
|
67
|
-
parseInterfaceDeclarations: (search: string, path: string) => DataType[];
|
|
68
|
-
};
|
|
69
|
-
private parseVariableDeclaration;
|
|
70
|
-
private parseTSInterfaceDeclaration;
|
|
71
|
-
private parseTypeDeclarations;
|
|
72
|
-
private parseInterfaceDeclarations;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
40
|
interface RouteTemplateValidator {
|
|
76
41
|
(value: string): boolean;
|
|
77
42
|
}
|
|
@@ -319,4 +284,4 @@ declare function useSilgiCLI(): SilgiCLI;
|
|
|
319
284
|
*/
|
|
320
285
|
declare function tryUseSilgiCLI(): SilgiCLI | null;
|
|
321
286
|
|
|
322
|
-
export { type BaseError, ErrorCategory, ErrorFactory, type ErrorMetadata, ErrorSeverity, HttpStatus,
|
|
287
|
+
export { type BaseError, ErrorCategory, ErrorFactory, type ErrorMetadata, ErrorSeverity, HttpStatus, SilgiError, createSchema, createService, createShared, createSilgi, createSilgiFetch, getEvent, isBaseError, mergeSchemas, mergeServices, mergeShared, parseURI, silgiCLICtx, silgiCtx, tryUseSilgi, tryUseSilgiCLI, useSilgi, useSilgiCLI };
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TSConfig } from 'pkg-types';
|
|
1
|
+
import { SilgiConfig, Silgi, SilgiRouterTypes, SilgiOperation, MergedSilgiSchema, ServiceType, SilgiSchema, RequiredServiceType, ModuleRuntimeShared, SilgiEvent, DefaultNamespaces, BaseSchemaType, SilgiCLI } from 'silgi/types';
|
|
3
2
|
import { FetchOptions } from 'ofetch';
|
|
4
3
|
export { c as createStorage, s as silgi, u as useSilgiStorage } from '../shared/silgi.BFbL2aof.js';
|
|
5
4
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
6
5
|
import * as unctx from 'unctx';
|
|
7
6
|
import 'unstorage';
|
|
8
7
|
|
|
9
|
-
declare function loadOptions(configOverrides?: SilgiCLIConfig, opts?: LoadConfigOptions): Promise<SilgiCLIOptions>;
|
|
10
|
-
|
|
11
|
-
declare function silgiGenerateType(silgi: SilgiCLI): Promise<{
|
|
12
|
-
declarations: string[];
|
|
13
|
-
tsConfig: TSConfig;
|
|
14
|
-
}>;
|
|
15
|
-
|
|
16
8
|
declare function createSilgi(config: SilgiConfig): Promise<Silgi>;
|
|
17
9
|
|
|
18
10
|
type TrimAfterFourSlashes<T extends string> = T extends `/${infer S1}/${infer S2}/${infer S3}/${infer S4}/${infer _}` ? `/${S1}/${S2}/${S3}/${S4}` : T;
|
|
@@ -45,33 +37,6 @@ type SilgiFetchOptions<R extends ValidRoute, M extends Method<R>> = {
|
|
|
45
37
|
type SilgiFetchClient = <R extends ValidRoute, M extends Method<R> = 'get' extends Method<R> ? 'get' : Method<R>>(url: R, options: SilgiFetchOptions<R, M>) => Promise<FetchResponseData<R, M>>;
|
|
46
38
|
declare function createSilgiFetch(options: FetchOptions | ((options: FetchOptions) => FetchOptions), localFetch?: typeof globalThis.$fetch): SilgiFetchClient;
|
|
47
39
|
|
|
48
|
-
interface Options {
|
|
49
|
-
debug?: boolean;
|
|
50
|
-
}
|
|
51
|
-
interface DataType {
|
|
52
|
-
exportName: string;
|
|
53
|
-
options: {
|
|
54
|
-
type: boolean;
|
|
55
|
-
pluginName?: string;
|
|
56
|
-
};
|
|
57
|
-
path: string;
|
|
58
|
-
}
|
|
59
|
-
declare class SchemaParser {
|
|
60
|
-
options: Options;
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
*/
|
|
64
|
-
constructor(options?: Options);
|
|
65
|
-
parseExports(content: string, filePath: string): {
|
|
66
|
-
exportVariables: (search: string, path: string) => DataType[];
|
|
67
|
-
parseInterfaceDeclarations: (search: string, path: string) => DataType[];
|
|
68
|
-
};
|
|
69
|
-
private parseVariableDeclaration;
|
|
70
|
-
private parseTSInterfaceDeclaration;
|
|
71
|
-
private parseTypeDeclarations;
|
|
72
|
-
private parseInterfaceDeclarations;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
40
|
interface RouteTemplateValidator {
|
|
76
41
|
(value: string): boolean;
|
|
77
42
|
}
|
|
@@ -319,4 +284,4 @@ declare function useSilgiCLI(): SilgiCLI;
|
|
|
319
284
|
*/
|
|
320
285
|
declare function tryUseSilgiCLI(): SilgiCLI | null;
|
|
321
286
|
|
|
322
|
-
export { type BaseError, ErrorCategory, ErrorFactory, type ErrorMetadata, ErrorSeverity, HttpStatus,
|
|
287
|
+
export { type BaseError, ErrorCategory, ErrorFactory, type ErrorMetadata, ErrorSeverity, HttpStatus, SilgiError, createSchema, createService, createShared, createSilgi, createSilgiFetch, getEvent, isBaseError, mergeSchemas, mergeServices, mergeShared, parseURI, silgiCLICtx, silgiCtx, tryUseSilgi, tryUseSilgiCLI, useSilgi, useSilgiCLI };
|