silgi 0.37.27 → 0.37.28
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/cli/build.mjs +6 -2
- package/dist/cli/index.mjs +1 -1
- package/dist/types/index.d.mts +1 -1
- package/package.json +1 -1
package/dist/cli/build.mjs
CHANGED
|
@@ -1437,8 +1437,12 @@ async function createSilgiCLI(config = {}, opts = {}) {
|
|
|
1437
1437
|
adapters: {}
|
|
1438
1438
|
};
|
|
1439
1439
|
updateRuntimeStorage(silgi.options.runtimeConfig);
|
|
1440
|
-
|
|
1441
|
-
|
|
1440
|
+
let adapters = silgi.options.adapters;
|
|
1441
|
+
if (typeof adapters === "function") {
|
|
1442
|
+
adapters = await adapters();
|
|
1443
|
+
}
|
|
1444
|
+
if (adapters && typeof adapters === "object" && Object.keys(adapters)?.length > 0) {
|
|
1445
|
+
for (const [key, value] of Object.entries(adapters)) {
|
|
1442
1446
|
silgi.adapters[key] = value;
|
|
1443
1447
|
}
|
|
1444
1448
|
}
|
package/dist/cli/index.mjs
CHANGED
package/dist/types/index.d.mts
CHANGED
|
@@ -1151,7 +1151,7 @@ interface SilgiCLIOptions extends PresetOptions {
|
|
|
1151
1151
|
ignoreOptions: Options;
|
|
1152
1152
|
installPackages: Record<'dependencies' | 'devDependencies', Record<string, string>>;
|
|
1153
1153
|
apiFul: ApifulConfig;
|
|
1154
|
-
adapters: Record<string, Adapter<Record<string, any>, TablesSchema, InferModelTypes<TablesSchema
|
|
1154
|
+
adapters: Record<string, Adapter<Record<string, any>, TablesSchema, InferModelTypes<TablesSchema>>> | (() => Record<string, Adapter<Record<string, any>, TablesSchema, InferModelTypes<TablesSchema>>>) | (() => Promise<Record<string, Adapter<Record<string, any>, TablesSchema, InferModelTypes<TablesSchema>>>>);
|
|
1155
1155
|
}
|
|
1156
1156
|
/**
|
|
1157
1157
|
* Silgi input config (silgi.config)
|