Tracking de l'application VApp (IHM du jeu)

This commit is contained in:
2025-05-11 18:04:12 +02:00
commit 89e9db9b62
17763 changed files with 3718499 additions and 0 deletions

View File

@ -0,0 +1,2 @@
export declare function getEslintCli(packagePath: string): string;
//# sourceMappingURL=get-eslint-cli.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"get-eslint-cli.d.ts","sourceRoot":"","sources":["../../../../src/eslint-bulk-suppressions/cli/utils/get-eslint-cli.ts"],"names":[],"mappings":"AAOA,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAqBxD"}

View File

@ -0,0 +1,30 @@
"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEslintCli = void 0;
const path_1 = __importDefault(require("path"));
const TESTED_VERSIONS = ['8.6.0', '8.7.0', '8.21.0', '8.22.0', '8.23.0', '8.23.1'];
function getEslintCli(packagePath) {
// Try to find a local ESLint installation, the one that should be listed as a dev dependency in package.json
// and installed in node_modules
try {
const localEslintApiPath = require.resolve('eslint', { paths: [packagePath] });
const localEslintPath = path_1.default.dirname(path_1.default.dirname(localEslintApiPath));
const eslintPackageJson = require(path_1.default.join(localEslintPath, 'package.json'));
const localEslintVersion = eslintPackageJson.version;
const eslintExecutable = path_1.default.join(localEslintPath, 'bin', 'eslint.js');
if (!TESTED_VERSIONS.includes(localEslintVersion)) {
console.warn('@rushstack/eslint-bulk: Be careful, the installed ESLint version has not been tested with eslint-bulk.');
}
return `node ${eslintExecutable}`;
}
catch (e) {
throw new Error('@rushstack/eslint-bulk: eslint is specified as a dev dependency in package.json, but eslint-bulk cannot find it in node_modules.');
}
}
exports.getEslintCli = getEslintCli;
//# sourceMappingURL=get-eslint-cli.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"get-eslint-cli.js","sourceRoot":"","sources":["../../../../src/eslint-bulk-suppressions/cli/utils/get-eslint-cli.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;AAE3D,gDAAwB;AAExB,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAEnF,SAAgB,YAAY,CAAC,WAAmB;IAC9C,6GAA6G;IAC7G,gCAAgC;IAChC,IAAI,CAAC;QACH,MAAM,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAC/E,MAAM,eAAe,GAAG,cAAI,CAAC,OAAO,CAAC,cAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC;QACvE,MAAM,iBAAiB,GAAG,OAAO,CAAC,cAAI,CAAC,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC,CAAC;QAC9E,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,OAAO,CAAC;QACrD,MAAM,gBAAgB,GAAG,cAAI,CAAC,IAAI,CAAC,eAAe,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;QAExE,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;YAClD,OAAO,CAAC,IAAI,CACV,wGAAwG,CACzG,CAAC;QACJ,CAAC;QACD,OAAO,QAAQ,gBAAgB,EAAE,CAAC;IACpC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,kIAAkI,CACnI,CAAC;IACJ,CAAC;AACH,CAAC;AArBD,oCAqBC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport path from 'path';\n\nconst TESTED_VERSIONS = ['8.6.0', '8.7.0', '8.21.0', '8.22.0', '8.23.0', '8.23.1'];\n\nexport function getEslintCli(packagePath: string): string {\n // Try to find a local ESLint installation, the one that should be listed as a dev dependency in package.json\n // and installed in node_modules\n try {\n const localEslintApiPath = require.resolve('eslint', { paths: [packagePath] });\n const localEslintPath = path.dirname(path.dirname(localEslintApiPath));\n const eslintPackageJson = require(path.join(localEslintPath, 'package.json'));\n const localEslintVersion = eslintPackageJson.version;\n const eslintExecutable = path.join(localEslintPath, 'bin', 'eslint.js');\n\n if (!TESTED_VERSIONS.includes(localEslintVersion)) {\n console.warn(\n '@rushstack/eslint-bulk: Be careful, the installed ESLint version has not been tested with eslint-bulk.'\n );\n }\n return `node ${eslintExecutable}`;\n } catch (e) {\n throw new Error(\n '@rushstack/eslint-bulk: eslint is specified as a dev dependency in package.json, but eslint-bulk cannot find it in node_modules.'\n );\n }\n}\n"]}

View File

