@forge/cli 6.4.2 → 6.4.3-next.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/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @forge/cli
2
2
 
3
+ ## 6.4.3-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 2b0f7fbe: Remove arguments that are never supplied
8
+ - Updated dependencies [20c8fc14]
9
+ - Updated dependencies [272a7845]
10
+ - Updated dependencies [986ad5d5]
11
+ - Updated dependencies [80e6b952]
12
+ - @forge/runtime@4.2.0-next.1
13
+ - @forge/manifest@4.6.1-next.0
14
+ - @forge/bundler@4.5.0-next.1
15
+ - @forge/tunnel@3.1.1-next.1
16
+ - @forge/cli-shared@3.6.1-next.0
17
+ - @forge/lint@3.2.15-next.0
18
+
19
+ ## 6.4.3-next.0
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies [18d686e4]
24
+ - Updated dependencies [a90c1412]
25
+ - @forge/runtime@4.2.0-next.0
26
+ - @forge/bundler@4.5.0-next.0
27
+ - @forge/tunnel@3.1.1-next.0
28
+
3
29
  ## 6.4.2
4
30
 
5
31
  ### Patch Changes
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "@forge/cli",
3
- "version": "6.4.2",
3
+ "version": "6.4.3-next.1",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@forge/cli",
9
- "version": "6.4.2",
9
+ "version": "6.4.3-next.1",
10
10
  "hasInstallScript": true,
11
11
  "license": "UNLICENSED",
12
12
  "dependencies": {
13
- "@forge/bundler": "4.4.0",
14
- "@forge/cli-shared": "3.6.0",
13
+ "@forge/bundler": "4.5.0-next.1",
14
+ "@forge/cli-shared": "3.6.1-next.0",
15
15
  "@forge/egress": "^1.1.2",
16
- "@forge/lint": "3.2.14",
17
- "@forge/manifest": "4.6.0",
18
- "@forge/runtime": "4.1.0",
19
- "@forge/tunnel": "3.1.0",
16
+ "@forge/lint": "3.2.15-next.0",
17
+ "@forge/manifest": "4.6.1-next.0",
18
+ "@forge/runtime": "4.2.0-next.1",
19
+ "@forge/tunnel": "3.1.1-next.1",
20
20
  "@forge/util": "1.2.0",
21
21
  "@sentry/node": "^7.29.0",
22
22
  "ajv": "^6.12.5",
@@ -684,9 +684,9 @@
684
684
  "integrity": "sha512-+GFtFqBhFzwKaKmeEfw1jWQgZJNX4q11CCx1fSPFJB49Fdjb7k3lx74jAyzHlX0UWnm6DMK+/cYT7j5t6G9LfA=="
685
685
  },
686
686
  "node_modules/@forge/bundler": {
687
- "version": "4.4.0",
688
- "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.4.0.tgz",
689
- "integrity": "sha512-G5dpVuw5dZAX1mur2e5UeDEHQQZiBnuIvIAwQGQ9oyYIMrCWQIJYCcd/vOtcTstPuniOh7k0hmcvPGwSe7kavQ==",
687
+ "version": "4.5.0-next.1",
688
+ "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.5.0-next.1.tgz",
689
+ "integrity": "sha512-VDCD5hjhWE3LRGhoAfvofIFc+MDtftcAkKbggpSJQEFkPy/o8woJW94nAAAI0ASxu6ixSLMb2GaIAYeg9zTuQA==",
690
690
  "dependencies": {
691
691
  "@babel/core": "^7.16.7",
692
692
  "@babel/plugin-proposal-class-properties": "^7.16.7",
@@ -696,9 +696,9 @@
696
696
  "@babel/preset-typescript": "^7.16.7",
697
697
  "@forge/api": "2.11.0",
698
698
  "@forge/babel-plugin-transform-ui": "1.1.0",
699
- "@forge/cli-shared": "3.6.0",
700
- "@forge/lint": "3.2.14",
701
- "@forge/runtime": "4.1.0",
699
+ "@forge/cli-shared": "3.6.1-next.0",
700
+ "@forge/lint": "3.2.15-next.0",
701
+ "@forge/runtime": "4.2.0-next.1",
702
702
  "@forge/util": "1.2.0",
703
703
  "assert": "^1.1.1",
704
704
  "babel-loader": "^8.2.3",
@@ -734,11 +734,11 @@
734
734
  }
735
735
  },
736
736
  "node_modules/@forge/cli-shared": {
737
- "version": "3.6.0",
738
- "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-3.6.0.tgz",
739
- "integrity": "sha512-Be1tkD63v99HwQuAssECUaRDHNy3xFCdhWV9SoaYpJh1iEhw7i1M1S8j80wpuXy35nxYj5hb1FSj4JGQniiIaQ==",
737
+ "version": "3.6.1-next.0",
738
+ "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-3.6.1-next.0.tgz",
739
+ "integrity": "sha512-SAGzwGPuGD7jmXZdABLjUavruOoGZaAaNs6KoI0lN7xqim/Wibo1Div/suj8QQOw4IdsHMmZj/V7hiXq77ntBQ==",
740
740
  "dependencies": {
741
- "@forge/manifest": "4.6.0",
741
+ "@forge/manifest": "4.6.1-next.0",
742
742
  "@forge/util": "1.2.0",
743
743
  "@sentry/node": "^7.29.0",
744
744
  "array.prototype.flatmap": "^1.2.3",
@@ -789,13 +789,13 @@
789
789
  }
790
790
  },
