@eclipse-glsp/cli 2.7.0-next.16 → 2.7.0-next.19
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.js +425 -227
- package/dist/cli.js.map +3 -3
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -1194,8 +1194,8 @@ var require_command = __commonJS({
|
|
|
1194
1194
|
"../../node_modules/commander/lib/command.js"(exports2) {
|
|
1195
1195
|
var EventEmitter = require("node:events").EventEmitter;
|
|
1196
1196
|
var childProcess2 = require("node:child_process");
|
|
1197
|
-
var
|
|
1198
|
-
var
|
|
1197
|
+
var path27 = require("node:path");
|
|
1198
|
+
var fs22 = require("node:fs");
|
|
1199
1199
|
var process10 = require("node:process");
|
|
1200
1200
|
var { Argument: Argument2, humanReadableArgName } = require_argument();
|
|
1201
1201
|
var { CommanderError: CommanderError2 } = require_error();
|
|
@@ -2190,7 +2190,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2190
2190
|
* @param {string} subcommandName
|
|
2191
2191
|
*/
|
|
2192
2192
|
_checkForMissingExecutable(executableFile, executableDir, subcommandName) {
|
|
2193
|
-
if (
|
|
2193
|
+
if (fs22.existsSync(executableFile)) return;
|
|
2194
2194
|
const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
|
|
2195
2195
|
const executableMissing = `'${executableFile}' does not exist
|
|
2196
2196
|
- if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
@@ -2208,11 +2208,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2208
2208
|
let launchWithNode = false;
|
|
2209
2209
|
const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
2210
2210
|
function findFile(baseDir, baseName) {
|
|
2211
|
-
const localBin =
|
|
2212
|
-
if (
|
|
2213
|
-
if (sourceExt.includes(
|
|
2211
|
+
const localBin = path27.resolve(baseDir, baseName);
|
|
2212
|
+
if (fs22.existsSync(localBin)) return localBin;
|
|
2213
|
+
if (sourceExt.includes(path27.extname(baseName))) return void 0;
|
|
2214
2214
|
const foundExt = sourceExt.find(
|
|
2215
|
-
(ext) =>
|
|
2215
|
+
(ext) => fs22.existsSync(`${localBin}${ext}`)
|
|
2216
2216
|
);
|
|
2217
2217
|
if (foundExt) return `${localBin}${foundExt}`;
|
|
2218
2218
|
return void 0;
|
|
@@ -2224,21 +2224,21 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2224
2224
|
if (this._scriptPath) {
|
|
2225
2225
|
let resolvedScriptPath;
|
|
2226
2226
|
try {
|
|
2227
|
-
resolvedScriptPath =
|
|
2227
|
+
resolvedScriptPath = fs22.realpathSync(this._scriptPath);
|
|
2228
2228
|
} catch {
|
|
2229
2229
|
resolvedScriptPath = this._scriptPath;
|
|
2230
2230
|
}
|
|
2231
|
-
executableDir =
|
|
2232
|
-
|
|
2231
|
+
executableDir = path27.resolve(
|
|
2232
|
+
path27.dirname(resolvedScriptPath),
|
|
2233
2233
|
executableDir
|
|
2234
2234
|
);
|
|
2235
2235
|
}
|
|
2236
2236
|
if (executableDir) {
|
|
2237
2237
|
let localFile = findFile(executableDir, executableFile);
|
|
2238
2238
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
2239
|
-
const legacyName =
|
|
2239
|
+
const legacyName = path27.basename(
|
|
2240
2240
|
this._scriptPath,
|
|
2241
|
-
|
|
2241
|
+
path27.extname(this._scriptPath)
|
|
2242
2242
|
);
|
|
2243
2243
|
if (legacyName !== this._name) {
|
|
2244
2244
|
localFile = findFile(
|
|
@@ -2249,7 +2249,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2249
2249
|
}
|
|
2250
2250
|
executableFile = localFile || executableFile;
|
|
2251
2251
|
}
|
|
2252
|
-
launchWithNode = sourceExt.includes(
|
|
2252
|
+
launchWithNode = sourceExt.includes(path27.extname(executableFile));
|
|
2253
2253
|
let proc;
|
|
2254
2254
|
if (process10.platform !== "win32") {
|
|
2255
2255
|
if (launchWithNode) {
|
|
@@ -3165,7 +3165,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3165
3165
|
* @return {Command}
|
|
3166
3166
|
*/
|
|
3167
3167
|
nameFromFilename(filename) {
|
|
3168
|
-
this._name =
|
|
3168
|
+
this._name = path27.basename(filename, path27.extname(filename));
|
|
3169
3169
|
return this;
|
|
3170
3170
|
}
|
|
3171
3171
|
/**
|
|
@@ -3179,9 +3179,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3179
3179
|
* @param {string} [path]
|
|
3180
3180
|
* @return {(string|null|Command)}
|
|
3181
3181
|
*/
|
|
3182
|
-
executableDir(
|
|
3183
|
-
if (
|
|
3184
|
-
this._executableDir =
|
|
3182
|
+
executableDir(path28) {
|
|
3183
|
+
if (path28 === void 0) return this._executableDir;
|
|
3184
|
+
this._executableDir = path28;
|
|
3185
3185
|
return this;
|
|
3186
3186
|
}
|
|
3187
3187
|
/**
|
|
@@ -3684,7 +3684,7 @@ var require_minimatch = __commonJS({
|
|
|
3684
3684
|
"../../node_modules/minimatch/minimatch.js"(exports2, module2) {
|
|
3685
3685
|
module2.exports = minimatch2;
|
|
3686
3686
|
minimatch2.Minimatch = Minimatch;
|
|
3687
|
-
var
|
|
3687
|
+
var path27 = (function() {
|
|
3688
3688
|
try {
|
|
3689
3689
|
return require("path");
|
|
3690
3690
|
} catch (e) {
|
|
@@ -3692,7 +3692,7 @@ var require_minimatch = __commonJS({
|
|
|
3692
3692
|
})() || {
|
|
3693
3693
|
sep: "/"
|
|
3694
3694
|
};
|
|
3695
|
-
minimatch2.sep =
|
|
3695
|
+
minimatch2.sep = path27.sep;
|
|
3696
3696
|
var GLOBSTAR = minimatch2.GLOBSTAR = Minimatch.GLOBSTAR = {};
|
|
3697
3697
|
var expand = require_brace_expansion();
|
|
3698
3698
|
var plTypes = {
|
|
@@ -3781,8 +3781,8 @@ var require_minimatch = __commonJS({
|
|
|
3781
3781
|
assertValidPattern(pattern);
|
|
3782
3782
|
if (!options) options = {};
|
|
3783
3783
|
pattern = pattern.trim();
|
|
3784
|
-
if (!options.allowWindowsEscape &&
|
|
3785
|
-
pattern = pattern.split(
|
|
3784
|
+
if (!options.allowWindowsEscape && path27.sep !== "/") {
|
|
3785
|
+
pattern = pattern.split(path27.sep).join("/");
|
|
3786
3786
|
}
|
|
3787
3787
|
this.options = options;
|
|
3788
3788
|
this.set = [];
|
|
@@ -4151,8 +4151,8 @@ var require_minimatch = __commonJS({
|
|
|
4151
4151
|
if (this.empty) return f === "";
|
|
4152
4152
|
if (f === "/" && partial) return true;
|
|
4153
4153
|
var options = this.options;
|
|
4154
|
-
if (
|
|
4155
|
-
f = f.split(
|
|
4154
|
+
if (path27.sep !== "/") {
|
|
4155
|
+
f = f.split(path27.sep).join("/");
|
|
4156
4156
|
}
|
|
4157
4157
|
f = f.split(slashSplit);
|
|
4158
4158
|
this.debug(this.pattern, "split", f);
|
|
@@ -4506,7 +4506,7 @@ var require_path = __commonJS({
|
|
|
4506
4506
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4507
4507
|
exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0;
|
|
4508
4508
|
var os4 = require("os");
|
|
4509
|
-
var
|
|
4509
|
+
var path27 = require("path");
|
|
4510
4510
|
var IS_WINDOWS_PLATFORM = os4.platform() === "win32";
|
|
4511
4511
|
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
4512
4512
|
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
@@ -4518,7 +4518,7 @@ var require_path = __commonJS({
|
|
|
4518
4518
|
}
|
|
4519
4519
|
exports2.unixify = unixify;
|
|
4520
4520
|
function makeAbsolute(cwd, filepath) {
|
|
4521
|
-
return
|
|
4521
|
+
return path27.resolve(cwd, filepath);
|
|
4522
4522
|
}
|
|
4523
4523
|
exports2.makeAbsolute = makeAbsolute;
|
|
4524
4524
|
function removeLeadingDotSegment(entry) {
|
|
@@ -5815,7 +5815,7 @@ var require_braces = __commonJS({
|
|
|
5815
5815
|
var require_constants2 = __commonJS({
|
|
5816
5816
|
"../../node_modules/picomatch/lib/constants.js"(exports2, module2) {
|
|
5817
5817
|
"use strict";
|
|
5818
|
-
var
|
|
5818
|
+
var path27 = require("path");
|
|
5819
5819
|
var WIN_SLASH = "\\\\/";
|
|
5820
5820
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
5821
5821
|
var DOT_LITERAL = "\\.";
|
|
@@ -5985,7 +5985,7 @@ var require_constants2 = __commonJS({
|
|
|
5985
5985
|
/* | */
|
|
5986
5986
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
5987
5987
|
/* \uFEFF */
|
|
5988
|
-
SEP:
|
|
5988
|
+
SEP: path27.sep,
|
|
5989
5989
|
/**
|
|
5990
5990
|
* Create EXTGLOB_CHARS
|
|
5991
5991
|
*/
|
|
@@ -6012,7 +6012,7 @@ var require_constants2 = __commonJS({
|
|
|
6012
6012
|
var require_utils2 = __commonJS({
|
|
6013
6013
|
"../../node_modules/picomatch/lib/utils.js"(exports2) {
|
|
6014
6014
|
"use strict";
|
|
6015
|
-
var
|
|
6015
|
+
var path27 = require("path");
|
|
6016
6016
|
var win32 = process.platform === "win32";
|
|
6017
6017
|
var {
|
|
6018
6018
|
REGEX_BACKSLASH,
|
|
@@ -6041,7 +6041,7 @@ var require_utils2 = __commonJS({
|
|
|
6041
6041
|
if (options && typeof options.windows === "boolean") {
|
|
6042
6042
|
return options.windows;
|
|
6043
6043
|
}
|
|
6044
|
-
return win32 === true ||
|
|
6044
|
+
return win32 === true || path27.sep === "\\";
|
|
6045
6045
|
};
|
|
6046
6046
|
exports2.escapeLast = (input, char, lastIdx) => {
|
|
6047
6047
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -7176,7 +7176,7 @@ var require_parse2 = __commonJS({
|
|
|
7176
7176
|
var require_picomatch = __commonJS({
|
|
7177
7177
|
"../../node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
|
|
7178
7178
|
"use strict";
|
|
7179
|
-
var
|
|
7179
|
+
var path27 = require("path");
|
|
7180
7180
|
var scan = require_scan();
|
|
7181
7181
|
var parse2 = require_parse2();
|
|
7182
7182
|
var utils = require_utils2();
|
|
@@ -7261,7 +7261,7 @@ var require_picomatch = __commonJS({
|
|
|
7261
7261
|
};
|
|
7262
7262
|
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
7263
7263
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
7264
|
-
return regex.test(
|
|
7264
|
+
return regex.test(path27.basename(input));
|
|
7265
7265
|
};
|
|
7266
7266
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
7267
7267
|
picomatch.parse = (pattern, options) => {
|
|
@@ -7488,7 +7488,7 @@ var require_pattern = __commonJS({
|
|
|
7488
7488
|
"use strict";
|
|
7489
7489
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7490
7490
|
exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0;
|
|
7491
|
-
var
|
|
7491
|
+
var path27 = require("path");
|
|
7492
7492
|
var globParent = require_glob_parent();
|
|
7493
7493
|
var micromatch = require_micromatch();
|
|
7494
7494
|
var GLOBSTAR = "**";
|
|
@@ -7583,7 +7583,7 @@ var require_pattern = __commonJS({
|
|
|
7583
7583
|
}
|
|
7584
7584
|
exports2.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
7585
7585
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
7586
|
-
const basename4 =
|
|
7586
|
+
const basename4 = path27.basename(pattern);
|
|
7587
7587
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename4);
|
|
7588
7588
|
}
|
|
7589
7589
|
exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
|
@@ -7641,7 +7641,7 @@ var require_pattern = __commonJS({
|
|
|
7641
7641
|
}
|
|
7642
7642
|
exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
7643
7643
|
function isAbsolute(pattern) {
|
|
7644
|
-
return
|
|
7644
|
+
return path27.isAbsolute(pattern);
|
|
7645
7645
|
}
|
|
7646
7646
|
exports2.isAbsolute = isAbsolute;
|
|
7647
7647
|
}
|
|
@@ -7816,10 +7816,10 @@ var require_utils3 = __commonJS({
|
|
|
7816
7816
|
exports2.array = array;
|
|
7817
7817
|
var errno = require_errno();
|
|
7818
7818
|
exports2.errno = errno;
|
|
7819
|
-
var
|
|
7820
|
-
exports2.fs =
|
|
7821
|
-
var
|
|
7822
|
-
exports2.path =
|
|
7819
|
+
var fs22 = require_fs();
|
|
7820
|
+
exports2.fs = fs22;
|
|
7821
|
+
var path27 = require_path();
|
|
7822
|
+
exports2.path = path27;
|
|
7823
7823
|
var pattern = require_pattern();
|
|
7824
7824
|
exports2.pattern = pattern;
|
|
7825
7825
|
var stream = require_stream();
|
|
@@ -7931,8 +7931,8 @@ var require_async = __commonJS({
|
|
|
7931
7931
|
"use strict";
|
|
7932
7932
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7933
7933
|
exports2.read = void 0;
|
|
7934
|
-
function read(
|
|
7935
|
-
settings.fs.lstat(
|
|
7934
|
+
function read(path27, settings, callback) {
|
|
7935
|
+
settings.fs.lstat(path27, (lstatError, lstat) => {
|
|
7936
7936
|
if (lstatError !== null) {
|
|
7937
7937
|
callFailureCallback(callback, lstatError);
|
|
7938
7938
|
return;
|
|
@@ -7941,7 +7941,7 @@ var require_async = __commonJS({
|
|
|
7941
7941
|
callSuccessCallback(callback, lstat);
|
|
7942
7942
|
return;
|
|
7943
7943
|
}
|
|
7944
|
-
settings.fs.stat(
|
|
7944
|
+
settings.fs.stat(path27, (statError, stat) => {
|
|
7945
7945
|
if (statError !== null) {
|
|
7946
7946
|
if (settings.throwErrorOnBrokenSymbolicLink) {
|
|
7947
7947
|
callFailureCallback(callback, statError);
|
|
@@ -7973,13 +7973,13 @@ var require_sync = __commonJS({
|
|
|
7973
7973
|
"use strict";
|
|
7974
7974
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7975
7975
|
exports2.read = void 0;
|
|
7976
|
-
function read(
|
|
7977
|
-
const lstat = settings.fs.lstatSync(
|
|
7976
|
+
function read(path27, settings) {
|
|
7977
|
+
const lstat = settings.fs.lstatSync(path27);
|
|
7978
7978
|
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
|
|
7979
7979
|
return lstat;
|
|
7980
7980
|
}
|
|
7981
7981
|
try {
|
|
7982
|
-
const stat = settings.fs.statSync(
|
|
7982
|
+
const stat = settings.fs.statSync(path27);
|
|
7983
7983
|
if (settings.markSymbolicLink) {
|
|
7984
7984
|
stat.isSymbolicLink = () => true;
|
|
7985
7985
|
}
|
|
@@ -8001,12 +8001,12 @@ var require_fs2 = __commonJS({
|
|
|
8001
8001
|
"use strict";
|
|
8002
8002
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
8003
8003
|
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
|
|
8004
|
-
var
|
|
8004
|
+
var fs22 = require("fs");
|
|
8005
8005
|
exports2.FILE_SYSTEM_ADAPTER = {
|
|
8006
|
-
lstat:
|
|
8007
|
-
stat:
|
|
8008
|
-
lstatSync:
|
|
8009
|
-
statSync:
|
|
8006
|
+
lstat: fs22.lstat,
|
|
8007
|
+
stat: fs22.stat,
|
|
8008
|
+
lstatSync: fs22.lstatSync,
|
|
8009
|
+
statSync: fs22.statSync
|
|
8010
8010
|
};
|
|
8011
8011
|
function createFileSystemAdapter(fsMethods) {
|
|
8012
8012
|
if (fsMethods === void 0) {
|
|
@@ -8023,12 +8023,12 @@ var require_settings = __commonJS({
|
|
|
8023
8023
|
"../../node_modules/@nodelib/fs.stat/out/settings.js"(exports2) {
|
|
8024
8024
|
"use strict";
|
|
8025
8025
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
8026
|
-
var
|
|
8026
|
+
var fs22 = require_fs2();
|
|
8027
8027
|
var Settings = class {
|
|
8028
8028
|
constructor(_options = {}) {
|
|
8029
8029
|
this._options = _options;
|
|
8030
8030
|
this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
|
|
8031
|
-
this.fs =
|
|
8031
|
+
this.fs = fs22.createFileSystemAdapter(this._options.fs);
|
|
8032
8032
|
this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
|
|
8033
8033
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
8034
8034
|
}
|
|
@@ -8050,17 +8050,17 @@ var require_out = __commonJS({
|
|
|
8050
8050
|
var sync = require_sync();
|
|
8051
8051
|
var settings_1 = require_settings();
|
|
8052
8052
|
exports2.Settings = settings_1.default;
|
|
8053
|
-
function stat(
|
|
8053
|
+
function stat(path27, optionsOrSettingsOrCallback, callback) {
|
|
8054
8054
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
8055
|
-
async.read(
|
|
8055
|
+
async.read(path27, getSettings(), optionsOrSettingsOrCallback);
|
|
8056
8056
|
return;
|
|
8057
8057
|
}
|
|
8058
|
-
async.read(
|
|
8058
|
+
async.read(path27, getSettings(optionsOrSettingsOrCallback), callback);
|
|
8059
8059
|
}
|
|
8060
8060
|
exports2.stat = stat;
|
|
8061
|
-
function statSync5(
|
|
8061
|
+
function statSync5(path27, optionsOrSettings) {
|
|
8062
8062
|
const settings = getSettings(optionsOrSettings);
|
|
8063
|
-
return sync.read(
|
|
8063
|
+
return sync.read(path27, settings);
|
|
8064
8064
|
}
|
|
8065
8065
|
exports2.statSync = statSync5;
|
|
8066
8066
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -8183,8 +8183,8 @@ var require_utils4 = __commonJS({
|
|
|
8183
8183
|
"use strict";
|
|
8184
8184
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
8185
8185
|
exports2.fs = void 0;
|
|
8186
|
-
var
|
|
8187
|
-
exports2.fs =
|
|
8186
|
+
var fs22 = require_fs3();
|
|
8187
|
+
exports2.fs = fs22;
|
|
8188
8188
|
}
|
|
8189
8189
|
});
|
|
8190
8190
|
|
|
@@ -8276,16 +8276,16 @@ var require_async2 = __commonJS({
|
|
|
8276
8276
|
return;
|
|
8277
8277
|
}
|
|
8278
8278
|
const tasks = names.map((name) => {
|
|
8279
|
-
const
|
|
8279
|
+
const path27 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
8280
8280
|
return (done) => {
|
|
8281
|
-
fsStat.stat(
|
|
8281
|
+
fsStat.stat(path27, settings.fsStatSettings, (error, stats) => {
|
|
8282
8282
|
if (error !== null) {
|
|
8283
8283
|
done(error);
|
|
8284
8284
|
return;
|
|
8285
8285
|
}
|
|
8286
8286
|
const entry = {
|
|
8287
8287
|
name,
|
|
8288
|
-
path:
|
|
8288
|
+
path: path27,
|
|
8289
8289
|
dirent: utils.fs.createDirentFromStats(name, stats)
|
|
8290
8290
|
};
|
|
8291
8291
|
if (settings.stats) {
|
|
@@ -8379,14 +8379,14 @@ var require_fs4 = __commonJS({
|
|
|
8379
8379
|
"use strict";
|
|
8380
8380
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
8381
8381
|
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
|
|
8382
|
-
var
|
|
8382
|
+
var fs22 = require("fs");
|
|
8383
8383
|
exports2.FILE_SYSTEM_ADAPTER = {
|
|
8384
|
-
lstat:
|
|
8385
|
-
stat:
|
|
8386
|
-
lstatSync:
|
|
8387
|
-
statSync:
|
|
8388
|
-
readdir:
|
|
8389
|
-
readdirSync:
|
|
8384
|
+
lstat: fs22.lstat,
|
|
8385
|
+
stat: fs22.stat,
|
|
8386
|
+
lstatSync: fs22.lstatSync,
|
|
8387
|
+
statSync: fs22.statSync,
|
|
8388
|
+
readdir: fs22.readdir,
|
|
8389
|
+
readdirSync: fs22.readdirSync
|
|
8390
8390
|
};
|
|
8391
8391
|
function createFileSystemAdapter(fsMethods) {
|
|
8392
8392
|
if (fsMethods === void 0) {
|
|
@@ -8403,15 +8403,15 @@ var require_settings2 = __commonJS({
|
|
|
8403
8403
|
"../../node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) {
|
|
8404
8404
|
"use strict";
|
|
8405
8405
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
8406
|
-
var
|
|
8406
|
+
var path27 = require("path");
|
|
8407
8407
|
var fsStat = require_out();
|
|
8408
|
-
var
|
|
8408
|
+
var fs22 = require_fs4();
|
|
8409
8409
|
var Settings = class {
|
|
8410
8410
|
constructor(_options = {}) {
|
|
8411
8411
|
this._options = _options;
|
|
8412
8412
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
8413
|
-
this.fs =
|
|
8414
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
8413
|
+
this.fs = fs22.createFileSystemAdapter(this._options.fs);
|
|
8414
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path27.sep);
|
|
8415
8415
|
this.stats = this._getValue(this._options.stats, false);
|
|
8416
8416
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
8417
8417
|
this.fsStatSettings = new fsStat.Settings({
|
|
@@ -8438,17 +8438,17 @@ var require_out2 = __commonJS({
|
|
|
8438
8438
|
var sync = require_sync2();
|
|
8439
8439
|
var settings_1 = require_settings2();
|
|
8440
8440
|
exports2.Settings = settings_1.default;
|
|
8441
|
-
function scandir(
|
|
8441
|
+
function scandir(path27, optionsOrSettingsOrCallback, callback) {
|
|
8442
8442
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
8443
|
-
async.read(
|
|
8443
|
+
async.read(path27, getSettings(), optionsOrSettingsOrCallback);
|
|
8444
8444
|
return;
|
|
8445
8445
|
}
|
|
8446
|
-
async.read(
|
|
8446
|
+
async.read(path27, getSettings(optionsOrSettingsOrCallback), callback);
|
|
8447
8447
|
}
|
|
8448
8448
|
exports2.scandir = scandir;
|
|
8449
|
-
function scandirSync(
|
|
8449
|
+
function scandirSync(path27, optionsOrSettings) {
|
|
8450
8450
|
const settings = getSettings(optionsOrSettings);
|
|
8451
|
-
return sync.read(
|
|
8451
|
+
return sync.read(path27, settings);
|
|
8452
8452
|
}
|
|
8453
8453
|
exports2.scandirSync = scandirSync;
|
|
8454
8454
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -8704,26 +8704,26 @@ var require_queue = __commonJS({
|
|
|
8704
8704
|
queue.drained = drained;
|
|
8705
8705
|
return queue;
|
|
8706
8706
|
function push(value) {
|
|
8707
|
-
var p = new Promise(function(
|
|
8707
|
+
var p = new Promise(function(resolve27, reject) {
|
|
8708
8708
|
pushCb(value, function(err, result) {
|
|
8709
8709
|
if (err) {
|
|
8710
8710
|
reject(err);
|
|
8711
8711
|
return;
|
|
8712
8712
|
}
|
|
8713
|
-
|
|
8713
|
+
resolve27(result);
|
|
8714
8714
|
});
|
|
8715
8715
|
});
|
|
8716
8716
|
p.catch(noop2);
|
|
8717
8717
|
return p;
|
|
8718
8718
|
}
|
|
8719
8719
|
function unshift(value) {
|
|
8720
|
-
var p = new Promise(function(
|
|
8720
|
+
var p = new Promise(function(resolve27, reject) {
|
|
8721
8721
|
unshiftCb(value, function(err, result) {
|
|
8722
8722
|
if (err) {
|
|
8723
8723
|
reject(err);
|
|
8724
8724
|
return;
|
|
8725
8725
|
}
|
|
8726
|
-
|
|
8726
|
+
resolve27(result);
|
|
8727
8727
|
});
|
|
8728
8728
|
});
|
|
8729
8729
|
p.catch(noop2);
|
|
@@ -8731,15 +8731,15 @@ var require_queue = __commonJS({
|
|
|
8731
8731
|
}
|
|
8732
8732
|
function drained() {
|
|
8733
8733
|
if (queue.idle()) {
|
|
8734
|
-
return new Promise(function(
|
|
8735
|
-
|
|
8734
|
+
return new Promise(function(resolve27) {
|
|
8735
|
+
resolve27();
|
|
8736
8736
|
});
|
|
8737
8737
|
}
|
|
8738
8738
|
var previousDrain = queue.drain;
|
|
8739
|
-
var p = new Promise(function(
|
|
8739
|
+
var p = new Promise(function(resolve27) {
|
|
8740
8740
|
queue.drain = function() {
|
|
8741
8741
|
previousDrain();
|
|
8742
|
-
|
|
8742
|
+
resolve27();
|
|
8743
8743
|
};
|
|
8744
8744
|
});
|
|
8745
8745
|
return p;
|
|
@@ -9070,7 +9070,7 @@ var require_settings3 = __commonJS({
|
|
|
9070
9070
|
"../../node_modules/@nodelib/fs.walk/out/settings.js"(exports2) {
|
|
9071
9071
|
"use strict";
|
|
9072
9072
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
9073
|
-
var
|
|
9073
|
+
var path27 = require("path");
|
|
9074
9074
|
var fsScandir = require_out2();
|
|
9075
9075
|
var Settings = class {
|
|
9076
9076
|
constructor(_options = {}) {
|
|
@@ -9080,7 +9080,7 @@ var require_settings3 = __commonJS({
|
|
|
9080
9080
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
9081
9081
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
9082
9082
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
9083
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
9083
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path27.sep);
|
|
9084
9084
|
this.fsScandirSettings = new fsScandir.Settings({
|
|
9085
9085
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
9086
9086
|
fs: this._options.fs,
|
|
@@ -9142,7 +9142,7 @@ var require_reader2 = __commonJS({
|
|
|
9142
9142
|
"../../node_modules/fast-glob/out/readers/reader.js"(exports2) {
|
|
9143
9143
|
"use strict";
|
|
9144
9144
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
9145
|
-
var
|
|
9145
|
+
var path27 = require("path");
|
|
9146
9146
|
var fsStat = require_out();
|
|
9147
9147
|
var utils = require_utils3();
|
|
9148
9148
|
var Reader = class {
|
|
@@ -9155,7 +9155,7 @@ var require_reader2 = __commonJS({
|
|
|
9155
9155
|
});
|
|
9156
9156
|
}
|
|
9157
9157
|
_getFullEntryPath(filepath) {
|
|
9158
|
-
return
|
|
9158
|
+
return path27.resolve(this._settings.cwd, filepath);
|
|
9159
9159
|
}
|
|
9160
9160
|
_makeEntry(stats, pattern) {
|
|
9161
9161
|
const entry = {
|
|
@@ -9222,9 +9222,9 @@ var require_stream3 = __commonJS({
|
|
|
9222
9222
|
});
|
|
9223
9223
|
}
|
|
9224
9224
|
_getStat(filepath) {
|
|
9225
|
-
return new Promise((
|
|
9225
|
+
return new Promise((resolve27, reject) => {
|
|
9226
9226
|
this._stat(filepath, this._fsStatSettings, (error, stats) => {
|
|
9227
|
-
return error === null ?
|
|
9227
|
+
return error === null ? resolve27(stats) : reject(error);
|
|
9228
9228
|
});
|
|
9229
9229
|
});
|
|
9230
9230
|
}
|
|
@@ -9248,10 +9248,10 @@ var require_async5 = __commonJS({
|
|
|
9248
9248
|
this._readerStream = new stream_1.default(this._settings);
|
|
9249
9249
|
}
|
|
9250
9250
|
dynamic(root, options) {
|
|
9251
|
-
return new Promise((
|
|
9251
|
+
return new Promise((resolve27, reject) => {
|
|
9252
9252
|
this._walkAsync(root, options, (error, entries) => {
|
|
9253
9253
|
if (error === null) {
|
|
9254
|
-
|
|
9254
|
+
resolve27(entries);
|
|
9255
9255
|
} else {
|
|
9256
9256
|
reject(error);
|
|
9257
9257
|
}
|
|
@@ -9261,10 +9261,10 @@ var require_async5 = __commonJS({
|
|
|
9261
9261
|
async static(patterns, options) {
|
|
9262
9262
|
const entries = [];
|
|
9263
9263
|
const stream = this._readerStream.static(patterns, options);
|
|
9264
|
-
return new Promise((
|
|
9264
|
+
return new Promise((resolve27, reject) => {
|
|
9265
9265
|
stream.once("error", reject);
|
|
9266
9266
|
stream.on("data", (entry) => entries.push(entry));
|
|
9267
|
-
stream.once("end", () =>
|
|
9267
|
+
stream.once("end", () => resolve27(entries));
|
|
9268
9268
|
});
|
|
9269
9269
|
}
|
|
9270
9270
|
};
|
|
@@ -9571,7 +9571,7 @@ var require_provider = __commonJS({
|
|
|
9571
9571
|
"../../node_modules/fast-glob/out/providers/provider.js"(exports2) {
|
|
9572
9572
|
"use strict";
|
|
9573
9573
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
9574
|
-
var
|
|
9574
|
+
var path27 = require("path");
|
|
9575
9575
|
var deep_1 = require_deep();
|
|
9576
9576
|
var entry_1 = require_entry();
|
|
9577
9577
|
var error_1 = require_error2();
|
|
@@ -9585,7 +9585,7 @@ var require_provider = __commonJS({
|
|
|
9585
9585
|
this.entryTransformer = new entry_2.default(this._settings);
|
|
9586
9586
|
}
|
|
9587
9587
|
_getRootDirectory(task) {
|
|
9588
|
-
return
|
|
9588
|
+
return path27.resolve(this._settings.cwd, task.base);
|
|
9589
9589
|
}
|
|
9590
9590
|
_getReaderOptions(task) {
|
|
9591
9591
|
const basePath = task.base === "." ? "" : task.base;
|
|
@@ -9766,16 +9766,16 @@ var require_settings4 = __commonJS({
|
|
|
9766
9766
|
"use strict";
|
|
9767
9767
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
9768
9768
|
exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
9769
|
-
var
|
|
9769
|
+
var fs22 = require("fs");
|
|
9770
9770
|
var os4 = require("os");
|
|
9771
9771
|
var CPU_COUNT = Math.max(os4.cpus().length, 1);
|
|
9772
9772
|
exports2.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
9773
|
-
lstat:
|
|
9774
|
-
lstatSync:
|
|
9775
|
-
stat:
|
|
9776
|
-
statSync:
|
|
9777
|
-
readdir:
|
|
9778
|
-
readdirSync:
|
|
9773
|
+
lstat: fs22.lstat,
|
|
9774
|
+
lstatSync: fs22.lstatSync,
|
|
9775
|
+
stat: fs22.stat,
|
|
9776
|
+
statSync: fs22.statSync,
|
|
9777
|
+
readdir: fs22.readdir,
|
|
9778
|
+
readdirSync: fs22.readdirSync
|
|
9779
9779
|
};
|
|
9780
9780
|
var Settings = class {
|
|
9781
9781
|
constructor(_options = {}) {
|
|
@@ -10282,7 +10282,7 @@ var require_ignore = __commonJS({
|
|
|
10282
10282
|
// path matching.
|
|
10283
10283
|
// - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
|
|
10284
10284
|
// @returns {TestResult} true if a file is ignored
|
|
10285
|
-
test(
|
|
10285
|
+
test(path27, checkUnignored, mode) {
|
|
10286
10286
|
let ignored = false;
|
|
10287
10287
|
let unignored = false;
|
|
10288
10288
|
let matchedRule;
|
|
@@ -10291,7 +10291,7 @@ var require_ignore = __commonJS({
|
|
|
10291
10291
|
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
|
|
10292
10292
|
return;
|
|
10293
10293
|
}
|
|
10294
|
-
const matched = rule[mode].test(
|
|
10294
|
+
const matched = rule[mode].test(path27);
|
|
10295
10295
|
if (!matched) {
|
|
10296
10296
|
return;
|
|
10297
10297
|
}
|
|
@@ -10312,17 +10312,17 @@ var require_ignore = __commonJS({
|
|
|
10312
10312
|
var throwError = (message, Ctor) => {
|
|
10313
10313
|
throw new Ctor(message);
|
|
10314
10314
|
};
|
|
10315
|
-
var checkPath = (
|
|
10316
|
-
if (!isString(
|
|
10315
|
+
var checkPath = (path27, originalPath, doThrow) => {
|
|
10316
|
+
if (!isString(path27)) {
|
|
10317
10317
|
return doThrow(
|
|
10318
10318
|
`path must be a string, but got \`${originalPath}\``,
|
|
10319
10319
|
TypeError
|
|
10320
10320
|
);
|
|
10321
10321
|
}
|
|
10322
|
-
if (!
|
|
10322
|
+
if (!path27) {
|
|
10323
10323
|
return doThrow(`path must not be empty`, TypeError);
|
|
10324
10324
|
}
|
|
10325
|
-
if (checkPath.isNotRelative(
|
|
10325
|
+
if (checkPath.isNotRelative(path27)) {
|
|
10326
10326
|
const r = "`path.relative()`d";
|
|
10327
10327
|
return doThrow(
|
|
10328
10328
|
`path should be a ${r} string, but got "${originalPath}"`,
|
|
@@ -10331,7 +10331,7 @@ var require_ignore = __commonJS({
|
|
|
10331
10331
|
}
|
|
10332
10332
|
return true;
|
|
10333
10333
|
};
|
|
10334
|
-
var isNotRelative = (
|
|
10334
|
+
var isNotRelative = (path27) => REGEX_TEST_INVALID_PATH.test(path27);
|
|
10335
10335
|
checkPath.isNotRelative = isNotRelative;
|
|
10336
10336
|
checkPath.convert = (p) => p;
|
|
10337
10337
|
var Ignore = class {
|
|
@@ -10361,19 +10361,19 @@ var require_ignore = __commonJS({
|
|
|
10361
10361
|
}
|
|
10362
10362
|
// @returns {TestResult}
|
|
10363
10363
|
_test(originalPath, cache, checkUnignored, slices) {
|
|
10364
|
-
const
|
|
10364
|
+
const path27 = originalPath && checkPath.convert(originalPath);
|
|
10365
10365
|
checkPath(
|
|
10366
|
-
|
|
10366
|
+
path27,
|
|
10367
10367
|
originalPath,
|
|
10368
10368
|
this._strictPathCheck ? throwError : RETURN_FALSE
|
|
10369
10369
|
);
|
|
10370
|
-
return this._t(
|
|
10370
|
+
return this._t(path27, cache, checkUnignored, slices);
|
|
10371
10371
|
}
|
|
10372
|
-
checkIgnore(
|
|
10373
|
-
if (!REGEX_TEST_TRAILING_SLASH.test(
|
|
10374
|
-
return this.test(
|
|
10372
|
+
checkIgnore(path27) {
|
|
10373
|
+
if (!REGEX_TEST_TRAILING_SLASH.test(path27)) {
|
|
10374
|
+
return this.test(path27);
|
|
10375
10375
|
}
|
|
10376
|
-
const slices =
|
|
10376
|
+
const slices = path27.split(SLASH).filter(Boolean);
|
|
10377
10377
|
slices.pop();
|
|
10378
10378
|
if (slices.length) {
|
|
10379
10379
|
const parent = this._t(
|
|
@@ -10386,18 +10386,18 @@ var require_ignore = __commonJS({
|
|
|
10386
10386
|
return parent;
|
|
10387
10387
|
}
|
|
10388
10388
|
}
|
|
10389
|
-
return this._rules.test(
|
|
10389
|
+
return this._rules.test(path27, false, MODE_CHECK_IGNORE);
|
|
10390
10390
|
}
|
|
10391
|
-
_t(
|
|
10392
|
-
if (
|
|
10393
|
-
return cache[
|
|
10391
|
+
_t(path27, cache, checkUnignored, slices) {
|
|
10392
|
+
if (path27 in cache) {
|
|
10393
|
+
return cache[path27];
|
|
10394
10394
|
}
|
|
10395
10395
|
if (!slices) {
|
|
10396
|
-
slices =
|
|
10396
|
+
slices = path27.split(SLASH).filter(Boolean);
|
|
10397
10397
|
}
|
|
10398
10398
|
slices.pop();
|
|
10399
10399
|
if (!slices.length) {
|
|
10400
|
-
return cache[
|
|
10400
|
+
return cache[path27] = this._rules.test(path27, checkUnignored, MODE_IGNORE);
|
|
10401
10401
|
}
|
|
10402
10402
|
const parent = this._t(
|
|
10403
10403
|
slices.join(SLASH) + SLASH,
|
|
@@ -10405,29 +10405,29 @@ var require_ignore = __commonJS({
|
|
|
10405
10405
|
checkUnignored,
|
|
10406
10406
|
slices
|
|
10407
10407
|
);
|
|
10408
|
-
return cache[
|
|
10408
|
+
return cache[path27] = parent.ignored ? parent : this._rules.test(path27, checkUnignored, MODE_IGNORE);
|
|
10409
10409
|
}
|
|
10410
|
-
ignores(
|
|
10411
|
-
return this._test(
|
|
10410
|
+
ignores(path27) {
|
|
10411
|
+
return this._test(path27, this._ignoreCache, false).ignored;
|
|
10412
10412
|
}
|
|
10413
10413
|
createFilter() {
|
|
10414
|
-
return (
|
|
10414
|
+
return (path27) => !this.ignores(path27);
|
|
10415
10415
|
}
|
|
10416
10416
|
filter(paths) {
|
|
10417
10417
|
return makeArray(paths).filter(this.createFilter());
|
|
10418
10418
|
}
|
|
10419
10419
|
// @returns {TestResult}
|
|
10420
|
-
test(
|
|
10421
|
-
return this._test(
|
|
10420
|
+
test(path27) {
|
|
10421
|
+
return this._test(path27, this._testCache, true);
|
|
10422
10422
|
}
|
|
10423
10423
|
};
|
|
10424
10424
|
var factory = (options) => new Ignore(options);
|
|
10425
|
-
var isPathValid = (
|
|
10425
|
+
var isPathValid = (path27) => checkPath(path27 && checkPath.convert(path27), path27, RETURN_FALSE);
|
|
10426
10426
|
var setupWindows = () => {
|
|
10427
10427
|
const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
|
10428
10428
|
checkPath.convert = makePosix;
|
|
10429
10429
|
const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
10430
|
-
checkPath.isNotRelative = (
|
|
10430
|
+
checkPath.isNotRelative = (path27) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path27) || isNotRelative(path27);
|
|
10431
10431
|
};
|
|
10432
10432
|
if (
|
|
10433
10433
|
// Detect `process` so that it can run in browsers.
|
|
@@ -10443,12 +10443,12 @@ var require_ignore = __commonJS({
|
|
|
10443
10443
|
});
|
|
10444
10444
|
|
|
10445
10445
|
// ../../node_modules/globby/node_modules/slash/index.js
|
|
10446
|
-
function slash(
|
|
10447
|
-
const isExtendedLengthPath =
|
|
10446
|
+
function slash(path27) {
|
|
10447
|
+
const isExtendedLengthPath = path27.startsWith("\\\\?\\");
|
|
10448
10448
|
if (isExtendedLengthPath) {
|
|
10449
|
-
return
|
|
10449
|
+
return path27;
|
|
10450
10450
|
}
|
|
10451
|
-
return
|
|
10451
|
+
return path27.replace(/\\/g, "/");
|
|
10452
10452
|
}
|
|
10453
10453
|
var init_slash = __esm({
|
|
10454
10454
|
"../../node_modules/globby/node_modules/slash/index.js"() {
|
|
@@ -10588,8 +10588,8 @@ var init_globby = __esm({
|
|
|
10588
10588
|
}
|
|
10589
10589
|
};
|
|
10590
10590
|
normalizePathForDirectoryGlob = (filePath, cwd) => {
|
|
10591
|
-
const
|
|
10592
|
-
return import_node_path2.default.isAbsolute(
|
|
10591
|
+
const path27 = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
|
|
10592
|
+
return import_node_path2.default.isAbsolute(path27) ? path27 : import_node_path2.default.join(cwd, path27);
|
|
10593
10593
|
};
|
|
10594
10594
|
getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
10595
10595
|
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
@@ -13191,14 +13191,14 @@ var init_open = __esm({
|
|
|
13191
13191
|
}
|
|
13192
13192
|
const subprocess = import_node_child_process6.default.spawn(command, cliArguments, childProcessOptions);
|
|
13193
13193
|
if (options.wait) {
|
|
13194
|
-
return new Promise((
|
|
13194
|
+
return new Promise((resolve27, reject) => {
|
|
13195
13195
|
subprocess.once("error", reject);
|
|
13196
13196
|
subprocess.once("close", (exitCode) => {
|
|
13197
13197
|
if (!options.allowNonzeroExitCode && exitCode > 0) {
|
|
13198
13198
|
reject(new Error(`Exited with code ${exitCode}`));
|
|
13199
13199
|
return;
|
|
13200
13200
|
}
|
|
13201
|
-
|
|
13201
|
+
resolve27(subprocess);
|
|
13202
13202
|
});
|
|
13203
13203
|
});
|
|
13204
13204
|
}
|
|
@@ -13539,7 +13539,7 @@ function execAsync(cmd, options = {}) {
|
|
|
13539
13539
|
if (verbose) {
|
|
13540
13540
|
console.log(`+ ${cmd}`);
|
|
13541
13541
|
}
|
|
13542
|
-
return new Promise((
|
|
13542
|
+
return new Promise((resolve27, reject) => {
|
|
13543
13543
|
const [command, ...args] = cmd.split(" ");
|
|
13544
13544
|
const childProcess2 = child.spawn(command, args, {
|
|
13545
13545
|
shell: true,
|
|
@@ -13573,7 +13573,7 @@ ${stderr}`.trim();
|
|
|
13573
13573
|
return;
|
|
13574
13574
|
}
|
|
13575
13575
|
}
|
|
13576
|
-
|
|
13576
|
+
resolve27(stdout.trim());
|
|
13577
13577
|
});
|
|
13578
13578
|
childProcess2.on("error", (error) => {
|
|
13579
13579
|
const errorMsg = `Command failed: ${cmd}
|
|
@@ -13596,7 +13596,7 @@ function execForeground(cmd, options = {}) {
|
|
|
13596
13596
|
if (verbose) {
|
|
13597
13597
|
console.log(`+ ${cmd}`);
|
|
13598
13598
|
}
|
|
13599
|
-
return new Promise((
|
|
13599
|
+
return new Promise((resolve27, reject) => {
|
|
13600
13600
|
const [command, ...args] = cmd.split(" ");
|
|
13601
13601
|
const childProcess2 = child.spawn(command, args, {
|
|
13602
13602
|
shell: true,
|
|
@@ -13608,7 +13608,7 @@ function execForeground(cmd, options = {}) {
|
|
|
13608
13608
|
reject(new Error(`Command "${cmd}" exited with code ${code ?? 1}`));
|
|
13609
13609
|
return;
|
|
13610
13610
|
}
|
|
13611
|
-
|
|
13611
|
+
resolve27();
|
|
13612
13612
|
});
|
|
13613
13613
|
childProcess2.on("error", (error) => {
|
|
13614
13614
|
reject(new Error(`Command "${cmd}" failed: ${error.message}`));
|
|
@@ -13620,31 +13620,31 @@ function execForeground(cmd, options = {}) {
|
|
|
13620
13620
|
function escapeDoubleQuotesAndBackslashes(str) {
|
|
13621
13621
|
return str.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
13622
13622
|
}
|
|
13623
|
-
function isGitRepository(
|
|
13624
|
-
const isGitRepo = exec("git rev-parse --is-inside-work-tree", { silent: true, cwd:
|
|
13623
|
+
function isGitRepository(path27) {
|
|
13624
|
+
const isGitRepo = exec("git rev-parse --is-inside-work-tree", { silent: true, cwd: path27 }).toLocaleLowerCase() === "true";
|
|
13625
13625
|
return isGitRepo;
|
|
13626
13626
|
}
|
|
13627
|
-
function getGitRoot(
|
|
13628
|
-
const fileString = exec("git rev-parse --show-toplevel", { cwd:
|
|
13627
|
+
function getGitRoot(path27) {
|
|
13628
|
+
const fileString = exec("git rev-parse --show-toplevel", { cwd: path27 });
|
|
13629
13629
|
return (0, import_path.resolve)(fileString);
|
|
13630
13630
|
}
|
|
13631
|
-
function hasChanges(
|
|
13632
|
-
return getUncommittedChanges(
|
|
13631
|
+
function hasChanges(path27) {
|
|
13632
|
+
return getUncommittedChanges(path27).length > 0;
|
|
13633
13633
|
}
|
|
13634
|
-
function getUncommittedChanges(
|
|
13635
|
-
return exec("git status --porcelain", { cwd:
|
|
13634
|
+
function getUncommittedChanges(path27) {
|
|
13635
|
+
return exec("git status --porcelain", { cwd: path27 }).split("\n").filter((value) => value.trim().length !== 0).map(
|
|
13636
13636
|
(fileInfo) => (
|
|
13637
13637
|
// Extract relative file path from the info string and convert to absolute path
|
|
13638
|
-
(0, import_path.resolve)(
|
|
13638
|
+
(0, import_path.resolve)(path27 ?? process.cwd(), fileInfo.trim().split(" ").pop() ?? "")
|
|
13639
13639
|
)
|
|
13640
13640
|
);
|
|
13641
13641
|
}
|
|
13642
|
-
function commitChanges(message,
|
|
13643
|
-
exec("git add .", { cwd:
|
|
13644
|
-
exec(`git commit -m "${escapeDoubleQuotesAndBackslashes(message)}"`, { cwd:
|
|
13642
|
+
function commitChanges(message, path27) {
|
|
13643
|
+
exec("git add .", { cwd: path27 });
|
|
13644
|
+
exec(`git commit -m "${escapeDoubleQuotesAndBackslashes(message)}"`, { cwd: path27 });
|
|
13645
13645
|
}
|
|
13646
|
-
function getChangesOfLastCommit(
|
|
13647
|
-
return exec("git diff --name-only HEAD^", { cwd:
|
|
13646
|
+
function getChangesOfLastCommit(path27) {
|
|
13647
|
+
return exec("git diff --name-only HEAD^", { cwd: path27 }).split("\n").map((file) => (0, import_path.resolve)(path27 ?? process.cwd(), file));
|
|
13648
13648
|
}
|
|
13649
13649
|
function getLastModificationDate(filePath, repoRoot, excludeMessage) {
|
|
13650
13650
|
const additionalArgs = excludeMessage ? `--grep="${excludeMessage}" --invert-grep` : "";
|
|
@@ -13655,22 +13655,22 @@ function getLastModificationDate(filePath, repoRoot, excludeMessage) {
|
|
|
13655
13655
|
return void 0;
|
|
13656
13656
|
}
|
|
13657
13657
|
}
|
|
13658
|
-
function getRemoteUrl(
|
|
13659
|
-
return exec("git config --get remote.origin.url", { cwd:
|
|
13658
|
+
function getRemoteUrl(path27) {
|
|
13659
|
+
return exec("git config --get remote.origin.url", { cwd: path27 });
|
|
13660
13660
|
}
|
|
13661
|
-
function createBranch(branch,
|
|
13662
|
-
exec(`git checkout -B ${branch}`, { cwd:
|
|
13661
|
+
function createBranch(branch, path27) {
|
|
13662
|
+
exec(`git checkout -B ${branch}`, { cwd: path27 });
|
|
13663
13663
|
}
|
|
13664
|
-
function getDefaultBranch(
|
|
13665
|
-
const output = exec("git remote show origin", { cwd:
|
|
13664
|
+
function getDefaultBranch(path27) {
|
|
13665
|
+
const output = exec("git remote show origin", { cwd: path27 });
|
|
13666
13666
|
const match = output.match(/HEAD branch: (.+)/);
|
|
13667
13667
|
return match ? match[1].trim() : "master";
|
|
13668
13668
|
}
|
|
13669
13669
|
|
|
13670
13670
|
// src/util/glsp-repo-util.ts
|
|
13671
13671
|
var GLSPRepo;
|
|
13672
|
-
((
|
|
13673
|
-
|
|
13672
|
+
((GLSPRepo11) => {
|
|
13673
|
+
GLSPRepo11.choices = [
|
|
13674
13674
|
"glsp",
|
|
13675
13675
|
"glsp-server-node",
|
|
13676
13676
|
"glsp-client",
|
|
@@ -13681,13 +13681,13 @@ var GLSPRepo;
|
|
|
13681
13681
|
"glsp-playwright"
|
|
13682
13682
|
];
|
|
13683
13683
|
function is(object) {
|
|
13684
|
-
return typeof object === "string" &&
|
|
13684
|
+
return typeof object === "string" && GLSPRepo11.choices.includes(object);
|
|
13685
13685
|
}
|
|
13686
|
-
|
|
13686
|
+
GLSPRepo11.is = is;
|
|
13687
13687
|
function isNpmRepo(repo) {
|
|
13688
13688
|
return repo !== "glsp-server" && repo !== "glsp-eclipse-integration";
|
|
13689
13689
|
}
|
|
13690
|
-
|
|
13690
|
+
GLSPRepo11.isNpmRepo = isNpmRepo;
|
|
13691
13691
|
function deriveFromDirectory(repoDir) {
|
|
13692
13692
|
const remoteUrl = getRemoteUrl(repoDir);
|
|
13693
13693
|
const repo = remoteUrl.substring(remoteUrl.lastIndexOf("/") + 1).replace(".git", "");
|
|
@@ -13700,7 +13700,7 @@ var GLSPRepo;
|
|
|
13700
13700
|
}
|
|
13701
13701
|
return repo;
|
|
13702
13702
|
}
|
|
13703
|
-
|
|
13703
|
+
GLSPRepo11.deriveFromDirectory = deriveFromDirectory;
|
|
13704
13704
|
})(GLSPRepo || (GLSPRepo = {}));
|
|
13705
13705
|
function checkGHCli() {
|
|
13706
13706
|
LOGGER.debug("Verify that Github CLI is configured correctly");
|
|
@@ -13870,14 +13870,14 @@ function getYarnWorkspacePackages(rootPath, includeRoot = false) {
|
|
|
13870
13870
|
var fs6 = __toESM(require("fs"));
|
|
13871
13871
|
var import_path2 = require("path");
|
|
13872
13872
|
function validateDirectory(rootDir) {
|
|
13873
|
-
const
|
|
13874
|
-
if (!fs6.existsSync(
|
|
13875
|
-
throw new InvalidArgumentError(`Not a valid file path!: ${
|
|
13873
|
+
const path27 = (0, import_path2.resolve)(rootDir);
|
|
13874
|
+
if (!fs6.existsSync(path27)) {
|
|
13875
|
+
throw new InvalidArgumentError(`Not a valid file path!: ${path27}`);
|
|
13876
13876
|
}
|
|
13877
|
-
if (!fs6.statSync(
|
|
13878
|
-
throw new InvalidArgumentError(`Not a directory!: ${
|
|
13877
|
+
if (!fs6.statSync(path27).isDirectory()) {
|
|
13878
|
+
throw new InvalidArgumentError(`Not a directory!: ${path27}`);
|
|
13879
13879
|
}
|
|
13880
|
-
return
|
|
13880
|
+
return path27;
|
|
13881
13881
|
}
|
|
13882
13882
|
function validateGitDirectory(repository) {
|
|
13883
13883
|
const repoPath = validateDirectory(repository);
|
|
@@ -14702,6 +14702,7 @@ var readline = __toESM(require("readline"));
|
|
|
14702
14702
|
var GLSP_GITHUB_ORG = "eclipse-glsp";
|
|
14703
14703
|
var THEIA_URL = "http://localhost:3000";
|
|
14704
14704
|
var VSIX_TARGET_DIR = "example/workflow/extension";
|
|
14705
|
+
var WEB_VSIX_TARGET_DIR = "example/workflow/web-extension";
|
|
14705
14706
|
function configureRepoEnv(options) {
|
|
14706
14707
|
configureEnv(options);
|
|
14707
14708
|
}
|
|
@@ -14784,9 +14785,9 @@ function isLeafRepo(repo) {
|
|
|
14784
14785
|
function prompt(question) {
|
|
14785
14786
|
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
14786
14787
|
return new Promise(
|
|
14787
|
-
(
|
|
14788
|
+
(resolve27) => rl.question(question, (answer) => {
|
|
14788
14789
|
rl.close();
|
|
14789
|
-
|
|
14790
|
+
resolve27(answer);
|
|
14790
14791
|
})
|
|
14791
14792
|
);
|
|
14792
14793
|
}
|
|
@@ -15449,19 +15450,229 @@ var TheiaOpenCommand = baseCommand().name("open").description("Open the Theia ap
|
|
|
15449
15450
|
await openTarget(THEIA_URL);
|
|
15450
15451
|
});
|
|
15451
15452
|
|
|
15452
|
-
// src/commands/repo/
|
|
15453
|
+
// src/commands/repo/playwright.ts
|
|
15454
|
+
var fs20 = __toESM(require("fs"));
|
|
15455
|
+
var path21 = __toESM(require("path"));
|
|
15456
|
+
|
|
15457
|
+
// src/commands/repo/server-node.ts
|
|
15458
|
+
var fs19 = __toESM(require("fs"));
|
|
15453
15459
|
var path19 = __toESM(require("path"));
|
|
15460
|
+
var BROWSER_BUNDLE_PATH = "examples/workflow-server-bundled-web/wf-glsp-server-webworker.js";
|
|
15461
|
+
var NODE_BUNDLE_PATH = "examples/workflow-server-bundled/wf-glsp-server-node.js";
|
|
15462
|
+
function resolveBundlePath(repoDir, relativePath, label) {
|
|
15463
|
+
const bundlePath = path19.resolve(repoDir, relativePath);
|
|
15464
|
+
if (!fs19.existsSync(bundlePath)) {
|
|
15465
|
+
throw new Error(`${label} not found at ${bundlePath}. Run 'glsp repo server-node build' first.`);
|
|
15466
|
+
}
|
|
15467
|
+
return bundlePath;
|
|
15468
|
+
}
|
|
15469
|
+
var BrowserBundleCommand = baseCommand().name("browser-bundle").description("Print the absolute path to the browser (Web Worker) server bundle").option("-d, --dir <path>", "Target directory where repos are cloned").option("-v, --verbose", "Verbose output", false).action(async (_cmdOptions, thisCmd) => {
|
|
15470
|
+
const cli = thisCmd.opts();
|
|
15471
|
+
configureRepoEnv(cli);
|
|
15472
|
+
const dir = resolveWorkspaceDir(cli.dir);
|
|
15473
|
+
const repoDir = path19.resolve(dir, "glsp-server-node");
|
|
15474
|
+
const bundlePath = resolveBundlePath(repoDir, BROWSER_BUNDLE_PATH, "Browser bundle");
|
|
15475
|
+
process.stdout.write(bundlePath);
|
|
15476
|
+
});
|
|
15477
|
+
var NodeBundleCommand = baseCommand().name("node-bundle").description("Print the absolute path to the Node.js server bundle").option("-d, --dir <path>", "Target directory where repos are cloned").option("-v, --verbose", "Verbose output", false).action(async (_cmdOptions, thisCmd) => {
|
|
15478
|
+
const cli = thisCmd.opts();
|
|
15479
|
+
configureRepoEnv(cli);
|
|
15480
|
+
const dir = resolveWorkspaceDir(cli.dir);
|
|
15481
|
+
const repoDir = path19.resolve(dir, "glsp-server-node");
|
|
15482
|
+
const bundlePath = resolveBundlePath(repoDir, NODE_BUNDLE_PATH, "Node server bundle");
|
|
15483
|
+
process.stdout.write(bundlePath);
|
|
15484
|
+
});
|
|
15485
|
+
|
|
15486
|
+
// src/commands/repo/vscode.ts
|
|
15487
|
+
var path20 = __toESM(require("path"));
|
|
15488
|
+
var VSIX_ID = "eclipse-glsp.workflow-vscode-example";
|
|
15489
|
+
var WEB_VSIX_ID = "eclipse-glsp.workflow-vscode-example-web";
|
|
15490
|
+
var VscodePackageCommand = baseCommand().name("package").description("Package the workflow VS Code extension as a VSIX").option("-d, --dir <path>", "Target directory where repos are cloned").option("-v, --verbose", "Verbose output", false).action(async (_cmdOptions, thisCmd) => {
|
|
15491
|
+
const cli = thisCmd.opts();
|
|
15492
|
+
configureRepoEnv(cli);
|
|
15493
|
+
const dir = resolveWorkspaceDir(cli.dir);
|
|
15494
|
+
const repoDir = path20.resolve(dir, "glsp-vscode-integration");
|
|
15495
|
+
await execAsync("yarn workflow package", { cwd: repoDir, silent: false, env: { FORCE_COLOR: "1" } });
|
|
15496
|
+
});
|
|
15497
|
+
var VscodeWebPackageCommand = baseCommand().name("web-package").description("Package the workflow VS Code web extension as a VSIX").option("-d, --dir <path>", "Target directory where repos are cloned").option("-v, --verbose", "Verbose output", false).action(async (_cmdOptions, thisCmd) => {
|
|
15498
|
+
const cli = thisCmd.opts();
|
|
15499
|
+
configureRepoEnv(cli);
|
|
15500
|
+
const dir = resolveWorkspaceDir(cli.dir);
|
|
15501
|
+
const repoDir = path20.resolve(dir, "glsp-vscode-integration");
|
|
15502
|
+
await execAsync("yarn workflow:web package", { cwd: repoDir, silent: false, env: { FORCE_COLOR: "1" } });
|
|
15503
|
+
});
|
|
15504
|
+
var VsixPathCommand = baseCommand().name("vsix-path").description("Print the path to the workflow VSIX file").option("-d, --dir <path>", "Target directory where repos are cloned").option("-v, --verbose", "Verbose output", false).action(async (_cmdOptions, thisCmd) => {
|
|
15505
|
+
const cli = thisCmd.opts();
|
|
15506
|
+
configureRepoEnv(cli);
|
|
15507
|
+
const dir = resolveWorkspaceDir(cli.dir);
|
|
15508
|
+
const repoDir = path20.resolve(dir, "glsp-vscode-integration");
|
|
15509
|
+
const vsixPath = discoverVsix(repoDir);
|
|
15510
|
+
process.stdout.write(vsixPath);
|
|
15511
|
+
});
|
|
15512
|
+
var WebVsixPathCommand = baseCommand().name("web-vsix-path").description("Print the path to the workflow web extension VSIX file").option("-d, --dir <path>", "Target directory where repos are cloned").option("-v, --verbose", "Verbose output", false).action(async (_cmdOptions, thisCmd) => {
|
|
15513
|
+
const cli = thisCmd.opts();
|
|
15514
|
+
configureRepoEnv(cli);
|
|
15515
|
+
const dir = resolveWorkspaceDir(cli.dir);
|
|
15516
|
+
const repoDir = path20.resolve(dir, "glsp-vscode-integration");
|
|
15517
|
+
const vsixPath = discoverWebVsix(repoDir);
|
|
15518
|
+
process.stdout.write(vsixPath);
|
|
15519
|
+
});
|
|
15520
|
+
var VsixIdCommand = baseCommand().name("vsix-id").description("Print the VSIX ID of the workflow VS Code extension").action(() => {
|
|
15521
|
+
process.stdout.write(VSIX_ID);
|
|
15522
|
+
});
|
|
15523
|
+
var WebVsixIdCommand = baseCommand().name("web-vsix-id").description("Print the VSIX ID of the workflow VS Code web extension").action(() => {
|
|
15524
|
+
process.stdout.write(WEB_VSIX_ID);
|
|
15525
|
+
});
|
|
15526
|
+
function discoverVsix(repoDir) {
|
|
15527
|
+
const vsixDir = path20.resolve(repoDir, VSIX_TARGET_DIR);
|
|
15528
|
+
return discoverNewestFile("*.vsix", vsixDir, `No .vsix file found in ${vsixDir}. Run 'glsp repo vscode package' first.`);
|
|
15529
|
+
}
|
|
15530
|
+
function discoverWebVsix(repoDir) {
|
|
15531
|
+
const vsixDir = path20.resolve(repoDir, WEB_VSIX_TARGET_DIR);
|
|
15532
|
+
return discoverNewestFile("*.vsix", vsixDir, `No .vsix file found in ${vsixDir}. Run 'glsp repo vscode web-package' first.`);
|
|
15533
|
+
}
|
|
15534
|
+
|
|
15535
|
+
// src/commands/repo/playwright.ts
|
|
15536
|
+
var DEFAULT_TARGET_DIR = "examples/workflow-test";
|
|
15537
|
+
function generatePlaywrightEnvContent(options) {
|
|
15538
|
+
const { dir, discoveredRepos } = options;
|
|
15539
|
+
const lines = [];
|
|
15540
|
+
lines.push("# Generated by: glsp repo playwright env");
|
|
15541
|
+
lines.push("# Regenerate this file after workspace changes.");
|
|
15542
|
+
lines.push("");
|
|
15543
|
+
lines.push("# Optional port overrides (uncomment to change defaults)");
|
|
15544
|
+
lines.push("# GLSP_SERVER_PORT=8081");
|
|
15545
|
+
lines.push("# STANDALONE_PORT=8082");
|
|
15546
|
+
lines.push("# STANDALONE_BROWSER_PORT=8083");
|
|
15547
|
+
lines.push("# THEIA_PORT=3000");
|
|
15548
|
+
lines.push("");
|
|
15549
|
+
const hasServerNode = discoveredRepos.includes("glsp-server-node");
|
|
15550
|
+
const hasClient = discoveredRepos.includes("glsp-client");
|
|
15551
|
+
if (hasServerNode && hasClient) {
|
|
15552
|
+
lines.push("# Standalone Node (WebSocket)");
|
|
15553
|
+
lines.push("GLSP_SERVER_START_CMD=glsp repo server-node start");
|
|
15554
|
+
lines.push("STANDALONE_START_CMD=glsp repo client run start -- --external-server --no-open");
|
|
15555
|
+
} else {
|
|
15556
|
+
lines.push("# Standalone Node (WebSocket) \u2014 missing repos, uncomment when available");
|
|
15557
|
+
lines.push("# GLSP_SERVER_START_CMD=glsp repo server-node start");
|
|
15558
|
+
lines.push("# STANDALONE_START_CMD=glsp repo client run start -- --external-server --no-open");
|
|
15559
|
+
}
|
|
15560
|
+
lines.push("");
|
|
15561
|
+
if (hasServerNode && hasClient) {
|
|
15562
|
+
const bundlePath = path21.resolve(dir, "glsp-server-node", BROWSER_BUNDLE_PATH);
|
|
15563
|
+
const bundleExists = fs20.existsSync(bundlePath);
|
|
15564
|
+
lines.push("# Standalone Browser (Web Worker)");
|
|
15565
|
+
if (bundleExists) {
|
|
15566
|
+
lines.push(`STANDALONE_BROWSER_START_CMD=glsp repo client run start:browser -- --external-server ${bundlePath} --no-open`);
|
|
15567
|
+
} else {
|
|
15568
|
+
LOGGER.warn(`Browser bundle not found at ${bundlePath}. Build glsp-server-node first.`);
|
|
15569
|
+
lines.push(`# STANDALONE_BROWSER_START_CMD=glsp repo client run start:browser -- --external-server ${bundlePath} --no-open`);
|
|
15570
|
+
}
|
|
15571
|
+
} else {
|
|
15572
|
+
lines.push("# Standalone Browser (Web Worker) \u2014 missing repos, uncomment when available");
|
|
15573
|
+
lines.push("# STANDALONE_BROWSER_START_CMD=glsp repo client run start:browser -- --external-server <bundle-path> --no-open");
|
|
15574
|
+
}
|
|
15575
|
+
lines.push("");
|
|
15576
|
+
const hasTheia = discoveredRepos.includes("glsp-theia-integration");
|
|
15577
|
+
if (hasTheia) {
|
|
15578
|
+
lines.push("# Theia");
|
|
15579
|
+
lines.push("THEIA_START_CMD=glsp repo theia start");
|
|
15580
|
+
} else {
|
|
15581
|
+
lines.push("# Theia \u2014 repo not found, uncomment when available");
|
|
15582
|
+
lines.push("# THEIA_START_CMD=glsp repo theia start");
|
|
15583
|
+
}
|
|
15584
|
+
lines.push("");
|
|
15585
|
+
const hasVscode = discoveredRepos.includes("glsp-vscode-integration");
|
|
15586
|
+
if (hasVscode) {
|
|
15587
|
+
const vscodeRepoDir = path21.resolve(dir, "glsp-vscode-integration");
|
|
15588
|
+
lines.push("# VSCode");
|
|
15589
|
+
lines.push(`VSCODE_VSIX_ID=${VSIX_ID}`);
|
|
15590
|
+
let vsixPath;
|
|
15591
|
+
try {
|
|
15592
|
+
vsixPath = discoverVsix(vscodeRepoDir);
|
|
15593
|
+
} catch {
|
|
15594
|
+
LOGGER.warn("VSIX file not found. Build and package the VSCode extension first.");
|
|
15595
|
+
}
|
|
15596
|
+
if (vsixPath) {
|
|
15597
|
+
lines.push(`VSCODE_VSIX_PATH=${vsixPath}`);
|
|
15598
|
+
} else {
|
|
15599
|
+
lines.push("# VSCODE_VSIX_PATH=<path-to-vsix>");
|
|
15600
|
+
}
|
|
15601
|
+
lines.push("");
|
|
15602
|
+
lines.push("# VSCode Web Extension");
|
|
15603
|
+
lines.push(`VSCODE_WEB_VSIX_ID=${WEB_VSIX_ID}`);
|
|
15604
|
+
let webVsixPath;
|
|
15605
|
+
try {
|
|
15606
|
+
webVsixPath = discoverWebVsix(vscodeRepoDir);
|
|
15607
|
+
} catch {
|
|
15608
|
+
LOGGER.warn("Web extension VSIX file not found. Build and package the web extension first.");
|
|
15609
|
+
}
|
|
15610
|
+
if (webVsixPath) {
|
|
15611
|
+
lines.push(`VSCODE_WEB_VSIX_PATH=${webVsixPath}`);
|
|
15612
|
+
} else {
|
|
15613
|
+
lines.push("# VSCODE_WEB_VSIX_PATH=<path-to-web-vsix>");
|
|
15614
|
+
}
|
|
15615
|
+
} else {
|
|
15616
|
+
lines.push("# VSCode \u2014 repo not found, uncomment when available");
|
|
15617
|
+
lines.push(`# VSCODE_VSIX_ID=${VSIX_ID}`);
|
|
15618
|
+
lines.push("# VSCODE_VSIX_PATH=<path-to-vsix>");
|
|
15619
|
+
lines.push("");
|
|
15620
|
+
lines.push("# VSCode Web Extension \u2014 repo not found, uncomment when available");
|
|
15621
|
+
lines.push(`# VSCODE_WEB_VSIX_ID=${WEB_VSIX_ID}`);
|
|
15622
|
+
lines.push("# VSCODE_WEB_VSIX_PATH=<path-to-web-vsix>");
|
|
15623
|
+
}
|
|
15624
|
+
lines.push("");
|
|
15625
|
+
return lines.join("\n");
|
|
15626
|
+
}
|
|
15627
|
+
var PlaywrightEnvCommand = baseCommand().name("env").description("Generate a .env file for Playwright testing").option("-d, --dir <path>", "Target directory where repos are cloned").option("-t, --target-dir <path>", "Target directory for the .env file (default: glsp-playwright/examples/workflow-test)").option("-v, --verbose", "Verbose output", false).action(async (_cmdOptions, thisCmd) => {
|
|
15628
|
+
const cli = thisCmd.opts();
|
|
15629
|
+
configureRepoEnv(cli);
|
|
15630
|
+
const dir = resolveWorkspaceDir(cli.dir);
|
|
15631
|
+
const discoveredRepos = discoverRepos(dir);
|
|
15632
|
+
const content = generatePlaywrightEnvContent({ dir, discoveredRepos });
|
|
15633
|
+
let targetDir;
|
|
15634
|
+
if (cli.targetDir) {
|
|
15635
|
+
targetDir = path21.resolve(cli.targetDir);
|
|
15636
|
+
} else {
|
|
15637
|
+
const playwrightRepo = path21.resolve(dir, "glsp-playwright");
|
|
15638
|
+
if (!discoveredRepos.includes("glsp-playwright")) {
|
|
15639
|
+
throw new Error(`glsp-playwright repo not found in '${dir}'. Use --target-dir to specify an alternative output directory.`);
|
|
15640
|
+
}
|
|
15641
|
+
targetDir = path21.resolve(playwrightRepo, DEFAULT_TARGET_DIR);
|
|
15642
|
+
}
|
|
15643
|
+
const envFile = path21.resolve(targetDir, ".env");
|
|
15644
|
+
fs20.mkdirSync(targetDir, { recursive: true });
|
|
15645
|
+
fs20.writeFileSync(envFile, content, "utf-8");
|
|
15646
|
+
LOGGER.info(`Generated ${envFile}`);
|
|
15647
|
+
});
|
|
15648
|
+
|
|
15649
|
+
// src/commands/repo/run.ts
|
|
15650
|
+
var path22 = __toESM(require("path"));
|
|
15651
|
+
function createScopedRunCommand(repo) {
|
|
15652
|
+
return baseCommand().name("run").allowUnknownOption(true).description(`Run an arbitrary yarn script in ${repo}`).argument("<script>", "The yarn script to run").option("-d, --dir <path>", "Target directory where repos are cloned").option("-v, --verbose", "Verbose output", false).action(async (script, _cmdOptions, thisCmd) => {
|
|
15653
|
+
const cli = thisCmd.opts();
|
|
15654
|
+
configureRepoEnv(cli);
|
|
15655
|
+
const dir = resolveWorkspaceDir(cli.dir);
|
|
15656
|
+
const repoDir = path22.resolve(dir, repo);
|
|
15657
|
+
const passthrough = thisCmd.args.slice(1).join(" ");
|
|
15658
|
+
const cmd = passthrough ? `yarn ${script} ${passthrough}` : `yarn ${script}`;
|
|
15659
|
+
await execForeground(cmd, { cwd: repoDir, verbose: cli.verbose });
|
|
15660
|
+
});
|
|
15661
|
+
}
|
|
15662
|
+
|
|
15663
|
+
// src/commands/repo/start.ts
|
|
15664
|
+
var path23 = __toESM(require("path"));
|
|
15454
15665
|
var JAR_TARGET_DIR = "examples/org.eclipse.glsp.example.workflow/target";
|
|
15455
15666
|
var JAR_PATTERN = "*-glsp.jar";
|
|
15456
15667
|
function discoverJar(repoDir) {
|
|
15457
|
-
const targetDir =
|
|
15668
|
+
const targetDir = path23.resolve(repoDir, JAR_TARGET_DIR);
|
|
15458
15669
|
return discoverNewestFile(JAR_PATTERN, targetDir, `No *-glsp.jar found in ${targetDir}. Run \`glsp repo server build\` first.`);
|
|
15459
15670
|
}
|
|
15460
15671
|
var TheiaStartCommand = baseCommand().name("start").description("Start the Theia application for glsp-theia-integration").option("-d, --dir <path>", "Target directory where repos are cloned").option("--electron", "Start electron variant instead of browser", false).option("--debug", "Connect to external GLSP server for debugging", false).option("-v, --verbose", "Verbose output", false).action(async (_cmdOptions, thisCmd) => {
|
|
15461
15672
|
const cli = thisCmd.opts();
|
|
15462
15673
|
configureRepoEnv(cli);
|
|
15463
15674
|
const dir = resolveWorkspaceDir(cli.dir);
|
|
15464
|
-
const repoDir =
|
|
15675
|
+
const repoDir = path23.resolve(dir, "glsp-theia-integration");
|
|
15465
15676
|
const target = cli.electron ? "electron" : "browser";
|
|
15466
15677
|
const script = cli.debug ? "start:debug" : "start";
|
|
15467
15678
|
await execForeground(`yarn ${target} ${script}`, { cwd: repoDir, verbose: cli.verbose });
|
|
@@ -15470,15 +15681,15 @@ var ClientStartCommand = baseCommand().name("start").description("Start the stan
|
|
|
15470
15681
|
const cli = thisCmd.opts();
|
|
15471
15682
|
configureRepoEnv(cli);
|
|
15472
15683
|
const dir = resolveWorkspaceDir(cli.dir);
|
|
15473
|
-
const repoDir =
|
|
15474
|
-
const script = cli.browser ? "
|
|
15684
|
+
const repoDir = path23.resolve(dir, "glsp-client");
|
|
15685
|
+
const script = cli.browser ? "start:browser" : "start";
|
|
15475
15686
|
await execForeground(`yarn ${script}`, { cwd: repoDir, verbose: cli.verbose });
|
|
15476
15687
|
});
|
|
15477
15688
|
var ServerStartCommand = baseCommand().name("start").description("Start the glsp-server Java GLSP server").option("-d, --dir <path>", "Target directory where repos are cloned").option("--socket", "Use socket connection instead of websocket", false).option("-v, --verbose", "Verbose output", false).action(async (_cmdOptions, thisCmd) => {
|
|
15478
15689
|
const cli = thisCmd.opts();
|
|
15479
15690
|
configureRepoEnv(cli);
|
|
15480
15691
|
const dir = resolveWorkspaceDir(cli.dir);
|
|
15481
|
-
const repoDir =
|
|
15692
|
+
const repoDir = path23.resolve(dir, "glsp-server");
|
|
15482
15693
|
const jarPath = discoverJar(repoDir);
|
|
15483
15694
|
LOGGER.info(`Found JAR: ${jarPath}`);
|
|
15484
15695
|
const javaCmd = cli.socket ? `java -jar ${jarPath} --port=5007` : `java -jar ${jarPath} --websocket --port=8081`;
|
|
@@ -15488,15 +15699,15 @@ var ServerNodeStartCommand = baseCommand().name("start").description("Start the
|
|
|
15488
15699
|
const cli = thisCmd.opts();
|
|
15489
15700
|
configureRepoEnv(cli);
|
|
15490
15701
|
const dir = resolveWorkspaceDir(cli.dir);
|
|
15491
|
-
const repoDir =
|
|
15702
|
+
const repoDir = path23.resolve(dir, "glsp-server-node");
|
|
15492
15703
|
const yarnCmd = cli.socket ? "yarn start" : "yarn start:websocket";
|
|
15493
15704
|
await execForeground(yarnCmd, { cwd: repoDir, verbose: cli.verbose });
|
|
15494
15705
|
});
|
|
15495
15706
|
|
|
15496
15707
|
// src/commands/repo/switch.ts
|
|
15497
|
-
var
|
|
15708
|
+
var path24 = __toESM(require("path"));
|
|
15498
15709
|
function validateReposClean(repos, dir) {
|
|
15499
|
-
const dirty = repos.filter((repo) => hasChanges(
|
|
15710
|
+
const dirty = repos.filter((repo) => hasChanges(path24.resolve(dir, repo)));
|
|
15500
15711
|
if (dirty.length > 0) {
|
|
15501
15712
|
throw new Error(
|
|
15502
15713
|
`The following repositories have uncommitted changes: ${dirty.join(", ")}. Commit or stash your changes first, or use --force.`
|
|
@@ -15504,7 +15715,7 @@ function validateReposClean(repos, dir) {
|
|
|
15504
15715
|
}
|
|
15505
15716
|
}
|
|
15506
15717
|
function switchSingleRepo(repo, options) {
|
|
15507
|
-
const repoDir =
|
|
15718
|
+
const repoDir = path24.resolve(options.dir, repo);
|
|
15508
15719
|
if (options.pr) {
|
|
15509
15720
|
LOGGER.info(`Checking out PR #${options.pr} in ${repo}`);
|
|
15510
15721
|
exec(`gh pr checkout ${options.pr} -R ${GLSP_GITHUB_ORG}/${repo}`, { cwd: repoDir });
|
|
@@ -15557,28 +15768,6 @@ function createScopedSwitchCommand(repo) {
|
|
|
15557
15768
|
return cmd;
|
|
15558
15769
|
}
|
|
15559
15770
|
|
|
15560
|
-
// src/commands/repo/vscode.ts
|
|
15561
|
-
var path21 = __toESM(require("path"));
|
|
15562
|
-
var VscodePackageCommand = baseCommand().name("package").description("Package the workflow VS Code extension as a VSIX").option("-d, --dir <path>", "Target directory where repos are cloned").option("-v, --verbose", "Verbose output", false).action(async (_cmdOptions, thisCmd) => {
|
|
15563
|
-
const cli = thisCmd.opts();
|
|
15564
|
-
configureRepoEnv(cli);
|
|
15565
|
-
const dir = resolveWorkspaceDir(cli.dir);
|
|
15566
|
-
const repoDir = path21.resolve(dir, "glsp-vscode-integration");
|
|
15567
|
-
await execAsync("yarn workflow package", { cwd: repoDir, silent: false, env: { FORCE_COLOR: "1" } });
|
|
15568
|
-
});
|
|
15569
|
-
var VsixPathCommand = baseCommand().name("vsix-path").description("Print the path to the workflow VSIX file").option("-d, --dir <path>", "Target directory where repos are cloned").option("-v, --verbose", "Verbose output", false).action(async (_cmdOptions, thisCmd) => {
|
|
15570
|
-
const cli = thisCmd.opts();
|
|
15571
|
-
configureRepoEnv(cli);
|
|
15572
|
-
const dir = resolveWorkspaceDir(cli.dir);
|
|
15573
|
-
const repoDir = path21.resolve(dir, "glsp-vscode-integration");
|
|
15574
|
-
const vsixPath = discoverVsix(repoDir);
|
|
15575
|
-
process.stdout.write(vsixPath);
|
|
15576
|
-
});
|
|
15577
|
-
function discoverVsix(repoDir) {
|
|
15578
|
-
const vsixDir = path21.resolve(repoDir, VSIX_TARGET_DIR);
|
|
15579
|
-
return discoverNewestFile("*.vsix", vsixDir, `No .vsix file found in ${vsixDir}. Run 'glsp repo vscode package' first.`);
|
|
15580
|
-
}
|
|
15581
|
-
|
|
15582
15771
|
// src/commands/repo/subrepos.ts
|
|
15583
15772
|
var SHORT_ALIASES = {
|
|
15584
15773
|
"glsp-client": "client",
|
|
@@ -15599,10 +15788,19 @@ var OPEN_COMMANDS = {
|
|
|
15599
15788
|
"glsp-theia-integration": TheiaOpenCommand
|
|
15600
15789
|
};
|
|
15601
15790
|
var EXTRA_COMMANDS = {
|
|
15602
|
-
"glsp-
|
|
15791
|
+
"glsp-server-node": [BrowserBundleCommand, NodeBundleCommand],
|
|
15792
|
+
"glsp-vscode-integration": [
|
|
15793
|
+
VsixIdCommand,
|
|
15794
|
+
VsixPathCommand,
|
|
15795
|
+
VscodePackageCommand,
|
|
15796
|
+
WebVsixIdCommand,
|
|
15797
|
+
WebVsixPathCommand,
|
|
15798
|
+
VscodeWebPackageCommand
|
|
15799
|
+
],
|
|
15800
|
+
"glsp-playwright": [PlaywrightEnvCommand]
|
|
15603
15801
|
};
|
|
15604
15802
|
function createSubrepoCommand(repo) {
|
|
15605
|
-
const cmd = baseCommand().name(repo).description(`Operations on the ${repo} repository`).addCommand(createScopedCloneCommand(repo)).addCommand(createScopedSwitchCommand(repo)).addCommand(createScopedBuildCommand(repo)).addCommand(createScopedPwdCommand(repo)).addCommand(createScopedLogCommand(repo));
|
|
15803
|
+
const cmd = baseCommand().name(repo).description(`Operations on the ${repo} repository`).addCommand(createScopedCloneCommand(repo)).addCommand(createScopedSwitchCommand(repo)).addCommand(createScopedBuildCommand(repo)).addCommand(createScopedPwdCommand(repo)).addCommand(createScopedLogCommand(repo)).addCommand(createScopedRunCommand(repo));
|
|
15606
15804
|
const startCmd = START_COMMANDS[repo];
|
|
15607
15805
|
if (startCmd) {
|
|
15608
15806
|
cmd.addCommand(startCmd);
|
|
@@ -15625,14 +15823,14 @@ function createSubrepoCommand(repo) {
|
|
|
15625
15823
|
}
|
|
15626
15824
|
|
|
15627
15825
|
// src/commands/repo/workspace.ts
|
|
15628
|
-
var
|
|
15629
|
-
var
|
|
15826
|
+
var fs21 = __toESM(require("fs"));
|
|
15827
|
+
var path25 = __toESM(require("path"));
|
|
15630
15828
|
var WORKSPACE_FILE_NAME = "glsp.code-workspace";
|
|
15631
15829
|
function generateWorkspaceContent(repos, dir, options) {
|
|
15632
|
-
const outputDir = options.outputPath ?
|
|
15830
|
+
const outputDir = options.outputPath ? path25.dirname(path25.resolve(options.outputPath)) : dir;
|
|
15633
15831
|
const folders = repos.map((repo) => {
|
|
15634
|
-
const repoDir =
|
|
15635
|
-
const relativePath =
|
|
15832
|
+
const repoDir = path25.resolve(dir, repo);
|
|
15833
|
+
const relativePath = path25.relative(outputDir, repoDir);
|
|
15636
15834
|
return { name: repo, path: relativePath };
|
|
15637
15835
|
});
|
|
15638
15836
|
const hasJavaRepos = repos.some((r) => !GLSPRepo.isNpmRepo(r));
|
|
@@ -15697,24 +15895,24 @@ function generateWorkspaceContent(repos, dir, options) {
|
|
|
15697
15895
|
}
|
|
15698
15896
|
function generateWorkspaceFile(repos, dir, options) {
|
|
15699
15897
|
const workspace = generateWorkspaceContent(repos, dir, options);
|
|
15700
|
-
const outputFile = options.outputPath ?
|
|
15701
|
-
|
|
15702
|
-
|
|
15898
|
+
const outputFile = options.outputPath ? path25.resolve(options.outputPath) : path25.join(dir, WORKSPACE_FILE_NAME);
|
|
15899
|
+
fs21.mkdirSync(path25.dirname(outputFile), { recursive: true });
|
|
15900
|
+
fs21.writeFileSync(outputFile, JSON.stringify(workspace, void 0, 4) + "\n", "utf-8");
|
|
15703
15901
|
LOGGER.info(`Workspace file written to ${outputFile}`);
|
|
15704
15902
|
return outputFile;
|
|
15705
15903
|
}
|
|
15706
15904
|
function discoverWorkspaceFile(dir) {
|
|
15707
|
-
if (!
|
|
15905
|
+
if (!fs21.existsSync(dir)) {
|
|
15708
15906
|
return void 0;
|
|
15709
15907
|
}
|
|
15710
|
-
const files =
|
|
15908
|
+
const files = fs21.readdirSync(dir).filter((f) => f.endsWith(".code-workspace"));
|
|
15711
15909
|
if (files.length === 1) {
|
|
15712
|
-
return
|
|
15910
|
+
return path25.join(dir, files[0]);
|
|
15713
15911
|
}
|
|
15714
15912
|
if (files.length > 1) {
|
|
15715
15913
|
const defaultFile = files.find((f) => f === WORKSPACE_FILE_NAME);
|
|
15716
15914
|
if (defaultFile) {
|
|
15717
|
-
return
|
|
15915
|
+
return path25.join(dir, defaultFile);
|
|
15718
15916
|
}
|
|
15719
15917
|
}
|
|
15720
15918
|
return void 0;
|
|
@@ -15752,18 +15950,18 @@ for (const repo of GLSPRepo.choices) {
|
|
|
15752
15950
|
}
|
|
15753
15951
|
|
|
15754
15952
|
// src/commands/update-next.ts
|
|
15755
|
-
var
|
|
15953
|
+
var path26 = __toESM(require("path"));
|
|
15756
15954
|
var UpdateNextCommand = baseCommand().name("updateNext").alias("u").description("Updates all `next` dependencies in GLSP project to the latest version").argument("[rootDir]", "The repository root", validateGitDirectory, process.cwd()).option("-v, --verbose", "Enable verbose (debug) log output", false).action(updateNext);
|
|
15757
15955
|
async function updateNext(rootDir, options) {
|
|
15758
15956
|
configureLogger(options.verbose);
|
|
15759
|
-
const rootPkgPath =
|
|
15957
|
+
const rootPkgPath = path26.join(rootDir, "package.json");
|
|
15760
15958
|
if (getUncommittedChanges(rootDir).includes(rootPkgPath)) {
|
|
15761
15959
|
LOGGER.warn("Uncommitted changes in root `package.json`. Please commit or stash them before running this command.");
|
|
15762
15960
|
return;
|
|
15763
15961
|
}
|
|
15764
15962
|
configureExec({ silent: false, fatal: true });
|
|
15765
15963
|
LOGGER.info("Updating next dependencies ...");
|
|
15766
|
-
rootDir =
|
|
15964
|
+
rootDir = path26.resolve(rootDir);
|
|
15767
15965
|
const packages = getYarnWorkspacePackages(rootDir, true);
|
|
15768
15966
|
LOGGER.debug(`Scanning ${packages.length} packages to derive resolutions`, packages);
|
|
15769
15967
|
const resolutions = await getResolutions(packages);
|