rulesync 36.0.1 → 36.0.2
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/index.cjs +37 -24
- package/dist/cli/index.js +37 -24
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.cjs
CHANGED
|
@@ -2548,8 +2548,7 @@ async function prefetchGithubSource(params) {
|
|
|
2548
2548
|
const parsedFromSource = parseSource(sourceEntry.source);
|
|
2549
2549
|
const parsed = {
|
|
2550
2550
|
...parsedFromSource,
|
|
2551
|
-
ref: sourceEntry.ref ?? parsedFromSource.ref
|
|
2552
|
-
path: sourceEntry.path ?? parsedFromSource.path
|
|
2551
|
+
ref: sourceEntry.ref ?? parsedFromSource.ref
|
|
2553
2552
|
};
|
|
2554
2553
|
const locked = getLockedSource(lock, sourceEntry.source);
|
|
2555
2554
|
const ref = await resolvePrefetchRef({
|
|
@@ -2612,7 +2611,7 @@ async function prefetchGithubSkills(params) {
|
|
|
2612
2611
|
}
|
|
2613
2612
|
const skillFilter = sourceEntry.skills ?? ["*"];
|
|
2614
2613
|
const isWildcard = skillFilter.length === 1 && skillFilter[0] === "*";
|
|
2615
|
-
const entries = await withSemaphore(semaphore, () => client.listDirectory(parsed.owner, parsed.repo,
|
|
2614
|
+
const entries = await withSemaphore(semaphore, () => client.listDirectory(parsed.owner, parsed.repo, resolveSkillsSourcePath(sourceEntry), ref));
|
|
2616
2615
|
const skillDirs = entries.filter((entry) => entry.type === "dir" && (isWildcard || skillFilter.includes(entry.name)));
|
|
2617
2616
|
const useRootFallback = shouldUseRootFallback({
|
|
2618
2617
|
skillFilter,
|
|
@@ -2687,7 +2686,7 @@ async function prefetchGithubRules(params) {
|
|
|
2687
2686
|
claim.settle(getLockedRuleNames(locked));
|
|
2688
2687
|
return;
|
|
2689
2688
|
}
|
|
2690
|
-
const entries = await withSemaphore(context.semaphore, () => context.client.listDirectory(parsed.owner, parsed.repo, sourceEntry
|
|
2689
|
+
const entries = await withSemaphore(context.semaphore, () => context.client.listDirectory(parsed.owner, parsed.repo, resolveRulesSourcePath(sourceEntry), ref));
|
|
2691
2690
|
const ruleFilter = (sourceEntry.rules ?? []).map(normalizeRuleFilterName);
|
|
2692
2691
|
const isWildcard = ruleFilter.length === 1 && ruleFilter[0] === "*";
|
|
2693
2692
|
const files = entries.filter((entry) => {
|
|
@@ -3532,16 +3531,31 @@ async function canReuseLockedSkills(params) {
|
|
|
3532
3531
|
}) && await checkLockedSkillsExist(curatedDir, lockedSkillNames);
|
|
3533
3532
|
}
|
|
3534
3533
|
/**
|
|
3535
|
-
* The
|
|
3534
|
+
* The path the skills of a source are read from, as declared: the source's
|
|
3536
3535
|
* `path`, else (for the github transport) the path embedded in the source
|
|
3537
|
-
* spec, else `skills`.
|
|
3536
|
+
* spec, else `skills`. Every transport fetches from this path, and the
|
|
3537
|
+
* lockfile records its normalized form ({@link resolveSkillsPath}), so the
|
|
3538
|
+
* fetch and the lock comparison cannot pick different paths.
|
|
3538
3539
|
*/
|
|
3539
|
-
function
|
|
3540
|
+
function resolveSkillsSourcePath(sourceEntry) {
|
|
3540
3541
|
const embeddedPath = (sourceEntry.transport ?? "github") === "github" ? parseSource(sourceEntry.source).path : void 0;
|
|
3541
|
-
return
|
|
3542
|
+
return sourceEntry.path ?? embeddedPath ?? "skills";
|
|
3543
|
+
}
|
|
3544
|
+
/** The skills path of a source in the form the lockfile records and compares. */
|
|
3545
|
+
function resolveSkillsPath(sourceEntry) {
|
|
3546
|
+
return normalizeSourceDirPath(resolveSkillsSourcePath(sourceEntry));
|
|
3542
3547
|
}
|
|
3543
|
-
|
|
3544
|
-
|
|
3548
|
+
/**
|
|
3549
|
+
* The path the rules of a source are read from, as declared: the source's
|
|
3550
|
+
* `rulesPath`, else `rules`. The rules counterpart of
|
|
3551
|
+
* {@link resolveSkillsSourcePath}.
|
|
3552
|
+
*/
|
|
3553
|
+
function resolveRulesSourcePath(sourceEntry) {
|
|
3554
|
+
return sourceEntry.rulesPath ?? "rules";
|
|
3555
|
+
}
|
|
3556
|
+
/** The rules path of a source in the form the lockfile records and compares. */
|
|
3557
|
+
function resolveRulesPath(sourceEntry) {
|
|
3558
|
+
return normalizeSourceDirPath(resolveRulesSourcePath(sourceEntry));
|
|
3545
3559
|
}
|
|
3546
3560
|
/**
|
|
3547
3561
|
* The form a source directory path is recorded in the lockfile and compared
|
|
@@ -3554,7 +3568,7 @@ function lockedRuleConfigMatches(params) {
|
|
|
3554
3568
|
const rules = getSourceFilters(params.sourceEntry).rules;
|
|
3555
3569
|
if (rules === void 0 || params.locked.ruleSelection === void 0) return false;
|
|
3556
3570
|
const selection = normalizeRuleSelection(rules);
|
|
3557
|
-
return selection.length === params.locked.ruleSelection.length && selection.every((ruleName, index) => ruleName === params.locked.ruleSelection?.[index]) &&
|
|
3571
|
+
return selection.length === params.locked.ruleSelection.length && selection.every((ruleName, index) => ruleName === params.locked.ruleSelection?.[index]) && resolveRulesPath(params.sourceEntry) === params.locked.rulesPath;
|
|
3558
3572
|
}
|
|
3559
3573
|
function assertMatchingRulesFound(params) {
|
|
3560
3574
|
if (params.ruleNames.length === 0) throw new Error(`No matching rules found in ${params.source}.`);
|
|
@@ -3600,7 +3614,7 @@ async function fetchRulesViaGithub(params) {
|
|
|
3600
3614
|
}
|
|
3601
3615
|
const ruleFilter = (sourceEntry.rules ?? []).map(normalizeRuleFilterName);
|
|
3602
3616
|
const isWildcard = ruleFilter.length === 1 && ruleFilter[0] === "*";
|
|
3603
|
-
const rulesPath = sourceEntry
|
|
3617
|
+
const rulesPath = resolveRulesSourcePath(sourceEntry);
|
|
3604
3618
|
let entries;
|
|
3605
3619
|
try {
|
|
3606
3620
|
entries = await client.listDirectory(parsed.owner, parsed.repo, rulesPath, ref);
|
|
@@ -3655,7 +3669,7 @@ async function fetchRulesViaGithub(params) {
|
|
|
3655
3669
|
requestedRef,
|
|
3656
3670
|
resolvedRef: resolvedSha,
|
|
3657
3671
|
ruleSelection: normalizeRuleSelection(sourceEntry.rules ?? []),
|
|
3658
|
-
rulesPath:
|
|
3672
|
+
rulesPath: resolveRulesPath(sourceEntry),
|
|
3659
3673
|
resolvedRuleNames: remoteRuleNames,
|
|
3660
3674
|
logger
|
|
3661
3675
|
});
|
|
@@ -3700,7 +3714,7 @@ async function fetchRulesViaGit(params) {
|
|
|
3700
3714
|
url: sourceKey,
|
|
3701
3715
|
ref: requestedRef,
|
|
3702
3716
|
resolvedRef,
|
|
3703
|
-
skillsPath: sourceEntry
|
|
3717
|
+
skillsPath: resolveRulesSourcePath(sourceEntry),
|
|
3704
3718
|
logger
|
|
3705
3719
|
});
|
|
3706
3720
|
const ruleFilter = (sourceEntry.rules ?? []).map(normalizeRuleFilterName);
|
|
@@ -3733,7 +3747,7 @@ async function fetchRulesViaGit(params) {
|
|
|
3733
3747
|
requestedRef,
|
|
3734
3748
|
resolvedRef,
|
|
3735
3749
|
ruleSelection: normalizeRuleSelection(sourceEntry.rules ?? []),
|
|
3736
|
-
rulesPath:
|
|
3750
|
+
rulesPath: resolveRulesPath(sourceEntry),
|
|
3737
3751
|
resolvedRuleNames: remoteRuleNames,
|
|
3738
3752
|
logger
|
|
3739
3753
|
});
|
|
@@ -3880,8 +3894,7 @@ async function fetchGithubSkillDir(params) {
|
|
|
3880
3894
|
* names already written into `fetchedSkills`.
|
|
3881
3895
|
*/
|
|
3882
3896
|
async function discoverGithubSkillDirs(params) {
|
|
3883
|
-
const { parsed, ref, resolvedSha, skillFilter, isWildcard, curatedDir, locked, sourceKey, localSkillNames, alreadyFetchedSkillNames, client, semaphore, getExecutablePaths, fetchedSkills, logger } = params;
|
|
3884
|
-
const skillsBasePath = parsed.path ?? "skills";
|
|
3897
|
+
const { parsed, skillsBasePath, ref, resolvedSha, skillFilter, isWildcard, curatedDir, locked, sourceKey, localSkillNames, alreadyFetchedSkillNames, client, semaphore, getExecutablePaths, fetchedSkills, logger } = params;
|
|
3885
3898
|
try {
|
|
3886
3899
|
const entries = await client.listDirectory(parsed.owner, parsed.repo, skillsBasePath, ref);
|
|
3887
3900
|
const remoteSkillDirs = entries.filter((e) => e.type === "dir").map((e) => ({
|
|
@@ -3946,8 +3959,7 @@ async function fetchSource(params) {
|
|
|
3946
3959
|
const parsedFromSource = parseSource(sourceEntry.source);
|
|
3947
3960
|
const parsed = {
|
|
3948
3961
|
...parsedFromSource,
|
|
3949
|
-
ref: sourceEntry.ref ?? parsedFromSource.ref
|
|
3950
|
-
path: sourceEntry.path ?? parsedFromSource.path
|
|
3962
|
+
ref: sourceEntry.ref ?? parsedFromSource.ref
|
|
3951
3963
|
};
|
|
3952
3964
|
if (parsed.provider === "gitlab") throw new Error(`GitLab sources are not yet supported: "${sourceEntry.source}".`);
|
|
3953
3965
|
const sourceKey = sourceEntry.source;
|
|
@@ -3991,6 +4003,7 @@ async function fetchSource(params) {
|
|
|
3991
4003
|
const fetchedSkills = {};
|
|
3992
4004
|
const discovery = await discoverGithubSkillDirs({
|
|
3993
4005
|
parsed,
|
|
4006
|
+
skillsBasePath: resolveSkillsSourcePath(sourceEntry),
|
|
3994
4007
|
ref,
|
|
3995
4008
|
resolvedSha,
|
|
3996
4009
|
skillFilter,
|
|
@@ -4103,7 +4116,7 @@ async function fetchSourceViaGit(params) {
|
|
|
4103
4116
|
url,
|
|
4104
4117
|
ref: requestedRef,
|
|
4105
4118
|
resolvedRef: resolvedSha,
|
|
4106
|
-
skillsPath: sourceEntry
|
|
4119
|
+
skillsPath: resolveSkillsSourcePath(sourceEntry),
|
|
4107
4120
|
logger
|
|
4108
4121
|
}),
|
|
4109
4122
|
skillFilter,
|
|
@@ -4327,7 +4340,7 @@ function buildNpmLockEntry(params) {
|
|
|
4327
4340
|
...sourceEntry.rules !== void 0 && {
|
|
4328
4341
|
rules: mergedRules,
|
|
4329
4342
|
ruleSelection: normalizeRuleSelection(sourceEntry.rules),
|
|
4330
|
-
rulesPath:
|
|
4343
|
+
rulesPath: resolveRulesPath(sourceEntry),
|
|
4331
4344
|
resolvedRuleNames
|
|
4332
4345
|
}
|
|
4333
4346
|
};
|
|
@@ -4342,7 +4355,7 @@ async function fetchNpmSkills(params) {
|
|
|
4342
4355
|
const declaredWildcard = skillFilter.length === 1 && skillFilter[0] === "*";
|
|
4343
4356
|
const selectedFiles = selectNpmSkillFiles({
|
|
4344
4357
|
allFiles,
|
|
4345
|
-
skillsPath: sourceEntry
|
|
4358
|
+
skillsPath: resolveSkillsSourcePath(sourceEntry),
|
|
4346
4359
|
skillFilter,
|
|
4347
4360
|
isWildcard: declaredWildcard,
|
|
4348
4361
|
packageName
|
|
@@ -4390,7 +4403,7 @@ async function fetchNpmRules(params) {
|
|
|
4390
4403
|
resolvedRuleNames: []
|
|
4391
4404
|
};
|
|
4392
4405
|
const { allFiles, sourceEntry, packageName, lockedForIntegrityCheck, lockedRuleNames, curatedRulesDir, localRuleNames, alreadyFetchedRuleNames, resolvedVersion, updateSources, logger } = params;
|
|
4393
|
-
const normalizedRulesPath =
|
|
4406
|
+
const normalizedRulesPath = resolveRulesPath(sourceEntry);
|
|
4394
4407
|
const rulePrefix = normalizedRulesPath === "." ? "" : `${normalizedRulesPath}/`;
|
|
4395
4408
|
const ruleFilter = (sourceEntry.rules ?? []).map(normalizeRuleFilterName);
|
|
4396
4409
|
const isWildcard = ruleFilter.length === 1 && ruleFilter[0] === "*";
|
|
@@ -14090,7 +14103,7 @@ function wrapCommand$1({ name, errorCode, handler, getVersion, loggerFactory = c
|
|
|
14090
14103
|
}
|
|
14091
14104
|
//#endregion
|
|
14092
14105
|
//#region src/cli/program.ts
|
|
14093
|
-
const getVersion = () => "36.0.
|
|
14106
|
+
const getVersion = () => "36.0.2";
|
|
14094
14107
|
const FEATURES_HELP = `${require_import.ALL_FEATURES.join(",")}; ignore is deprecated, use permissions`;
|
|
14095
14108
|
function wrapCommand(name, errorCode, handler) {
|
|
14096
14109
|
return wrapCommand$1({
|
package/dist/cli/index.js
CHANGED
|
@@ -2545,8 +2545,7 @@ async function prefetchGithubSource(params) {
|
|
|
2545
2545
|
const parsedFromSource = parseSource(sourceEntry.source);
|
|
2546
2546
|
const parsed = {
|
|
2547
2547
|
...parsedFromSource,
|
|
2548
|
-
ref: sourceEntry.ref ?? parsedFromSource.ref
|
|
2549
|
-
path: sourceEntry.path ?? parsedFromSource.path
|
|
2548
|
+
ref: sourceEntry.ref ?? parsedFromSource.ref
|
|
2550
2549
|
};
|
|
2551
2550
|
const locked = getLockedSource(lock, sourceEntry.source);
|
|
2552
2551
|
const ref = await resolvePrefetchRef({
|
|
@@ -2609,7 +2608,7 @@ async function prefetchGithubSkills(params) {
|
|
|
2609
2608
|
}
|
|
2610
2609
|
const skillFilter = sourceEntry.skills ?? ["*"];
|
|
2611
2610
|
const isWildcard = skillFilter.length === 1 && skillFilter[0] === "*";
|
|
2612
|
-
const entries = await withSemaphore(semaphore, () => client.listDirectory(parsed.owner, parsed.repo,
|
|
2611
|
+
const entries = await withSemaphore(semaphore, () => client.listDirectory(parsed.owner, parsed.repo, resolveSkillsSourcePath(sourceEntry), ref));
|
|
2613
2612
|
const skillDirs = entries.filter((entry) => entry.type === "dir" && (isWildcard || skillFilter.includes(entry.name)));
|
|
2614
2613
|
const useRootFallback = shouldUseRootFallback({
|
|
2615
2614
|
skillFilter,
|
|
@@ -2684,7 +2683,7 @@ async function prefetchGithubRules(params) {
|
|
|
2684
2683
|
claim.settle(getLockedRuleNames(locked));
|
|
2685
2684
|
return;
|
|
2686
2685
|
}
|
|
2687
|
-
const entries = await withSemaphore(context.semaphore, () => context.client.listDirectory(parsed.owner, parsed.repo, sourceEntry
|
|
2686
|
+
const entries = await withSemaphore(context.semaphore, () => context.client.listDirectory(parsed.owner, parsed.repo, resolveRulesSourcePath(sourceEntry), ref));
|
|
2688
2687
|
const ruleFilter = (sourceEntry.rules ?? []).map(normalizeRuleFilterName);
|
|
2689
2688
|
const isWildcard = ruleFilter.length === 1 && ruleFilter[0] === "*";
|
|
2690
2689
|
const files = entries.filter((entry) => {
|
|
@@ -3529,16 +3528,31 @@ async function canReuseLockedSkills(params) {
|
|
|
3529
3528
|
}) && await checkLockedSkillsExist(curatedDir, lockedSkillNames);
|
|
3530
3529
|
}
|
|
3531
3530
|
/**
|
|
3532
|
-
* The
|
|
3531
|
+
* The path the skills of a source are read from, as declared: the source's
|
|
3533
3532
|
* `path`, else (for the github transport) the path embedded in the source
|
|
3534
|
-
* spec, else `skills`.
|
|
3533
|
+
* spec, else `skills`. Every transport fetches from this path, and the
|
|
3534
|
+
* lockfile records its normalized form ({@link resolveSkillsPath}), so the
|
|
3535
|
+
* fetch and the lock comparison cannot pick different paths.
|
|
3535
3536
|
*/
|
|
3536
|
-
function
|
|
3537
|
+
function resolveSkillsSourcePath(sourceEntry) {
|
|
3537
3538
|
const embeddedPath = (sourceEntry.transport ?? "github") === "github" ? parseSource(sourceEntry.source).path : void 0;
|
|
3538
|
-
return
|
|
3539
|
+
return sourceEntry.path ?? embeddedPath ?? "skills";
|
|
3540
|
+
}
|
|
3541
|
+
/** The skills path of a source in the form the lockfile records and compares. */
|
|
3542
|
+
function resolveSkillsPath(sourceEntry) {
|
|
3543
|
+
return normalizeSourceDirPath(resolveSkillsSourcePath(sourceEntry));
|
|
3539
3544
|
}
|
|
3540
|
-
|
|
3541
|
-
|
|
3545
|
+
/**
|
|
3546
|
+
* The path the rules of a source are read from, as declared: the source's
|
|
3547
|
+
* `rulesPath`, else `rules`. The rules counterpart of
|
|
3548
|
+
* {@link resolveSkillsSourcePath}.
|
|
3549
|
+
*/
|
|
3550
|
+
function resolveRulesSourcePath(sourceEntry) {
|
|
3551
|
+
return sourceEntry.rulesPath ?? "rules";
|
|
3552
|
+
}
|
|
3553
|
+
/** The rules path of a source in the form the lockfile records and compares. */
|
|
3554
|
+
function resolveRulesPath(sourceEntry) {
|
|
3555
|
+
return normalizeSourceDirPath(resolveRulesSourcePath(sourceEntry));
|
|
3542
3556
|
}
|
|
3543
3557
|
/**
|
|
3544
3558
|
* The form a source directory path is recorded in the lockfile and compared
|
|
@@ -3551,7 +3565,7 @@ function lockedRuleConfigMatches(params) {
|
|
|
3551
3565
|
const rules = getSourceFilters(params.sourceEntry).rules;
|
|
3552
3566
|
if (rules === void 0 || params.locked.ruleSelection === void 0) return false;
|
|
3553
3567
|
const selection = normalizeRuleSelection(rules);
|
|
3554
|
-
return selection.length === params.locked.ruleSelection.length && selection.every((ruleName, index) => ruleName === params.locked.ruleSelection?.[index]) &&
|
|
3568
|
+
return selection.length === params.locked.ruleSelection.length && selection.every((ruleName, index) => ruleName === params.locked.ruleSelection?.[index]) && resolveRulesPath(params.sourceEntry) === params.locked.rulesPath;
|
|
3555
3569
|
}
|
|
3556
3570
|
function assertMatchingRulesFound(params) {
|
|
3557
3571
|
if (params.ruleNames.length === 0) throw new Error(`No matching rules found in ${params.source}.`);
|
|
@@ -3597,7 +3611,7 @@ async function fetchRulesViaGithub(params) {
|
|
|
3597
3611
|
}
|
|
3598
3612
|
const ruleFilter = (sourceEntry.rules ?? []).map(normalizeRuleFilterName);
|
|
3599
3613
|
const isWildcard = ruleFilter.length === 1 && ruleFilter[0] === "*";
|
|
3600
|
-
const rulesPath = sourceEntry
|
|
3614
|
+
const rulesPath = resolveRulesSourcePath(sourceEntry);
|
|
3601
3615
|
let entries;
|
|
3602
3616
|
try {
|
|
3603
3617
|
entries = await client.listDirectory(parsed.owner, parsed.repo, rulesPath, ref);
|
|
@@ -3652,7 +3666,7 @@ async function fetchRulesViaGithub(params) {
|
|
|
3652
3666
|
requestedRef,
|
|
3653
3667
|
resolvedRef: resolvedSha,
|
|
3654
3668
|
ruleSelection: normalizeRuleSelection(sourceEntry.rules ?? []),
|
|
3655
|
-
rulesPath:
|
|
3669
|
+
rulesPath: resolveRulesPath(sourceEntry),
|
|
3656
3670
|
resolvedRuleNames: remoteRuleNames,
|
|
3657
3671
|
logger
|
|
3658
3672
|
});
|
|
@@ -3697,7 +3711,7 @@ async function fetchRulesViaGit(params) {
|
|
|
3697
3711
|
url: sourceKey,
|
|
3698
3712
|
ref: requestedRef,
|
|
3699
3713
|
resolvedRef,
|
|
3700
|
-
skillsPath: sourceEntry
|
|
3714
|
+
skillsPath: resolveRulesSourcePath(sourceEntry),
|
|
3701
3715
|
logger
|
|
3702
3716
|
});
|
|
3703
3717
|
const ruleFilter = (sourceEntry.rules ?? []).map(normalizeRuleFilterName);
|
|
@@ -3730,7 +3744,7 @@ async function fetchRulesViaGit(params) {
|
|
|
3730
3744
|
requestedRef,
|
|
3731
3745
|
resolvedRef,
|
|
3732
3746
|
ruleSelection: normalizeRuleSelection(sourceEntry.rules ?? []),
|
|
3733
|
-
rulesPath:
|
|
3747
|
+
rulesPath: resolveRulesPath(sourceEntry),
|
|
3734
3748
|
resolvedRuleNames: remoteRuleNames,
|
|
3735
3749
|
logger
|
|
3736
3750
|
});
|
|
@@ -3877,8 +3891,7 @@ async function fetchGithubSkillDir(params) {
|
|
|
3877
3891
|
* names already written into `fetchedSkills`.
|
|
3878
3892
|
*/
|
|
3879
3893
|
async function discoverGithubSkillDirs(params) {
|
|
3880
|
-
const { parsed, ref, resolvedSha, skillFilter, isWildcard, curatedDir, locked, sourceKey, localSkillNames, alreadyFetchedSkillNames, client, semaphore, getExecutablePaths, fetchedSkills, logger } = params;
|
|
3881
|
-
const skillsBasePath = parsed.path ?? "skills";
|
|
3894
|
+
const { parsed, skillsBasePath, ref, resolvedSha, skillFilter, isWildcard, curatedDir, locked, sourceKey, localSkillNames, alreadyFetchedSkillNames, client, semaphore, getExecutablePaths, fetchedSkills, logger } = params;
|
|
3882
3895
|
try {
|
|
3883
3896
|
const entries = await client.listDirectory(parsed.owner, parsed.repo, skillsBasePath, ref);
|
|
3884
3897
|
const remoteSkillDirs = entries.filter((e) => e.type === "dir").map((e) => ({
|
|
@@ -3943,8 +3956,7 @@ async function fetchSource(params) {
|
|
|
3943
3956
|
const parsedFromSource = parseSource(sourceEntry.source);
|
|
3944
3957
|
const parsed = {
|
|
3945
3958
|
...parsedFromSource,
|
|
3946
|
-
ref: sourceEntry.ref ?? parsedFromSource.ref
|
|
3947
|
-
path: sourceEntry.path ?? parsedFromSource.path
|
|
3959
|
+
ref: sourceEntry.ref ?? parsedFromSource.ref
|
|
3948
3960
|
};
|
|
3949
3961
|
if (parsed.provider === "gitlab") throw new Error(`GitLab sources are not yet supported: "${sourceEntry.source}".`);
|
|
3950
3962
|
const sourceKey = sourceEntry.source;
|
|
@@ -3988,6 +4000,7 @@ async function fetchSource(params) {
|
|
|
3988
4000
|
const fetchedSkills = {};
|
|
3989
4001
|
const discovery = await discoverGithubSkillDirs({
|
|
3990
4002
|
parsed,
|
|
4003
|
+
skillsBasePath: resolveSkillsSourcePath(sourceEntry),
|
|
3991
4004
|
ref,
|
|
3992
4005
|
resolvedSha,
|
|
3993
4006
|
skillFilter,
|
|
@@ -4100,7 +4113,7 @@ async function fetchSourceViaGit(params) {
|
|
|
4100
4113
|
url,
|
|
4101
4114
|
ref: requestedRef,
|
|
4102
4115
|
resolvedRef: resolvedSha,
|
|
4103
|
-
skillsPath: sourceEntry
|
|
4116
|
+
skillsPath: resolveSkillsSourcePath(sourceEntry),
|
|
4104
4117
|
logger
|
|
4105
4118
|
}),
|
|
4106
4119
|
skillFilter,
|
|
@@ -4324,7 +4337,7 @@ function buildNpmLockEntry(params) {
|
|
|
4324
4337
|
...sourceEntry.rules !== void 0 && {
|
|
4325
4338
|
rules: mergedRules,
|
|
4326
4339
|
ruleSelection: normalizeRuleSelection(sourceEntry.rules),
|
|
4327
|
-
rulesPath:
|
|
4340
|
+
rulesPath: resolveRulesPath(sourceEntry),
|
|
4328
4341
|
resolvedRuleNames
|
|
4329
4342
|
}
|
|
4330
4343
|
};
|
|
@@ -4339,7 +4352,7 @@ async function fetchNpmSkills(params) {
|
|
|
4339
4352
|
const declaredWildcard = skillFilter.length === 1 && skillFilter[0] === "*";
|
|
4340
4353
|
const selectedFiles = selectNpmSkillFiles({
|
|
4341
4354
|
allFiles,
|
|
4342
|
-
skillsPath: sourceEntry
|
|
4355
|
+
skillsPath: resolveSkillsSourcePath(sourceEntry),
|
|
4343
4356
|
skillFilter,
|
|
4344
4357
|
isWildcard: declaredWildcard,
|
|
4345
4358
|
packageName
|
|
@@ -4387,7 +4400,7 @@ async function fetchNpmRules(params) {
|
|
|
4387
4400
|
resolvedRuleNames: []
|
|
4388
4401
|
};
|
|
4389
4402
|
const { allFiles, sourceEntry, packageName, lockedForIntegrityCheck, lockedRuleNames, curatedRulesDir, localRuleNames, alreadyFetchedRuleNames, resolvedVersion, updateSources, logger } = params;
|
|
4390
|
-
const normalizedRulesPath =
|
|
4403
|
+
const normalizedRulesPath = resolveRulesPath(sourceEntry);
|
|
4391
4404
|
const rulePrefix = normalizedRulesPath === "." ? "" : `${normalizedRulesPath}/`;
|
|
4392
4405
|
const ruleFilter = (sourceEntry.rules ?? []).map(normalizeRuleFilterName);
|
|
4393
4406
|
const isWildcard = ruleFilter.length === 1 && ruleFilter[0] === "*";
|
|
@@ -14087,7 +14100,7 @@ function wrapCommand$1({ name, errorCode, handler, getVersion, loggerFactory = c
|
|
|
14087
14100
|
}
|
|
14088
14101
|
//#endregion
|
|
14089
14102
|
//#region src/cli/program.ts
|
|
14090
|
-
const getVersion = () => "36.0.
|
|
14103
|
+
const getVersion = () => "36.0.2";
|
|
14091
14104
|
const FEATURES_HELP = `${ALL_FEATURES.join(",")}; ignore is deprecated, use permissions`;
|
|
14092
14105
|
function wrapCommand(name, errorCode, handler) {
|
|
14093
14106
|
return wrapCommand$1({
|