silgi 0.28.6 → 0.28.7
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/build.mjs +0 -1
- package/dist/cli/dev.mjs +0 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/init.mjs +0 -1
- package/dist/cli/install.mjs +0 -1
- package/dist/cli/silgi.mjs +4 -9
- package/dist/types/index.d.mts +3 -5
- package/package.json +1 -1
package/dist/build.mjs
CHANGED
package/dist/cli/dev.mjs
CHANGED
package/dist/cli/index.mjs
CHANGED
package/dist/cli/init.mjs
CHANGED
package/dist/cli/install.mjs
CHANGED
package/dist/cli/silgi.mjs
CHANGED
|
@@ -13,7 +13,6 @@ import { generateTypes, resolveSchema } from 'untyped';
|
|
|
13
13
|
import { s as silgiGenerateType, l as loadOptions } from './types.mjs';
|
|
14
14
|
import { createHooks, createDebugger } from 'hookable';
|
|
15
15
|
import { useSilgiCLI, replaceRuntimeValues, silgiCLICtx, autoImportTypes } from 'silgi';
|
|
16
|
-
import { createAdapter } from 'unadapter';
|
|
17
16
|
import { c as createRouteRules } from '../_chunks/routeRules.mjs';
|
|
18
17
|
import * as p from '@clack/prompts';
|
|
19
18
|
import * as dotenv from 'dotenv';
|
|
@@ -2348,15 +2347,11 @@ async function createSilgiCLI(config = {}, opts = {}) {
|
|
|
2348
2347
|
async updateConfig(_config) {
|
|
2349
2348
|
},
|
|
2350
2349
|
routeRules: void 0,
|
|
2351
|
-
|
|
2350
|
+
adapters: {}
|
|
2352
2351
|
};
|
|
2353
|
-
if (silgi.options.
|
|
2354
|
-
for (const [key, value] of Object.entries(silgi.options.
|
|
2355
|
-
|
|
2356
|
-
silgi.adapter[key] = createAdapter(
|
|
2357
|
-
value.tables,
|
|
2358
|
-
options2
|
|
2359
|
-
);
|
|
2352
|
+
if (silgi.options.adapters && Object.keys(silgi.options.adapters)?.length > 0) {
|
|
2353
|
+
for (const [key, value] of Object.entries(silgi.options.adapters)) {
|
|
2354
|
+
silgi.adapters[key] = value;
|
|
2360
2355
|
}
|
|
2361
2356
|
}
|
|
2362
2357
|
await prepareEnv(options);
|
package/dist/types/index.d.mts
CHANGED
|
@@ -8,7 +8,7 @@ import { Ignore, Options } from 'ignore';
|
|
|
8
8
|
import { TSConfig } from 'pkg-types';
|
|
9
9
|
import { PresetName, PresetOptions, PresetNameInput } from 'silgi/presets';
|
|
10
10
|
import { ResolvedServiceType as ResolvedServiceType$1, SilgiRuntimeShareds as SilgiRuntimeShareds$1, SilgiRuntimeOptions as SilgiRuntimeOptions$1, RouteRules as RouteRules$1, ModuleMeta as ModuleMeta$1, SilgiModule as SilgiModule$1, SilgiRouteRules as SilgiRouteRules$1, DotenvOptions as DotenvOptions$1, EnvOptions as EnvOptions$1, SilgiRuntimeConfig as SilgiRuntimeConfig$1, ServiceParseModule as ServiceParseModule$1, SilgiCLIHooks as SilgiCLIHooks$1, StorageMounts as StorageMounts$1, SilgiTemplate as SilgiTemplate$1, SilgiFrameworkInfo as SilgiFrameworkInfo$1 } from 'silgi/types';
|
|
11
|
-
import { Adapter, TablesSchema, InferModelTypes
|
|
11
|
+
import { Adapter, TablesSchema, InferModelTypes } from 'unadapter/types';
|
|
12
12
|
import { UnimportPluginOptions } from 'unimport/unplugin';
|
|
13
13
|
import { H3Event } from 'h3';
|
|
14
14
|
import { NitroRuntimeConfig } from 'nitropack/types';
|
|
@@ -89,7 +89,7 @@ interface SilgiCLI {
|
|
|
89
89
|
tags?: (keyof SilgiCommands)[];
|
|
90
90
|
enabled?: boolean;
|
|
91
91
|
}>>;
|
|
92
|
-
|
|
92
|
+
adapters: Record<string, Adapter<Record<string, any>, TablesSchema, InferModelTypes<TablesSchema>>>;
|
|
93
93
|
}
|
|
94
94
|
type SilgiCLIDynamicConfig = Pick<SilgiCLIConfig, 'routeRules'>;
|
|
95
95
|
interface SilgiFrameworkInfo {
|
|
@@ -813,9 +813,7 @@ interface SilgiCLIOptions extends PresetOptions {
|
|
|
813
813
|
}>>;
|
|
814
814
|
installPackages: Record<'dependencies' | 'devDependencies', Record<string, string>>;
|
|
815
815
|
apiFul: ApifulConfig;
|
|
816
|
-
|
|
817
|
-
tables: (options: AdapterOptions) => TablesSchema;
|
|
818
|
-
} & AdapterOptions>;
|
|
816
|
+
adapters: Record<string, Adapter<Record<string, any>, TablesSchema, InferModelTypes<TablesSchema>>>;
|
|
819
817
|
}
|
|
820
818
|
/**
|
|
821
819
|
* Silgi input config (silgi.config)
|