@ -0,0 +1,2 @@
export declare function isCorrectCwd(cwd: string): boolean;
//# sourceMappingURL=is-correct-cwd.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"is-correct-cwd.d.ts","sourceRoot":"","sources":["../../../../src/eslint-bulk-suppressions/cli/utils/is-correct-cwd.ts"],"names":[],"mappings":"AAMA,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEjD"}

View File

@ -0,0 +1,15 @@
"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isCorrectCwd = void 0;
const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
function isCorrectCwd(cwd) {
return fs_1.default.existsSync(path_1.default.join(cwd, '.eslintrc.js')) || fs_1.default.existsSync(path_1.default.join(cwd, '.eslintrc.cjs'));
}
exports.isCorrectCwd = isCorrectCwd;
//# sourceMappingURL=is-correct-cwd.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"is-correct-cwd.js","sourceRoot":"","sources":["../../../../src/eslint-bulk-suppressions/cli/utils/is-correct-cwd.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;AAE3D,4CAAoB;AACpB,gDAAwB;AAExB,SAAgB,YAAY,CAAC,GAAW;IACtC,OAAO,YAAE,CAAC,UAAU,CAAC,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,IAAI,YAAE,CAAC,UAAU,CAAC,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC,CAAC;AACzG,CAAC;AAFD,oCAEC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport fs from 'fs';\nimport path from 'path';\n\nexport function isCorrectCwd(cwd: string): boolean {\n return fs.existsSync(path.join(cwd, '.eslintrc.js')) || fs.existsSync(path.join(cwd, '.eslintrc.cjs'));\n}\n"]}

View File

@ -0,0 +1,4 @@
export declare function printPruneHelp(): void;
export declare function printHelp(): void;
export declare function printSuppressHelp(): void;
//# sourceMappingURL=print-help.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"print-help.d.ts","sourceRoot":"","sources":["../../../../src/eslint-bulk-suppressions/cli/utils/print-help.ts"],"names":[],"mappings":"AAKA,wBAAgB,cAAc,SAa7B;AAED,wBAAgB,SAAS,SA8BxB;AAED,wBAAgB,iBAAiB,SA6BhC"}

View File