791
791
  "node_modules/@forge/lint": {
792
- "version": "3.2.14",
793
- "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-3.2.14.tgz",
794
- "integrity": "sha512-8WvRcL14Pc9HdojVDVZDXlolZhBjpnWmwYH51Du+jLGsoOZrqlRxu2KRl999jZN691ta33dhuadDBgIYUXaAhw==",
792
+ "version": "3.2.15-next.0",
793
+ "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-3.2.15-next.0.tgz",
794
+ "integrity": "sha512-iy8CdC1UwnPsDbS4/UFjAtoLH8V3yBqzrRQ+08LsmiFOP3IhkzTzmQ2XaEFGmnrspeJ0+mcc9IxAUZJnPnQn3g==",
795
795
  "dependencies": {
796
- "@forge/cli-shared": "3.6.0",
796
+ "@forge/cli-shared": "3.6.1-next.0",
797
797
  "@forge/egress": "^1.1.2",
798
- "@forge/manifest": "4.6.0",
798
+ "@forge/manifest": "4.6.1-next.0",
799
799
  "@typescript-eslint/typescript-estree": "^5.40.0",
800
800
  "atlassian-openapi": "^1.0.13",
801
801
  "cross-spawn": "^7.0.1",
@@ -803,9 +803,9 @@
803
803
  }
804
804
  },
805
805
  "node_modules/@forge/manifest": {
806
- "version": "4.6.0",
807
- "resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-4.6.0.tgz",
808
- "integrity": "sha512-wmARdfQAZlqfmPXjgL8pbEzcXi/oYoyy7Eh5mH4k4NEa5rii/rwg9gz7S7Q1sFhUEdDOBjYgkonmUUc2X48DcQ==",
806
+ "version": "4.6.1-next.0",
807
+ "resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-4.6.1-next.0.tgz",
808
+ "integrity": "sha512-HLeBPiuy0afxIXFn/IdUTz1J0xkznFCmsgZHEthJPeoPPsfAuclg2LBCC2VLUZ7C25pflBjTakmBPx/+o6Kg5A==",
809
809
  "dependencies": {
810
810
  "@forge/util": "1.2.0",
811
811
  "ajv": "^6.12.5",
@@ -818,9 +818,9 @@
818
818
  }
819
819
  },
