@theholocron/cli 5.0.0-alpha.548 → 5.0.0-alpha.549
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.mjs +8 -2
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +12 -4
- package/package.json +10 -10
package/dist/cli.mjs
CHANGED
|
@@ -7700,6 +7700,12 @@ function areaLabelDefs(areas) {
|
|
|
7700
7700
|
});
|
|
7701
7701
|
}
|
|
7702
7702
|
// src/area-labels/path-matches/path-matches.ts
|
|
7703
|
+
/** `value` without the slashes at its end. A scan from the end, not a pattern, so a long run of slashes costs one pass. */
|
|
7704
|
+
function withoutTrailingSlashes(value) {
|
|
7705
|
+
let end = value.length;
|
|
7706
|
+
while (end > 0 && value[end - 1] === "/") end -= 1;
|
|
7707
|
+
return value.slice(0, end);
|
|
7708
|
+
}
|
|
7703
7709
|
/** Turns one glob into the expression a whole path must match: `**` crosses folders, `*` and `?` stay in one. */
|
|
7704
7710
|
function globToRegExp(glob) {
|
|
7705
7711
|
let out = "";
|
|
@@ -7724,7 +7730,7 @@ function globToRegExp(glob) {
|
|
|
7724
7730
|
function pathMatches(path, pattern) {
|
|
7725
7731
|
const clean = path.replace(/^\.?\//, "");
|
|
7726
7732
|
if (/[*?]/.test(pattern)) return globToRegExp(pattern.replace(/^\.?\//, "")).test(clean);
|
|
7727
|
-
const plain = pattern.replace(/^\.?\//, "")
|
|
7733
|
+
const plain = withoutTrailingSlashes(pattern.replace(/^\.?\//, ""));
|
|
7728
7734
|
return clean === plain || clean.startsWith(`${plain}/`);
|
|
7729
7735
|
}
|
|
7730
7736
|
// src/area-labels/area-labels-for-files/area-labels-for-files.ts
|
|
@@ -16938,7 +16944,7 @@ function realReleasesIo(repoRoot, deps = defaultDeps$1) {
|
|
|
16938
16944
|
},
|
|
16939
16945
|
packages: (scope) => [...deps.discover(repoRoot, scope)],
|
|
16940
16946
|
distTags: async (name) => {
|
|
16941
|
-
const response = await deps.fetch(`${REGISTRY}/-/package/${name.
|
|
16947
|
+
const response = await deps.fetch(`${REGISTRY}/-/package/${name.split("/").join("%2f")}/dist-tags`);
|
|
16942
16948
|
if (response.status === 404 || response.status === 401) return void 0;
|
|
16943
16949
|
if (!response.ok) throw new Error(`npm answered ${response.status} for ${name}`);
|
|
16944
16950
|
return await response.json();
|