@ -0,0 +1,82 @@
"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
Object.defineProperty(exports, "__esModule", { value: true });
exports.printSuppressHelp = exports.printHelp = exports.printPruneHelp = void 0;
const wrap_words_to_lines_1 = require("./wrap-words-to-lines");
function printPruneHelp() {
const help = `eslint-bulk prune
Usage:
eslint-bulk prune
This command is a thin wrapper around ESLint that communicates with @rushstack/eslint-patch to delete all unused suppression entries in all .eslint-bulk-suppressions.json files under the current working directory.`;
const wrapped = (0, wrap_words_to_lines_1.wrapWordsToLines)(help);
for (const line of wrapped) {
console.log(line);
}
}
exports.printPruneHelp = printPruneHelp;
function printHelp() {
const help = `eslint-bulk <command>
Usage:
eslint-bulk suppress --rule RULENAME1 [--rule RULENAME2...] PATH1 [PATH2...]
eslint-bulk suppress --all PATH1 [PATH2...]
eslint-bulk suppress --help
eslint-bulk prune
eslint-bulk prune --help
eslint-bulk --help
This command line tool is a thin wrapper around ESLint that communicates with @rushstack/eslint-patch to suppress or prune unused suppressions in the local .eslint-bulk-suppressions.json file.
Commands:
eslint-bulk suppress [options] <path...>
Use this command to generate a new .eslint-bulk-suppressions.json file or add suppression entries to the existing file. Specify the files and rules you want to suppress.
Please run "eslint-bulk suppress --help" to learn more.
eslint-bulk prune
Use this command to delete all unused suppression entries in all .eslint-bulk-suppressions.json files under the current working directory.
Please run "eslint-bulk prune --help" to learn more.
`;
const wrapped = (0, wrap_words_to_lines_1.wrapWordsToLines)(help);
for (const line of wrapped) {
console.log(line);
}
}
exports.printHelp = printHelp;
function printSuppressHelp() {
const help = `eslint-bulk suppress [options] <path...>
Usage:
eslint-bulk suppress --rule RULENAME1 [--rule RULENAME2...] PATH1 [PATH2...]
eslint-bulk suppress --all PATH1 [PATH2...]
eslint-bulk suppress --help
This command is a thin wrapper around ESLint that communicates with @rushstack/eslint-patch to either generate a new .eslint-bulk-suppressions.json file or add suppression entries to the existing file. Specify the files and rules you want to suppress.
Argument:
<path...>
Glob patterns for paths to suppress, same as eslint files argument. Should be relative to the project root.
Options:
-h, -H, --help
Display this help message.
-R, --rule
The full name of the ESLint rule you want to bulk-suppress. Specify multiple rules with --rule NAME1 --rule RULENAME2.
-A, --all
Bulk-suppress all rules in the specified file patterns.`;
const wrapped = (0, wrap_words_to_lines_1.wrapWordsToLines)(help);
for (const line of wrapped) {
console.log(line);
}
}
exports.printSuppressHelp = printSuppressHelp;
//# sourceMappingURL=print-help.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"print-help.js","sourceRoot":"","sources":["../../../../src/eslint-bulk-suppressions/cli/utils/print-help.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,+DAAyD;AAEzD,SAAgB,cAAc;IAC5B,MAAM,IAAI,GAAG;;;;;;sNAMuM,CAAC;IAErN,MAAM,OAAO,GAAG,IAAA,sCAAgB,EAAC,IAAI,CAAC,CAAC;IACvC,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;AACH,CAAC;AAbD,wCAaC;AAED,SAAgB,SAAS;IACvB,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuBd,CAAC;IAEA,MAAM,OAAO,GAAG,IAAA,sCAAgB,EAAC,IAAI,CAAC,CAAC;IACvC,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;AACH,CAAC;AA9BD,8BA8BC;AAED,SAAgB,iBAAiB;IAC/B,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;4DAsB6C,CAAC;IAE3D,MAAM,OAAO,GAAG,IAAA,sCAAgB,EAAC,IAAI,CAAC,CAAC;IACvC,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;AACH,CAAC;AA7BD,8CA6BC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { wrapWordsToLines } from './wrap-words-to-lines';\n\nexport function printPruneHelp() {\n const help = `eslint-bulk prune\n\nUsage:\n\neslint-bulk prune\n\nThis command is a thin wrapper around ESLint that communicates with @rushstack/eslint-patch to delete all unused suppression entries in all .eslint-bulk-suppressions.json files under the current working directory.`;\n\n const wrapped = wrapWordsToLines(help);\n for (const line of wrapped) {\n console.log(line);\n }\n}\n\nexport function printHelp() {\n const help = `eslint-bulk <command>\n\nUsage:\n\neslint-bulk suppress --rule RULENAME1 [--rule RULENAME2...] PATH1 [PATH2...]\neslint-bulk suppress --all PATH1 [PATH2...]\neslint-bulk suppress --help\n\neslint-bulk prune\neslint-bulk prune --help\n\neslint-bulk --help\n\nThis command line tool is a thin wrapper around ESLint that communicates with @rushstack/eslint-patch to suppress or prune unused suppressions in the local .eslint-bulk-suppressions.json file.\n\nCommands:\n eslint-bulk suppress [options] <path...>\n Use this command to generate a new .eslint-bulk-suppressions.json file or add suppression entries to the existing file. Specify the files and rules you want to suppress.\n Please run \"eslint-bulk suppress --help\" to learn more.\n\n eslint-bulk prune\n Use this command to delete all unused suppression entries in all .eslint-bulk-suppressions.json files under the current working directory.\n Please run \"eslint-bulk prune --help\" to learn more.\n`;\n\n const wrapped = wrapWordsToLines(help);\n for (const line of wrapped) {\n console.log(line);\n }\n}\n\nexport function printSuppressHelp() {\n const help = `eslint-bulk suppress [options] <path...>\n\nUsage:\n\neslint-bulk suppress --rule RULENAME1 [--rule RULENAME2...] PATH1 [PATH2...]\neslint-bulk suppress --all PATH1 [PATH2...]\neslint-bulk suppress --help\n\nThis command is a thin wrapper around ESLint that communicates with @rushstack/eslint-patch to either generate a new .eslint-bulk-suppressions.json file or add suppression entries to the existing file. Specify the files and rules you want to suppress.\n\nArgument:\n <path...>\n Glob patterns for paths to suppress, same as eslint files argument. Should be relative to the project root.\n\nOptions:\n -h, -H, --help\n Display this help message.\n\n -R, --rule\n The full name of the ESLint rule you want to bulk-suppress. Specify multiple rules with --rule NAME1 --rule RULENAME2.\n\n -A, --all\n Bulk-suppress all rules in the specified file patterns.`;\n\n const wrapped = wrapWordsToLines(help);\n for (const line of wrapped) {\n console.log(line);\n }\n}\n"]}

