@kitschpatrol/repo-config 5.7.0 → 5.7.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/bin/cli.js +151 -69
- package/package.json +3 -3
package/bin/cli.js
CHANGED
|
@@ -11084,7 +11084,7 @@ var Yargs = YargsFactory(esm_default);
|
|
|
11084
11084
|
var yargs_default = Yargs;
|
|
11085
11085
|
|
|
11086
11086
|
// ../../package.json
|
|
11087
|
-
var version = "5.7.
|
|
11087
|
+
var version = "5.7.2";
|
|
11088
11088
|
|
|
11089
11089
|
// ../../src/execa-utilities.ts
|
|
11090
11090
|
function isErrorExecaError(error) {
|
|
@@ -11704,14 +11704,15 @@ var DESCRIPTION = {
|
|
|
11704
11704
|
packageSearch: "Package-scoped."
|
|
11705
11705
|
};
|
|
11706
11706
|
|
|
11707
|
-
// ../../node_modules/.pnpm/globby@
|
|
11707
|
+
// ../../node_modules/.pnpm/globby@15.0.0/node_modules/globby/index.js
|
|
11708
11708
|
import process5 from "node:process";
|
|
11709
11709
|
import fs6 from "node:fs";
|
|
11710
11710
|
import nodePath from "node:path";
|
|
11711
|
+
import { Readable } from "node:stream";
|
|
11711
11712
|
|
|
11712
|
-
// ../../node_modules/.pnpm/@sindresorhus+merge-streams@
|
|
11713
|
+
// ../../node_modules/.pnpm/@sindresorhus+merge-streams@4.0.0/node_modules/@sindresorhus/merge-streams/index.js
|
|
11713
11714
|
import { on, once } from "node:events";
|
|
11714
|
-
import { PassThrough as PassThroughStream } from "node:stream";
|
|
11715
|
+
import { PassThrough as PassThroughStream, getDefaultHighWaterMark } from "node:stream";
|
|
11715
11716
|
import { finished } from "node:stream/promises";
|
|
11716
11717
|
function mergeStreams(streams) {
|
|
11717
11718
|
if (!Array.isArray(streams)) {
|
|
@@ -11730,14 +11731,11 @@ function mergeStreams(streams) {
|
|
|
11730
11731
|
for (const stream of streams) {
|
|
11731
11732
|
passThroughStream.add(stream);
|
|
11732
11733
|
}
|
|
11733
|
-
if (streams.length === 0) {
|
|
11734
|
-
endStream(passThroughStream);
|
|
11735
|
-
}
|
|
11736
11734
|
return passThroughStream;
|
|
11737
11735
|
}
|
|
11738
11736
|
var getHighWaterMark = (streams, objectMode) => {
|
|
11739
11737
|
if (streams.length === 0) {
|
|
11740
|
-
return
|
|
11738
|
+
return getDefaultHighWaterMark(objectMode);
|
|
11741
11739
|
}
|
|
11742
11740
|
const highWaterMarks = streams.filter(({ readableObjectMode }) => readableObjectMode === objectMode).map(({ readableHighWaterMark }) => readableHighWaterMark);
|
|
11743
11741
|
return Math.max(...highWaterMarks);
|
|
@@ -11747,39 +11745,49 @@ var MergedStream = class extends PassThroughStream {
|
|
|
11747
11745
|
#ended = /* @__PURE__ */ new Set([]);
|
|
11748
11746
|
#aborted = /* @__PURE__ */ new Set([]);
|
|
11749
11747
|
#onFinished;
|
|
11748
|
+
#unpipeEvent = Symbol("unpipe");
|
|
11749
|
+
#streamPromises = /* @__PURE__ */ new WeakMap();
|
|
11750
11750
|
add(stream) {
|
|
11751
11751
|
validateStream(stream);
|
|
11752
11752
|
if (this.#streams.has(stream)) {
|
|
11753
11753
|
return;
|
|
11754
11754
|
}
|
|
11755
11755
|
this.#streams.add(stream);
|
|
11756
|
-
this.#onFinished ??= onMergedStreamFinished(this, this.#streams);
|
|
11757
|
-
endWhenStreamsDone({
|
|
11756
|
+
this.#onFinished ??= onMergedStreamFinished(this, this.#streams, this.#unpipeEvent);
|
|
11757
|
+
const streamPromise = endWhenStreamsDone({
|
|
11758
11758
|
passThroughStream: this,
|
|
11759
11759
|
stream,
|
|
11760
11760
|
streams: this.#streams,
|
|
11761
11761
|
ended: this.#ended,
|
|
11762
11762
|
aborted: this.#aborted,
|
|
11763
|
-
onFinished: this.#onFinished
|
|
11763
|
+
onFinished: this.#onFinished,
|
|
11764
|
+
unpipeEvent: this.#unpipeEvent
|
|
11764
11765
|
});
|
|
11766
|
+
this.#streamPromises.set(stream, streamPromise);
|
|
11765
11767
|
stream.pipe(this, { end: false });
|
|
11766
11768
|
}
|
|
11767
|
-
remove(stream) {
|
|
11769
|
+
async remove(stream) {
|
|
11768
11770
|
validateStream(stream);
|
|
11769
11771
|
if (!this.#streams.has(stream)) {
|
|
11770
11772
|
return false;
|
|
11771
11773
|
}
|
|
11774
|
+
const streamPromise = this.#streamPromises.get(stream);
|
|
11775
|
+
if (streamPromise === void 0) {
|
|
11776
|
+
return false;
|
|
11777
|
+
}
|
|
11778
|
+
this.#streamPromises.delete(stream);
|
|
11772
11779
|
stream.unpipe(this);
|
|
11780
|
+
await streamPromise;
|
|
11773
11781
|
return true;
|
|
11774
11782
|
}
|
|
11775
11783
|
};
|
|
11776
|
-
var onMergedStreamFinished = async (passThroughStream, streams) => {
|
|
11784
|
+
var onMergedStreamFinished = async (passThroughStream, streams, unpipeEvent) => {
|
|
11777
11785
|
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_COUNT);
|
|
11778
11786
|
const controller = new AbortController();
|
|
11779
11787
|
try {
|
|
11780
11788
|
await Promise.race([
|
|
11781
11789
|
onMergedStreamEnd(passThroughStream, controller),
|
|
11782
|
-
onInputStreamsUnpipe(passThroughStream, streams, controller)
|
|
11790
|
+
onInputStreamsUnpipe(passThroughStream, streams, unpipeEvent, controller)
|
|
11783
11791
|
]);
|
|
11784
11792
|
} finally {
|
|
11785
11793
|
controller.abort();
|
|
@@ -11787,9 +11795,14 @@ var onMergedStreamFinished = async (passThroughStream, streams) => {
|
|
|
11787
11795
|
}
|
|
11788
11796
|
};
|
|
11789
11797
|
var onMergedStreamEnd = async (passThroughStream, { signal }) => {
|
|
11790
|
-
|
|
11798
|
+
try {
|
|
11799
|
+
await finished(passThroughStream, { signal, cleanup: true });
|
|
11800
|
+
} catch (error) {
|
|
11801
|
+
errorOrAbortStream(passThroughStream, error);
|
|
11802
|
+
throw error;
|
|
11803
|
+
}
|
|
11791
11804
|
};
|
|
11792
|
-
var onInputStreamsUnpipe = async (passThroughStream, streams, { signal }) => {
|
|
11805
|
+
var onInputStreamsUnpipe = async (passThroughStream, streams, unpipeEvent, { signal }) => {
|
|
11793
11806
|
for await (const [unpipedStream] of on(passThroughStream, "unpipe", { signal })) {
|
|
11794
11807
|
if (streams.has(unpipedStream)) {
|
|
11795
11808
|
unpipedStream.emit(unpipeEvent);
|
|
@@ -11801,20 +11814,34 @@ var validateStream = (stream) => {
|
|
|
11801
11814
|
throw new TypeError(`Expected a readable stream, got: \`${typeof stream}\`.`);
|
|
11802
11815
|
}
|
|
11803
11816
|
};
|
|
11804
|
-
var endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted, onFinished }) => {
|
|
11817
|
+
var endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted, onFinished, unpipeEvent }) => {
|
|
11805
11818
|
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
11806
11819
|
const controller = new AbortController();
|
|
11807
11820
|
try {
|
|
11808
11821
|
await Promise.race([
|
|
11809
|
-
afterMergedStreamFinished(onFinished, stream),
|
|
11810
|
-
onInputStreamEnd({
|
|
11811
|
-
|
|
11822
|
+
afterMergedStreamFinished(onFinished, stream, controller),
|
|
11823
|
+
onInputStreamEnd({
|
|
11824
|
+
passThroughStream,
|
|
11825
|
+
stream,
|
|
11826
|
+
streams,
|
|
11827
|
+
ended,
|
|
11828
|
+
aborted,
|
|
11829
|
+
controller
|
|
11830
|
+
}),
|
|
11831
|
+
onInputStreamUnpipe({
|
|
11832
|
+
stream,
|
|
11833
|
+
streams,
|
|
11834
|
+
ended,
|
|
11835
|
+
aborted,
|
|
11836
|
+
unpipeEvent,
|
|
11837
|
+
controller
|
|
11838
|
+
})
|
|
11812
11839
|
]);
|
|
11813
11840
|
} finally {
|
|
11814
11841
|
controller.abort();
|
|
11815
11842
|
updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
11816
11843
|
}
|
|
11817
|
-
if (streams.size === ended.size + aborted.size) {
|
|
11844
|
+
if (streams.size > 0 && streams.size === ended.size + aborted.size) {
|
|
11818
11845
|
if (ended.size === 0 && aborted.size > 0) {
|
|
11819
11846
|
abortStream(passThroughStream);
|
|
11820
11847
|
} else {
|
|
@@ -11822,22 +11849,26 @@ var endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, abo
|
|
|
11822
11849
|
}
|
|
11823
11850
|
}
|
|
11824
11851
|
};
|
|
11825
|
-
var
|
|
11826
|
-
var afterMergedStreamFinished = async (onFinished, stream) => {
|
|
11852
|
+
var afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
|
|
11827
11853
|
try {
|
|
11828
11854
|
await onFinished;
|
|
11829
|
-
|
|
11830
|
-
} catch (error) {
|
|
11831
|
-
if (isAbortError(error)) {
|
|
11855
|
+
if (!signal.aborted) {
|
|
11832
11856
|
abortStream(stream);
|
|
11833
|
-
}
|
|
11834
|
-
|
|
11857
|
+
}
|
|
11858
|
+
} catch (error) {
|
|
11859
|
+
if (!signal.aborted) {
|
|
11860
|
+
errorOrAbortStream(stream, error);
|
|
11835
11861
|
}
|
|
11836
11862
|
}
|
|
11837
11863
|
};
|
|
11838
11864
|
var onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted, controller: { signal } }) => {
|
|
11839
11865
|
try {
|
|
11840
|
-
await finished(stream, {
|
|
11866
|
+
await finished(stream, {
|
|
11867
|
+
signal,
|
|
11868
|
+
cleanup: true,
|
|
11869
|
+
readable: true,
|
|
11870
|
+
writable: false
|
|
11871
|
+
});
|
|
11841
11872
|
if (streams.has(stream)) {
|
|
11842
11873
|
ended.add(stream);
|
|
11843
11874
|
}
|
|
@@ -11852,18 +11883,28 @@ var onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, abort
|
|
|
11852
11883
|
}
|
|
11853
11884
|
}
|
|
11854
11885
|
};
|
|
11855
|
-
var onInputStreamUnpipe = async ({ stream, streams, ended, aborted, controller: { signal } }) => {
|
|
11886
|
+
var onInputStreamUnpipe = async ({ stream, streams, ended, aborted, unpipeEvent, controller: { signal } }) => {
|
|
11856
11887
|
await once(stream, unpipeEvent, { signal });
|
|
11888
|
+
if (!stream.readable) {
|
|
11889
|
+
return once(signal, "abort", { signal });
|
|
11890
|
+
}
|
|
11857
11891
|
streams.delete(stream);
|
|
11858
11892
|
ended.delete(stream);
|
|
11859
11893
|
aborted.delete(stream);
|
|
11860
11894
|
};
|
|
11861
|
-
var unpipeEvent = Symbol("unpipe");
|
|
11862
11895
|
var endStream = (stream) => {
|
|
11863
11896
|
if (stream.writable) {
|
|
11864
11897
|
stream.end();
|
|
11865
11898
|
}
|
|
11866
11899
|
};
|
|
11900
|
+
var errorOrAbortStream = (stream, error) => {
|
|
11901
|
+
if (isAbortError(error)) {
|
|
11902
|
+
abortStream(stream);
|
|
11903
|
+
} else {
|
|
11904
|
+
errorStream(stream, error);
|
|
11905
|
+
}
|
|
11906
|
+
};
|
|
11907
|
+
var isAbortError = (error) => error?.code === "ERR_STREAM_PREMATURE_CLOSE";
|
|
11867
11908
|
var abortStream = (stream) => {
|
|
11868
11909
|
if (stream.readable || stream.writable) {
|
|
11869
11910
|
stream.destroy();
|
|
@@ -11886,7 +11927,7 @@ var updateMaxListeners = (passThroughStream, increment2) => {
|
|
|
11886
11927
|
var PASSTHROUGH_LISTENERS_COUNT = 2;
|
|
11887
11928
|
var PASSTHROUGH_LISTENERS_PER_STREAM = 1;
|
|
11888
11929
|
|
|
11889
|
-
// ../../node_modules/.pnpm/globby@
|
|
11930
|
+
// ../../node_modules/.pnpm/globby@15.0.0/node_modules/globby/index.js
|
|
11890
11931
|
var import_fast_glob2 = __toESM(require_out4(), 1);
|
|
11891
11932
|
|
|
11892
11933
|
// ../../node_modules/.pnpm/path-type@6.0.0/node_modules/path-type/index.js
|
|
@@ -11936,7 +11977,7 @@ function toPath2(urlOrPath) {
|
|
|
11936
11977
|
}
|
|
11937
11978
|
var TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
11938
11979
|
|
|
11939
|
-
// ../../node_modules/.pnpm/globby@
|
|
11980
|
+
// ../../node_modules/.pnpm/globby@15.0.0/node_modules/globby/ignore.js
|
|
11940
11981
|
var import_fast_glob = __toESM(require_out4(), 1);
|
|
11941
11982
|
var import_ignore = __toESM(require_ignore(), 1);
|
|
11942
11983
|
import process4 from "node:process";
|
|
@@ -11953,10 +11994,10 @@ function slash(path5) {
|
|
|
11953
11994
|
return path5.replace(/\\/g, "/");
|
|
11954
11995
|
}
|
|
11955
11996
|
|
|
11956
|
-
// ../../node_modules/.pnpm/globby@
|
|
11997
|
+
// ../../node_modules/.pnpm/globby@15.0.0/node_modules/globby/utilities.js
|
|
11957
11998
|
var isNegativePattern = (pattern) => pattern[0] === "!";
|
|
11958
11999
|
|
|
11959
|
-
// ../../node_modules/.pnpm/globby@
|
|
12000
|
+
// ../../node_modules/.pnpm/globby@15.0.0/node_modules/globby/ignore.js
|
|
11960
12001
|
var defaultIgnoredDirectories = [
|
|
11961
12002
|
"**/node_modules",
|
|
11962
12003
|
"**/flow-typed",
|
|
@@ -11968,7 +12009,24 @@ var ignoreFilesGlobOptions = {
|
|
|
11968
12009
|
dot: true
|
|
11969
12010
|
};
|
|
11970
12011
|
var GITIGNORE_FILES_PATTERN = "**/.gitignore";
|
|
11971
|
-
var applyBaseToPattern = (pattern, base) =>
|
|
12012
|
+
var applyBaseToPattern = (pattern, base) => {
|
|
12013
|
+
if (!base) {
|
|
12014
|
+
return pattern;
|
|
12015
|
+
}
|
|
12016
|
+
const isNegative = isNegativePattern(pattern);
|
|
12017
|
+
const cleanPattern = isNegative ? pattern.slice(1) : pattern;
|
|
12018
|
+
const slashIndex = cleanPattern.indexOf("/");
|
|
12019
|
+
const hasNonTrailingSlash = slashIndex !== -1 && slashIndex !== cleanPattern.length - 1;
|
|
12020
|
+
let result;
|
|
12021
|
+
if (!hasNonTrailingSlash) {
|
|
12022
|
+
result = path4.posix.join(base, "**", cleanPattern);
|
|
12023
|
+
} else if (cleanPattern.startsWith("/")) {
|
|
12024
|
+
result = path4.posix.join(base, cleanPattern.slice(1));
|
|
12025
|
+
} else {
|
|
12026
|
+
result = path4.posix.join(base, cleanPattern);
|
|
12027
|
+
}
|
|
12028
|
+
return isNegative ? "!" + result : result;
|
|
12029
|
+
};
|
|
11972
12030
|
var parseIgnoreFile = (file, cwd) => {
|
|
11973
12031
|
const base = slash(path4.relative(cwd, path4.dirname(file.filePath)));
|
|
11974
12032
|
return file.content.split(/\r?\n/).filter((line) => line && !line.startsWith("#")).map((pattern) => applyBaseToPattern(pattern, base));
|
|
@@ -11981,6 +12039,12 @@ var toRelativePath = (fileOrDirectory, cwd) => {
|
|
|
11981
12039
|
}
|
|
11982
12040
|
throw new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`);
|
|
11983
12041
|
}
|
|
12042
|
+
if (fileOrDirectory.startsWith("./")) {
|
|
12043
|
+
return fileOrDirectory.slice(2);
|
|
12044
|
+
}
|
|
12045
|
+
if (fileOrDirectory.startsWith("../")) {
|
|
12046
|
+
return void 0;
|
|
12047
|
+
}
|
|
11984
12048
|
return fileOrDirectory;
|
|
11985
12049
|
};
|
|
11986
12050
|
var getIsIgnoredPredicate = (files, cwd) => {
|
|
@@ -11989,6 +12053,9 @@ var getIsIgnoredPredicate = (files, cwd) => {
|
|
|
11989
12053
|
return (fileOrDirectory) => {
|
|
11990
12054
|
fileOrDirectory = toPath2(fileOrDirectory);
|
|
11991
12055
|
fileOrDirectory = toRelativePath(fileOrDirectory, cwd);
|
|
12056
|
+
if (fileOrDirectory === void 0) {
|
|
12057
|
+
return false;
|
|
12058
|
+
}
|
|
11992
12059
|
return fileOrDirectory ? ignores.ignores(slash(fileOrDirectory)) : false;
|
|
11993
12060
|
};
|
|
11994
12061
|
};
|
|
@@ -12007,12 +12074,10 @@ var isIgnoredByIgnoreFiles = async (patterns, options) => {
|
|
|
12007
12074
|
ignore,
|
|
12008
12075
|
...ignoreFilesGlobOptions
|
|
12009
12076
|
});
|
|
12010
|
-
const files = await Promise.all(
|
|
12011
|
-
|
|
12012
|
-
|
|
12013
|
-
|
|
12014
|
-
}))
|
|
12015
|
-
);
|
|
12077
|
+
const files = await Promise.all(paths.map(async (filePath) => ({
|
|
12078
|
+
filePath,
|
|
12079
|
+
content: await fsPromises3.readFile(filePath, "utf8")
|
|
12080
|
+
})));
|
|
12016
12081
|
return getIsIgnoredPredicate(files, cwd);
|
|
12017
12082
|
};
|
|
12018
12083
|
var isIgnoredByIgnoreFilesSync = (patterns, options) => {
|
|
@@ -12031,7 +12096,7 @@ var isIgnoredByIgnoreFilesSync = (patterns, options) => {
|
|
|
12031
12096
|
return getIsIgnoredPredicate(files, cwd);
|
|
12032
12097
|
};
|
|
12033
12098
|
|
|
12034
|
-
// ../../node_modules/.pnpm/globby@
|
|
12099
|
+
// ../../node_modules/.pnpm/globby@15.0.0/node_modules/globby/index.js
|
|
12035
12100
|
var assertPatternsInput = (patterns) => {
|
|
12036
12101
|
if (patterns.some((pattern) => typeof pattern !== "string")) {
|
|
12037
12102
|
throw new TypeError("Patterns must be a string or an array of strings");
|
|
@@ -12041,6 +12106,16 @@ var normalizePathForDirectoryGlob = (filePath, cwd) => {
|
|
|
12041
12106
|
const path5 = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
|
|
12042
12107
|
return nodePath.isAbsolute(path5) ? path5 : nodePath.join(cwd, path5);
|
|
12043
12108
|
};
|
|
12109
|
+
var shouldExpandGlobstarDirectory = (pattern) => {
|
|
12110
|
+
const match = pattern?.match(/\*\*\/([^/]+)$/);
|
|
12111
|
+
if (!match) {
|
|
12112
|
+
return false;
|
|
12113
|
+
}
|
|
12114
|
+
const dirname3 = match[1];
|
|
12115
|
+
const hasWildcards = /[*?[\]{}]/.test(dirname3);
|
|
12116
|
+
const hasExtension = nodePath.extname(dirname3) && !dirname3.startsWith(".");
|
|
12117
|
+
return !hasWildcards && !hasExtension;
|
|
12118
|
+
};
|
|
12044
12119
|
var getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
12045
12120
|
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
12046
12121
|
return files ? files.map((file) => nodePath.posix.join(directoryPath, `**/${nodePath.extname(file) ? file : `${file}${extensionGlob}`}`)) : [nodePath.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
|
|
@@ -12050,16 +12125,28 @@ var directoryToGlob = async (directoryPaths, {
|
|
|
12050
12125
|
files,
|
|
12051
12126
|
extensions
|
|
12052
12127
|
} = {}) => {
|
|
12053
|
-
const globs = await Promise.all(
|
|
12054
|
-
|
|
12055
|
-
|
|
12128
|
+
const globs = await Promise.all(directoryPaths.map(async (directoryPath) => {
|
|
12129
|
+
const checkPattern = isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath;
|
|
12130
|
+
if (shouldExpandGlobstarDirectory(checkPattern)) {
|
|
12131
|
+
return getDirectoryGlob({ directoryPath, files, extensions });
|
|
12132
|
+
}
|
|
12133
|
+
const pathToCheck = normalizePathForDirectoryGlob(directoryPath, cwd);
|
|
12134
|
+
return await isDirectory(pathToCheck) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath;
|
|
12135
|
+
}));
|
|
12056
12136
|
return globs.flat();
|
|
12057
12137
|
};
|
|
12058
12138
|
var directoryToGlobSync = (directoryPaths, {
|
|
12059
12139
|
cwd = process5.cwd(),
|
|
12060
12140
|
files,
|
|
12061
12141
|
extensions
|
|
12062
|
-
} = {}) => directoryPaths.flatMap((directoryPath) =>
|
|
12142
|
+
} = {}) => directoryPaths.flatMap((directoryPath) => {
|
|
12143
|
+
const checkPattern = isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath;
|
|
12144
|
+
if (shouldExpandGlobstarDirectory(checkPattern)) {
|
|
12145
|
+
return getDirectoryGlob({ directoryPath, files, extensions });
|
|
12146
|
+
}
|
|
12147
|
+
const pathToCheck = normalizePathForDirectoryGlob(directoryPath, cwd);
|
|
12148
|
+
return isDirectorySync(pathToCheck) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath;
|
|
12149
|
+
});
|
|
12063
12150
|
var toPatternsArray = (patterns) => {
|
|
12064
12151
|
patterns = [...new Set([patterns].flat())];
|
|
12065
12152
|
assertPatternsInput(patterns);
|
|
@@ -12101,15 +12188,11 @@ var getIgnoreFilesPatterns = (options) => {
|
|
|
12101
12188
|
};
|
|
12102
12189
|
var getFilter = async (options) => {
|
|
12103
12190
|
const ignoreFilesPatterns = getIgnoreFilesPatterns(options);
|
|
12104
|
-
return createFilterFunction(
|
|
12105
|
-
ignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, options)
|
|
12106
|
-
);
|
|
12191
|
+
return createFilterFunction(ignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, options));
|
|
12107
12192
|
};
|
|
12108
12193
|
var getFilterSync = (options) => {
|
|
12109
12194
|
const ignoreFilesPatterns = getIgnoreFilesPatterns(options);
|
|
12110
|
-
return createFilterFunction(
|
|
12111
|
-
ignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, options)
|
|
12112
|
-
);
|
|
12195
|
+
return createFilterFunction(ignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, options));
|
|
12113
12196
|
};
|
|
12114
12197
|
var createFilterFunction = (isIgnored) => {
|
|
12115
12198
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -12162,19 +12245,17 @@ var generateTasks = async (patterns, options) => {
|
|
|
12162
12245
|
return globTasks;
|
|
12163
12246
|
}
|
|
12164
12247
|
const directoryToGlobOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd);
|
|
12165
|
-
return Promise.all(
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
|
|
12169
|
-
|
|
12170
|
-
|
|
12171
|
-
|
|
12172
|
-
|
|
12173
|
-
|
|
12174
|
-
|
|
12175
|
-
|
|
12176
|
-
})
|
|
12177
|
-
);
|
|
12248
|
+
return Promise.all(globTasks.map(async (task) => {
|
|
12249
|
+
let { patterns: patterns2, options: options2 } = task;
|
|
12250
|
+
[
|
|
12251
|
+
patterns2,
|
|
12252
|
+
options2.ignore
|
|
12253
|
+
] = await Promise.all([
|
|
12254
|
+
directoryToGlob(patterns2, directoryToGlobOptions),
|
|
12255
|
+
directoryToGlob(options2.ignore, { cwd })
|
|
12256
|
+
]);
|
|
12257
|
+
return { patterns: patterns2, options: options2 };
|
|
12258
|
+
}));
|
|
12178
12259
|
};
|
|
12179
12260
|
var generateTasksSync = (patterns, options) => {
|
|
12180
12261
|
const globTasks = convertNegativePatterns(patterns, options);
|
|
@@ -12211,12 +12292,13 @@ var globbyStream = normalizeArgumentsSync((patterns, options) => {
|
|
|
12211
12292
|
const tasks = generateTasksSync(patterns, options);
|
|
12212
12293
|
const filter = getFilterSync(options);
|
|
12213
12294
|
const streams = tasks.map((task) => import_fast_glob2.default.stream(task.patterns, task.options));
|
|
12295
|
+
if (streams.length === 0) {
|
|
12296
|
+
return Readable.from([]);
|
|
12297
|
+
}
|
|
12214
12298
|
const stream = mergeStreams(streams).filter((fastGlobResult) => filter(fastGlobResult));
|
|
12215
12299
|
return stream;
|
|
12216
12300
|
});
|
|
12217
|
-
var isDynamicPattern = normalizeArgumentsSync(
|
|
12218
|
-
(patterns, options) => patterns.some((pattern) => import_fast_glob2.default.isDynamicPattern(pattern, options))
|
|
12219
|
-
);
|
|
12301
|
+
var isDynamicPattern = normalizeArgumentsSync((patterns, options) => patterns.some((pattern) => import_fast_glob2.default.isDynamicPattern(pattern, options)));
|
|
12220
12302
|
var generateGlobTasks = normalizeArguments(generateTasks);
|
|
12221
12303
|
var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);
|
|
12222
12304
|
var { convertPathToPattern } = import_fast_glob2.default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/repo-config",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.2",
|
|
4
4
|
"description": "Repository configuration and GitHub workflows for @kitschpatrol/shared-config.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shared-config",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"cosmiconfig-typescript-loader": "^6.1.0",
|
|
38
38
|
"execa": "^9.6.0",
|
|
39
39
|
"find-workspaces": "^0.3.1",
|
|
40
|
-
"fs-extra": "^11.3.
|
|
40
|
+
"fs-extra": "^11.3.2",
|
|
41
41
|
"prettier": "^3.6.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"globby": "^
|
|
44
|
+
"globby": "^15.0.0"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=20.19.0"
|