heroku 10.0.3-alpha.2 → 10.0.3-beta.0
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/bin/run +7 -31
- package/lib/file.d.ts +1 -1
- package/lib/file.js +2 -2
- package/oclif.manifest.json +305 -305
- package/package.json +7 -7
- package/bin/heroku-prompts.js +0 -235
- package/bin/heroku-repl.js +0 -48
package/bin/run
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const {Config} = require('@oclif/core')
|
|
4
|
-
const root = require.resolve('../package.json')
|
|
5
|
-
const config = new Config({root})
|
|
6
|
-
|
|
7
3
|
process.env.HEROKU_UPDATE_INSTRUCTIONS = process.env.HEROKU_UPDATE_INSTRUCTIONS || 'update with: "npm update -g heroku"'
|
|
8
4
|
|
|
9
5
|
const now = new Date()
|
|
10
6
|
const cliStartTime = now.getTime()
|
|
11
7
|
const globalTelemetry = require('../lib/global_telemetry')
|
|
12
|
-
const yargs = require('yargs-parser')(process.argv.slice(2))
|
|
13
8
|
|
|
14
9
|
process.once('beforeExit', async code => {
|
|
15
10
|
// capture as successful exit
|
|
@@ -43,32 +38,13 @@ process.on('SIGTERM', async () => {
|
|
|
43
38
|
globalTelemetry.initializeInstrumentation()
|
|
44
39
|
|
|
45
40
|
const oclif = require('@oclif/core')
|
|
46
|
-
const oclifFlush = require('@oclif/core/flush')
|
|
47
|
-
const oclifError = require('@oclif/core/handle')
|
|
48
|
-
const { promptUser } = require('./heroku-prompts')
|
|
49
|
-
const { herokuRepl } = require('./heroku-repl')
|
|
50
41
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return await herokuRepl(config)
|
|
57
|
-
}
|
|
58
|
-
if (flags.prompt) {
|
|
59
|
-
delete flags.prompt
|
|
60
|
-
await promptUser(config, commandName, args, flags)
|
|
61
|
-
}
|
|
62
|
-
await oclif.run([commandName, ...args], config)
|
|
63
|
-
await oclifFlush()
|
|
64
|
-
} catch (error) {
|
|
65
|
-
// capture any errors raised by oclif
|
|
66
|
-
const cliError = error
|
|
67
|
-
cliError.cliRunDuration = globalTelemetry.computeDuration(cliStartTime)
|
|
68
|
-
await globalTelemetry.sendTelemetry(cliError)
|
|
42
|
+
oclif.run().then(require('@oclif/core/flush')).catch(async error => {
|
|
43
|
+
// capture any errors raised by oclif
|
|
44
|
+
const cliError = error
|
|
45
|
+
cliError.cliRunDuration = globalTelemetry.computeDuration(cliStartTime)
|
|
46
|
+
await globalTelemetry.sendTelemetry(cliError)
|
|
69
47
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
};
|
|
48
|
+
return require('@oclif/core/handle')(error)
|
|
49
|
+
})
|
|
73
50
|
|
|
74
|
-
void main();
|
package/lib/file.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export declare function ls(dir: string): Promise<{
|
|
|
10
10
|
}[]>;
|
|
11
11
|
export declare function removeEmptyDirs(dir: string): Promise<void>;
|
|
12
12
|
export declare function readJSON(file: string): Promise<any>;
|
|
13
|
-
export declare function outputJSON(file: string, data: any
|
|
13
|
+
export declare function outputJSON(file: string, data: any): Promise<void>;
|
|
14
14
|
export declare function realpathSync(p: string): string;
|
package/lib/file.js
CHANGED
|
@@ -53,9 +53,9 @@ async function readJSON(file) {
|
|
|
53
53
|
return deps_1.default.fs.readJSON(file);
|
|
54
54
|
}
|
|
55
55
|
exports.readJSON = readJSON;
|
|
56
|
-
async function outputJSON(file, data
|
|
56
|
+
async function outputJSON(file, data) {
|
|
57
57
|
debug('outputJSON', file);
|
|
58
|
-
return deps_1.default.fs.outputJSON(file, data,
|
|
58
|
+
return deps_1.default.fs.outputJSON(file, data, { spaces: 2 });
|
|
59
59
|
}
|
|
60
60
|
exports.outputJSON = outputJSON;
|
|
61
61
|
function realpathSync(p) {
|
package/oclif.manifest.json
CHANGED
|
@@ -2450,24 +2450,16 @@
|
|
|
2450
2450
|
"script.js"
|
|
2451
2451
|
]
|
|
2452
2452
|
},
|
|
2453
|
-
"
|
|
2453
|
+
"buildpacks:add": {
|
|
2454
2454
|
"aliases": [],
|
|
2455
2455
|
"args": {
|
|
2456
|
-
"
|
|
2457
|
-
"description": "
|
|
2458
|
-
"name": "
|
|
2459
|
-
"required": true
|
|
2460
|
-
},
|
|
2461
|
-
"KEY": {
|
|
2462
|
-
"description": "absolute path of the key file on disk",
|
|
2463
|
-
"name": "KEY",
|
|
2456
|
+
"buildpack": {
|
|
2457
|
+
"description": "namespace/name of the buildpack",
|
|
2458
|
+
"name": "buildpack",
|
|
2464
2459
|
"required": true
|
|
2465
2460
|
}
|
|
2466
2461
|
},
|
|
2467
|
-
"description": "
|
|
2468
|
-
"examples": [
|
|
2469
|
-
"$ heroku certs:add example.com.crt example.com.key\n If you require intermediate certificates, refer to this article on merging certificates to get a complete chain:\n https://help.salesforce.com/s/articleView?id=000333504&type=1"
|
|
2470
|
-
],
|
|
2462
|
+
"description": "add new app buildpack, inserting into list of buildpacks if necessary",
|
|
2471
2463
|
"flags": {
|
|
2472
2464
|
"app": {
|
|
2473
2465
|
"char": "a",
|
|
@@ -2485,91 +2477,36 @@
|
|
|
2485
2477
|
"hasDynamicHelp": false,
|
|
2486
2478
|
"multiple": false,
|
|
2487
2479
|
"type": "option"
|
|
2480
|
+
},
|
|
2481
|
+
"index": {
|
|
2482
|
+
"char": "i",
|
|
2483
|
+
"description": "the 1-based index of the URL in the list of URLs",
|
|
2484
|
+
"name": "index",
|
|
2485
|
+
"hasDynamicHelp": false,
|
|
2486
|
+
"multiple": false,
|
|
2487
|
+
"type": "option"
|
|
2488
2488
|
}
|
|
2489
2489
|
},
|
|
2490
2490
|
"hasDynamicHelp": false,
|
|
2491
2491
|
"hiddenAliases": [],
|
|
2492
|
-
"id": "
|
|
2492
|
+
"id": "buildpacks:add",
|
|
2493
2493
|
"pluginAlias": "heroku",
|
|
2494
2494
|
"pluginName": "heroku",
|
|
2495
2495
|
"pluginType": "core",
|
|
2496
2496
|
"strict": true,
|
|
2497
|
-
"topic": "certs",
|
|
2498
2497
|
"isESM": false,
|
|
2499
2498
|
"relativePath": [
|
|
2500
2499
|
"lib",
|
|
2501
2500
|
"commands",
|
|
2502
|
-
"
|
|
2501
|
+
"buildpacks",
|
|
2503
2502
|
"add.js"
|
|
2504
2503
|
]
|
|
2505
2504
|
},
|
|
2506
|
-
"
|
|
2505
|
+
"buildpacks:clear": {
|
|
2507
2506
|
"aliases": [],
|
|
2508
|
-
"args": {
|
|
2509
|
-
|
|
2510
|
-
"description": "domain name to generate",
|
|
2511
|
-
"name": "domain",
|
|
2512
|
-
"required": true
|
|
2513
|
-
}
|
|
2514
|
-
},
|
|
2515
|
-
"description": "generate a key and a CSR or self-signed certificate",
|
|
2507
|
+
"args": {},
|
|
2508
|
+
"description": "clear all buildpacks set on the app",
|
|
2516
2509
|
"flags": {
|
|
2517
|
-
"selfsigned": {
|
|
2518
|
-
"description": "generate a self-signed certificate instead of a CSR",
|
|
2519
|
-
"name": "selfsigned",
|
|
2520
|
-
"required": false,
|
|
2521
|
-
"allowNo": false,
|
|
2522
|
-
"type": "boolean"
|
|
2523
|
-
},
|
|
2524
|
-
"keysize": {
|
|
2525
|
-
"description": "RSA key size in bits (default: 2048)",
|
|
2526
|
-
"name": "keysize",
|
|
2527
|
-
"hasDynamicHelp": false,
|
|
2528
|
-
"multiple": false,
|
|
2529
|
-
"type": "option"
|
|
2530
|
-
},
|
|
2531
|
-
"owner": {
|
|
2532
|
-
"description": "name of organization certificate belongs to",
|
|
2533
|
-
"name": "owner",
|
|
2534
|
-
"hasDynamicHelp": false,
|
|
2535
|
-
"multiple": false,
|
|
2536
|
-
"type": "option"
|
|
2537
|
-
},
|
|
2538
|
-
"country": {
|
|
2539
|
-
"description": "country of owner, as a two-letter ISO country code",
|
|
2540
|
-
"name": "country",
|
|
2541
|
-
"hasDynamicHelp": false,
|
|
2542
|
-
"multiple": false,
|
|
2543
|
-
"type": "option"
|
|
2544
|
-
},
|
|
2545
|
-
"area": {
|
|
2546
|
-
"description": "sub-country area (state, province, etc.) of owner",
|
|
2547
|
-
"name": "area",
|
|
2548
|
-
"hasDynamicHelp": false,
|
|
2549
|
-
"multiple": false,
|
|
2550
|
-
"type": "option"
|
|
2551
|
-
},
|
|
2552
|
-
"city": {
|
|
2553
|
-
"description": "city of owner",
|
|
2554
|
-
"name": "city",
|
|
2555
|
-
"hasDynamicHelp": false,
|
|
2556
|
-
"multiple": false,
|
|
2557
|
-
"type": "option"
|
|
2558
|
-
},
|
|
2559
|
-
"subject": {
|
|
2560
|
-
"description": "specify entire certificate subject",
|
|
2561
|
-
"name": "subject",
|
|
2562
|
-
"hasDynamicHelp": false,
|
|
2563
|
-
"multiple": false,
|
|
2564
|
-
"type": "option"
|
|
2565
|
-
},
|
|
2566
|
-
"now": {
|
|
2567
|
-
"description": "do not prompt for any owner information",
|
|
2568
|
-
"name": "now",
|
|
2569
|
-
"required": false,
|
|
2570
|
-
"allowNo": false,
|
|
2571
|
-
"type": "boolean"
|
|
2572
|
-
},
|
|
2573
2510
|
"app": {
|
|
2574
2511
|
"char": "a",
|
|
2575
2512
|
"description": "app to run command against",
|
|
@@ -2590,25 +2527,23 @@
|
|
|
2590
2527
|
},
|
|
2591
2528
|
"hasDynamicHelp": false,
|
|
2592
2529
|
"hiddenAliases": [],
|
|
2593
|
-
"id": "
|
|
2530
|
+
"id": "buildpacks:clear",
|
|
2594
2531
|
"pluginAlias": "heroku",
|
|
2595
2532
|
"pluginName": "heroku",
|
|
2596
2533
|
"pluginType": "core",
|
|
2597
2534
|
"strict": true,
|
|
2598
|
-
"topic": "certs",
|
|
2599
|
-
"help": "Generate a key and certificate signing request (or self-signed certificate)\nfor an app. Prompts for information to put in the certificate unless --now\nis used, or at least one of the --subject, --owner, --country, --area, or\n--city options is specified.",
|
|
2600
2535
|
"isESM": false,
|
|
2601
2536
|
"relativePath": [
|
|
2602
2537
|
"lib",
|
|
2603
2538
|
"commands",
|
|
2604
|
-
"
|
|
2605
|
-
"
|
|
2539
|
+
"buildpacks",
|
|
2540
|
+
"clear.js"
|
|
2606
2541
|
]
|
|
2607
2542
|
},
|
|
2608
|
-
"
|
|
2543
|
+
"buildpacks": {
|
|
2609
2544
|
"aliases": [],
|
|
2610
2545
|
"args": {},
|
|
2611
|
-
"description": "
|
|
2546
|
+
"description": "display the buildpacks for an app",
|
|
2612
2547
|
"flags": {
|
|
2613
2548
|
"app": {
|
|
2614
2549
|
"char": "a",
|
|
@@ -2630,45 +2565,55 @@
|
|
|
2630
2565
|
},
|
|
2631
2566
|
"hasDynamicHelp": false,
|
|
2632
2567
|
"hiddenAliases": [],
|
|
2633
|
-
"id": "
|
|
2568
|
+
"id": "buildpacks",
|
|
2634
2569
|
"pluginAlias": "heroku",
|
|
2635
2570
|
"pluginName": "heroku",
|
|
2636
2571
|
"pluginType": "core",
|
|
2637
2572
|
"strict": true,
|
|
2638
|
-
"topic": "certs",
|
|
2639
2573
|
"isESM": false,
|
|
2640
2574
|
"relativePath": [
|
|
2641
2575
|
"lib",
|
|
2642
2576
|
"commands",
|
|
2643
|
-
"
|
|
2577
|
+
"buildpacks",
|
|
2644
2578
|
"index.js"
|
|
2645
2579
|
]
|
|
2646
2580
|
},
|
|
2647
|
-
"
|
|
2581
|
+
"buildpacks:info": {
|
|
2648
2582
|
"aliases": [],
|
|
2649
|
-
"args": {
|
|
2650
|
-
|
|
2583
|
+
"args": {
|
|
2584
|
+
"buildpack": {
|
|
2585
|
+
"description": "namespace/name of the buildpack",
|
|
2586
|
+
"name": "buildpack",
|
|
2587
|
+
"required": true
|
|
2588
|
+
}
|
|
2589
|
+
},
|
|
2590
|
+
"description": "fetch info about a buildpack",
|
|
2591
|
+
"flags": {},
|
|
2592
|
+
"hasDynamicHelp": false,
|
|
2593
|
+
"hiddenAliases": [],
|
|
2594
|
+
"id": "buildpacks:info",
|
|
2595
|
+
"pluginAlias": "heroku",
|
|
2596
|
+
"pluginName": "heroku",
|
|
2597
|
+
"pluginType": "core",
|
|
2598
|
+
"strict": true,
|
|
2599
|
+
"isESM": false,
|
|
2600
|
+
"relativePath": [
|
|
2601
|
+
"lib",
|
|
2602
|
+
"commands",
|
|
2603
|
+
"buildpacks",
|
|
2604
|
+
"info.js"
|
|
2605
|
+
]
|
|
2606
|
+
},
|
|
2607
|
+
"buildpacks:remove": {
|
|
2608
|
+
"aliases": [],
|
|
2609
|
+
"args": {
|
|
2610
|
+
"buildpack": {
|
|
2611
|
+
"description": "namespace/name of the buildpack",
|
|
2612
|
+
"name": "buildpack"
|
|
2613
|
+
}
|
|
2614
|
+
},
|
|
2615
|
+
"description": "remove a buildpack set on the app",
|
|
2651
2616
|
"flags": {
|
|
2652
|
-
"name": {
|
|
2653
|
-
"description": "name to check info on",
|
|
2654
|
-
"name": "name",
|
|
2655
|
-
"hasDynamicHelp": false,
|
|
2656
|
-
"multiple": false,
|
|
2657
|
-
"type": "option"
|
|
2658
|
-
},
|
|
2659
|
-
"endpoint": {
|
|
2660
|
-
"description": "endpoint to check info on",
|
|
2661
|
-
"name": "endpoint",
|
|
2662
|
-
"hasDynamicHelp": false,
|
|
2663
|
-
"multiple": false,
|
|
2664
|
-
"type": "option"
|
|
2665
|
-
},
|
|
2666
|
-
"show-domains": {
|
|
2667
|
-
"description": "show associated domains",
|
|
2668
|
-
"name": "show-domains",
|
|
2669
|
-
"allowNo": false,
|
|
2670
|
-
"type": "boolean"
|
|
2671
|
-
},
|
|
2672
2617
|
"app": {
|
|
2673
2618
|
"char": "a",
|
|
2674
2619
|
"description": "app to run command against",
|
|
@@ -2685,50 +2630,88 @@
|
|
|
2685
2630
|
"hasDynamicHelp": false,
|
|
2686
2631
|
"multiple": false,
|
|
2687
2632
|
"type": "option"
|
|
2633
|
+
},
|
|
2634
|
+
"index": {
|
|
2635
|
+
"char": "i",
|
|
2636
|
+
"description": "the 1-based index of the URL to remove from the list of URLs",
|
|
2637
|
+
"name": "index",
|
|
2638
|
+
"hasDynamicHelp": false,
|
|
2639
|
+
"multiple": false,
|
|
2640
|
+
"type": "option"
|
|
2688
2641
|
}
|
|
2689
2642
|
},
|
|
2690
2643
|
"hasDynamicHelp": false,
|
|
2691
2644
|
"hiddenAliases": [],
|
|
2692
|
-
"id": "
|
|
2645
|
+
"id": "buildpacks:remove",
|
|
2693
2646
|
"pluginAlias": "heroku",
|
|
2694
2647
|
"pluginName": "heroku",
|
|
2695
2648
|
"pluginType": "core",
|
|
2696
2649
|
"strict": true,
|
|
2697
|
-
"topic": "certs",
|
|
2698
2650
|
"isESM": false,
|
|
2699
2651
|
"relativePath": [
|
|
2700
2652
|
"lib",
|
|
2701
2653
|
"commands",
|
|
2702
|
-
"
|
|
2703
|
-
"
|
|
2654
|
+
"buildpacks",
|
|
2655
|
+
"remove.js"
|
|
2704
2656
|
]
|
|
2705
2657
|
},
|
|
2706
|
-
"
|
|
2658
|
+
"buildpacks:search": {
|
|
2707
2659
|
"aliases": [],
|
|
2708
|
-
"args": {
|
|
2709
|
-
|
|
2660
|
+
"args": {
|
|
2661
|
+
"term": {
|
|
2662
|
+
"description": "search term that searches across name, namespace, and description",
|
|
2663
|
+
"name": "term"
|
|
2664
|
+
}
|
|
2665
|
+
},
|
|
2666
|
+
"description": "search for buildpacks",
|
|
2710
2667
|
"flags": {
|
|
2711
|
-
"
|
|
2712
|
-
"
|
|
2713
|
-
"name": "
|
|
2668
|
+
"namespace": {
|
|
2669
|
+
"description": "buildpack namespaces to filter on using a comma separated list",
|
|
2670
|
+
"name": "namespace",
|
|
2714
2671
|
"hasDynamicHelp": false,
|
|
2715
2672
|
"multiple": false,
|
|
2716
2673
|
"type": "option"
|
|
2717
2674
|
},
|
|
2718
2675
|
"name": {
|
|
2719
|
-
"description": "
|
|
2676
|
+
"description": "buildpack names to filter on using a comma separated list ",
|
|
2720
2677
|
"name": "name",
|
|
2721
2678
|
"hasDynamicHelp": false,
|
|
2722
2679
|
"multiple": false,
|
|
2723
2680
|
"type": "option"
|
|
2724
2681
|
},
|
|
2725
|
-
"
|
|
2726
|
-
"description": "
|
|
2727
|
-
"name": "
|
|
2682
|
+
"description": {
|
|
2683
|
+
"description": "buildpack description to filter on",
|
|
2684
|
+
"name": "description",
|
|
2728
2685
|
"hasDynamicHelp": false,
|
|
2729
2686
|
"multiple": false,
|
|
2730
2687
|
"type": "option"
|
|
2731
|
-
}
|
|
2688
|
+
}
|
|
2689
|
+
},
|
|
2690
|
+
"hasDynamicHelp": false,
|
|
2691
|
+
"hiddenAliases": [],
|
|
2692
|
+
"id": "buildpacks:search",
|
|
2693
|
+
"pluginAlias": "heroku",
|
|
2694
|
+
"pluginName": "heroku",
|
|
2695
|
+
"pluginType": "core",
|
|
2696
|
+
"strict": true,
|
|
2697
|
+
"isESM": false,
|
|
2698
|
+
"relativePath": [
|
|
2699
|
+
"lib",
|
|
2700
|
+
"commands",
|
|
2701
|
+
"buildpacks",
|
|
2702
|
+
"search.js"
|
|
2703
|
+
]
|
|
2704
|
+
},
|
|
2705
|
+
"buildpacks:set": {
|
|
2706
|
+
"aliases": [],
|
|
2707
|
+
"args": {
|
|
2708
|
+
"buildpack": {
|
|
2709
|
+
"description": "namespace/name of the buildpack",
|
|
2710
|
+
"name": "buildpack",
|
|
2711
|
+
"required": true
|
|
2712
|
+
}
|
|
2713
|
+
},
|
|
2714
|
+
"flags": {
|
|
2732
2715
|
"app": {
|
|
2733
2716
|
"char": "a",
|
|
2734
2717
|
"description": "app to run command against",
|
|
@@ -2745,25 +2728,58 @@
|
|
|
2745
2728
|
"hasDynamicHelp": false,
|
|
2746
2729
|
"multiple": false,
|
|
2747
2730
|
"type": "option"
|
|
2731
|
+
},
|
|
2732
|
+
"index": {
|
|
2733
|
+
"char": "i",
|
|
2734
|
+
"description": "the 1-based index of the URL in the list of URLs",
|
|
2735
|
+
"name": "index",
|
|
2736
|
+
"hasDynamicHelp": false,
|
|
2737
|
+
"multiple": false,
|
|
2738
|
+
"type": "option"
|
|
2748
2739
|
}
|
|
2749
2740
|
},
|
|
2750
2741
|
"hasDynamicHelp": false,
|
|
2751
2742
|
"hiddenAliases": [],
|
|
2752
|
-
"id": "
|
|
2743
|
+
"id": "buildpacks:set",
|
|
2753
2744
|
"pluginAlias": "heroku",
|
|
2754
2745
|
"pluginName": "heroku",
|
|
2755
2746
|
"pluginType": "core",
|
|
2756
2747
|
"strict": true,
|
|
2757
|
-
"topic": "certs",
|
|
2758
2748
|
"isESM": false,
|
|
2759
2749
|
"relativePath": [
|
|
2760
2750
|
"lib",
|
|
2761
2751
|
"commands",
|
|
2762
|
-
"
|
|
2763
|
-
"
|
|
2752
|
+
"buildpacks",
|
|
2753
|
+
"set.js"
|
|
2764
2754
|
]
|
|
2765
2755
|
},
|
|
2766
|
-
"
|
|
2756
|
+
"buildpacks:versions": {
|
|
2757
|
+
"aliases": [],
|
|
2758
|
+
"args": {
|
|
2759
|
+
"buildpack": {
|
|
2760
|
+
"description": "namespace/name of the buildpack",
|
|
2761
|
+
"name": "buildpack",
|
|
2762
|
+
"required": true
|
|
2763
|
+
}
|
|
2764
|
+
},
|
|
2765
|
+
"description": "list versions of a buildpack",
|
|
2766
|
+
"flags": {},
|
|
2767
|
+
"hasDynamicHelp": false,
|
|
2768
|
+
"hiddenAliases": [],
|
|
2769
|
+
"id": "buildpacks:versions",
|
|
2770
|
+
"pluginAlias": "heroku",
|
|
2771
|
+
"pluginName": "heroku",
|
|
2772
|
+
"pluginType": "core",
|
|
2773
|
+
"strict": true,
|
|
2774
|
+
"isESM": false,
|
|
2775
|
+
"relativePath": [
|
|
2776
|
+
"lib",
|
|
2777
|
+
"commands",
|
|
2778
|
+
"buildpacks",
|
|
2779
|
+
"versions.js"
|
|
2780
|
+
]
|
|
2781
|
+
},
|
|
2782
|
+
"certs:add": {
|
|
2767
2783
|
"aliases": [],
|
|
2768
2784
|
"args": {
|
|
2769
2785
|
"CRT": {
|
|
@@ -2777,32 +2793,11 @@
|
|
|
2777
2793
|
"required": true
|
|
2778
2794
|
}
|
|
2779
2795
|
},
|
|
2780
|
-
"description": "
|
|
2796
|
+
"description": "Add an SSL certificate to an app.\n\n Note: certificates with PEM encoding are also valid.\n ",
|
|
2781
2797
|
"examples": [
|
|
2782
|
-
"$ heroku certs:
|
|
2798
|
+
"$ heroku certs:add example.com.crt example.com.key\n If you require intermediate certificates, refer to this article on merging certificates to get a complete chain:\n https://help.salesforce.com/s/articleView?id=000333504&type=1"
|
|
2783
2799
|
],
|
|
2784
2800
|
"flags": {
|
|
2785
|
-
"confirm": {
|
|
2786
|
-
"hidden": true,
|
|
2787
|
-
"name": "confirm",
|
|
2788
|
-
"hasDynamicHelp": false,
|
|
2789
|
-
"multiple": false,
|
|
2790
|
-
"type": "option"
|
|
2791
|
-
},
|
|
2792
|
-
"name": {
|
|
2793
|
-
"description": "name to update",
|
|
2794
|
-
"name": "name",
|
|
2795
|
-
"hasDynamicHelp": false,
|
|
2796
|
-
"multiple": false,
|
|
2797
|
-
"type": "option"
|
|
2798
|
-
},
|
|
2799
|
-
"endpoint": {
|
|
2800
|
-
"description": "endpoint to update",
|
|
2801
|
-
"name": "endpoint",
|
|
2802
|
-
"hasDynamicHelp": false,
|
|
2803
|
-
"multiple": false,
|
|
2804
|
-
"type": "option"
|
|
2805
|
-
},
|
|
2806
2801
|
"app": {
|
|
2807
2802
|
"char": "a",
|
|
2808
2803
|
"description": "app to run command against",
|
|
@@ -2823,7 +2818,7 @@
|
|
|
2823
2818
|
},
|
|
2824
2819
|
"hasDynamicHelp": false,
|
|
2825
2820
|
"hiddenAliases": [],
|
|
2826
|
-
"id": "certs:
|
|
2821
|
+
"id": "certs:add",
|
|
2827
2822
|
"pluginAlias": "heroku",
|
|
2828
2823
|
"pluginName": "heroku",
|
|
2829
2824
|
"pluginType": "core",
|
|
@@ -2834,20 +2829,76 @@
|
|
|
2834
2829
|
"lib",
|
|
2835
2830
|
"commands",
|
|
2836
2831
|
"certs",
|
|
2837
|
-
"
|
|
2832
|
+
"add.js"
|
|
2838
2833
|
]
|
|
2839
2834
|
},
|
|
2840
|
-
"
|
|
2835
|
+
"certs:generate": {
|
|
2841
2836
|
"aliases": [],
|
|
2842
2837
|
"args": {
|
|
2843
|
-
"
|
|
2844
|
-
"description": "
|
|
2845
|
-
"name": "
|
|
2838
|
+
"domain": {
|
|
2839
|
+
"description": "domain name to generate",
|
|
2840
|
+
"name": "domain",
|
|
2846
2841
|
"required": true
|
|
2847
2842
|
}
|
|
2848
2843
|
},
|
|
2849
|
-
"description": "
|
|
2844
|
+
"description": "generate a key and a CSR or self-signed certificate",
|
|
2850
2845
|
"flags": {
|
|
2846
|
+
"selfsigned": {
|
|
2847
|
+
"description": "generate a self-signed certificate instead of a CSR",
|
|
2848
|
+
"name": "selfsigned",
|
|
2849
|
+
"required": false,
|
|
2850
|
+
"allowNo": false,
|
|
2851
|
+
"type": "boolean"
|
|
2852
|
+
},
|
|
2853
|
+
"keysize": {
|
|
2854
|
+
"description": "RSA key size in bits (default: 2048)",
|
|
2855
|
+
"name": "keysize",
|
|
2856
|
+
"hasDynamicHelp": false,
|
|
2857
|
+
"multiple": false,
|
|
2858
|
+
"type": "option"
|
|
2859
|
+
},
|
|
2860
|
+
"owner": {
|
|
2861
|
+
"description": "name of organization certificate belongs to",
|
|
2862
|
+
"name": "owner",
|
|
2863
|
+
"hasDynamicHelp": false,
|
|
2864
|
+
"multiple": false,
|
|
2865
|
+
"type": "option"
|
|
2866
|
+
},
|
|
2867
|
+
"country": {
|
|
2868
|
+
"description": "country of owner, as a two-letter ISO country code",
|
|
2869
|
+
"name": "country",
|
|
2870
|
+
"hasDynamicHelp": false,
|
|
2871
|
+
"multiple": false,
|
|
2872
|
+
"type": "option"
|
|
2873
|
+
},
|
|
2874
|
+
"area": {
|
|
2875
|
+
"description": "sub-country area (state, province, etc.) of owner",
|
|
2876
|
+
"name": "area",
|
|
2877
|
+
"hasDynamicHelp": false,
|
|
2878
|
+
"multiple": false,
|
|
2879
|
+
"type": "option"
|
|
2880
|
+
},
|
|
2881
|
+
"city": {
|
|
2882
|
+
"description": "city of owner",
|
|
2883
|
+
"name": "city",
|
|
2884
|
+
"hasDynamicHelp": false,
|
|
2885
|
+
"multiple": false,
|
|
2886
|
+
"type": "option"
|
|
2887
|
+
},
|
|
2888
|
+
"subject": {
|
|
2889
|
+
"description": "specify entire certificate subject",
|
|
2890
|
+
"name": "subject",
|
|
2891
|
+
"hasDynamicHelp": false,
|
|
2892
|
+
"multiple": false,
|
|
2893
|
+
"type": "option"
|
|
2894
|
+
},
|
|
2895
|
+
"now": {
|
|
2896
|
+
"description": "do not prompt for any owner information",
|
|
2897
|
+
"name": "now",
|
|
2898
|
+
"required": false,
|
|
2899
|
+
"allowNo": false,
|
|
2900
|
+
"type": "boolean"
|
|
2901
|
+
},
|
|
2851
2902
|
"app": {
|
|
2852
2903
|
"char": "a",
|
|
2853
2904
|
"description": "app to run command against",
|
|
@@ -2864,35 +2915,29 @@
|
|
|
2864
2915
|
"hasDynamicHelp": false,
|
|
2865
2916
|
"multiple": false,
|
|
2866
2917
|
"type": "option"
|
|
2867
|
-
},
|
|
2868
|
-
"index": {
|
|
2869
|
-
"char": "i",
|
|
2870
|
-
"description": "the 1-based index of the URL in the list of URLs",
|
|
2871
|
-
"name": "index",
|
|
2872
|
-
"hasDynamicHelp": false,
|
|
2873
|
-
"multiple": false,
|
|
2874
|
-
"type": "option"
|
|
2875
2918
|
}
|
|
2876
2919
|
},
|
|
2877
2920
|
"hasDynamicHelp": false,
|
|
2878
2921
|
"hiddenAliases": [],
|
|
2879
|
-
"id": "
|
|
2922
|
+
"id": "certs:generate",
|
|
2880
2923
|
"pluginAlias": "heroku",
|
|
2881
2924
|
"pluginName": "heroku",
|
|
2882
2925
|
"pluginType": "core",
|
|
2883
2926
|
"strict": true,
|
|
2927
|
+
"topic": "certs",
|
|
2928
|
+
"help": "Generate a key and certificate signing request (or self-signed certificate)\nfor an app. Prompts for information to put in the certificate unless --now\nis used, or at least one of the --subject, --owner, --country, --area, or\n--city options is specified.",
|
|
2884
2929
|
"isESM": false,
|
|
2885
2930
|
"relativePath": [
|
|
2886
2931
|
"lib",
|
|
2887
2932
|
"commands",
|
|
2888
|
-
"
|
|
2889
|
-
"
|
|
2933
|
+
"certs",
|
|
2934
|
+
"generate.js"
|
|
2890
2935
|
]
|
|
2891
2936
|
},
|
|
2892
|
-
"
|
|
2937
|
+
"certs": {
|
|
2893
2938
|
"aliases": [],
|
|
2894
2939
|
"args": {},
|
|
2895
|
-
"description": "
|
|
2940
|
+
"description": "list SSL certificates for an app",
|
|
2896
2941
|
"flags": {
|
|
2897
2942
|
"app": {
|
|
2898
2943
|
"char": "a",
|
|
@@ -2914,24 +2959,45 @@
|
|
|
2914
2959
|
},
|
|
2915
2960
|
"hasDynamicHelp": false,
|
|
2916
2961
|
"hiddenAliases": [],
|
|
2917
|
-
"id": "
|
|
2962
|
+
"id": "certs",
|
|
2918
2963
|
"pluginAlias": "heroku",
|
|
2919
2964
|
"pluginName": "heroku",
|
|
2920
2965
|
"pluginType": "core",
|
|
2921
2966
|
"strict": true,
|
|
2967
|
+
"topic": "certs",
|
|
2922
2968
|
"isESM": false,
|
|
2923
2969
|
"relativePath": [
|
|
2924
2970
|
"lib",
|
|
2925
2971
|
"commands",
|
|
2926
|
-
"
|
|
2927
|
-
"
|
|
2972
|
+
"certs",
|
|
2973
|
+
"index.js"
|
|
2928
2974
|
]
|
|
2929
2975
|
},
|
|
2930
|
-
"
|
|
2976
|
+
"certs:info": {
|
|
2931
2977
|
"aliases": [],
|
|
2932
2978
|
"args": {},
|
|
2933
|
-
"description": "
|
|
2979
|
+
"description": "show certificate information for an SSL certificate",
|
|
2934
2980
|
"flags": {
|
|
2981
|
+
"name": {
|
|
2982
|
+
"description": "name to check info on",
|
|
2983
|
+
"name": "name",
|
|
2984
|
+
"hasDynamicHelp": false,
|
|
2985
|
+
"multiple": false,
|
|
2986
|
+
"type": "option"
|
|
2987
|
+
},
|
|
2988
|
+
"endpoint": {
|
|
2989
|
+
"description": "endpoint to check info on",
|
|
2990
|
+
"name": "endpoint",
|
|
2991
|
+
"hasDynamicHelp": false,
|
|
2992
|
+
"multiple": false,
|
|
2993
|
+
"type": "option"
|
|
2994
|
+
},
|
|
2995
|
+
"show-domains": {
|
|
2996
|
+
"description": "show associated domains",
|
|
2997
|
+
"name": "show-domains",
|
|
2998
|
+
"allowNo": false,
|
|
2999
|
+
"type": "boolean"
|
|
3000
|
+
},
|
|
2935
3001
|
"app": {
|
|
2936
3002
|
"char": "a",
|
|
2937
3003
|
"description": "app to run command against",
|
|
@@ -2952,55 +3018,46 @@
|
|
|
2952
3018
|
},
|
|
2953
3019
|
"hasDynamicHelp": false,
|
|
2954
3020
|
"hiddenAliases": [],
|
|
2955
|
-
"id": "
|
|
2956
|
-
"pluginAlias": "heroku",
|
|
2957
|
-
"pluginName": "heroku",
|
|
2958
|
-
"pluginType": "core",
|
|
2959
|
-
"strict": true,
|
|
2960
|
-
"isESM": false,
|
|
2961
|
-
"relativePath": [
|
|
2962
|
-
"lib",
|
|
2963
|
-
"commands",
|
|
2964
|
-
"buildpacks",
|
|
2965
|
-
"index.js"
|
|
2966
|
-
]
|
|
2967
|
-
},
|
|
2968
|
-
"buildpacks:info": {
|
|
2969
|
-
"aliases": [],
|
|
2970
|
-
"args": {
|
|
2971
|
-
"buildpack": {
|
|
2972
|
-
"description": "namespace/name of the buildpack",
|
|
2973
|
-
"name": "buildpack",
|
|
2974
|
-
"required": true
|
|
2975
|
-
}
|
|
2976
|
-
},
|
|
2977
|
-
"description": "fetch info about a buildpack",
|
|
2978
|
-
"flags": {},
|
|
2979
|
-
"hasDynamicHelp": false,
|
|
2980
|
-
"hiddenAliases": [],
|
|
2981
|
-
"id": "buildpacks:info",
|
|
3021
|
+
"id": "certs:info",
|
|
2982
3022
|
"pluginAlias": "heroku",
|
|
2983
3023
|
"pluginName": "heroku",
|
|
2984
3024
|
"pluginType": "core",
|
|
2985
3025
|
"strict": true,
|
|
3026
|
+
"topic": "certs",
|
|
2986
3027
|
"isESM": false,
|
|
2987
3028
|
"relativePath": [
|
|
2988
3029
|
"lib",
|
|
2989
3030
|
"commands",
|
|
2990
|
-
"
|
|
3031
|
+
"certs",
|
|
2991
3032
|
"info.js"
|
|
2992
3033
|
]
|
|
2993
3034
|
},
|
|
2994
|
-
"
|
|
3035
|
+
"certs:remove": {
|
|
2995
3036
|
"aliases": [],
|
|
2996
|
-
"args": {
|
|
2997
|
-
|
|
2998
|
-
"description": "namespace/name of the buildpack",
|
|
2999
|
-
"name": "buildpack"
|
|
3000
|
-
}
|
|
3001
|
-
},
|
|
3002
|
-
"description": "remove a buildpack set on the app",
|
|
3037
|
+
"args": {},
|
|
3038
|
+
"description": "remove an SSL certificate from an app",
|
|
3003
3039
|
"flags": {
|
|
3040
|
+
"confirm": {
|
|
3041
|
+
"hidden": true,
|
|
3042
|
+
"name": "confirm",
|
|
3043
|
+
"hasDynamicHelp": false,
|
|
3044
|
+
"multiple": false,
|
|
3045
|
+
"type": "option"
|
|
3046
|
+
},
|
|
3047
|
+
"name": {
|
|
3048
|
+
"description": "name to remove",
|
|
3049
|
+
"name": "name",
|
|
3050
|
+
"hasDynamicHelp": false,
|
|
3051
|
+
"multiple": false,
|
|
3052
|
+
"type": "option"
|
|
3053
|
+
},
|
|
3054
|
+
"endpoint": {
|
|
3055
|
+
"description": "endpoint to remove",
|
|
3056
|
+
"name": "endpoint",
|
|
3057
|
+
"hasDynamicHelp": false,
|
|
3058
|
+
"multiple": false,
|
|
3059
|
+
"type": "option"
|
|
3060
|
+
},
|
|
3004
3061
|
"app": {
|
|
3005
3062
|
"char": "a",
|
|
3006
3063
|
"description": "app to run command against",
|
|
@@ -3017,88 +3074,64 @@
|
|
|
3017
3074
|
"hasDynamicHelp": false,
|
|
3018
3075
|
"multiple": false,
|
|
3019
3076
|
"type": "option"
|
|
3020
|
-
},
|
|
3021
|
-
"index": {
|
|
3022
|
-
"char": "i",
|
|
3023
|
-
"description": "the 1-based index of the URL to remove from the list of URLs",
|
|
3024
|
-
"name": "index",
|
|
3025
|
-
"hasDynamicHelp": false,
|
|
3026
|
-
"multiple": false,
|
|
3027
|
-
"type": "option"
|
|
3028
3077
|
}
|
|
3029
3078
|
},
|
|
3030
3079
|
"hasDynamicHelp": false,
|
|
3031
3080
|
"hiddenAliases": [],
|
|
3032
|
-
"id": "
|
|
3081
|
+
"id": "certs:remove",
|
|
3033
3082
|
"pluginAlias": "heroku",
|
|
3034
3083
|
"pluginName": "heroku",
|
|
3035
3084
|
"pluginType": "core",
|
|
3036
3085
|
"strict": true,
|
|
3086
|
+
"topic": "certs",
|
|
3037
3087
|
"isESM": false,
|
|
3038
3088
|
"relativePath": [
|
|
3039
3089
|
"lib",
|
|
3040
3090
|
"commands",
|
|
3041
|
-
"
|
|
3091
|
+
"certs",
|
|
3042
3092
|
"remove.js"
|
|
3043
3093
|
]
|
|
3044
3094
|
},
|
|
3045
|
-
"
|
|
3095
|
+
"certs:update": {
|
|
3046
3096
|
"aliases": [],
|
|
3047
3097
|
"args": {
|
|
3048
|
-
"
|
|
3049
|
-
"description": "
|
|
3050
|
-
"name": "
|
|
3098
|
+
"CRT": {
|
|
3099
|
+
"description": "absolute path of the certificate file on disk",
|
|
3100
|
+
"name": "CRT",
|
|
3101
|
+
"required": true
|
|
3102
|
+
},
|
|
3103
|
+
"KEY": {
|
|
3104
|
+
"description": "absolute path of the key file on disk",
|
|
3105
|
+
"name": "KEY",
|
|
3106
|
+
"required": true
|
|
3051
3107
|
}
|
|
3052
3108
|
},
|
|
3053
|
-
"description": "
|
|
3109
|
+
"description": "update an SSL certificate on an app\nNote: certificates with PEM encoding are also valid\n",
|
|
3110
|
+
"examples": [
|
|
3111
|
+
"$ heroku certs:update example.com.crt example.com.key\n\n If you require intermediate certificates, refer to this article on merging certificates to get a complete chain:\n https://help.salesforce.com/s/articleView?id=000333504&type=1\n"
|
|
3112
|
+
],
|
|
3054
3113
|
"flags": {
|
|
3055
|
-
"
|
|
3056
|
-
"
|
|
3057
|
-
"name": "
|
|
3114
|
+
"confirm": {
|
|
3115
|
+
"hidden": true,
|
|
3116
|
+
"name": "confirm",
|
|
3058
3117
|
"hasDynamicHelp": false,
|
|
3059
3118
|
"multiple": false,
|
|
3060
3119
|
"type": "option"
|
|
3061
3120
|
},
|
|
3062
3121
|
"name": {
|
|
3063
|
-
"description": "
|
|
3122
|
+
"description": "name to update",
|
|
3064
3123
|
"name": "name",
|
|
3065
3124
|
"hasDynamicHelp": false,
|
|
3066
3125
|
"multiple": false,
|
|
3067
3126
|
"type": "option"
|
|
3068
3127
|
},
|
|
3069
|
-
"
|
|
3070
|
-
"description": "
|
|
3071
|
-
"name": "
|
|
3128
|
+
"endpoint": {
|
|
3129
|
+
"description": "endpoint to update",
|
|
3130
|
+
"name": "endpoint",
|
|
3072
3131
|
"hasDynamicHelp": false,
|
|
3073
3132
|
"multiple": false,
|
|
3074
3133
|
"type": "option"
|
|
3075
|
-
}
|
|
3076
|
-
},
|
|
3077
|
-
"hasDynamicHelp": false,
|
|
3078
|
-
"hiddenAliases": [],
|
|
3079
|
-
"id": "buildpacks:search",
|
|
3080
|
-
"pluginAlias": "heroku",
|
|
3081
|
-
"pluginName": "heroku",
|
|
3082
|
-
"pluginType": "core",
|
|
3083
|
-
"strict": true,
|
|
3084
|
-
"isESM": false,
|
|
3085
|
-
"relativePath": [
|
|
3086
|
-
"lib",
|
|
3087
|
-
"commands",
|
|
3088
|
-
"buildpacks",
|
|
3089
|
-
"search.js"
|
|
3090
|
-
]
|
|
3091
|
-
},
|
|
3092
|
-
"buildpacks:set": {
|
|
3093
|
-
"aliases": [],
|
|
3094
|
-
"args": {
|
|
3095
|
-
"buildpack": {
|
|
3096
|
-
"description": "namespace/name of the buildpack",
|
|
3097
|
-
"name": "buildpack",
|
|
3098
|
-
"required": true
|
|
3099
|
-
}
|
|
3100
|
-
},
|
|
3101
|
-
"flags": {
|
|
3134
|
+
},
|
|
3102
3135
|
"app": {
|
|
3103
3136
|
"char": "a",
|
|
3104
3137
|
"description": "app to run command against",
|
|
@@ -3115,55 +3148,22 @@
|
|
|
3115
3148
|
"hasDynamicHelp": false,
|
|
3116
3149
|
"multiple": false,
|
|
3117
3150
|
"type": "option"
|
|
3118
|
-
},
|
|
3119
|
-
"index": {
|
|
3120
|
-
"char": "i",
|
|
3121
|
-
"description": "the 1-based index of the URL in the list of URLs",
|
|
3122
|
-
"name": "index",
|
|
3123
|
-
"hasDynamicHelp": false,
|
|
3124
|
-
"multiple": false,
|
|
3125
|
-
"type": "option"
|
|
3126
|
-
}
|
|
3127
|
-
},
|
|
3128
|
-
"hasDynamicHelp": false,
|
|
3129
|
-
"hiddenAliases": [],
|
|
3130
|
-
"id": "buildpacks:set",
|
|
3131
|
-
"pluginAlias": "heroku",
|
|
3132
|
-
"pluginName": "heroku",
|
|
3133
|
-
"pluginType": "core",
|
|
3134
|
-
"strict": true,
|
|
3135
|
-
"isESM": false,
|
|
3136
|
-
"relativePath": [
|
|
3137
|
-
"lib",
|
|
3138
|
-
"commands",
|
|
3139
|
-
"buildpacks",
|
|
3140
|
-
"set.js"
|
|
3141
|
-
]
|
|
3142
|
-
},
|
|
3143
|
-
"buildpacks:versions": {
|
|
3144
|
-
"aliases": [],
|
|
3145
|
-
"args": {
|
|
3146
|
-
"buildpack": {
|
|
3147
|
-
"description": "namespace/name of the buildpack",
|
|
3148
|
-
"name": "buildpack",
|
|
3149
|
-
"required": true
|
|
3150
3151
|
}
|
|
3151
3152
|
},
|
|
3152
|
-
"description": "list versions of a buildpack",
|
|
3153
|
-
"flags": {},
|
|
3154
3153
|
"hasDynamicHelp": false,
|
|
3155
3154
|
"hiddenAliases": [],
|
|
3156
|
-
"id": "
|
|
3155
|
+
"id": "certs:update",
|
|
3157
3156
|
"pluginAlias": "heroku",
|
|
3158
3157
|
"pluginName": "heroku",
|
|
3159
3158
|
"pluginType": "core",
|
|
3160
3159
|
"strict": true,
|
|
3160
|
+
"topic": "certs",
|
|
3161
3161
|
"isESM": false,
|
|
3162
3162
|
"relativePath": [
|
|
3163
3163
|
"lib",
|
|
3164
3164
|
"commands",
|
|
3165
|
-
"
|
|
3166
|
-
"
|
|
3165
|
+
"certs",
|
|
3166
|
+
"update.js"
|
|
3167
3167
|
]
|
|
3168
3168
|
},
|
|
3169
3169
|
"ci:debug": {
|
|
@@ -14450,5 +14450,5 @@
|
|
|
14450
14450
|
]
|
|
14451
14451
|
}
|
|
14452
14452
|
},
|
|
14453
|
-
"version": "10.0.3-
|
|
14453
|
+
"version": "10.0.3-beta.0"
|
|
14454
14454
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "heroku",
|
|
3
3
|
"description": "CLI to interact with Heroku",
|
|
4
|
-
"version": "10.0.3-
|
|
4
|
+
"version": "10.0.3-beta.0",
|
|
5
5
|
"author": "Heroku",
|
|
6
6
|
"bin": "./bin/run",
|
|
7
7
|
"bugs": "https://github.com/heroku/cli/issues",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"execa": "5.1.1",
|
|
47
47
|
"filesize": "^10.1.2",
|
|
48
48
|
"foreman": "^3.0.1",
|
|
49
|
-
"fs-extra": "^
|
|
49
|
+
"fs-extra": "^11.3.0",
|
|
50
50
|
"github-url-to-object": "^4.0.4",
|
|
51
51
|
"glob": "^10.3.10",
|
|
52
52
|
"got": "^11.8.6",
|
|
@@ -78,8 +78,7 @@
|
|
|
78
78
|
"urijs": "^1.19.11",
|
|
79
79
|
"validator": "^13.7.0",
|
|
80
80
|
"word-wrap": "^1.2.5",
|
|
81
|
-
"ws": "^6.2.2"
|
|
82
|
-
"yargs-parser": "18.1.3"
|
|
81
|
+
"ws": "^6.2.2"
|
|
83
82
|
},
|
|
84
83
|
"devDependencies": {
|
|
85
84
|
"@heroku-cli/schema": "^1.0.25",
|
|
@@ -89,7 +88,7 @@
|
|
|
89
88
|
"@types/chai": "^4.3.14",
|
|
90
89
|
"@types/chai-as-promised": "^7.1.8",
|
|
91
90
|
"@types/debug": "^4.1.2",
|
|
92
|
-
"@types/fs-extra": "^
|
|
91
|
+
"@types/fs-extra": "^11.0.4",
|
|
93
92
|
"@types/glob": "^7.1.1",
|
|
94
93
|
"@types/inquirer": "^8.2.10",
|
|
95
94
|
"@types/lodash": "^4.14.123",
|
|
@@ -102,6 +101,7 @@
|
|
|
102
101
|
"@types/redis-parser": "^3.0.3",
|
|
103
102
|
"@types/shell-escape": "^0.2.0",
|
|
104
103
|
"@types/shell-quote": "^1.7.5",
|
|
104
|
+
"@types/sinon": "^17.0.3",
|
|
105
105
|
"@types/ssh2": "^1.15.0",
|
|
106
106
|
"@types/std-mocks": "^1.0.4",
|
|
107
107
|
"@types/strftime": "^0.9.8",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"qqjs": "0.3.11",
|
|
127
127
|
"read-pkg": "^4.0.1",
|
|
128
128
|
"rimraf": "5.0.5",
|
|
129
|
-
"sinon": "^
|
|
129
|
+
"sinon": "^19.0.2",
|
|
130
130
|
"std-mocks": "^2.0.0",
|
|
131
131
|
"strip-ansi": "6.0.1",
|
|
132
132
|
"tmp": "^0.2.3",
|
|
@@ -391,5 +391,5 @@
|
|
|
391
391
|
"version": "oclif readme --multi && git add README.md ../../docs"
|
|
392
392
|
},
|
|
393
393
|
"types": "lib/index.d.ts",
|
|
394
|
-
"gitHead": "
|
|
394
|
+
"gitHead": "a9b1f3fa165a6a37e0681031eabfb1589dbf4e2e"
|
|
395
395
|
}
|
package/bin/heroku-prompts.js
DELETED
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
const fs = require('node:fs')
|
|
2
|
-
const inquirer = require('inquirer')
|
|
3
|
-
|
|
4
|
-
function choicesPrompt(description, choices, required, defaultValue) {
|
|
5
|
-
return inquirer.prompt([{
|
|
6
|
-
type: 'list',
|
|
7
|
-
name: 'choices',
|
|
8
|
-
message: description,
|
|
9
|
-
choices,
|
|
10
|
-
default: defaultValue,
|
|
11
|
-
validate(input) {
|
|
12
|
-
if (!required || input) {
|
|
13
|
-
return true
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return `${description} is required`
|
|
17
|
-
},
|
|
18
|
-
}])
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function prompt(description, required) {
|
|
22
|
-
return inquirer.prompt([{
|
|
23
|
-
type: 'input',
|
|
24
|
-
name: 'input',
|
|
25
|
-
message: description,
|
|
26
|
-
validate(input) {
|
|
27
|
-
if (!required || input.trim()) {
|
|
28
|
-
return true
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return `${description} is required`
|
|
32
|
-
},
|
|
33
|
-
}])
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function filePrompt(description, defaultPath) {
|
|
37
|
-
return inquirer.prompt([{
|
|
38
|
-
type: 'input',
|
|
39
|
-
name: 'path',
|
|
40
|
-
message: description,
|
|
41
|
-
default: defaultPath,
|
|
42
|
-
validate(input) {
|
|
43
|
-
if (fs.existsSync(input)) {
|
|
44
|
-
return true
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return 'File does not exist. Please enter a valid file path.'
|
|
48
|
-
},
|
|
49
|
-
}])
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const showBooleanPrompt = async (commandFlag, userInputMap, defaultOption) => {
|
|
53
|
-
const {description, default: defaultValue, name: flagOrArgName} = commandFlag
|
|
54
|
-
const choice = await choicesPrompt(description, [
|
|
55
|
-
{name: 'yes', value: true},
|
|
56
|
-
{name: 'no', value: false},
|
|
57
|
-
], defaultOption)
|
|
58
|
-
|
|
59
|
-
// user cancelled
|
|
60
|
-
if (choice === undefined || choice === 'Cancel') {
|
|
61
|
-
return true
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if (choice === 'Yes') {
|
|
65
|
-
userInputMap.set(flagOrArgName, defaultValue)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return false
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const showOtherDialog = async (commandFlagOrArg, userInputMap) => {
|
|
72
|
-
const {description, default: defaultValue, options, required, name: flagOrArgName} = commandFlagOrArg
|
|
73
|
-
|
|
74
|
-
let input
|
|
75
|
-
const isFileInput = description?.includes('absolute path')
|
|
76
|
-
if (isFileInput) {
|
|
77
|
-
input = await filePrompt(description, '')
|
|
78
|
-
} else if (options) {
|
|
79
|
-
const choices = options.map(option => ({name: option, value: option}))
|
|
80
|
-
input = await choicesPrompt(`Select the ${description}`, choices, required, defaultValue)
|
|
81
|
-
} else {
|
|
82
|
-
input = await prompt(`${description.slice(0, 1).toUpperCase()}${description.slice(1)} (${required ? 'required' : 'optional - press "Enter" to bypass'})`, required)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (input === undefined) {
|
|
86
|
-
return true
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (input !== '') {
|
|
90
|
-
userInputMap.set(flagOrArgName, input)
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
return false
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function collectInputsFromManifest(flagsOrArgsManifest, omitOptional) {
|
|
97
|
-
const requiredInputs = []
|
|
98
|
-
const optionalInputs = []
|
|
99
|
-
|
|
100
|
-
// Prioritize options over booleans to
|
|
101
|
-
// prevent the user from yo-yo back and
|
|
102
|
-
// forth between the different input dialogs
|
|
103
|
-
const keysByType = Object.keys(flagsOrArgsManifest).sort((a, b) => {
|
|
104
|
-
const {type: aType} = flagsOrArgsManifest[a]
|
|
105
|
-
const {type: bType} = flagsOrArgsManifest[b]
|
|
106
|
-
if (aType === bType) {
|
|
107
|
-
return 0
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
if (aType === 'option') {
|
|
111
|
-
return -1
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
if (bType === 'option') {
|
|
115
|
-
return 1
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
return 0
|
|
119
|
-
})
|
|
120
|
-
|
|
121
|
-
keysByType.forEach(key => {
|
|
122
|
-
const isRequired = Reflect.get(flagsOrArgsManifest[key], 'required');
|
|
123
|
-
(isRequired ? requiredInputs : optionalInputs).push(key)
|
|
124
|
-
})
|
|
125
|
-
// Prioritize required inputs
|
|
126
|
-
// over optional inputs when
|
|
127
|
-
// prompting the user.
|
|
128
|
-
// required inputs are sorted
|
|
129
|
-
// alphabetically. optional
|
|
130
|
-
// inputs are sorted alphabetically
|
|
131
|
-
// and then pushed to the end of
|
|
132
|
-
// the list.
|
|
133
|
-
requiredInputs.sort((a, b) => {
|
|
134
|
-
if (a < b) {
|
|
135
|
-
return -1
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
if (a > b) {
|
|
139
|
-
return 1
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return 0
|
|
143
|
-
})
|
|
144
|
-
// Include optional only when not explicitly omitted
|
|
145
|
-
return omitOptional ? requiredInputs : [...requiredInputs, ...optionalInputs]
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
async function getInput(flagsOrArgsManifest, userInputMap, omitOptional) {
|
|
149
|
-
const flagsOrArgs = collectInputsFromManifest(flagsOrArgsManifest, omitOptional)
|
|
150
|
-
|
|
151
|
-
for (const flagOrArg of flagsOrArgs) {
|
|
152
|
-
const {name, description, type, hidden} = flagsOrArgsManifest[flagOrArg]
|
|
153
|
-
if (userInputMap.has(name)) {
|
|
154
|
-
continue
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
// hidden args and flags may be exposed later
|
|
158
|
-
// based on the user type. For now, skip them.
|
|
159
|
-
if (!description || hidden) {
|
|
160
|
-
continue
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
const cancelled = await (type === 'boolean' ? showBooleanPrompt : showOtherDialog)(flagsOrArgsManifest[flagOrArg], userInputMap)
|
|
164
|
-
if (cancelled) {
|
|
165
|
-
return true
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return false
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
async function promptForInputs(commandName, commandManifest, userArgs, userFlags) {
|
|
173
|
-
const {args, flags} = commandManifest
|
|
174
|
-
|
|
175
|
-
const userInputByArg = new Map()
|
|
176
|
-
Object.keys(args).forEach((argKey, index) => {
|
|
177
|
-
if (userArgs[index]) {
|
|
178
|
-
userInputByArg.set(argKey, userArgs[index])
|
|
179
|
-
}
|
|
180
|
-
})
|
|
181
|
-
|
|
182
|
-
let cancelled = await getInput(args, userInputByArg)
|
|
183
|
-
if (cancelled) {
|
|
184
|
-
return {userInputByArg}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
const userInputByFlag = new Map()
|
|
188
|
-
Object.keys(flags).forEach(flagKey => {
|
|
189
|
-
const {name, char} = flags[flagKey]
|
|
190
|
-
if (userFlags[name] || userFlags[char]) {
|
|
191
|
-
userInputByFlag.set(flagKey, userFlags[flagKey])
|
|
192
|
-
}
|
|
193
|
-
})
|
|
194
|
-
cancelled = await getInput(flags, userInputByFlag)
|
|
195
|
-
if (cancelled) {
|
|
196
|
-
return
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
return {userInputByArg, userInputByFlag}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
module.exports.promptUser = async (config, commandName, args, flags) => {
|
|
203
|
-
const commandMeta = config.findCommand(commandName)
|
|
204
|
-
if (!commandMeta) {
|
|
205
|
-
process.stderr.write(`"${commandName}" not a valid command\n$ `)
|
|
206
|
-
return
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
const {userInputByArg, userInputByFlag} = await promptForInputs(commandName, commandMeta, args, flags)
|
|
210
|
-
|
|
211
|
-
try {
|
|
212
|
-
for (const [, {input: argValue}] of userInputByArg) {
|
|
213
|
-
if (argValue) {
|
|
214
|
-
args.push(argValue)
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
for (const [flagName, {input: flagValue}] of userInputByFlag) {
|
|
219
|
-
if (!flagValue) {
|
|
220
|
-
continue
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
if (flagValue === true) {
|
|
224
|
-
args.push(`--${flagName}`)
|
|
225
|
-
continue
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
args.push(`--${flagName}`, flagValue)
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
return args
|
|
232
|
-
} catch (error) {
|
|
233
|
-
process.stderr.write(error.message)
|
|
234
|
-
}
|
|
235
|
-
}
|
package/bin/heroku-repl.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
const {Config} = require('@oclif/core')
|
|
2
|
-
const root = require.resolve('../package.json')
|
|
3
|
-
const config = new Config({root})
|
|
4
|
-
const flagsByName = new Map()
|
|
5
|
-
async function * commandGenerator() {
|
|
6
|
-
while (true) {
|
|
7
|
-
const argv = await new Promise(resolve => {
|
|
8
|
-
process.stdin.once('data', resolve)
|
|
9
|
-
})
|
|
10
|
-
yield argv.toString().trim().split(' ')
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
module.exports.herokuRepl = async function (config) {
|
|
15
|
-
process.stderr.write('Welcome to the Heroku Terminal!\n$ ')
|
|
16
|
-
|
|
17
|
-
for await (const input of commandGenerator()) {
|
|
18
|
-
const [command, ...argv] = input
|
|
19
|
-
if (command === '.exit') {
|
|
20
|
-
process.exit(0)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (command.startsWith('set')) {
|
|
24
|
-
flagsByName.set(argv[0], argv[1])
|
|
25
|
-
process.stderr.write(`setting --app to "${argv[1]}"\n$ `)
|
|
26
|
-
continue
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const commandMeta = config.findCommand(command)
|
|
30
|
-
if (!commandMeta) {
|
|
31
|
-
process.stderr.write(`"${command}" not a valid command\n$ `)
|
|
32
|
-
continue
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
try {
|
|
36
|
-
const {flags} = commandMeta
|
|
37
|
-
if (flags.app && flagsByName.has('app') && !argv?.includes('--app')) {
|
|
38
|
-
argv.push('--app', flagsByName.get('app'))
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
await config.runCommand(command, argv)
|
|
42
|
-
} catch (error) {
|
|
43
|
-
process.stderr.write(error.message)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
process.stderr.write('\n$ ')
|
|
47
|
-
}
|
|
48
|
-
}
|