silgi 0.8.22 → 0.8.23
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 +16 -9
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/types/index.d.mts +3 -2
- package/dist/types/index.d.ts +3 -2
- package/package.json +1 -1
package/dist/_chunks/index.mjs
CHANGED
package/dist/cli/prepare.mjs
CHANGED
|
@@ -1053,15 +1053,22 @@ function createDependencyGraph(modules) {
|
|
|
1053
1053
|
});
|
|
1054
1054
|
modules.forEach((module) => {
|
|
1055
1055
|
const key = module.meta?.configKey;
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1056
|
+
if (!key)
|
|
1057
|
+
return;
|
|
1058
|
+
const beforeDeps = module.meta?.beforeDependencies || [];
|
|
1059
|
+
beforeDeps.forEach((dep) => {
|
|
1060
|
+
if (graph.has(dep)) {
|
|
1061
|
+
graph.get(dep)?.add(key);
|
|
1062
|
+
inDegree.set(key, (inDegree.get(key) || 0) + 1);
|
|
1063
|
+
}
|
|
1064
|
+
});
|
|
1065
|
+
const afterDeps = module.meta?.afterDependencies || [];
|
|
1066
|
+
afterDeps.forEach((dep) => {
|
|
1067
|
+
if (graph.has(key)) {
|
|
1068
|
+
graph.get(key)?.add(dep);
|
|
1069
|
+
inDegree.set(dep, (inDegree.get(dep) || 0) + 1);
|
|
1070
|
+
}
|
|
1071
|
+
});
|
|
1065
1072
|
});
|
|
1066
1073
|
return { graph, inDegree };
|
|
1067
1074
|
}
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED
package/dist/types/index.d.mts
CHANGED
|
@@ -467,7 +467,8 @@ interface ModuleMeta {
|
|
|
467
467
|
* @private
|
|
468
468
|
*/
|
|
469
469
|
_packageName?: string;
|
|
470
|
-
readonly
|
|
470
|
+
readonly afterDependencies?: ReadonlyArray<string>;
|
|
471
|
+
readonly beforeDependencies?: ReadonlyArray<string>;
|
|
471
472
|
[key: string]: unknown;
|
|
472
473
|
}
|
|
473
474
|
interface ResolvedModuleMeta extends ModuleMeta {
|
|
@@ -503,7 +504,7 @@ interface ModuleDefinition<TOptions extends ModuleOptionsCustom, TOptionsDefault
|
|
|
503
504
|
meta?: ModuleMeta;
|
|
504
505
|
defaults?: TOptionsDefaults | ((silgi: SilgiCLI) => Awaitable<TOptionsDefaults>);
|
|
505
506
|
hooks?: Partial<SilgiCLIHooks>;
|
|
506
|
-
setup?: (this: void, resolvedOptions: TWith extends true ? ResolvedModuleOptions<TOptions, TOptionsDefaults> : TOptions, silgi: SilgiCLI) => ModuleSetupReturn;
|
|
507
|
+
setup?: (this: void, resolvedOptions: TWith extends true ? ResolvedModuleOptions<TOptions, TOptionsDefaults> : TOptions, silgi: SilgiCLI & SilgiModuleOptions) => ModuleSetupReturn;
|
|
507
508
|
}
|
|
508
509
|
interface ModuleSetupInstallResult {
|
|
509
510
|
/**
|
package/dist/types/index.d.ts
CHANGED
|
@@ -467,7 +467,8 @@ interface ModuleMeta {
|
|
|
467
467
|
* @private
|
|
468
468
|
*/
|
|
469
469
|
_packageName?: string;
|
|
470
|
-
readonly
|
|
470
|
+
readonly afterDependencies?: ReadonlyArray<string>;
|
|
471
|
+
readonly beforeDependencies?: ReadonlyArray<string>;
|
|
471
472
|
[key: string]: unknown;
|
|
472
473
|
}
|
|
473
474
|
interface ResolvedModuleMeta extends ModuleMeta {
|
|
@@ -503,7 +504,7 @@ interface ModuleDefinition<TOptions extends ModuleOptionsCustom, TOptionsDefault
|
|
|
503
504
|
meta?: ModuleMeta;
|
|
504
505
|
defaults?: TOptionsDefaults | ((silgi: SilgiCLI) => Awaitable<TOptionsDefaults>);
|
|
505
506
|
hooks?: Partial<SilgiCLIHooks>;
|
|
506
|
-
setup?: (this: void, resolvedOptions: TWith extends true ? ResolvedModuleOptions<TOptions, TOptionsDefaults> : TOptions, silgi: SilgiCLI) => ModuleSetupReturn;
|
|
507
|
+
setup?: (this: void, resolvedOptions: TWith extends true ? ResolvedModuleOptions<TOptions, TOptionsDefaults> : TOptions, silgi: SilgiCLI & SilgiModuleOptions) => ModuleSetupReturn;
|
|
507
508
|
}
|
|
508
509
|
interface ModuleSetupInstallResult {
|
|
509
510
|
/**
|