View File

@ -0,0 +1,26 @@
/**
* Applies word wrapping and returns an array of lines.
*
* @param text - The text to wrap
* @param maxLineLength - The maximum length of a line, defaults to the console width
* @param indent - The number of spaces to indent the wrapped lines, defaults to 0
*/
export declare function wrapWordsToLines(text: string, maxLineLength?: number, indent?: number): string[];
/**
* Applies word wrapping and returns an array of lines.
*
* @param text - The text to wrap
* @param maxLineLength - The maximum length of a line, defaults to the console width
* @param linePrefix - The string to prefix each line with, defaults to ''
*/
export declare function wrapWordsToLines(text: string, maxLineLength?: number, linePrefix?: string): string[];
/**
* Applies word wrapping and returns an array of lines.
*
* @param text - The text to wrap
* @param maxLineLength - The maximum length of a line, defaults to the console width
* @param indentOrLinePrefix - The number of spaces to indent the wrapped lines or the string to prefix
* each line with, defaults to no prefix
*/
export declare function wrapWordsToLines(text: string, maxLineLength?: number, indentOrLinePrefix?: number | string): string[];
//# sourceMappingURL=wrap-words-to-lines.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"wrap-words-to-lines.d.ts","sourceRoot":"","sources":["../../../../src/eslint-bulk-suppressions/cli/utils/wrap-words-to-lines.ts"],"names":[],"mappings":"AAWA;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;AAClG;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;AACtG;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,aAAa,CAAC,EAAE,MAAM,EACtB,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,GACnC,MAAM,EAAE,CAAC"}

View File

@ -0,0 +1,69 @@
"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
Object.defineProperty(exports, "__esModule", { value: true });
exports.wrapWordsToLines = void 0;
function wrapWordsToLines(text, maxLineLength, indentOrLinePrefix) {
var _a;
let linePrefix;
switch (typeof indentOrLinePrefix) {
case 'number':
linePrefix = ' '.repeat(indentOrLinePrefix);
break;
case 'string':
linePrefix = indentOrLinePrefix;
break;
default:
linePrefix = '';
break;
}
const linePrefixLength = linePrefix.length;
if (!maxLineLength) {
maxLineLength = process.stdout.getWindowSize()[0];
}
// Apply word wrapping and the provided line prefix, while also respecting existing newlines
// and prefix spaces that may exist in the text string already.
const lines = text.split(/\r?\n/);
const wrappedLines = [];
for (const line of lines) {
if (line.length + linePrefixLength <= maxLineLength) {
wrappedLines.push(linePrefix + line);
}
else {
const lineAdditionalPrefix = ((_a = line.match(/^\s*/)) === null || _a === void 0 ? void 0 : _a[0]) || '';
const whitespaceRegexp = /\s+/g;
let currentWhitespaceMatch = null;
let previousWhitespaceMatch;
let currentLineStartIndex = lineAdditionalPrefix.length;
let previousBreakRanOver = false;
while ((currentWhitespaceMatch = whitespaceRegexp.exec(line)) !== null) {
if (currentWhitespaceMatch.index + linePrefixLength - currentLineStartIndex > maxLineLength) {
let whitespaceToSplitAt;
if (!previousWhitespaceMatch ||
// Handle the case where there are two words longer than the maxLineLength in a row
previousBreakRanOver) {
whitespaceToSplitAt = currentWhitespaceMatch;
}
else {
whitespaceToSplitAt = previousWhitespaceMatch;
}
wrappedLines.push(linePrefix +
lineAdditionalPrefix +
line.substring(currentLineStartIndex, whitespaceToSplitAt.index));
previousBreakRanOver = whitespaceToSplitAt.index - currentLineStartIndex > maxLineLength;
currentLineStartIndex = whitespaceToSplitAt.index + whitespaceToSplitAt[0].length;
}
else {
previousBreakRanOver = false;
}
previousWhitespaceMatch = currentWhitespaceMatch;
}
if (currentLineStartIndex < line.length) {
wrappedLines.push(linePrefix + lineAdditionalPrefix + line.substring(currentLineStartIndex));
}
}
}
return wrappedLines;
}
exports.wrapWordsToLines = wrapWordsToLines;
//# sourceMappingURL=wrap-words-to-lines.js.map

File diff suppressed because one or more lines are too long