820
820
  "node_modules/@forge/runtime": {
821
- "version": "4.1.0",
822
- "resolved": "https://registry.npmjs.org/@forge/runtime/-/runtime-4.1.0.tgz",
823
- "integrity": "sha512-Kr63sCtvjqpSWKwOmqQl2C/qLzacj9Bs8rabakcauNC+jSK9tl3GqBdoQZ+u1TmoYggwjth6A4VjEq7SHJz7Mw==",
821
+ "version": "4.2.0-next.1",
822
+ "resolved": "https://registry.npmjs.org/@forge/runtime/-/runtime-4.2.0-next.1.tgz",
823
+ "integrity": "sha512-crJ4WgzvuGw3eyrp4NeEuazhrvo4N3Hq4pLjmQD8LGpywlwRDlRyyugq3GZolrSwAPnyJ46lyqxedz/sugTbOQ==",
824
824
  "dependencies": {
825
825
  "@forge/util": "1.2.0",
826
826
  "fp-ts": "^2.0.1",
@@ -842,14 +842,14 @@
842
842
  "integrity": "sha512-BU1qU0R08FH68MynaF409sp6mt3Ps8+XxyMk4Lsh9PYwYxMOpz5ynczv/DY0331G2n0LMBS1nVsJ9q88PFxI/Q=="
843
843
  },
844
844
  "node_modules/@forge/tunnel": {
845
- "version": "3.1.0",
846
- "resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-3.1.0.tgz",
847
- "integrity": "sha512-OEHdxjGYEBh0pVRLghWvML9V7ElaQUfrWb/OPC76qeKdof+YippE3qsjarMYcOFyttfauUyXECEXqqHGV/d88g==",
845
+ "version": "3.1.1-next.1",
846
+ "resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-3.1.1-next.1.tgz",
847
+ "integrity": "sha512-tl1tIyQrnudp1VRi4UI2+eofIY/zhowmmz1pnKnMB8bO5bnp4E20TaKumttjWwUbqps9ToYYWb56W2X45dCZ5A==",
848
848
  "dependencies": {
849
- "@forge/bundler": "4.4.0",
850
- "@forge/cli-shared": "3.6.0",
849
+ "@forge/bundler": "4.5.0-next.1",
850
+ "@forge/cli-shared": "3.6.1-next.0",
851
851
  "@forge/csp": "^2.1.0",
852
- "@forge/runtime": "4.1.0",
852
+ "@forge/runtime": "4.2.0-next.1",
853
853
  "express": "^4.17.1",
854
854
  "express-intercept": "^0.8.10",
855
855
  "http-proxy-middleware": "^1.0.6",
@@ -2372,9 +2372,9 @@
2372
2372
  }
2373
2373
  },
2374
2374
  "node_modules/caniuse-lite": {
2375
- "version": "1.0.30001451",
2376
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001451.tgz",
2377
- "integrity": "sha512-XY7UbUpGRatZzoRft//5xOa69/1iGJRBlrieH6QYrkKLIFn3m7OVEJ81dSrKoy2BnKsdbX5cLrOispZNYo9v2w==",
2375
+ "version": "1.0.30001454",
2376
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001454.tgz",
2377
+ "integrity": "sha512-4E63M5TBbgDoA9dQoFRdjL6iAmzTrz3rwYWoKDlvnvyvBxjCZ0rrUoX3THhEMie0/RYuTCeMbeTYLGAWgnLwEg==",
2378
2378
  "funding": [
2379
2379
  {
2380
2380
  "type": "opencollective",
@@ -3555,9 +3555,9 @@
3555
3555
  "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
3556
3556
  },
3557
3557
  "node_modules/electron-to-chromium": {
3558
- "version": "1.4.295",
3559
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.295.tgz",
3560
- "integrity": "sha512-lEO94zqf1bDA3aepxwnWoHUjA8sZ+2owgcSZjYQy0+uOSEclJX0VieZC+r+wLpSxUHRd6gG32znTWmr+5iGzFw=="
3558
+ "version": "1.4.301",
3559
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.301.tgz",
3560
+ "integrity": "sha512-bz00ASIIDjcgszZKuEA1JEFhbDjqUNbQ/PEhNEl1wbixzYpeTp2H2QWjsQvAL2T1wJBdOwCF5hE896BoMwYKrA=="
3561
3561
  },
3562
3562
  "node_modules/elliptic": {
3563
3563
  "version": "6.5.4",
@@ -10173,9 +10173,9 @@
10173
10173
  "integrity": "sha512-+GFtFqBhFzwKaKmeEfw1jWQgZJNX4q11CCx1fSPFJB49Fdjb7k3lx74jAyzHlX0UWnm6DMK+/cYT7j5t6G9LfA=="
10174
10174
  },
10175
10175
  "@forge/bundler": {
10176
- "version": "4.4.0",
10177
- "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.4.0.tgz",
10178
- "integrity": "sha512-G5dpVuw5dZAX1mur2e5UeDEHQQZiBnuIvIAwQGQ9oyYIMrCWQIJYCcd/vOtcTstPuniOh7k0hmcvPGwSe7kavQ==",
10176
+ "version": "4.5.0-next.1",
10177
+ "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.5.0-next.1.tgz",
10178
+ "integrity": "sha512-VDCD5hjhWE3LRGhoAfvofIFc+MDtftcAkKbggpSJQEFkPy/o8woJW94nAAAI0ASxu6ixSLMb2GaIAYeg9zTuQA==",
10179
10179
  "requires": {
10180
10180
  "@babel/core": "^7.16.7",
10181
10181
  "@babel/plugin-proposal-class-properties": "^7.16.7",
@@ -10185,9 +10185,9 @@
10185
10185
  "@babel/preset-typescript": "^7.16.7",
10186
10186
  "@forge/api": "2.11.0",
10187
10187
  "@forge/babel-plugin-transform-ui": "1.1.0",
10188
- "@forge/cli-shared": "3.6.0",
10189
- "@forge/lint": "3.2.14",
10190
- "@forge/runtime": "4.1.0",
10188
+ "@forge/cli-shared": "3.6.1-next.0",
10189
+ "@forge/lint": "3.2.15-next.0",
10190
+ "@forge/runtime": "4.2.0-next.1",
10191
10191
  "@forge/util": "1.2.0",
10192
10192
  "assert": "^1.1.1",
10193
10193
  "babel-loader": "^8.2.3",
@@ -10220,11 +10220,11 @@
10220
10220
  }
10221
10221
  },
10222
10222
  "@forge/cli-shared": {
10223
- "version": "3.6.0",
10224
- "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-3.6.0.tgz",
10225
- "integrity": "sha512-Be1tkD63v99HwQuAssECUaRDHNy3xFCdhWV9SoaYpJh1iEhw7i1M1S8j80wpuXy35nxYj5hb1FSj4JGQniiIaQ==",
10223
+ "version": "3.6.1-next.0",
10224
+ "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-3.6.1-next.0.tgz",
10225
+ "integrity": "sha512-SAGzwGPuGD7jmXZdABLjUavruOoGZaAaNs6KoI0lN7xqim/Wibo1Div/suj8QQOw4IdsHMmZj/V7hiXq77ntBQ==",
10226
10226
  "requires": {
10227
- "@forge/manifest": "4.6.0",
10227
+ "@forge/manifest": "4.6.1-next.0",
10228
10228
  "@forge/util": "1.2.0",
10229
10229
  "@sentry/node": "^7.29.0",
10230
10230
  "array.prototype.flatmap": "^1.2.3",
@@ -10275,13 +10275,13 @@
10275
10275
  }
10276
10276
  },
10277
10277
  "@forge/lint": {
10278
- "version": "3.2.14",
10279
- "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-3.2.14.tgz",
10280
- "integrity": "sha512-8WvRcL14Pc9HdojVDVZDXlolZhBjpnWmwYH51Du+jLGsoOZrqlRxu2KRl999jZN691ta33dhuadDBgIYUXaAhw==",
10278
+ "version": "3.2.15-next.0",
10279
+ "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-3.2.15-next.0.tgz",
10280
+ "integrity": "sha512-iy8CdC1UwnPsDbS4/UFjAtoLH8V3yBqzrRQ+08LsmiFOP3IhkzTzmQ2XaEFGmnrspeJ0+mcc9IxAUZJnPnQn3g==",
10281
10281
  "requires": {
10282
- "@forge/cli-shared": "3.6.0",
10282
+ "@forge/cli-shared": "3.6.1-next.0",
10283
10283
  "@forge/egress": "^1.1.2",
10284
- "@forge/manifest": "4.6.0",
10284
+ "@forge/manifest": "4.6.1-next.0",
10285
10285
  "@typescript-eslint/typescript-estree": "^5.40.0",
10286
10286
  "atlassian-openapi": "^1.0.13",
10287
10287
  "cross-spawn": "^7.0.1",
@@ -10289,9 +10289,9 @@
10289
10289
  }
10290
10290
  },
10291
10291
  "@forge/manifest": {
10292
- "version": "4.6.0",
10293
- "resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-4.6.0.tgz",
10294
- "integrity": "sha512-wmARdfQAZlqfmPXjgL8pbEzcXi/oYoyy7Eh5mH4k4NEa5rii/rwg9gz7S7Q1sFhUEdDOBjYgkonmUUc2X48DcQ==",
10292
+ "version": "4.6.1-next.0",
10293
+ "resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-4.6.1-next.0.tgz",
10294
+ "integrity": "sha512-HLeBPiuy0afxIXFn/IdUTz1J0xkznFCmsgZHEthJPeoPPsfAuclg2LBCC2VLUZ7C25pflBjTakmBPx/+o6Kg5A==",
10295
10295
  "requires": {
10296
10296
  "@forge/util": "1.2.0",
10297
10297
  "ajv": "^6.12.5",
@@ -10304,9 +10304,9 @@
10304
10304
  }
10305
10305
  },
10306
10306
  "@forge/runtime": {
10307
- "version": "4.1.0",
10308
- "resolved": "https://registry.npmjs.org/@forge/runtime/-/runtime-4.1.0.tgz",
10309
- "integrity": "sha512-Kr63sCtvjqpSWKwOmqQl2C/qLzacj9Bs8rabakcauNC+jSK9tl3GqBdoQZ+u1TmoYggwjth6A4VjEq7SHJz7Mw==",
10307
+ "version": "4.2.0-next.1",
10308
+ "resolved": "https://registry.npmjs.org/@forge/runtime/-/runtime-4.2.0-next.1.tgz",
10309
+ "integrity": "sha512-crJ4WgzvuGw3eyrp4NeEuazhrvo4N3Hq4pLjmQD8LGpywlwRDlRyyugq3GZolrSwAPnyJ46lyqxedz/sugTbOQ==",
10310
10310
  "requires": {
10311
10311
  "@forge/util": "1.2.0",
10312
10312
  "fp-ts": "^2.0.1",
@@ -10325,14 +10325,14 @@
10325
10325
  "integrity": "sha512-BU1qU0R08FH68MynaF409sp6mt3Ps8+XxyMk4Lsh9PYwYxMOpz5ynczv/DY0331G2n0LMBS1nVsJ9q88PFxI/Q=="
10326
10326
  },
10327
10327
  "@forge/tunnel": {
10328
- "version": "3.1.0",
10329
- "resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-3.1.0.tgz",
10330
- "integrity": "sha512-OEHdxjGYEBh0pVRLghWvML9V7ElaQUfrWb/OPC76qeKdof+YippE3qsjarMYcOFyttfauUyXECEXqqHGV/d88g==",
10328
+ "version": "3.1.1-next.1",
10329
+ "resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-3.1.1-next.1.tgz",
10330
+ "integrity": "sha512-tl1tIyQrnudp1VRi4UI2+eofIY/zhowmmz1pnKnMB8bO5bnp4E20TaKumttjWwUbqps9ToYYWb56W2X45dCZ5A==",
10331
10331
  "requires": {
10332
- "@forge/bundler": "4.4.0",
10333
- "@forge/cli-shared": "3.6.0",
10332
+ "@forge/bundler": "4.5.0-next.1",
10333
+ "@forge/cli-shared": "3.6.1-next.0",
10334
10334
  "@forge/csp": "^2.1.0",
10335
- "@forge/runtime": "4.1.0",
10335
+ "@forge/runtime": "4.2.0-next.1",
10336
10336
  "express": "^4.17.1",
10337
10337
  "express-intercept": "^0.8.10",
10338
10338
  "http-proxy-middleware": "^1.0.6",
@@ -11635,9 +11635,9 @@
11635
11635
  }
11636
11636
  },
11637
11637
  "caniuse-lite": {
11638
- "version": "1.0.30001451",
11639
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001451.tgz",
11640
- "integrity": "sha512-XY7UbUpGRatZzoRft//5xOa69/1iGJRBlrieH6QYrkKLIFn3m7OVEJ81dSrKoy2BnKsdbX5cLrOispZNYo9v2w=="
11638
+ "version": "1.0.30001454",
11639
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001454.tgz",
11640
+ "integrity": "sha512-4E63M5TBbgDoA9dQoFRdjL6iAmzTrz3rwYWoKDlvnvyvBxjCZ0rrUoX3THhEMie0/RYuTCeMbeTYLGAWgnLwEg=="
11641
11641
  },
11642
11642
  "case": {
11643
11643
  "version": "1.6.3",
@@ -12591,9 +12591,9 @@
12591
12591
  "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
12592
12592
  },
12593
12593
  "electron-to-chromium": {
12594
- "version": "1.4.295",
12595
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.295.tgz",
12596
- "integrity": "sha512-lEO94zqf1bDA3aepxwnWoHUjA8sZ+2owgcSZjYQy0+uOSEclJX0VieZC+r+wLpSxUHRd6gG32znTWmr+5iGzFw=="
12594
+ "version": "1.4.301",
12595
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.301.tgz",
12596
+ "integrity": "sha512-bz00ASIIDjcgszZKuEA1JEFhbDjqUNbQ/PEhNEl1wbixzYpeTp2H2QWjsQvAL2T1wJBdOwCF5hE896BoMwYKrA=="
12597
12597
  },
12598
12598
  "elliptic": {
12599
12599
  "version": "6.5.4",
@@ -1,8 +1,6 @@
1
1
  import commander, { CommanderError, OutputConfiguration } from 'commander';
2
2
  import { AnalyticsClientReporter } from '../analytics-client/analytics-client';
3
- import { PersonalApiCredentialsValidated } from '@forge/cli-shared';
4
- import { UI } from '@forge/cli-shared';
5
- import { CLIDetails } from '@forge/cli-shared';
3
+ import { UI, CLIDetails, PersonalApiCredentialsValidated } from '@forge/cli-shared';
6
4
  import { PreCommandController } from './controller/pre-command-controller';
7
5
  import { StubController } from './controller/stubController';
8
6
  declare type PreconditionCallback = (...args: any[]) => any;
@@ -59,7 +57,6 @@ export declare class Command {
59
57
  getCmdName(): string;
60
58
  getCommands(): Command[];
61
59
  environmentOption(): this;
62
- siteAndProductOption(): this;
63
60
  jsonOption(): this;
64
61
  requireNoAuthentication(): this;
65
62
  requireNoAnalyticsConsent(): this;
@@ -70,7 +67,6 @@ export declare class Command {
70
67
  private checkAuthentication;
71
68
  private checkVersion;
72
69
  private isLatestVersion;
73
- private validateContext;
74
70
  private findLastValidCommand;
75
71
  private outputRelevantHelp;
76
72
  private unknownCommand;
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/command-line/command.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAAE,cAAc,EAAU,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAsB,+BAA+B,EAAE,MAAM,mBAAmB,CAAC;AASxF,OAAO,EAAQ,EAAE,EAAuC,MAAM,mBAAmB,CAAC;AAIlF,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,aAAK,oBAAoB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AACpD,aAAK,YAAY,GAAG,OAAO,CAAC;IAAE,KAAK,CAAC,EAAE,+BAA+B,CAAC;IAAC,SAAS,EAAE,GAAG,CAAA;CAAE,GAAG,IAAI,CAAC,CAAC;AAOhG,qBAAa,YAAa,SAAQ,cAAc;I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AI;IAKlB,uBAAuB,IAAI,IAAI;IAK/B,yBAAyB,IAAI,IAAI;IAKxC,OAAO,CAAC,8BAA8B;IAW/B,eAAe,mBAA0B,GAAG,EAAE,4BAA4B,GAAG,EAAE,mBA6EpF;IAEK,eAAe,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI;YAKxC,kBAAkB;YAUlB,mBAAmB;IASjC,OAAO,CAAC,YAAY;IAgBpB,OAAO,CAAC,eAAe;IAgBvB,OAAO,CAAC,oBAAoB;IAyB5B,OAAO,CAAC,kBAAkB,CAExB;YAEY,cAAc;IAqC5B,OAAO,CAAC,eAAe;CAyBxB"}
@@ -6,10 +6,7 @@ const tslib_1 = require("tslib");
6
6
  const commander_1 = tslib_1.__importStar(require("commander"));
7
7
  const semver_1 = tslib_1.__importDefault(require("semver"));
8
8
  const cli_shared_1 = require("@forge/cli-shared");
9
- const cli_shared_2 = require("@forge/cli-shared");
10
- const cli_shared_3 = require("@forge/cli-shared");
11
9
  const environment_1 = require("./environment");
12
- const cli_shared_4 = require("@forge/cli-shared");
13
10
  const version_info_1 = require("./version-info");
14
11
  const anon_user_id_1 = require("./anon-user-id");
15
12
  const errors_1 = require("./errors");
@@ -46,7 +43,7 @@ class Command {
46
43
  this.actionProcessor = async (cb, ...args) => {
47
44
  var _b, _c, _d, _e, _f;
48
45
  if (this.newCommand) {
49
- this.ui.error(new Error(cli_shared_3.Text.deprecate(this.newCommand)));
46
+ this.ui.error(new Error(cli_shared_1.Text.deprecate(this.newCommand)));
50
47
  }
51
48
  const cmdName = this.cmd.name();
52
49
  let cred = (0, anon_user_id_1.getAnonId)(true);
@@ -61,12 +58,12 @@ class Command {
61
58
  }
62
59
  this.analyticsClient.reportCommandInvoke((_b = this.analyticsName) !== null && _b !== void 0 ? _b : cmdName, cred, attributes);
63
60
  if (!this.expectsArguments && args.length > 2) {
64
- throw new cli_shared_3.ValidationError(cli_shared_3.Text.extraArguments(cmdName));
61
+ throw new cli_shared_1.ValidationError(cli_shared_1.Text.extraArguments(cmdName));
65
62
  }
66
63
  const [options] = args;
67
64
  if (options === null || options === void 0 ? void 0 : options.nonInteractive) {
68
65
  if (!this.satisfiesNonInteractiveOptions(options)) {
69
- throw new cli_shared_3.ValidationError(cli_shared_3.Text.nonInteractive.error.missingRequiredOption(cmdName, this.requiredOptionFlags));
66
+ throw new cli_shared_1.ValidationError(cli_shared_1.Text.nonInteractive.error.missingRequiredOption(cmdName, this.requiredOptionFlags));
70
67
  }
71
68
  }
72
69
  if (this.requiresAnalyticsConsent) {
@@ -104,7 +101,7 @@ class Command {
104
101
  }
105
102
  else {
106
103
  this.analyticsClient.reportFailure((_f = this.analyticsName) !== null && _f !== void 0 ? _f : cmdName, cred, attributes, e);
107
- await (0, cli_shared_4.exitOnError)(this.ui, e);
104
+ await (0, cli_shared_1.exitOnError)(this.ui, e);
108
105
  }
109
106
  }
110
107
  };
@@ -131,7 +128,7 @@ class Command {
131
128
  const trimmedName = name.trim();
132
129
  const expectsArguments = trimmedName.endsWith(']') || trimmedName.endsWith('>');
133
130
  const subCommand = new Command(this.ui, this.analyticsClient, this.preCommandController, this.cliDetails, cmd, expectsArguments, Command.concatenateNames(this.analyticsName, cmd.name()));
134
- subCommand.option('--verbose', cli_shared_3.Text.optionVerbose);
131
+ subCommand.option('--verbose', cli_shared_1.Text.optionVerbose);
135
132
  subCommand.exitOverride((err) => {
136
133
  throw new WrapperError(err, subCommand.cmd.name());
137
134
  });
@@ -181,7 +178,7 @@ class Command {
181
178
  }
182
179
  nonInteractiveOption(...args) {
183
180
  this.requiredOptionFlags = args;
184
- this.cmd.option('--non-interactive', cli_shared_3.Text.nonInteractive.description);
181
+ this.cmd.option('--non-interactive', cli_shared_1.Text.nonInteractive.description);
185
182
  return this;
186
183
  }
187
184
  action(fn) {
@@ -206,7 +203,7 @@ class Command {
206
203
  if (Command.isUnknownCommand(err) || Command.isExcessCommands(err)) {
207
204
  return this.unknownCommand(argv);
208
205
  }
209
- return await (0, cli_shared_4.exitOnError)(this.ui, err);
206
+ return await (0, cli_shared_1.exitOnError)(this.ui, err);
210
207
  }
211
208
  }
212
209
  getDefinedCommands() {
@@ -222,23 +219,15 @@ class Command {
222
219
  return this.commands;
223
220
  }
224
221
  environmentOption() {
225
- this.option('-e, --environment [environment]', cli_shared_3.Text.env.option(cli_shared_2.DEFAULT_ENVIRONMENT_OPTION, cli_shared_2.VALID_ENVIRONMENT_OPTIONS));
222
+ this.option('-e, --environment [environment]', cli_shared_1.Text.env.option(cli_shared_1.DEFAULT_ENVIRONMENT_OPTION, cli_shared_1.VALID_ENVIRONMENT_OPTIONS));
226
223
  this.precondition(() => {
227
- this.cmd.opts().environment = (0, environment_1.checkEnvironmentOption)(this.cmd.opts().environment || cli_shared_2.DEFAULT_ENVIRONMENT_OPTION);
224
+ this.cmd.opts().environment = (0, environment_1.checkEnvironmentOption)(this.cmd.opts().environment || cli_shared_1.DEFAULT_ENVIRONMENT_OPTION);
228
225
  return { appEnv: this.cmd.opts().environment };
229
226
  });
230
227
  return this;
231
228
  }
232
- siteAndProductOption() {
233
- this.option('-s, --site [site]', cli_shared_3.Text.optionSite);
234
- this.option('-p, --product [product]', cli_shared_3.Text.optionProduct(cli_shared_2.SUPPORTED_PRODUCTS));
235
- this.precondition(() => {
236
- return this.validateContext();
237
- });
238
- return this;
239
- }
240
229
  jsonOption() {
241
- this.option('--json', cli_shared_3.Text.optionJson);
230
+ this.option('--json', cli_shared_1.Text.optionJson);
242
231
  return this;
243
232
  }
244
233
  requireNoAuthentication() {
@@ -281,7 +270,7 @@ class Command {
281
270
  return;
282
271
  }
283
272
  if (semver_1.default.gt(this.cliDetails.latest, this.cliDetails.version)) {
284
- this.ui.warn(cli_shared_3.Text.error.outdatedCLIVersion(this.cliDetails.version, this.cliDetails.latest));
273
+ this.ui.warn(cli_shared_1.Text.error.outdatedCLIVersion(this.cliDetails.version, this.cliDetails.latest));
285
274
  }
286
275
  else if (semver_1.default.gt(this.cliDetails.version, this.cliDetails.latest)) {
287
276
  (0, version_info_1.clearVersionCache)(this.cliDetails.name);
@@ -301,21 +290,6 @@ class Command {
301
290
  return false;
302
291
  }
303
292
  }
304
- async validateContext() {
305
- if (this.cmd.opts().product) {
306
- const capitalizedProduct = (0, cli_shared_2.capitalizeProduct)(this.cmd.opts().product);
307
- if (!(0, cli_shared_2.isSupportedProduct)(capitalizedProduct)) {
308
- throw new cli_shared_3.ValidationError(cli_shared_3.Text.error.invalidProduct);
309
- }
310
- this.cmd.opts().product = capitalizedProduct;
311
- }
312
- let trySite;
313
- if (this.cmd.opts().site) {
314
- trySite = this.cmd.opts().site;
315
- }
316
- this.cmd.opts().site = trySite ? (0, cli_shared_2.validateSite)(trySite, this.cmd.opts().product) : undefined;
317
- return { product: this.cmd.opts().product };
318
- }
319
293
  findLastValidCommand(argv) {
320
294
  let command = this.cmd;
321
295
  for (const [index, arg] of argv.slice(2).entries()) {
@@ -343,14 +317,14 @@ class Command {
343
317
  return cmd._hidden !== true;
344
318
  })
345
319
  .map((cmd) => cmd.name()));
346
- const errorText = cli_shared_3.Text.invalidCmd(argv.slice(2, lastCommandIndex + 2).join(' '));
320
+ const errorText = cli_shared_1.Text.invalidCmd(argv.slice(2, lastCommandIndex + 2).join(' '));
347
321
  if (suggestions.length) {
348
322
  errorMessage.push(`Did you mean:`);
349
323
  const suggestionsPrefixed = suggestions.map((suggestion) => [...argv.slice(2, lastCommandIndex + 1), suggestion].join(' '));
350
324
  errorMessage.push(suggestionsPrefixed.join('\n'));
351
325
  }
352
- errorMessage.push(cli_shared_3.Text.invalidCmdHelp);
353
- return await (0, cli_shared_4.exitOnError)(this.ui, new Error(errorText), errorMessage.join('\n\n'));
326
+ errorMessage.push(cli_shared_1.Text.invalidCmdHelp);
327
+ return await (0, cli_shared_1.exitOnError)(this.ui, new Error(errorText), errorMessage.join('\n\n'));
354
328
  }
355
329
  assertValidArgs(argv) {
356
330
  const args = argv.slice(2);
@@ -1,5 +1,12 @@
1
+ import commander from 'commander';
1
2
  import { Dependencies } from './dependency-injection';
2
3
  import { Installation } from '../service/installation-service';
4
+ export declare function validateContext({ site, product }: {
5
+ site?: string;
6
+ product?: string;
7
+ }, cmd: commander.Command): Promise<{
8
+ product?: string;
9
+ }>;
3
10
  export declare const performSingleUninstall: (installId: string, { ui, commands: { uninstallAppCommand } }: Dependencies) => Promise<void>;
4
11
  export declare const performMultipleUninstalls: (appsToUninstall: Installation[], { ui, commands: { uninstallAppCommand } }: Dependencies) => Promise<void>;
5
12
  export declare const registerCommands: ({ cmd, ...deps }: Dependencies) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"register-installation-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-installation-commands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAqD/D,eAAO,MAAM,sBAAsB,cACtB,MAAM,6CAC0B,YAAY,kBAwBxD,CAAC;AAEF,eAAO,MAAM,yBAAyB,oBACnB,YAAY,EAAE,6CACY,YAAY,kBA+CxD,CAAC;AAgEF,eAAO,MAAM,gBAAgB,qBAAsB,YAAY,KAAG,IAejE,CAAC"}
1
+ {"version":3,"file":"register-installation-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-installation-commands.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAYlC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAK/D,wBAAsB,eAAe,CACnC,EACE,IAAI,EACJ,OAAO,EACR,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,EACD,GAAG,EAAE,SAAS,CAAC,OAAO,GACrB,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAc/B;AAoDD,eAAO,MAAM,sBAAsB,cACtB,MAAM,6CAC0B,YAAY,kBAwBxD,CAAC;AAEF,eAAO,MAAM,yBAAyB,oBACnB,YAAY,EAAE,6CACY,YAAY,kBA+CxD,CAAC;AAgEF,eAAO,MAAM,gBAAgB,qBAAsB,YAAY,KAAG,IAejE,CAAC"}
@@ -1,16 +1,31 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.registerCommands = exports.performMultipleUninstalls = exports.performSingleUninstall = void 0;
3
+ exports.registerCommands = exports.performMultipleUninstalls = exports.performSingleUninstall = exports.validateContext = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const cli_shared_1 = require("@forge/cli-shared");
6
6
  const shared_1 = require("../installations/shared");
7
7
  const errors_1 = require("./errors");
8
8
  const COMMAND_NAME = 'install';
9
+ async function validateContext({ site, product }, cmd) {
10
+ if (product) {
11
+ product = (0, cli_shared_1.capitalizeProduct)(product);
12
+ if (!(0, cli_shared_1.isSupportedProduct)(product)) {
13
+ throw new cli_shared_1.ValidationError(cli_shared_1.Text.error.invalidProduct);
14
+ }
15
+ }
16
+ const siteURL = site ? (0, cli_shared_1.validateSite)(site, product) : undefined;
17
+ cmd.opts().product = product;
18
+ cmd.opts().site = siteURL;
19
+ return { product };
20
+ }
21
+ exports.validateContext = validateContext;
9
22
  const registerInstallAppCommand = ({ cmd, controllers: { installController } }) => {
10
23
  cmd
11
24
  .requireAppId()
12
25
  .environmentOption()
13
- .siteAndProductOption()
26
+ .option('-s, --site [site]', cli_shared_1.Text.optionSite)
27
+ .option('-p, --product [product]', cli_shared_1.Text.optionProduct(cli_shared_1.SUPPORTED_PRODUCTS))
28
+ .precondition(validateContext)
14
29
  .option('--upgrade', cli_shared_1.Text.install.optionUpgrade)
15
30
  .option('--confirm-scopes', cli_shared_1.Text.install.optionConfirmScopes)
16
31
  .nonInteractiveOption('--site', '--product', '--environment')
@@ -1,7 +1,6 @@
1
1
  import { Dependencies } from './dependency-injection';
2
2
  export interface LintActionParams {
3
3
  environment: string;
4
- directory: string;
5
4
  fix: boolean;
6
5
  }
7
6
  export declare const registerCommands: ({ cmd, controllers: { lintController } }: Dependencies) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"register-lint-command.d.ts","sourceRoot":"","sources":["../../src/command-line/register-lint-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAItD,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,OAAO,CAAC;CACd;AAED,eAAO,MAAM,gBAAgB,6CAA8C,YAAY,KAAG,IAUzF,CAAC"}
1
+ {"version":3,"file":"register-lint-command.d.ts","sourceRoot":"","sources":["../../src/command-line/register-lint-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAItD,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,OAAO,CAAC;CACd;AAED,eAAO,MAAM,gBAAgB,6CAA8C,YAAY,KAAG,IAUzF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"register-log-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-log-commands.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAStD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAczE;AAwFD,eAAO,MAAM,gBAAgB,kDAAmD,YAAY,SAsC3F,CAAC"}
1
+ {"version":3,"file":"register-log-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-log-commands.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAStD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAczE;AAwFD,eAAO,MAAM,gBAAgB,kDAAmD,YAAY,SAgC3F,CAAC"}
@@ -111,12 +111,10 @@ const registerCommands = ({ cmd, ui, commands: { viewAppLogsCommand } }) => {
111
111
  .option('-n, --limit <limit>', cli_shared_3.Text.logs.optionLimit, parseLimit, DEFAULT_LIMIT)
112
112
  .option('-s, --since <since>', cli_shared_3.Text.logs.optionSince)
113
113
  .option('-g, --grouped', cli_shared_3.Text.logs.optionGroup)
114
- .action(async ({ environment, site, product, invocation, limit, grouped, since }) => {
115
- const context = site && product ? { site, product } : undefined;
114
+ .action(async ({ environment, invocation, limit, grouped, since }) => {
116
115
  if (invocation) {
117
116
  const log = await viewAppLogsCommand.getOne({
118
117
  environmentKey: environment,
119
- context,
120
118
  invocationId: invocation
121
119
  });
122
120
  logInvocation(ui, log, grouped);
@@ -128,7 +126,6 @@ const registerCommands = ({ cmd, ui, commands: { viewAppLogsCommand } }) => {
128
126
  }
129
127
  const logs = await viewAppLogsCommand.getAll({
130
128
  environmentKey: environment,
131
- context,
132
129
  limit,
133
130
  startTime
134
131
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/cli",
3
- "version": "6.4.2",
3
+ "version": "6.4.3-next.1",
4
4
  "description": "A command line interface for managing Atlassian-hosted apps",
5
5
  "author": "Atlassian",
6
6
  "license": "UNLICENSED",
@@ -18,13 +18,13 @@
18
18
  "postinstall": "node -e \"process.exitCode = fs.existsSync('./out/bin/postinstall.js')\" || node ./out/bin/postinstall.js"
19
19
  },
20
20
  "dependencies": {
21
- "@forge/bundler": "4.4.0",
22
- "@forge/cli-shared": "3.6.0",
21
+ "@forge/bundler": "4.5.0-next.1",
22
+ "@forge/cli-shared": "3.6.1-next.0",
23
23
  "@forge/egress": "^1.1.2",
24
- "@forge/lint": "3.2.14",
25
- "@forge/manifest": "4.6.0",
26
- "@forge/runtime": "4.1.0",
27
- "@forge/tunnel": "3.1.0",
24
+ "@forge/lint": "3.2.15-next.0",
25
+ "@forge/manifest": "4.6.1-next.0",
26
+ "@forge/runtime": "4.2.0-next.1",
27
+ "@forge/tunnel": "3.1.1-next.1",
28
28
  "@forge/util": "1.2.0",
29
29
  "@sentry/node": "^7.29.0",
30
30
  "ajv": "^6.12.5",