@autometa/cli 1.0.0-rc.6 → 1.0.0-rc.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/bin.cjs +22 -13
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +22 -13
- package/dist/bin.js.map +1 -1
- package/dist/index.cjs +22 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +22 -13
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -2423,25 +2423,34 @@ function parseScopeOverrideTag(tags) {
|
|
|
2423
2423
|
}
|
|
2424
2424
|
function resolveFeatureScope(options) {
|
|
2425
2425
|
const override = parseScopeOverrideTag(options.feature.tags);
|
|
2426
|
+
const fileScope = resolveFileScope(options.featureAbsPath, options.groupIndex);
|
|
2427
|
+
const inferred = (() => {
|
|
2428
|
+
if (fileScope.kind !== "root") {
|
|
2429
|
+
return fileScope;
|
|
2430
|
+
}
|
|
2431
|
+
if (options.hoistedFeatureScopingMode !== "directory") {
|
|
2432
|
+
return fileScope;
|
|
2433
|
+
}
|
|
2434
|
+
return resolveHoistedDirectoryScope({
|
|
2435
|
+
featureAbsPath: options.featureAbsPath,
|
|
2436
|
+
hoistedFeatureRootsAbs: options.hoistedFeatureRootsAbs,
|
|
2437
|
+
groupIndex: options.groupIndex,
|
|
2438
|
+
strict: options.hoistedFeatureScopingStrict
|
|
2439
|
+
});
|
|
2440
|
+
})();
|
|
2426
2441
|
if (override) {
|
|
2427
2442
|
if (override.modulePath && override.modulePath.length > 0) {
|
|
2428
2443
|
return { kind: "module", group: override.group, modulePath: override.modulePath };
|
|
2429
2444
|
}
|
|
2445
|
+
if (inferred.kind === "module" && inferred.group === override.group) {
|
|
2446
|
+
return inferred;
|
|
2447
|
+
}
|
|
2448
|
+
if (inferred.kind === "group" && inferred.group === override.group) {
|
|
2449
|
+
return inferred;
|
|
2450
|
+
}
|
|
2430
2451
|
return { kind: "group", group: override.group };
|
|
2431
2452
|
}
|
|
2432
|
-
|
|
2433
|
-
if (fileScope.kind !== "root") {
|
|
2434
|
-
return fileScope;
|
|
2435
|
-
}
|
|
2436
|
-
if (options.hoistedFeatureScopingMode !== "directory") {
|
|
2437
|
-
return fileScope;
|
|
2438
|
-
}
|
|
2439
|
-
return resolveHoistedDirectoryScope({
|
|
2440
|
-
featureAbsPath: options.featureAbsPath,
|
|
2441
|
-
hoistedFeatureRootsAbs: options.hoistedFeatureRootsAbs,
|
|
2442
|
-
groupIndex: options.groupIndex,
|
|
2443
|
-
strict: options.hoistedFeatureScopingStrict
|
|
2444
|
-
});
|
|
2453
|
+
return inferred;
|
|
2445
2454
|
}
|
|
2446
2455
|
function isVisibleStepScope(stepScope, featureScope) {
|
|
2447
2456
|
if (featureScope.kind === "root") {
|