imdone-cli 0.1.3 → 0.1.5
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/.env +6 -0
- package/README.md +3 -8
- package/dist/.env +6 -0
- package/dist/index.cjs +130 -99
- package/dist/index.cjs.map +4 -4
- package/dist/index.min.cjs +583 -0
- package/dist/index.min.cjs.map +7 -0
- package/package.json +8 -4
- package/src/bin.js +39 -30
package/.env
ADDED
package/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# Imdone CLI
|
2
2
|
|
3
|
-
Imdone CLI is a command-line tool that
|
3
|
+
Imdone CLI is a command-line tool that integrates with Jira to manage your tasks and issues directly from markdown files and your terminal. It allows you to pull issues from Jira, update them, and push changes back to Jira seamlessly.
|
4
|
+
This tool is designed to enhance your productivity by providing a simple and efficient way to manage your tasks without leaving your editor or terminal.
|
4
5
|
|
5
6
|
## Installation
|
6
7
|
|
@@ -8,15 +9,9 @@ Imdone CLI is a command-line tool that enables seamless integration between Imdo
|
|
8
9
|
npm install -g imdone-cli
|
9
10
|
```
|
10
11
|
|
11
|
-
Or if you prefer to use it locally in a project:
|
12
|
-
|
13
|
-
```bash
|
14
|
-
npm install --save-dev imdone-cli
|
15
|
-
```
|
16
|
-
|
17
12
|
## Prerequisites
|
18
13
|
|
19
|
-
- Node.js
|
14
|
+
- Node.js v18 or higher
|
20
15
|
- A valid Imdone license
|
21
16
|
- Jira account with API access
|
22
17
|
|
package/dist/.env
ADDED
package/dist/index.cjs
CHANGED
@@ -5527,10 +5527,10 @@ var require_supports_color = __commonJS({
|
|
5527
5527
|
return 3;
|
5528
5528
|
}
|
5529
5529
|
if ("TERM_PROGRAM" in env2) {
|
5530
|
-
const
|
5530
|
+
const version2 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
5531
5531
|
switch (env2.TERM_PROGRAM) {
|
5532
5532
|
case "iTerm.app":
|
5533
|
-
return
|
5533
|
+
return version2 >= 3 ? 3 : 2;
|
5534
5534
|
case "Apple_Terminal":
|
5535
5535
|
return 2;
|
5536
5536
|
}
|
@@ -22873,19 +22873,19 @@ var require_environment_v8_version = __commonJS({
|
|
22873
22873
|
var versions = process12 && process12.versions || Deno2 && Deno2.version;
|
22874
22874
|
var v8 = versions && versions.v8;
|
22875
22875
|
var match2;
|
22876
|
-
var
|
22876
|
+
var version2;
|
22877
22877
|
if (v8) {
|
22878
22878
|
match2 = v8.split(".");
|
22879
|
-
|
22879
|
+
version2 = match2[0] > 0 && match2[0] < 4 ? 1 : +(match2[0] + match2[1]);
|
22880
22880
|
}
|
22881
|
-
if (!
|
22881
|
+
if (!version2 && userAgent) {
|
22882
22882
|
match2 = userAgent.match(/Edge\/(\d+)/);
|
22883
22883
|
if (!match2 || match2[1] >= 74) {
|
22884
22884
|
match2 = userAgent.match(/Chrome\/(\d+)/);
|
22885
|
-
if (match2)
|
22885
|
+
if (match2) version2 = +match2[1];
|
22886
22886
|
}
|
22887
22887
|
}
|
22888
|
-
module2.exports =
|
22888
|
+
module2.exports = version2;
|
22889
22889
|
}
|
22890
22890
|
});
|
22891
22891
|
|
@@ -35456,6 +35456,9 @@ var require_plugin = __commonJS({
|
|
35456
35456
|
this.project = project2;
|
35457
35457
|
this.unimplWarning = {};
|
35458
35458
|
}
|
35459
|
+
static get pluginName() {
|
35460
|
+
return "Plugin";
|
35461
|
+
}
|
35459
35462
|
init() {
|
35460
35463
|
return __awaiter(this, void 0, void 0, function* () {
|
35461
35464
|
this.unimplemented("init()");
|
@@ -41669,10 +41672,10 @@ var require_deflater = __commonJS({
|
|
41669
41672
|
// node_modules/adm-zip/methods/inflater.js
|
41670
41673
|
var require_inflater = __commonJS({
|
41671
41674
|
"node_modules/adm-zip/methods/inflater.js"(exports2, module2) {
|
41672
|
-
var
|
41675
|
+
var version2 = +(process.versions ? process.versions.node : "").split(".")[0] || 0;
|
41673
41676
|
module2.exports = function(inbuf, expectedLength) {
|
41674
41677
|
var zlib2 = require("zlib");
|
41675
|
-
const option =
|
41678
|
+
const option = version2 >= 15 && expectedLength > 0 ? { maxOutputLength: expectedLength } : {};
|
41676
41679
|
return {
|
41677
41680
|
inflate: function() {
|
41678
41681
|
return zlib2.inflateRawSync(inbuf, option);
|
@@ -43463,6 +43466,9 @@ var require_plugin2 = __commonJS({
|
|
43463
43466
|
this.project = project2;
|
43464
43467
|
this.unimplWarning = {};
|
43465
43468
|
}
|
43469
|
+
static get pluginName() {
|
43470
|
+
return "Plugin";
|
43471
|
+
}
|
43466
43472
|
init() {
|
43467
43473
|
return __awaiter(this, void 0, void 0, function* () {
|
43468
43474
|
this.unimplemented("init()");
|
@@ -43823,7 +43829,7 @@ var require_main = __commonJS({
|
|
43823
43829
|
var os2 = require("os");
|
43824
43830
|
var crypto3 = require("crypto");
|
43825
43831
|
var packageJson = require_package();
|
43826
|
-
var
|
43832
|
+
var version2 = packageJson.version;
|
43827
43833
|
var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
|
43828
43834
|
function parse3(src) {
|
43829
43835
|
const obj = {};
|
@@ -43870,13 +43876,13 @@ var require_main = __commonJS({
|
|
43870
43876
|
return DotenvModule.parse(decrypted);
|
43871
43877
|
}
|
43872
43878
|
function _log(message) {
|
43873
|
-
console.log(`[dotenv@${
|
43879
|
+
console.log(`[dotenv@${version2}][INFO] ${message}`);
|
43874
43880
|
}
|
43875
43881
|
function _warn(message) {
|
43876
|
-
console.log(`[dotenv@${
|
43882
|
+
console.log(`[dotenv@${version2}][WARN] ${message}`);
|
43877
43883
|
}
|
43878
43884
|
function _debug(message) {
|
43879
|
-
console.log(`[dotenv@${
|
43885
|
+
console.log(`[dotenv@${version2}][DEBUG] ${message}`);
|
43880
43886
|
}
|
43881
43887
|
function _dotenvKey(options2) {
|
43882
43888
|
if (options2 && options2.DOTENV_KEY && options2.DOTENV_KEY.length > 0) {
|
@@ -49177,31 +49183,31 @@ var require_semver = __commonJS({
|
|
49177
49183
|
var parseOptions = require_parse_options();
|
49178
49184
|
var { compareIdentifiers } = require_identifiers();
|
49179
49185
|
var SemVer = class _SemVer {
|
49180
|
-
constructor(
|
49186
|
+
constructor(version2, options2) {
|
49181
49187
|
options2 = parseOptions(options2);
|
49182
|
-
if (
|
49183
|
-
if (
|
49184
|
-
return
|
49188
|
+
if (version2 instanceof _SemVer) {
|
49189
|
+
if (version2.loose === !!options2.loose && version2.includePrerelease === !!options2.includePrerelease) {
|
49190
|
+
return version2;
|
49185
49191
|
} else {
|
49186
|
-
|
49192
|
+
version2 = version2.version;
|
49187
49193
|
}
|
49188
|
-
} else if (typeof
|
49189
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof
|
49194
|
+
} else if (typeof version2 !== "string") {
|
49195
|
+
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`);
|
49190
49196
|
}
|
49191
|
-
if (
|
49197
|
+
if (version2.length > MAX_LENGTH) {
|
49192
49198
|
throw new TypeError(
|
49193
49199
|
`version is longer than ${MAX_LENGTH} characters`
|
49194
49200
|
);
|
49195
49201
|
}
|
49196
|
-
debug6("SemVer",
|
49202
|
+
debug6("SemVer", version2, options2);
|
49197
49203
|
this.options = options2;
|
49198
49204
|
this.loose = !!options2.loose;
|
49199
49205
|
this.includePrerelease = !!options2.includePrerelease;
|
49200
|
-
const m2 =
|
49206
|
+
const m2 = version2.trim().match(options2.loose ? re[t2.LOOSE] : re[t2.FULL]);
|
49201
49207
|
if (!m2) {
|
49202
|
-
throw new TypeError(`Invalid Version: ${
|
49208
|
+
throw new TypeError(`Invalid Version: ${version2}`);
|
49203
49209
|
}
|
49204
|
-
this.raw =
|
49210
|
+
this.raw = version2;
|
49205
49211
|
this.major = +m2[1];
|
49206
49212
|
this.minor = +m2[2];
|
49207
49213
|
this.patch = +m2[3];
|
@@ -49433,12 +49439,12 @@ var require_semver = __commonJS({
|
|
49433
49439
|
var require_parse3 = __commonJS({
|
49434
49440
|
"node_modules/semver/functions/parse.js"(exports2, module2) {
|
49435
49441
|
var SemVer = require_semver();
|
49436
|
-
var parse3 = (
|
49437
|
-
if (
|
49438
|
-
return
|
49442
|
+
var parse3 = (version2, options2, throwErrors = false) => {
|
49443
|
+
if (version2 instanceof SemVer) {
|
49444
|
+
return version2;
|
49439
49445
|
}
|
49440
49446
|
try {
|
49441
|
-
return new SemVer(
|
49447
|
+
return new SemVer(version2, options2);
|
49442
49448
|
} catch (er) {
|
49443
49449
|
if (!throwErrors) {
|
49444
49450
|
return null;
|
@@ -49454,8 +49460,8 @@ var require_parse3 = __commonJS({
|
|
49454
49460
|
var require_valid = __commonJS({
|
49455
49461
|
"node_modules/semver/functions/valid.js"(exports2, module2) {
|
49456
49462
|
var parse3 = require_parse3();
|
49457
|
-
var valid = (
|
49458
|
-
const v = parse3(
|
49463
|
+
var valid = (version2, options2) => {
|
49464
|
+
const v = parse3(version2, options2);
|
49459
49465
|
return v ? v.version : null;
|
49460
49466
|
};
|
49461
49467
|
module2.exports = valid;
|
@@ -49466,8 +49472,8 @@ var require_valid = __commonJS({
|
|
49466
49472
|
var require_clean = __commonJS({
|
49467
49473
|
"node_modules/semver/functions/clean.js"(exports2, module2) {
|
49468
49474
|
var parse3 = require_parse3();
|
49469
|
-
var clean = (
|
49470
|
-
const s2 = parse3(
|
49475
|
+
var clean = (version2, options2) => {
|
49476
|
+
const s2 = parse3(version2.trim().replace(/^[=v]+/, ""), options2);
|
49471
49477
|
return s2 ? s2.version : null;
|
49472
49478
|
};
|
49473
49479
|
module2.exports = clean;
|
@@ -49478,7 +49484,7 @@ var require_clean = __commonJS({
|
|
49478
49484
|
var require_inc = __commonJS({
|
49479
49485
|
"node_modules/semver/functions/inc.js"(exports2, module2) {
|
49480
49486
|
var SemVer = require_semver();
|
49481
|
-
var inc = (
|
49487
|
+
var inc = (version2, release, options2, identifier, identifierBase) => {
|
49482
49488
|
if (typeof options2 === "string") {
|
49483
49489
|
identifierBase = identifier;
|
49484
49490
|
identifier = options2;
|
@@ -49486,7 +49492,7 @@ var require_inc = __commonJS({
|
|
49486
49492
|
}
|
49487
49493
|
try {
|
49488
49494
|
return new SemVer(
|
49489
|
-
|
49495
|
+
version2 instanceof SemVer ? version2.version : version2,
|
49490
49496
|
options2
|
49491
49497
|
).inc(release, identifier, identifierBase).version;
|
49492
49498
|
} catch (er) {
|
@@ -49571,8 +49577,8 @@ var require_patch = __commonJS({
|
|
49571
49577
|
var require_prerelease = __commonJS({
|
49572
49578
|
"node_modules/semver/functions/prerelease.js"(exports2, module2) {
|
49573
49579
|
var parse3 = require_parse3();
|
49574
|
-
var prerelease = (
|
49575
|
-
const parsed = parse3(
|
49580
|
+
var prerelease = (version2, options2) => {
|
49581
|
+
const parsed = parse3(version2, options2);
|
49576
49582
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
49577
49583
|
};
|
49578
49584
|
module2.exports = prerelease;
|
@@ -49746,24 +49752,24 @@ var require_coerce = __commonJS({
|
|
49746
49752
|
var SemVer = require_semver();
|
49747
49753
|
var parse3 = require_parse3();
|
49748
49754
|
var { safeRe: re, t: t2 } = require_re();
|
49749
|
-
var coerce = (
|
49750
|
-
if (
|
49751
|
-
return
|
49755
|
+
var coerce = (version2, options2) => {
|
49756
|
+
if (version2 instanceof SemVer) {
|
49757
|
+
return version2;
|
49752
49758
|
}
|
49753
|
-
if (typeof
|
49754
|
-
|
49759
|
+
if (typeof version2 === "number") {
|
49760
|
+
version2 = String(version2);
|
49755
49761
|
}
|
49756
|
-
if (typeof
|
49762
|
+
if (typeof version2 !== "string") {
|
49757
49763
|
return null;
|
49758
49764
|
}
|
49759
49765
|
options2 = options2 || {};
|
49760
49766
|
let match2 = null;
|
49761
49767
|
if (!options2.rtl) {
|
49762
|
-
match2 =
|
49768
|
+
match2 = version2.match(options2.includePrerelease ? re[t2.COERCEFULL] : re[t2.COERCE]);
|
49763
49769
|
} else {
|
49764
49770
|
const coerceRtlRegex = options2.includePrerelease ? re[t2.COERCERTLFULL] : re[t2.COERCERTL];
|
49765
49771
|
let next;
|
49766
|
-
while ((next = coerceRtlRegex.exec(
|
49772
|
+
while ((next = coerceRtlRegex.exec(version2)) && (!match2 || match2.index + match2[0].length !== version2.length)) {
|
49767
49773
|
if (!match2 || next.index + next[0].length !== match2.index + match2[0].length) {
|
49768
49774
|
match2 = next;
|
49769
49775
|
}
|
@@ -49945,19 +49951,19 @@ var require_range = __commonJS({
|
|
49945
49951
|
});
|
49946
49952
|
}
|
49947
49953
|
// if ANY of the sets match ALL of its comparators, then pass
|
49948
|
-
test(
|
49949
|
-
if (!
|
49954
|
+
test(version2) {
|
49955
|
+
if (!version2) {
|
49950
49956
|
return false;
|
49951
49957
|
}
|
49952
|
-
if (typeof
|
49958
|
+
if (typeof version2 === "string") {
|
49953
49959
|
try {
|
49954
|
-
|
49960
|
+
version2 = new SemVer(version2, this.options);
|
49955
49961
|
} catch (er) {
|
49956
49962
|
return false;
|
49957
49963
|
}
|
49958
49964
|
}
|
49959
49965
|
for (let i2 = 0; i2 < this.set.length; i2++) {
|
49960
|
-
if (testSet(this.set[i2],
|
49966
|
+
if (testSet(this.set[i2], version2, this.options)) {
|
49961
49967
|
return true;
|
49962
49968
|
}
|
49963
49969
|
}
|
@@ -50171,13 +50177,13 @@ var require_range = __commonJS({
|
|
50171
50177
|
}
|
50172
50178
|
return `${from2} ${to}`.trim();
|
50173
50179
|
};
|
50174
|
-
var testSet = (set2,
|
50180
|
+
var testSet = (set2, version2, options2) => {
|
50175
50181
|
for (let i2 = 0; i2 < set2.length; i2++) {
|
50176
|
-
if (!set2[i2].test(
|
50182
|
+
if (!set2[i2].test(version2)) {
|
50177
50183
|
return false;
|
50178
50184
|
}
|
50179
50185
|
}
|
50180
|
-
if (
|
50186
|
+
if (version2.prerelease.length && !options2.includePrerelease) {
|
50181
50187
|
for (let i2 = 0; i2 < set2.length; i2++) {
|
50182
50188
|
debug6(set2[i2].semver);
|
50183
50189
|
if (set2[i2].semver === Comparator.ANY) {
|
@@ -50185,7 +50191,7 @@ var require_range = __commonJS({
|
|
50185
50191
|
}
|
50186
50192
|
if (set2[i2].semver.prerelease.length > 0) {
|
50187
50193
|
const allowed = set2[i2].semver;
|
50188
|
-
if (allowed.major ===
|
50194
|
+
if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) {
|
50189
50195
|
return true;
|
50190
50196
|
}
|
50191
50197
|
}
|
@@ -50245,19 +50251,19 @@ var require_comparator = __commonJS({
|
|
50245
50251
|
toString() {
|
50246
50252
|
return this.value;
|
50247
50253
|
}
|
50248
|
-
test(
|
50249
|
-
debug6("Comparator.test",
|
50250
|
-
if (this.semver === ANY ||
|
50254
|
+
test(version2) {
|
50255
|
+
debug6("Comparator.test", version2, this.options.loose);
|
50256
|
+
if (this.semver === ANY || version2 === ANY) {
|
50251
50257
|
return true;
|
50252
50258
|
}
|
50253
|
-
if (typeof
|
50259
|
+
if (typeof version2 === "string") {
|
50254
50260
|
try {
|
50255
|
-
|
50261
|
+
version2 = new SemVer(version2, this.options);
|
50256
50262
|
} catch (er) {
|
50257
50263
|
return false;
|
50258
50264
|
}
|
50259
50265
|
}
|
50260
|
-
return cmp(
|
50266
|
+
return cmp(version2, this.operator, this.semver, this.options);
|
50261
50267
|
}
|
50262
50268
|
intersects(comp, options2) {
|
50263
50269
|
if (!(comp instanceof _Comparator)) {
|
@@ -50313,13 +50319,13 @@ var require_comparator = __commonJS({
|
|
50313
50319
|
var require_satisfies = __commonJS({
|
50314
50320
|
"node_modules/semver/functions/satisfies.js"(exports2, module2) {
|
50315
50321
|
var Range = require_range();
|
50316
|
-
var satisfies = (
|
50322
|
+
var satisfies = (version2, range2, options2) => {
|
50317
50323
|
try {
|
50318
50324
|
range2 = new Range(range2, options2);
|
50319
50325
|
} catch (er) {
|
50320
50326
|
return false;
|
50321
50327
|
}
|
50322
|
-
return range2.test(
|
50328
|
+
return range2.test(version2);
|
50323
50329
|
};
|
50324
50330
|
module2.exports = satisfies;
|
50325
50331
|
}
|
@@ -50475,8 +50481,8 @@ var require_outside = __commonJS({
|
|
50475
50481
|
var lt = require_lt();
|
50476
50482
|
var lte = require_lte();
|
50477
50483
|
var gte = require_gte();
|
50478
|
-
var outside = (
|
50479
|
-
|
50484
|
+
var outside = (version2, range2, hilo, options2) => {
|
50485
|
+
version2 = new SemVer(version2, options2);
|
50480
50486
|
range2 = new Range(range2, options2);
|
50481
50487
|
let gtfn, ltefn, ltfn, comp, ecomp;
|
50482
50488
|
switch (hilo) {
|
@@ -50497,7 +50503,7 @@ var require_outside = __commonJS({
|
|
50497
50503
|
default:
|
50498
50504
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
50499
50505
|
}
|
50500
|
-
if (satisfies(
|
50506
|
+
if (satisfies(version2, range2, options2)) {
|
50501
50507
|
return false;
|
50502
50508
|
}
|
50503
50509
|
for (let i2 = 0; i2 < range2.set.length; ++i2) {
|
@@ -50519,9 +50525,9 @@ var require_outside = __commonJS({
|
|
50519
50525
|
if (high.operator === comp || high.operator === ecomp) {
|
50520
50526
|
return false;
|
50521
50527
|
}
|
50522
|
-
if ((!low.operator || low.operator === comp) && ltefn(
|
50528
|
+
if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) {
|
50523
50529
|
return false;
|
50524
|
-
} else if (low.operator === ecomp && ltfn(
|
50530
|
+
} else if (low.operator === ecomp && ltfn(version2, low.semver)) {
|
50525
50531
|
return false;
|
50526
50532
|
}
|
50527
50533
|
}
|
@@ -50535,7 +50541,7 @@ var require_outside = __commonJS({
|
|
50535
50541
|
var require_gtr = __commonJS({
|
50536
50542
|
"node_modules/semver/ranges/gtr.js"(exports2, module2) {
|
50537
50543
|
var outside = require_outside();
|
50538
|
-
var gtr = (
|
50544
|
+
var gtr = (version2, range2, options2) => outside(version2, range2, ">", options2);
|
50539
50545
|
module2.exports = gtr;
|
50540
50546
|
}
|
50541
50547
|
});
|
@@ -50544,7 +50550,7 @@ var require_gtr = __commonJS({
|
|
50544
50550
|
var require_ltr = __commonJS({
|
50545
50551
|
"node_modules/semver/ranges/ltr.js"(exports2, module2) {
|
50546
50552
|
var outside = require_outside();
|
50547
|
-
var ltr = (
|
50553
|
+
var ltr = (version2, range2, options2) => outside(version2, range2, "<", options2);
|
50548
50554
|
module2.exports = ltr;
|
50549
50555
|
}
|
50550
50556
|
});
|
@@ -50572,12 +50578,12 @@ var require_simplify = __commonJS({
|
|
50572
50578
|
let first3 = null;
|
50573
50579
|
let prev = null;
|
50574
50580
|
const v = versions.sort((a, b) => compare(a, b, options2));
|
50575
|
-
for (const
|
50576
|
-
const included = satisfies(
|
50581
|
+
for (const version2 of v) {
|
50582
|
+
const included = satisfies(version2, range2, options2);
|
50577
50583
|
if (included) {
|
50578
|
-
prev =
|
50584
|
+
prev = version2;
|
50579
50585
|
if (!first3) {
|
50580
|
-
first3 =
|
50586
|
+
first3 = version2;
|
50581
50587
|
}
|
50582
50588
|
} else {
|
50583
50589
|
if (prev) {
|
@@ -62650,10 +62656,10 @@ var require_tmp = __commonJS({
|
|
62650
62656
|
function setGracefulCleanup() {
|
62651
62657
|
_gracefulCleanup = true;
|
62652
62658
|
}
|
62653
|
-
var
|
62659
|
+
var version2 = process.versions.node.split(".").map(function(value2) {
|
62654
62660
|
return parseInt(value2, 10);
|
62655
62661
|
});
|
62656
|
-
if (
|
62662
|
+
if (version2[0] === 0 && (version2[1] < 9 || version2[1] === 9 && version2[2] < 5)) {
|
62657
62663
|
process.addListener("uncaughtException", function _uncaughtExceptionThrown(err2) {
|
62658
62664
|
_uncaughtException = true;
|
62659
62665
|
_garbageCollector();
|
@@ -72841,10 +72847,10 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
72841
72847
|
return 3;
|
72842
72848
|
}
|
72843
72849
|
if ("TERM_PROGRAM" in env) {
|
72844
|
-
const
|
72850
|
+
const version2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
72845
72851
|
switch (env.TERM_PROGRAM) {
|
72846
72852
|
case "iTerm.app": {
|
72847
|
-
return
|
72853
|
+
return version2 >= 3 ? 3 : 2;
|
72848
72854
|
}
|
72849
72855
|
case "Apple_Terminal": {
|
72850
72856
|
return 2;
|
@@ -91245,8 +91251,8 @@ async function getAvailablePlugins() {
|
|
91245
91251
|
}
|
91246
91252
|
return plugins;
|
91247
91253
|
}
|
91248
|
-
async function getReadmeContent({ version }) {
|
91249
|
-
const response = await fetch(`https://api.github.com/repos/${
|
91254
|
+
async function getReadmeContent({ version: version2 }) {
|
91255
|
+
const response = await fetch(`https://api.github.com/repos/${version2}/readme`);
|
91250
91256
|
const { content } = response?.body;
|
91251
91257
|
if (!content) return "";
|
91252
91258
|
const buffer = Buffer.from(content, "base64");
|
@@ -97403,6 +97409,9 @@ var PersistTagsPlugin = class extends import_imdone_api.default {
|
|
97403
97409
|
constructor(project2) {
|
97404
97410
|
super(project2);
|
97405
97411
|
}
|
97412
|
+
static get pluginName() {
|
97413
|
+
return "PersistTagsPlugin";
|
97414
|
+
}
|
97406
97415
|
async onBoardUpdate() {
|
97407
97416
|
await save(this.project.allTags.sort(), this.project.path);
|
97408
97417
|
}
|
@@ -97424,6 +97433,9 @@ var DefaultBoardPropertiesPlugin = class extends import_imdone_api2.default {
|
|
97424
97433
|
super(project2);
|
97425
97434
|
this.templates = {};
|
97426
97435
|
}
|
97436
|
+
static get pluginName() {
|
97437
|
+
return "DefaultBoardPropertiesPlugin";
|
97438
|
+
}
|
97427
97439
|
async onBeforeBoardUpdate() {
|
97428
97440
|
this.templates = await this.getTemplates();
|
97429
97441
|
}
|
@@ -97481,6 +97493,9 @@ var DefaultBoardActionsPlugin = class extends import_imdone_api3.default {
|
|
97481
97493
|
constructor(project2) {
|
97482
97494
|
super(project2);
|
97483
97495
|
}
|
97496
|
+
static get pluginName() {
|
97497
|
+
return "DefaultBoardActionsPlugin";
|
97498
|
+
}
|
97484
97499
|
getBoardActions() {
|
97485
97500
|
const project2 = this.project;
|
97486
97501
|
const isWindows2 = process.platform === "win32";
|
@@ -97536,6 +97551,9 @@ var ArchivePlugin = class extends import_imdone_api4.default {
|
|
97536
97551
|
constructor(project2) {
|
97537
97552
|
super(project2);
|
97538
97553
|
}
|
97554
|
+
static get pluginName() {
|
97555
|
+
return "ArchivePlugin";
|
97556
|
+
}
|
97539
97557
|
get config() {
|
97540
97558
|
return this.project.config;
|
97541
97559
|
}
|
@@ -97602,6 +97620,9 @@ var EpicPlugin = class extends import_imdone_api5.default {
|
|
97602
97620
|
super(project2);
|
97603
97621
|
this.epics = {};
|
97604
97622
|
}
|
97623
|
+
static get pluginName() {
|
97624
|
+
return "EpicPlugin";
|
97625
|
+
}
|
97605
97626
|
async onBeforeBoardUpdate() {
|
97606
97627
|
this.epics = {};
|
97607
97628
|
}
|
@@ -97736,6 +97757,9 @@ var ExtensionPlugin = class extends import_imdone_api6.default {
|
|
97736
97757
|
logger.log("loading extensions");
|
97737
97758
|
this.configDir = import_path13.default.join(project2.path, ".imdone");
|
97738
97759
|
}
|
97760
|
+
static get pluginName() {
|
97761
|
+
return "ExtensionPlugin";
|
97762
|
+
}
|
97739
97763
|
async init() {
|
97740
97764
|
this.cardActionsFunction = await this.loadExtensionModule(
|
97741
97765
|
() => [],
|
@@ -97877,11 +97901,11 @@ var PluginManager = class extends import_events4.default {
|
|
97877
97901
|
delete this.pluginsMap[pluginClassName];
|
97878
97902
|
this.emit("plugin-uninstalled", pluginName);
|
97879
97903
|
}
|
97880
|
-
async installPlugin({ name, version }) {
|
97904
|
+
async installPlugin({ name, version: version2 }) {
|
97881
97905
|
if (!await exists2(this.pluginPath))
|
97882
97906
|
await mkdir(this.pluginPath);
|
97883
97907
|
const installPath = import_path14.default.join(this.pluginPath, name);
|
97884
|
-
await downloadPlugin(
|
97908
|
+
await downloadPlugin(version2, installPath);
|
97885
97909
|
logger.log(`Done installing ${name}`);
|
97886
97910
|
await this.loadPlugin(installPath);
|
97887
97911
|
this.emit("plugin-installed", name);
|
@@ -97945,9 +97969,10 @@ var PluginManager = class extends import_events4.default {
|
|
97945
97969
|
}
|
97946
97970
|
}
|
97947
97971
|
async createPlugin(pluginClass, path13 = void 0) {
|
97948
|
-
|
97972
|
+
const name = pluginClass.pluginName;
|
97973
|
+
if (!name) {
|
97949
97974
|
throw new Error(`${pluginClass.name} is not a plugin`);
|
97950
|
-
|
97975
|
+
}
|
97951
97976
|
const pluginInstance = new pluginClass(this.project);
|
97952
97977
|
const packageInfo = await this.getPackageInfo(path13);
|
97953
97978
|
let info3 = {
|
@@ -97975,13 +98000,6 @@ var PluginManager = class extends import_events4.default {
|
|
97975
98000
|
}
|
97976
98001
|
});
|
97977
98002
|
}
|
97978
|
-
isPlugin(pluginClass) {
|
97979
|
-
const pluginClassPrototypeName = Object.getPrototypeOf(pluginClass.prototype).constructor.name;
|
97980
|
-
const pluginClassName = import_imdone_api7.default.name.toString();
|
97981
|
-
logger.log("pluginClassPrototypeName", pluginClassPrototypeName);
|
97982
|
-
logger.log("pluginClassName", pluginClassName);
|
97983
|
-
return pluginClassPrototypeName === pluginClassName;
|
97984
|
-
}
|
97985
98003
|
eachPlugin(cb2) {
|
97986
98004
|
Object.keys(this.pluginsMap).forEach((key2) => {
|
97987
98005
|
cb2(this.getPlugin(key2));
|
@@ -98885,8 +98903,8 @@ var WorkerProject = class extends import_project.Project {
|
|
98885
98903
|
});
|
98886
98904
|
});
|
98887
98905
|
}
|
98888
|
-
installPlugin({ name, version }) {
|
98889
|
-
return this.pluginManager.installPlugin({ name, version });
|
98906
|
+
installPlugin({ name, version: version2 }) {
|
98907
|
+
return this.pluginManager.installPlugin({ name, version: version2 });
|
98890
98908
|
}
|
98891
98909
|
uninstallPlugin(name) {
|
98892
98910
|
return this.pluginManager.uninstallPlugin(name);
|
@@ -99761,6 +99779,9 @@ var JiraPlugin = class extends import_imdone_api8.default {
|
|
99761
99779
|
super(project2);
|
99762
99780
|
this.issueTypes = [];
|
99763
99781
|
}
|
99782
|
+
static get pluginName() {
|
99783
|
+
return "JiraPlugin";
|
99784
|
+
}
|
99764
99785
|
async init() {
|
99765
99786
|
await initEnv(process.cwd());
|
99766
99787
|
this.adapter = await jiraAdapter({
|
@@ -102724,12 +102745,12 @@ async function imdoneInit(projectPath, { name, jiraUrl, jiraProjectKey, jiraUser
|
|
102724
102745
|
logger.info("Imdone project initialized successfully:", imdoneConfig);
|
102725
102746
|
}
|
102726
102747
|
|
102748
|
+
// package.json
|
102749
|
+
var version = "0.1.5";
|
102750
|
+
|
102727
102751
|
// src/bin.js
|
102728
102752
|
logger.setLevel(process.env.LOG_LEVEL || LogLevel.ERROR);
|
102729
|
-
|
102730
|
-
program2.name("imdone").description("Imdone CLI to pull from and push to Jira").version("1.0.0");
|
102731
|
-
program2.command("pull").description("Pull issues from Jira").action(async () => {
|
102732
|
-
await checkLicense();
|
102753
|
+
async function pullCommand() {
|
102733
102754
|
const spinner = ora("Pulling issues from Jira...").start();
|
102734
102755
|
try {
|
102735
102756
|
const { result: result2 } = await pullFromJira(process.cwd(), { ...dependencies, feedback: spinner });
|
@@ -102741,9 +102762,8 @@ program2.command("pull").description("Pull issues from Jira").action(async () =>
|
|
102741
102762
|
logger.error(error.stack);
|
102742
102763
|
process.exit(1);
|
102743
102764
|
}
|
102744
|
-
}
|
102745
|
-
|
102746
|
-
await checkLicense();
|
102765
|
+
}
|
102766
|
+
async function pushCommand() {
|
102747
102767
|
const spinner = ora("Pushing changes to Jira...").start();
|
102748
102768
|
try {
|
102749
102769
|
const { result: result2 } = await pushToJira(process.cwd(), { ...dependencies2, feedback: ora });
|
@@ -102757,6 +102777,17 @@ program2.command("push").description("Push changes to Jira").action(async () =>
|
|
102757
102777
|
logger.error(error.stack);
|
102758
102778
|
process.exit(1);
|
102759
102779
|
}
|
102780
|
+
}
|
102781
|
+
var program2 = new Command();
|
102782
|
+
program2.name("imdone").description("Imdone CLI to pull from and push to Jira").version(version);
|
102783
|
+
program2.command("pull").description("Pull issues from Jira").action(async () => {
|
102784
|
+
await checkLicense();
|
102785
|
+
await pullCommand();
|
102786
|
+
});
|
102787
|
+
program2.command("push").description("Push changes to Jira").action(async () => {
|
102788
|
+
await checkLicense();
|
102789
|
+
await pullCommand();
|
102790
|
+
await pushCommand();
|
102760
102791
|
});
|
102761
102792
|
program2.command("init").description("Initialize Jira integration").option("--name [name]", "Project name").option("--jira-url [jiraUrl]", "Jira URL (e.g., https://your-domain.atlassian.net)").option("--jira-project-key [jiraProjectKey]", "Jira project key (e.g., ABC)").option("--jira-username [jiraUsername]", "Jira username (email)").option("--jira-api-token [jiraApiToken]", "Jira API token").option("--jql [jql]", 'JQL query to fetch issues (e.g., Sprint in openSprints() and status != "Done")').action(async (options2) => {
|
102762
102793
|
const projectPath = process.cwd();
|