jira-sprinter 2.0.0 → 2.0.1
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/main.js +121 -172
- package/package.json +9 -9
- package/src/cli.ts +7 -7
- package/src/jira.ts +3 -3
package/dist/main.js
CHANGED
|
@@ -30,97 +30,22 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
mod
|
|
31
31
|
));
|
|
32
32
|
|
|
33
|
-
// node_modules/dotenv/package.json
|
|
34
|
-
var require_package = __commonJS({
|
|
35
|
-
"node_modules/dotenv/package.json"(exports2, module2) {
|
|
36
|
-
module2.exports = {
|
|
37
|
-
name: "dotenv",
|
|
38
|
-
version: "17.3.1",
|
|
39
|
-
description: "Loads environment variables from .env file",
|
|
40
|
-
main: "lib/main.js",
|
|
41
|
-
types: "lib/main.d.ts",
|
|
42
|
-
exports: {
|
|
43
|
-
".": {
|
|
44
|
-
types: "./lib/main.d.ts",
|
|
45
|
-
require: "./lib/main.js",
|
|
46
|
-
default: "./lib/main.js"
|
|
47
|
-
},
|
|
48
|
-
"./config": "./config.js",
|
|
49
|
-
"./config.js": "./config.js",
|
|
50
|
-
"./lib/env-options": "./lib/env-options.js",
|
|
51
|
-
"./lib/env-options.js": "./lib/env-options.js",
|
|
52
|
-
"./lib/cli-options": "./lib/cli-options.js",
|
|
53
|
-
"./lib/cli-options.js": "./lib/cli-options.js",
|
|
54
|
-
"./package.json": "./package.json"
|
|
55
|
-
},
|
|
56
|
-
scripts: {
|
|
57
|
-
"dts-check": "tsc --project tests/types/tsconfig.json",
|
|
58
|
-
lint: "standard",
|
|
59
|
-
pretest: "npm run lint && npm run dts-check",
|
|
60
|
-
test: "tap run tests/**/*.js --allow-empty-coverage --disable-coverage --timeout=60000",
|
|
61
|
-
"test:coverage": "tap run tests/**/*.js --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",
|
|
62
|
-
prerelease: "npm test",
|
|
63
|
-
release: "standard-version"
|
|
64
|
-
},
|
|
65
|
-
repository: {
|
|
66
|
-
type: "git",
|
|
67
|
-
url: "git://github.com/motdotla/dotenv.git"
|
|
68
|
-
},
|
|
69
|
-
homepage: "https://github.com/motdotla/dotenv#readme",
|
|
70
|
-
funding: "https://dotenvx.com",
|
|
71
|
-
keywords: [
|
|
72
|
-
"dotenv",
|
|
73
|
-
"env",
|
|
74
|
-
".env",
|
|
75
|
-
"environment",
|
|
76
|
-
"variables",
|
|
77
|
-
"config",
|
|
78
|
-
"settings"
|
|
79
|
-
],
|
|
80
|
-
readmeFilename: "README.md",
|
|
81
|
-
license: "BSD-2-Clause",
|
|
82
|
-
devDependencies: {
|
|
83
|
-
"@types/node": "^18.11.3",
|
|
84
|
-
decache: "^4.6.2",
|
|
85
|
-
sinon: "^14.0.1",
|
|
86
|
-
standard: "^17.0.0",
|
|
87
|
-
"standard-version": "^9.5.0",
|
|
88
|
-
tap: "^19.2.0",
|
|
89
|
-
typescript: "^4.8.4"
|
|
90
|
-
},
|
|
91
|
-
engines: {
|
|
92
|
-
node: ">=12"
|
|
93
|
-
},
|
|
94
|
-
browser: {
|
|
95
|
-
fs: false
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
|
|
101
33
|
// node_modules/dotenv/lib/main.js
|
|
102
34
|
var require_main = __commonJS({
|
|
103
35
|
"node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
104
36
|
var fs = require("fs");
|
|
105
|
-
var
|
|
37
|
+
var path3 = require("path");
|
|
106
38
|
var os4 = require("os");
|
|
107
39
|
var crypto2 = require("crypto");
|
|
108
|
-
var packageJson = require_package();
|
|
109
|
-
var version2 = packageJson.version;
|
|
110
40
|
var TIPS = [
|
|
111
|
-
"\
|
|
112
|
-
"\
|
|
113
|
-
"\
|
|
114
|
-
"\
|
|
115
|
-
"\
|
|
116
|
-
"\
|
|
117
|
-
"\
|
|
118
|
-
"\
|
|
119
|
-
"\u2699\uFE0F enable debug logging with { debug: true }",
|
|
120
|
-
"\u2699\uFE0F override existing env vars with { override: true }",
|
|
121
|
-
"\u2699\uFE0F suppress all logs with { quiet: true }",
|
|
122
|
-
"\u2699\uFE0F write to custom object with { processEnv: myObject }",
|
|
123
|
-
"\u2699\uFE0F load multiple .env files with { path: ['.env.local', '.env'] }"
|
|
41
|
+
"\u25C8 encrypted .env [www.dotenvx.com]",
|
|
42
|
+
"\u25C8 secrets for agents [www.dotenvx.com]",
|
|
43
|
+
"\u2301 auth for agents [www.vestauth.com]",
|
|
44
|
+
"\u2318 custom filepath { path: '/custom/path/.env' }",
|
|
45
|
+
"\u2318 enable debugging { debug: true }",
|
|
46
|
+
"\u2318 override existing { override: true }",
|
|
47
|
+
"\u2318 suppress logs { quiet: true }",
|
|
48
|
+
"\u2318 multiple files { path: ['.env.local', '.env'] }"
|
|
124
49
|
];
|
|
125
50
|
function _getRandomTip() {
|
|
126
51
|
return TIPS[Math.floor(Math.random() * TIPS.length)];
|
|
@@ -185,13 +110,13 @@ var require_main = __commonJS({
|
|
|
185
110
|
return DotenvModule.parse(decrypted);
|
|
186
111
|
}
|
|
187
112
|
function _warn(message) {
|
|
188
|
-
console.error(
|
|
113
|
+
console.error(`\u26A0 ${message}`);
|
|
189
114
|
}
|
|
190
115
|
function _debug(message) {
|
|
191
|
-
console.log(
|
|
116
|
+
console.log(`\u2506 ${message}`);
|
|
192
117
|
}
|
|
193
118
|
function _log(message) {
|
|
194
|
-
console.log(
|
|
119
|
+
console.log(`\u25C7 ${message}`);
|
|
195
120
|
}
|
|
196
121
|
function _dotenvKey(options) {
|
|
197
122
|
if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {
|
|
@@ -248,7 +173,7 @@ var require_main = __commonJS({
|
|
|
248
173
|
possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
249
174
|
}
|
|
250
175
|
} else {
|
|
251
|
-
possibleVaultPath =
|
|
176
|
+
possibleVaultPath = path3.resolve(process.cwd(), ".env.vault");
|
|
252
177
|
}
|
|
253
178
|
if (fs.existsSync(possibleVaultPath)) {
|
|
254
179
|
return possibleVaultPath;
|
|
@@ -256,13 +181,13 @@ var require_main = __commonJS({
|
|
|
256
181
|
return null;
|
|
257
182
|
}
|
|
258
183
|
function _resolveHome(envPath) {
|
|
259
|
-
return envPath[0] === "~" ?
|
|
184
|
+
return envPath[0] === "~" ? path3.join(os4.homedir(), envPath.slice(1)) : envPath;
|
|
260
185
|
}
|
|
261
186
|
function _configVault(options) {
|
|
262
187
|
const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
|
|
263
188
|
const quiet = parseBoolean(process.env.DOTENV_CONFIG_QUIET || options && options.quiet);
|
|
264
189
|
if (debug || !quiet) {
|
|
265
|
-
_log("
|
|
190
|
+
_log("loading env from encrypted .env.vault");
|
|
266
191
|
}
|
|
267
192
|
const parsed = DotenvModule._parseVault(options);
|
|
268
193
|
let processEnv = process.env;
|
|
@@ -273,7 +198,7 @@ var require_main = __commonJS({
|
|
|
273
198
|
return { parsed };
|
|
274
199
|
}
|
|
275
200
|
function configDotenv(options) {
|
|
276
|
-
const dotenvPath =
|
|
201
|
+
const dotenvPath = path3.resolve(process.cwd(), ".env");
|
|
277
202
|
let encoding = "utf8";
|
|
278
203
|
let processEnv = process.env;
|
|
279
204
|
if (options && options.processEnv != null) {
|
|
@@ -285,7 +210,7 @@ var require_main = __commonJS({
|
|
|
285
210
|
encoding = options.encoding;
|
|
286
211
|
} else {
|
|
287
212
|
if (debug) {
|
|
288
|
-
_debug("
|
|
213
|
+
_debug("no encoding is specified (UTF-8 is used by default)");
|
|
289
214
|
}
|
|
290
215
|
}
|
|
291
216
|
let optionPaths = [dotenvPath];
|
|
@@ -301,13 +226,13 @@ var require_main = __commonJS({
|
|
|
301
226
|
}
|
|
302
227
|
let lastError;
|
|
303
228
|
const parsedAll = {};
|
|
304
|
-
for (const
|
|
229
|
+
for (const path4 of optionPaths) {
|
|
305
230
|
try {
|
|
306
|
-
const parsed = DotenvModule.parse(fs.readFileSync(
|
|
231
|
+
const parsed = DotenvModule.parse(fs.readFileSync(path4, { encoding }));
|
|
307
232
|
DotenvModule.populate(parsedAll, parsed, options);
|
|
308
233
|
} catch (e) {
|
|
309
234
|
if (debug) {
|
|
310
|
-
_debug(`
|
|
235
|
+
_debug(`failed to load ${path4} ${e.message}`);
|
|
311
236
|
}
|
|
312
237
|
lastError = e;
|
|
313
238
|
}
|
|
@@ -320,16 +245,16 @@ var require_main = __commonJS({
|
|
|
320
245
|
const shortPaths = [];
|
|
321
246
|
for (const filePath of optionPaths) {
|
|
322
247
|
try {
|
|
323
|
-
const relative =
|
|
248
|
+
const relative = path3.relative(process.cwd(), filePath);
|
|
324
249
|
shortPaths.push(relative);
|
|
325
250
|
} catch (e) {
|
|
326
251
|
if (debug) {
|
|
327
|
-
_debug(`
|
|
252
|
+
_debug(`failed to load ${filePath} ${e.message}`);
|
|
328
253
|
}
|
|
329
254
|
lastError = e;
|
|
330
255
|
}
|
|
331
256
|
}
|
|
332
|
-
_log(`
|
|
257
|
+
_log(`injected env (${keysCount}) from ${shortPaths.join(",")} ${dim(`// tip: ${_getRandomTip()}`)}`);
|
|
333
258
|
}
|
|
334
259
|
if (lastError) {
|
|
335
260
|
return { parsed: parsedAll, error: lastError };
|
|
@@ -343,7 +268,7 @@ var require_main = __commonJS({
|
|
|
343
268
|
}
|
|
344
269
|
const vaultPath = _vaultPath(options);
|
|
345
270
|
if (!vaultPath) {
|
|
346
|
-
_warn(`
|
|
271
|
+
_warn(`you set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}`);
|
|
347
272
|
return DotenvModule.configDotenv(options);
|
|
348
273
|
}
|
|
349
274
|
return DotenvModule._configVault(options);
|
|
@@ -1587,7 +1512,7 @@ var require_command = __commonJS({
|
|
|
1587
1512
|
"node_modules/commander/lib/command.js"(exports2) {
|
|
1588
1513
|
var EventEmitter2 = require("node:events").EventEmitter;
|
|
1589
1514
|
var childProcess = require("node:child_process");
|
|
1590
|
-
var
|
|
1515
|
+
var path3 = require("node:path");
|
|
1591
1516
|
var fs = require("node:fs");
|
|
1592
1517
|
var process6 = require("node:process");
|
|
1593
1518
|
var { Argument: Argument2, humanReadableArgName } = require_argument();
|
|
@@ -2600,9 +2525,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2600
2525
|
let launchWithNode = false;
|
|
2601
2526
|
const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
2602
2527
|
function findFile(baseDir, baseName) {
|
|
2603
|
-
const localBin =
|
|
2528
|
+
const localBin = path3.resolve(baseDir, baseName);
|
|
2604
2529
|
if (fs.existsSync(localBin)) return localBin;
|
|
2605
|
-
if (sourceExt.includes(
|
|
2530
|
+
if (sourceExt.includes(path3.extname(baseName))) return void 0;
|
|
2606
2531
|
const foundExt = sourceExt.find(
|
|
2607
2532
|
(ext) => fs.existsSync(`${localBin}${ext}`)
|
|
2608
2533
|
);
|
|
@@ -2620,17 +2545,17 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2620
2545
|
} catch {
|
|
2621
2546
|
resolvedScriptPath = this._scriptPath;
|
|
2622
2547
|
}
|
|
2623
|
-
executableDir =
|
|
2624
|
-
|
|
2548
|
+
executableDir = path3.resolve(
|
|
2549
|
+
path3.dirname(resolvedScriptPath),
|
|
2625
2550
|
executableDir
|
|
2626
2551
|
);
|
|
2627
2552
|
}
|
|
2628
2553
|
if (executableDir) {
|
|
2629
2554
|
let localFile = findFile(executableDir, executableFile);
|
|
2630
2555
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
2631
|
-
const legacyName =
|
|
2556
|
+
const legacyName = path3.basename(
|
|
2632
2557
|
this._scriptPath,
|
|
2633
|
-
|
|
2558
|
+
path3.extname(this._scriptPath)
|
|
2634
2559
|
);
|
|
2635
2560
|
if (legacyName !== this._name) {
|
|
2636
2561
|
localFile = findFile(
|
|
@@ -2641,7 +2566,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2641
2566
|
}
|
|
2642
2567
|
executableFile = localFile || executableFile;
|
|
2643
2568
|
}
|
|
2644
|
-
launchWithNode = sourceExt.includes(
|
|
2569
|
+
launchWithNode = sourceExt.includes(path3.extname(executableFile));
|
|
2645
2570
|
let proc;
|
|
2646
2571
|
if (process6.platform !== "win32") {
|
|
2647
2572
|
if (launchWithNode) {
|
|
@@ -3556,7 +3481,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3556
3481
|
* @return {Command}
|
|
3557
3482
|
*/
|
|
3558
3483
|
nameFromFilename(filename) {
|
|
3559
|
-
this._name =
|
|
3484
|
+
this._name = path3.basename(filename, path3.extname(filename));
|
|
3560
3485
|
return this;
|
|
3561
3486
|
}
|
|
3562
3487
|
/**
|
|
@@ -3570,9 +3495,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3570
3495
|
* @param {string} [path]
|
|
3571
3496
|
* @return {(string|null|Command)}
|
|
3572
3497
|
*/
|
|
3573
|
-
executableDir(
|
|
3574
|
-
if (
|
|
3575
|
-
this._executableDir =
|
|
3498
|
+
executableDir(path4) {
|
|
3499
|
+
if (path4 === void 0) return this._executableDir;
|
|
3500
|
+
this._executableDir = path4;
|
|
3576
3501
|
return this;
|
|
3577
3502
|
}
|
|
3578
3503
|
/**
|
|
@@ -12862,11 +12787,11 @@ var require_mime_types = __commonJS({
|
|
|
12862
12787
|
}
|
|
12863
12788
|
return exts[0];
|
|
12864
12789
|
}
|
|
12865
|
-
function lookup(
|
|
12866
|
-
if (!
|
|
12790
|
+
function lookup(path3) {
|
|
12791
|
+
if (!path3 || typeof path3 !== "string") {
|
|
12867
12792
|
return false;
|
|
12868
12793
|
}
|
|
12869
|
-
var extension2 = extname("x." +
|
|
12794
|
+
var extension2 = extname("x." + path3).toLowerCase().substr(1);
|
|
12870
12795
|
if (!extension2) {
|
|
12871
12796
|
return false;
|
|
12872
12797
|
}
|
|
@@ -14006,7 +13931,7 @@ var require_form_data = __commonJS({
|
|
|
14006
13931
|
"use strict";
|
|
14007
13932
|
var CombinedStream = require_combined_stream();
|
|
14008
13933
|
var util3 = require("util");
|
|
14009
|
-
var
|
|
13934
|
+
var path3 = require("path");
|
|
14010
13935
|
var http3 = require("http");
|
|
14011
13936
|
var https2 = require("https");
|
|
14012
13937
|
var parseUrl = require("url").parse;
|
|
@@ -14134,11 +14059,11 @@ var require_form_data = __commonJS({
|
|
|
14134
14059
|
FormData3.prototype._getContentDisposition = function(value, options) {
|
|
14135
14060
|
var filename;
|
|
14136
14061
|
if (typeof options.filepath === "string") {
|
|
14137
|
-
filename =
|
|
14062
|
+
filename = path3.normalize(options.filepath).replace(/\\/g, "/");
|
|
14138
14063
|
} else if (options.filename || value && (value.name || value.path)) {
|
|
14139
|
-
filename =
|
|
14064
|
+
filename = path3.basename(options.filename || value && (value.name || value.path));
|
|
14140
14065
|
} else if (value && value.readable && hasOwn(value, "httpVersion")) {
|
|
14141
|
-
filename =
|
|
14066
|
+
filename = path3.basename(value.client._httpMessage.path || "");
|
|
14142
14067
|
}
|
|
14143
14068
|
if (filename) {
|
|
14144
14069
|
return 'filename="' + filename + '"';
|
|
@@ -16336,6 +16261,9 @@ var effectScheduler = {
|
|
|
16336
16261
|
};
|
|
16337
16262
|
|
|
16338
16263
|
// node_modules/@inquirer/core/dist/lib/use-state.js
|
|
16264
|
+
function isFactory(value) {
|
|
16265
|
+
return typeof value === "function";
|
|
16266
|
+
}
|
|
16339
16267
|
function useState(defaultValue) {
|
|
16340
16268
|
return withPointer((pointer) => {
|
|
16341
16269
|
const setState = import_node_async_hooks2.AsyncResource.bind(function setState2(newValue) {
|
|
@@ -16347,7 +16275,7 @@ function useState(defaultValue) {
|
|
|
16347
16275
|
if (pointer.initialized) {
|
|
16348
16276
|
return [pointer.get(), setState];
|
|
16349
16277
|
}
|
|
16350
|
-
const value =
|
|
16278
|
+
const value = isFactory(defaultValue) ? defaultValue() : defaultValue;
|
|
16351
16279
|
pointer.set(value);
|
|
16352
16280
|
return [value, setState];
|
|
16353
16281
|
});
|
|
@@ -16371,10 +16299,11 @@ var import_node_util = require("node:util");
|
|
|
16371
16299
|
// node_modules/@inquirer/figures/dist/index.js
|
|
16372
16300
|
var import_node_process2 = __toESM(require("node:process"), 1);
|
|
16373
16301
|
function isUnicodeSupported() {
|
|
16374
|
-
if (import_node_process2.default.platform
|
|
16302
|
+
if (!import_node_process2.default.platform.startsWith("win")) {
|
|
16375
16303
|
return import_node_process2.default.env["TERM"] !== "linux";
|
|
16376
16304
|
}
|
|
16377
|
-
return Boolean(import_node_process2.default.env["
|
|
16305
|
+
return Boolean(import_node_process2.default.env["CI"]) || // CI environments generally support unicode
|
|
16306
|
+
Boolean(import_node_process2.default.env["WT_SESSION"]) || // Windows Terminal
|
|
16378
16307
|
Boolean(import_node_process2.default.env["TERMINUS_SUBLIME"]) || // Terminus (<0.2.27)
|
|
16379
16308
|
import_node_process2.default.env["ConEmuTask"] === "{cmd::Cmder}" || // ConEmu and cmder
|
|
16380
16309
|
import_node_process2.default.env["TERM_PROGRAM"] === "Terminus-Sublime" || import_node_process2.default.env["TERM_PROGRAM"] === "vscode" || import_node_process2.default.env["TERM"] === "xterm-256color" || import_node_process2.default.env["TERM"] === "alacritty" || import_node_process2.default.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm";
|
|
@@ -17564,6 +17493,7 @@ var PromisePolyfill = class extends Promise {
|
|
|
17564
17493
|
};
|
|
17565
17494
|
|
|
17566
17495
|
// node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
17496
|
+
var import_node_path = __toESM(require("node:path"), 1);
|
|
17567
17497
|
var nativeSetImmediate = globalThis.setImmediate;
|
|
17568
17498
|
function getCallSites() {
|
|
17569
17499
|
const _prepareStackTrace = Error.prepareStackTrace;
|
|
@@ -17620,13 +17550,22 @@ function createPrompt(view) {
|
|
|
17620
17550
|
const checkCursorPos = () => screen.checkCursorPos();
|
|
17621
17551
|
rl.input.on("keypress", checkCursorPos);
|
|
17622
17552
|
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
|
17553
|
+
let pendingDone = null;
|
|
17623
17554
|
cycle(() => {
|
|
17555
|
+
let effectsSettled = false;
|
|
17624
17556
|
try {
|
|
17625
17557
|
const nextView = view(config2, (value) => {
|
|
17626
|
-
|
|
17558
|
+
if (effectsSettled) {
|
|
17559
|
+
resolve(value);
|
|
17560
|
+
} else {
|
|
17561
|
+
pendingDone = { value };
|
|
17562
|
+
}
|
|
17627
17563
|
});
|
|
17628
17564
|
if (nextView === void 0) {
|
|
17629
|
-
|
|
17565
|
+
let callerFilename = callSites[1]?.getFileName();
|
|
17566
|
+
if (callerFilename && !callerFilename.startsWith("file://")) {
|
|
17567
|
+
callerFilename = import_node_path.default.resolve(callerFilename);
|
|
17568
|
+
}
|
|
17630
17569
|
throw new Error(`Prompt functions must return a string.
|
|
17631
17570
|
at ${callerFilename}`);
|
|
17632
17571
|
}
|
|
@@ -17636,6 +17575,12 @@ function createPrompt(view) {
|
|
|
17636
17575
|
} catch (error48) {
|
|
17637
17576
|
reject(error48);
|
|
17638
17577
|
}
|
|
17578
|
+
effectsSettled = true;
|
|
17579
|
+
if (pendingDone !== null) {
|
|
17580
|
+
const { value } = pendingDone;
|
|
17581
|
+
pendingDone = null;
|
|
17582
|
+
resolve(value);
|
|
17583
|
+
}
|
|
17639
17584
|
});
|
|
17640
17585
|
};
|
|
17641
17586
|
if ("readableFlowing" in input) {
|
|
@@ -17743,6 +17688,9 @@ var dist_default4 = createPrompt((config2, done) => {
|
|
|
17743
17688
|
}, [config2.default, items]);
|
|
17744
17689
|
const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
|
17745
17690
|
const selectedChoice = items[active];
|
|
17691
|
+
if (selectedChoice == null || Separator.isSeparator(selectedChoice)) {
|
|
17692
|
+
throw new Error("Active index does not point to a choice");
|
|
17693
|
+
}
|
|
17746
17694
|
const [errorMsg, setError] = useState();
|
|
17747
17695
|
useKeypress((key, rl) => {
|
|
17748
17696
|
clearTimeout(searchTimeoutRef.current);
|
|
@@ -17884,12 +17832,13 @@ function normalizeChoices2(choices) {
|
|
|
17884
17832
|
return choices.map((choice) => {
|
|
17885
17833
|
if (Separator.isSeparator(choice))
|
|
17886
17834
|
return choice;
|
|
17887
|
-
if (typeof choice === "
|
|
17835
|
+
if (typeof choice !== "object" || choice === null || !("value" in choice)) {
|
|
17836
|
+
const name2 = String(choice);
|
|
17888
17837
|
return {
|
|
17889
17838
|
value: choice,
|
|
17890
|
-
name:
|
|
17891
|
-
short:
|
|
17892
|
-
checkedName:
|
|
17839
|
+
name: name2,
|
|
17840
|
+
short: name2,
|
|
17841
|
+
checkedName: name2,
|
|
17893
17842
|
disabled: false,
|
|
17894
17843
|
checked: false
|
|
17895
17844
|
};
|
|
@@ -18554,9 +18503,9 @@ function isVisitable(thing) {
|
|
|
18554
18503
|
function removeBrackets(key) {
|
|
18555
18504
|
return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
18556
18505
|
}
|
|
18557
|
-
function renderKey(
|
|
18558
|
-
if (!
|
|
18559
|
-
return
|
|
18506
|
+
function renderKey(path3, key, dots) {
|
|
18507
|
+
if (!path3) return key;
|
|
18508
|
+
return path3.concat(key).map(function each(token, i) {
|
|
18560
18509
|
token = removeBrackets(token);
|
|
18561
18510
|
return !dots && i ? "[" + token + "]" : token;
|
|
18562
18511
|
}).join(dots ? "." : "");
|
|
@@ -18609,13 +18558,13 @@ function toFormData(obj, formData, options) {
|
|
|
18609
18558
|
}
|
|
18610
18559
|
return value;
|
|
18611
18560
|
}
|
|
18612
|
-
function defaultVisitor(value, key,
|
|
18561
|
+
function defaultVisitor(value, key, path3) {
|
|
18613
18562
|
let arr = value;
|
|
18614
18563
|
if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
|
|
18615
|
-
formData.append(renderKey(
|
|
18564
|
+
formData.append(renderKey(path3, key, dots), convertValue(value));
|
|
18616
18565
|
return false;
|
|
18617
18566
|
}
|
|
18618
|
-
if (value && !
|
|
18567
|
+
if (value && !path3 && typeof value === "object") {
|
|
18619
18568
|
if (utils_default.endsWith(key, "{}")) {
|
|
18620
18569
|
key = metaTokens ? key : key.slice(0, -2);
|
|
18621
18570
|
value = JSON.stringify(value);
|
|
@@ -18634,7 +18583,7 @@ function toFormData(obj, formData, options) {
|
|
|
18634
18583
|
if (isVisitable(value)) {
|
|
18635
18584
|
return true;
|
|
18636
18585
|
}
|
|
18637
|
-
formData.append(renderKey(
|
|
18586
|
+
formData.append(renderKey(path3, key, dots), convertValue(value));
|
|
18638
18587
|
return false;
|
|
18639
18588
|
}
|
|
18640
18589
|
const stack = [];
|
|
@@ -18643,16 +18592,16 @@ function toFormData(obj, formData, options) {
|
|
|
18643
18592
|
convertValue,
|
|
18644
18593
|
isVisitable
|
|
18645
18594
|
});
|
|
18646
|
-
function build(value,
|
|
18595
|
+
function build(value, path3) {
|
|
18647
18596
|
if (utils_default.isUndefined(value)) return;
|
|
18648
18597
|
if (stack.indexOf(value) !== -1) {
|
|
18649
|
-
throw Error("Circular reference detected in " +
|
|
18598
|
+
throw Error("Circular reference detected in " + path3.join("."));
|
|
18650
18599
|
}
|
|
18651
18600
|
stack.push(value);
|
|
18652
18601
|
utils_default.forEach(value, function each(el, key) {
|
|
18653
|
-
const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key,
|
|
18602
|
+
const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path3, exposedHelpers);
|
|
18654
18603
|
if (result === true) {
|
|
18655
|
-
build(el,
|
|
18604
|
+
build(el, path3 ? path3.concat(key) : [key]);
|
|
18656
18605
|
}
|
|
18657
18606
|
});
|
|
18658
18607
|
stack.pop();
|
|
@@ -18864,7 +18813,7 @@ var platform_default = {
|
|
|
18864
18813
|
// node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
18865
18814
|
function toURLEncodedForm(data, options) {
|
|
18866
18815
|
return toFormData_default(data, new platform_default.classes.URLSearchParams(), {
|
|
18867
|
-
visitor: function(value, key,
|
|
18816
|
+
visitor: function(value, key, path3, helpers) {
|
|
18868
18817
|
if (platform_default.isNode && utils_default.isBuffer(value)) {
|
|
18869
18818
|
this.append(key, value.toString("base64"));
|
|
18870
18819
|
return false;
|
|
@@ -18894,11 +18843,11 @@ function arrayToObject(arr) {
|
|
|
18894
18843
|
return obj;
|
|
18895
18844
|
}
|
|
18896
18845
|
function formDataToJSON(formData) {
|
|
18897
|
-
function buildPath(
|
|
18898
|
-
let name =
|
|
18846
|
+
function buildPath(path3, value, target, index) {
|
|
18847
|
+
let name = path3[index++];
|
|
18899
18848
|
if (name === "__proto__") return true;
|
|
18900
18849
|
const isNumericKey = Number.isFinite(+name);
|
|
18901
|
-
const isLast = index >=
|
|
18850
|
+
const isLast = index >= path3.length;
|
|
18902
18851
|
name = !name && utils_default.isArray(target) ? target.length : name;
|
|
18903
18852
|
if (isLast) {
|
|
18904
18853
|
if (utils_default.hasOwnProp(target, name)) {
|
|
@@ -18911,7 +18860,7 @@ function formDataToJSON(formData) {
|
|
|
18911
18860
|
if (!target[name] || !utils_default.isObject(target[name])) {
|
|
18912
18861
|
target[name] = [];
|
|
18913
18862
|
}
|
|
18914
|
-
const result = buildPath(
|
|
18863
|
+
const result = buildPath(path3, value, target[name], index);
|
|
18915
18864
|
if (result && utils_default.isArray(target[name])) {
|
|
18916
18865
|
target[name] = arrayToObject(target[name]);
|
|
18917
18866
|
}
|
|
@@ -20292,9 +20241,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
20292
20241
|
auth = urlUsername + ":" + urlPassword;
|
|
20293
20242
|
}
|
|
20294
20243
|
auth && headers.delete("authorization");
|
|
20295
|
-
let
|
|
20244
|
+
let path3;
|
|
20296
20245
|
try {
|
|
20297
|
-
|
|
20246
|
+
path3 = buildURL(
|
|
20298
20247
|
parsed.pathname + parsed.search,
|
|
20299
20248
|
config2.params,
|
|
20300
20249
|
config2.paramsSerializer
|
|
@@ -20312,7 +20261,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
20312
20261
|
false
|
|
20313
20262
|
);
|
|
20314
20263
|
const options = {
|
|
20315
|
-
path:
|
|
20264
|
+
path: path3,
|
|
20316
20265
|
method,
|
|
20317
20266
|
headers: headers.toJSON(),
|
|
20318
20267
|
agents: { http: config2.httpAgent, https: config2.httpsAgent },
|
|
@@ -20561,14 +20510,14 @@ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PUR
|
|
|
20561
20510
|
var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
20562
20511
|
// Standard browser envs support document.cookie
|
|
20563
20512
|
{
|
|
20564
|
-
write(name, value, expires,
|
|
20513
|
+
write(name, value, expires, path3, domain2, secure, sameSite) {
|
|
20565
20514
|
if (typeof document === "undefined") return;
|
|
20566
20515
|
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
20567
20516
|
if (utils_default.isNumber(expires)) {
|
|
20568
20517
|
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
20569
20518
|
}
|
|
20570
|
-
if (utils_default.isString(
|
|
20571
|
-
cookie.push(`path=${
|
|
20519
|
+
if (utils_default.isString(path3)) {
|
|
20520
|
+
cookie.push(`path=${path3}`);
|
|
20572
20521
|
}
|
|
20573
20522
|
if (utils_default.isString(domain2)) {
|
|
20574
20523
|
cookie.push(`domain=${domain2}`);
|
|
@@ -22578,10 +22527,10 @@ function mergeDefs(...defs) {
|
|
|
22578
22527
|
function cloneDef(schema) {
|
|
22579
22528
|
return mergeDefs(schema._zod.def);
|
|
22580
22529
|
}
|
|
22581
|
-
function getElementAtPath(obj,
|
|
22582
|
-
if (!
|
|
22530
|
+
function getElementAtPath(obj, path3) {
|
|
22531
|
+
if (!path3)
|
|
22583
22532
|
return obj;
|
|
22584
|
-
return
|
|
22533
|
+
return path3.reduce((acc, key) => acc?.[key], obj);
|
|
22585
22534
|
}
|
|
22586
22535
|
function promiseAllObject(promisesObj) {
|
|
22587
22536
|
const keys = Object.keys(promisesObj);
|
|
@@ -22964,11 +22913,11 @@ function aborted(x, startIndex = 0) {
|
|
|
22964
22913
|
}
|
|
22965
22914
|
return false;
|
|
22966
22915
|
}
|
|
22967
|
-
function prefixIssues(
|
|
22916
|
+
function prefixIssues(path3, issues) {
|
|
22968
22917
|
return issues.map((iss) => {
|
|
22969
22918
|
var _a2;
|
|
22970
22919
|
(_a2 = iss).path ?? (_a2.path = []);
|
|
22971
|
-
iss.path.unshift(
|
|
22920
|
+
iss.path.unshift(path3);
|
|
22972
22921
|
return iss;
|
|
22973
22922
|
});
|
|
22974
22923
|
}
|
|
@@ -23151,7 +23100,7 @@ function formatError(error48, mapper = (issue2) => issue2.message) {
|
|
|
23151
23100
|
}
|
|
23152
23101
|
function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
23153
23102
|
const result = { errors: [] };
|
|
23154
|
-
const processError = (error49,
|
|
23103
|
+
const processError = (error49, path3 = []) => {
|
|
23155
23104
|
var _a2, _b;
|
|
23156
23105
|
for (const issue2 of error49.issues) {
|
|
23157
23106
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
@@ -23161,7 +23110,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
23161
23110
|
} else if (issue2.code === "invalid_element") {
|
|
23162
23111
|
processError({ issues: issue2.issues }, issue2.path);
|
|
23163
23112
|
} else {
|
|
23164
|
-
const fullpath = [...
|
|
23113
|
+
const fullpath = [...path3, ...issue2.path];
|
|
23165
23114
|
if (fullpath.length === 0) {
|
|
23166
23115
|
result.errors.push(mapper(issue2));
|
|
23167
23116
|
continue;
|
|
@@ -23193,8 +23142,8 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
23193
23142
|
}
|
|
23194
23143
|
function toDotPath(_path) {
|
|
23195
23144
|
const segs = [];
|
|
23196
|
-
const
|
|
23197
|
-
for (const seg of
|
|
23145
|
+
const path3 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
23146
|
+
for (const seg of path3) {
|
|
23198
23147
|
if (typeof seg === "number")
|
|
23199
23148
|
segs.push(`[${seg}]`);
|
|
23200
23149
|
else if (typeof seg === "symbol")
|
|
@@ -35171,13 +35120,13 @@ function resolveRef(ref, ctx) {
|
|
|
35171
35120
|
if (!ref.startsWith("#")) {
|
|
35172
35121
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
35173
35122
|
}
|
|
35174
|
-
const
|
|
35175
|
-
if (
|
|
35123
|
+
const path3 = ref.slice(1).split("/").filter(Boolean);
|
|
35124
|
+
if (path3.length === 0) {
|
|
35176
35125
|
return ctx.rootSchema;
|
|
35177
35126
|
}
|
|
35178
35127
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
35179
|
-
if (
|
|
35180
|
-
const key =
|
|
35128
|
+
if (path3[0] === defsKey) {
|
|
35129
|
+
const key = path3[1];
|
|
35181
35130
|
if (!key || !ctx.defs[key]) {
|
|
35182
35131
|
throw new Error(`Reference not found: ${ref}`);
|
|
35183
35132
|
}
|
|
@@ -45027,7 +44976,7 @@ var Jira = class {
|
|
|
45027
44976
|
sprint: "customfield_10020",
|
|
45028
44977
|
storyPoints: "customfield_10028"
|
|
45029
44978
|
};
|
|
45030
|
-
this.
|
|
44979
|
+
this.nonTaskIssuesJQL = `(labels not in (upstream_task, dev_task, qe_task, root_cause_analysis_task, preliminary_testing_task, integration_testing_task) OR labels is EMPTY) AND type in (Bug, "Story", Vulnerability) AND Project = RHEL AND statusCategory != Done`;
|
|
45031
44980
|
this.api = new Version3Client({
|
|
45032
44981
|
host: instance,
|
|
45033
44982
|
authentication: {
|
|
@@ -45058,9 +45007,9 @@ var Jira = class {
|
|
|
45058
45007
|
});
|
|
45059
45008
|
return response.values;
|
|
45060
45009
|
}
|
|
45061
|
-
async getIssuesInSprint(sprintId, assignee,
|
|
45010
|
+
async getIssuesInSprint(sprintId, assignee, nonTaskIssues = true) {
|
|
45062
45011
|
let jql = assignee ? `assignee = "${assignee}"` : "";
|
|
45063
|
-
jql +=
|
|
45012
|
+
jql += nonTaskIssues ? ` AND ${this.nonTaskIssuesJQL}` : "";
|
|
45064
45013
|
const response = await this.agile.sprint.getIssuesForSprint({
|
|
45065
45014
|
sprintId: +sprintId,
|
|
45066
45015
|
jql,
|
|
@@ -45290,7 +45239,7 @@ var issueStatusSchema = external_exports.union([
|
|
|
45290
45239
|
// src/cli.ts
|
|
45291
45240
|
function cli() {
|
|
45292
45241
|
const program2 = new Command();
|
|
45293
|
-
program2.name("jira-sprinter").description("\u{1F3C3} Small CLI tool to manage sprints in JIRA Board").version("2.0.
|
|
45242
|
+
program2.name("jira-sprinter").description("\u{1F3C3} Small CLI tool to manage sprints in JIRA Board").version("2.0.1");
|
|
45294
45243
|
program2.option("-b, --board [board]", "Jira Board ID", getDefaultValue("BOARD")).option(
|
|
45295
45244
|
"-a, --assignee [assignee]",
|
|
45296
45245
|
"Jira Assignee",
|
|
@@ -45362,39 +45311,39 @@ ${issueTypeSchema.parse(issue2.fields?.issuetype.name)} ${issue2.key} - ${source
|
|
|
45362
45311
|
name: "DEV Task",
|
|
45363
45312
|
summary: "[DEV Task]:",
|
|
45364
45313
|
label: "dev_task",
|
|
45365
|
-
value: 14476,
|
|
45314
|
+
value: "14476",
|
|
45366
45315
|
checked: true
|
|
45367
45316
|
},
|
|
45368
45317
|
{
|
|
45369
45318
|
name: "QE Task",
|
|
45370
45319
|
summary: "[QE Task]:",
|
|
45371
45320
|
label: "qe_task",
|
|
45372
|
-
value: 14480,
|
|
45321
|
+
value: "14480",
|
|
45373
45322
|
checked: true
|
|
45374
45323
|
},
|
|
45375
45324
|
{
|
|
45376
45325
|
name: "Upstream",
|
|
45377
45326
|
summary: "[Upstream]:",
|
|
45378
45327
|
label: "upstream_task",
|
|
45379
|
-
value: 14475
|
|
45328
|
+
value: "14475"
|
|
45380
45329
|
},
|
|
45381
45330
|
{
|
|
45382
45331
|
name: "Root Cause Analysis Task",
|
|
45383
45332
|
summary: "[Root Cause Analysis Task]:",
|
|
45384
45333
|
label: "root_cause_analysis_task",
|
|
45385
|
-
value: 14483
|
|
45334
|
+
value: "14483"
|
|
45386
45335
|
},
|
|
45387
45336
|
{
|
|
45388
45337
|
name: "Preliminary Testing Task",
|
|
45389
45338
|
summary: "[Preliminary Testing Task]:",
|
|
45390
45339
|
label: "preliminary_testing_task",
|
|
45391
|
-
value: 14478
|
|
45340
|
+
value: "14478"
|
|
45392
45341
|
},
|
|
45393
45342
|
{
|
|
45394
45343
|
name: "Integration Testing",
|
|
45395
45344
|
summary: "[Integration Testing Task]:",
|
|
45396
45345
|
label: "integration_testing_task",
|
|
45397
|
-
value: 14481
|
|
45346
|
+
value: "14481"
|
|
45398
45347
|
}
|
|
45399
45348
|
];
|
|
45400
45349
|
let answer = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jira-sprinter",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Small CLI tool to manage sprints in JIRA Board",
|
|
5
5
|
"main": "src/main.ts",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -34,22 +34,22 @@
|
|
|
34
34
|
"scrum"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@inquirer/checkbox": "^5.1.
|
|
38
|
-
"@inquirer/select": "5.1.
|
|
37
|
+
"@inquirer/checkbox": "^5.1.3",
|
|
38
|
+
"@inquirer/select": "5.1.3",
|
|
39
39
|
"@total-typescript/ts-reset": "0.6.1",
|
|
40
40
|
"chalk": "5.6.2",
|
|
41
41
|
"commander": "14.0.3",
|
|
42
|
-
"dotenv": "17.
|
|
42
|
+
"dotenv": "17.4.1",
|
|
43
43
|
"jira.js": "5.3.1",
|
|
44
44
|
"zod": "4.3.6"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@types/node": "25.5.
|
|
48
|
-
"@vitest/coverage-v8": "4.1.
|
|
49
|
-
"esbuild": "0.
|
|
47
|
+
"@types/node": "25.5.2",
|
|
48
|
+
"@vitest/coverage-v8": "4.1.3",
|
|
49
|
+
"esbuild": "0.28.0",
|
|
50
50
|
"prettier": "3.8.1",
|
|
51
51
|
"ts-node": "10.9.2",
|
|
52
|
-
"typescript": "
|
|
53
|
-
"vitest": "4.1.
|
|
52
|
+
"typescript": "6.0.2",
|
|
53
|
+
"vitest": "4.1.3"
|
|
54
54
|
}
|
|
55
55
|
}
|
package/src/cli.ts
CHANGED
|
@@ -28,7 +28,7 @@ export function cli(): Command {
|
|
|
28
28
|
program
|
|
29
29
|
.name('jira-sprinter')
|
|
30
30
|
.description('🏃 Small CLI tool to manage sprints in JIRA Board')
|
|
31
|
-
.version('2.0.
|
|
31
|
+
.version('2.0.1');
|
|
32
32
|
|
|
33
33
|
program
|
|
34
34
|
.option('-b, --board [board]', 'Jira Board ID', getDefaultValue('BOARD'))
|
|
@@ -115,39 +115,39 @@ const runProgram = async () => {
|
|
|
115
115
|
name: 'DEV Task',
|
|
116
116
|
summary: '[DEV Task]:',
|
|
117
117
|
label: 'dev_task',
|
|
118
|
-
value: 14476,
|
|
118
|
+
value: '14476',
|
|
119
119
|
checked: true,
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
name: 'QE Task',
|
|
123
123
|
summary: '[QE Task]:',
|
|
124
124
|
label: 'qe_task',
|
|
125
|
-
value: 14480,
|
|
125
|
+
value: '14480',
|
|
126
126
|
checked: true,
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
name: 'Upstream',
|
|
130
130
|
summary: '[Upstream]:',
|
|
131
131
|
label: 'upstream_task',
|
|
132
|
-
value: 14475,
|
|
132
|
+
value: '14475',
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
135
|
name: 'Root Cause Analysis Task',
|
|
136
136
|
summary: '[Root Cause Analysis Task]:',
|
|
137
137
|
label: 'root_cause_analysis_task',
|
|
138
|
-
value: 14483,
|
|
138
|
+
value: '14483',
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
141
|
name: 'Preliminary Testing Task',
|
|
142
142
|
summary: '[Preliminary Testing Task]:',
|
|
143
143
|
label: 'preliminary_testing_task',
|
|
144
|
-
value: 14478,
|
|
144
|
+
value: '14478',
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
name: 'Integration Testing',
|
|
148
148
|
summary: '[Integration Testing Task]:',
|
|
149
149
|
label: 'integration_testing_task',
|
|
150
|
-
value: 14481,
|
|
150
|
+
value: '14481',
|
|
151
151
|
},
|
|
152
152
|
];
|
|
153
153
|
|
package/src/jira.ts
CHANGED
|
@@ -18,7 +18,7 @@ export class Jira {
|
|
|
18
18
|
storyPoints: 'customfield_10028',
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
readonly
|
|
21
|
+
readonly nonTaskIssuesJQL = `(labels not in (upstream_task, dev_task, qe_task, root_cause_analysis_task, preliminary_testing_task, integration_testing_task) OR labels is EMPTY) AND type in (Bug, "Story", Vulnerability) AND Project = RHEL AND statusCategory != Done`;
|
|
22
22
|
|
|
23
23
|
constructor(
|
|
24
24
|
readonly instance: string,
|
|
@@ -65,10 +65,10 @@ export class Jira {
|
|
|
65
65
|
async getIssuesInSprint(
|
|
66
66
|
sprintId: number,
|
|
67
67
|
assignee?: string,
|
|
68
|
-
|
|
68
|
+
nonTaskIssues: boolean = true
|
|
69
69
|
): Promise<SearchResults['issues']> {
|
|
70
70
|
let jql = assignee ? `assignee = "${assignee}"` : '';
|
|
71
|
-
jql +=
|
|
71
|
+
jql += nonTaskIssues ? ` AND ${this.nonTaskIssuesJQL}` : '';
|
|
72
72
|
|
|
73
73
|
const response = await this.agile.sprint.getIssuesForSprint({
|
|
74
74
|
sprintId: +sprintId,
|