oclif 2.0.0-main.6 → 2.0.0-master.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.
Files changed (105) hide show
  1. package/.oclif.manifest.json +1 -1
  2. package/CHANGELOG.md +5 -52
  3. package/README.md +57 -217
  4. package/bin/run +2 -5
  5. package/lib/app-command.d.ts +12 -0
  6. package/lib/app-command.js +26 -0
  7. package/lib/aws.d.ts +5 -5
  8. package/lib/aws.js +5 -5
  9. package/lib/command-base.d.ts +2 -2
  10. package/lib/command-base.js +3 -3
  11. package/lib/commands/base.d.ts +5 -0
  12. package/lib/commands/base.js +11 -0
  13. package/lib/commands/command.d.ts +17 -0
  14. package/lib/commands/command.js +23 -0
  15. package/lib/commands/hook.d.ts +18 -0
  16. package/lib/commands/hook.js +25 -0
  17. package/lib/commands/manifest.d.ts +2 -1
  18. package/lib/commands/manifest.js +7 -4
  19. package/lib/commands/multi.d.ts +5 -0
  20. package/lib/commands/multi.js +11 -0
  21. package/lib/commands/pack/deb.d.ts +3 -3
  22. package/lib/commands/pack/deb.js +12 -11
  23. package/lib/commands/pack/macos.d.ts +3 -3
  24. package/lib/commands/pack/macos.js +9 -8
  25. package/lib/commands/pack/tarballs.d.ts +3 -6
  26. package/lib/commands/pack/tarballs.js +7 -6
  27. package/lib/commands/pack/win.d.ts +3 -3
  28. package/lib/commands/pack/win.js +11 -17
  29. package/lib/commands/plugin.d.ts +5 -0
  30. package/lib/commands/plugin.js +11 -0
  31. package/lib/commands/promote.d.ts +3 -14
  32. package/lib/commands/promote.js +28 -27
  33. package/lib/commands/readme.d.ts +11 -13
  34. package/lib/commands/readme.js +36 -35
  35. package/lib/commands/single.d.ts +5 -0
  36. package/lib/commands/single.js +11 -0
  37. package/lib/commands/upload/deb.d.ts +3 -2
  38. package/lib/commands/upload/deb.js +9 -8
  39. package/lib/commands/upload/macos.d.ts +3 -2
  40. package/lib/commands/upload/macos.js +9 -8
  41. package/lib/commands/upload/tarballs.d.ts +3 -7
  42. package/lib/commands/upload/tarballs.js +17 -16
  43. package/lib/commands/upload/win.d.ts +3 -2
  44. package/lib/commands/upload/win.js +11 -10
  45. package/lib/generators/{cli.d.ts → app.d.ts} +21 -1
  46. package/lib/generators/app.js +459 -0
  47. package/lib/generators/command.d.ts +15 -0
  48. package/lib/generators/command.js +51 -0
  49. package/lib/generators/hook.d.ts +14 -0
  50. package/lib/generators/hook.js +51 -0
  51. package/lib/help-compatibility.d.ts +5 -4
  52. package/lib/help-compatibility.js +0 -1
  53. package/lib/index.d.ts +1 -1
  54. package/lib/index.js +2 -3
  55. package/lib/log.js +2 -3
  56. package/lib/tarballs/bin.d.ts +2 -2
  57. package/lib/tarballs/bin.js +1 -2
  58. package/lib/tarballs/build.js +28 -29
  59. package/lib/tarballs/config.d.ts +6 -6
  60. package/lib/tarballs/config.js +5 -6
  61. package/lib/tarballs/index.js +4 -4
  62. package/lib/tarballs/node.js +4 -5
  63. package/lib/upload-util.d.ts +3 -3
  64. package/lib/upload-util.js +0 -1
  65. package/lib/util.js +24 -27
  66. package/lib/version-indexes.d.ts +4 -2
  67. package/lib/version-indexes.js +5 -7
  68. package/package.json +22 -20
  69. package/templates/LICENSE.mit +21 -0
  70. package/templates/README.md.ejs +21 -0
  71. package/templates/appveyor.yml.ejs +33 -0
  72. package/templates/base/src/index.js +1 -0
  73. package/templates/base/src/index.ts +1 -0
  74. package/templates/base/test/index.test.js +8 -0
  75. package/templates/base/test/index.test.ts +9 -0
  76. package/templates/bin/run +5 -0
  77. package/templates/bin/run.cmd +3 -0
  78. package/templates/circle.yml.ejs +65 -0
  79. package/templates/editorconfig +11 -0
  80. package/templates/eslintrc +7 -0
  81. package/templates/eslintrc.typescript +10 -0
  82. package/templates/multi/src/index.js +1 -0
  83. package/templates/multi/src/index.ts +1 -0
  84. package/templates/plugin/bin/run +4 -0
  85. package/templates/plugin/src/index.ts +1 -0
  86. package/templates/scripts/setup_git +12 -0
  87. package/templates/single/bin/run.js +4 -0
  88. package/templates/single/bin/run.ts +13 -0
  89. package/templates/src/command.js.ejs +27 -0
  90. package/templates/src/command.ts.ejs +46 -0
  91. package/templates/src/hook.js.ejs +3 -0
  92. package/templates/src/hook.ts.ejs +7 -0
  93. package/templates/test/command.test.js.ejs +28 -0
  94. package/templates/test/command.test.ts.ejs +29 -0
  95. package/templates/test/hook.test.js.ejs +9 -0
  96. package/templates/test/hook.test.ts.ejs +9 -0
  97. package/templates/test/mocha.opts +4 -0
  98. package/templates/test/tsconfig.json +9 -0
  99. package/templates/travis.yml.ejs +14 -0
  100. package/templates/tsconfig.json +15 -0
  101. package/bin/dev +0 -19
  102. package/bin/dev.cmd +0 -3
  103. package/lib/commands/generate.d.ts +0 -11
  104. package/lib/commands/generate.js +0 -19
  105. package/lib/generators/cli.js +0 -183
@@ -1 +1 @@
1
- {"version":"2.0.0-main.6","commands":{"generate":{"id":"generate","description":"generate a new CLI\nThis will clone the template repo 'oclif/hello-world' and update package properties","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"name","description":"directory name of new project","required":true}]},"manifest":{"id":"manifest","description":"generates plugin manifest json","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"path to plugin","default":"."}]},"promote":{"id":"promote","description":"promote CLI builds to a S3 release channel","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to the oclif CLI project root","required":true,"multiple":false,"default":"."},"version":{"name":"version","type":"option","description":"semantic version of the CLI to promote","required":true,"multiple":false},"sha":{"name":"sha","type":"option","description":"7-digit short git commit SHA of the CLI to promote","required":true,"multiple":false},"channel":{"name":"channel","type":"option","description":"which channel to promote to","required":true,"multiple":false,"default":"stable"},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to promote (e.g.: linux-arm,win32-x64)","multiple":false,"default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64"},"deb":{"name":"deb","type":"boolean","char":"d","description":"promote debian artifacts","allowNo":false},"macos":{"name":"macos","type":"boolean","char":"m","description":"promote macOS pkg","allowNo":false},"win":{"name":"win","type":"boolean","char":"w","description":"promote Windows exe","allowNo":false},"max-age":{"name":"max-age","type":"option","char":"a","description":"cache control max-age in seconds","multiple":false,"default":"86400"},"xz":{"name":"xz","type":"boolean","description":"also upload xz","allowNo":true},"indexes":{"name":"indexes","type":"boolean","description":"append the promoted urls into the index files","allowNo":false}},"args":[]},"readme":{"id":"readme","description":"adds commands to README.md in current directory\nThe readme must have any of the following tags inside of it for it to be replaced or else it will do nothing:\n# Usage\n<!-- usage -->\n# Commands\n<!-- commands -->\n\nCustomize the code URL prefix by setting oclif.repositoryPrefix in package.json.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"output directory for multi docs","required":true,"multiple":false,"default":"docs"},"multi":{"name":"multi","type":"boolean","description":"create a different markdown page for each topic","allowNo":false}},"args":[]},"pack:deb":{"id":"pack:deb","description":"pack CLI into debian package","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[]},"pack:macos":{"id":"pack:macos","description":"pack CLI into macOS .pkg","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[]},"pack:tarballs":{"id":"pack:tarballs","description":"packages oclif CLI into tarballs\n\nThis can be used to create oclif CLIs that use the system node or that come preloaded with a node binary.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to pack (e.g.: linux-arm,win32-x64)","multiple":false,"default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64"},"xz":{"name":"xz","type":"boolean","description":"also build xz","allowNo":true}},"args":[]},"pack:win":{"id":"pack:win","description":"create windows installer from oclif CLI\n\n This command requires WINDOWS_SIGNING (prefixed with the name of your executable, e.g. OCLIF_WINDOWS_SIGNING_PASS) to be set in the environment","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[]},"upload:deb":{"id":"upload:deb","description":"upload deb package built with pack:deb","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[]},"upload:macos":{"id":"upload:macos","description":"upload macos installers built with pack:macos","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[]},"upload:tarballs":{"id":"upload:tarballs","description":"upload an oclif CLI to S3\n\n\"aws-sdk\" will need to be installed as a devDependency to upload.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to upload (e.g.: linux-arm,win32-x64)","multiple":false,"default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64"},"xz":{"name":"xz","type":"boolean","description":"also upload xz","allowNo":true}},"args":[]},"upload:win":{"id":"upload:win","description":"upload windows installers built with pack:win","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[]}}}
1
+ {"version":"2.0.0-master.0","commands":{"base":{"id":"base","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"defaults":{"name":"defaults","type":"boolean","description":"use defaults for every setting","allowNo":false},"options":{"name":"options","type":"option","description":"(yarn|typescript|eslint|mocha)"},"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false}},"args":[{"name":"path","description":"path to project, defaults to current directory","required":false}]},"command":{"id":"command","description":"add a command to an existing CLI or plugin","pluginName":"oclif","pluginType":"core","aliases":[],"flags":{"defaults":{"name":"defaults","type":"boolean","description":"use defaults for every setting","allowNo":false},"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false}},"args":[{"name":"name","description":"name of command","required":true}]},"hook":{"id":"hook","description":"add a hook to an existing CLI or plugin","pluginName":"oclif","pluginType":"core","aliases":[],"flags":{"defaults":{"name":"defaults","type":"boolean","description":"use defaults for every setting","allowNo":false},"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false},"event":{"name":"event","type":"option","description":"event to run hook on","default":"init"}},"args":[{"name":"name","description":"name of hook (snake_case)","required":true}]},"manifest":{"id":"manifest","description":"generates plugin manifest json","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{},"args":[{"name":"path","description":"path to plugin","default":"."}]},"multi":{"id":"multi","description":"generate a new multi-command CLI","pluginName":"oclif","pluginType":"core","aliases":[],"flags":{"defaults":{"name":"defaults","type":"boolean","description":"use defaults for every setting","allowNo":false},"options":{"name":"options","type":"option","description":"(yarn|typescript|eslint|mocha)"},"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false}},"args":[{"name":"path","description":"path to project, defaults to current directory","required":false}]},"plugin":{"id":"plugin","description":"create a new CLI plugin","pluginName":"oclif","pluginType":"core","aliases":[],"flags":{"defaults":{"name":"defaults","type":"boolean","description":"use defaults for every setting","allowNo":false},"options":{"name":"options","type":"option","description":"(yarn|typescript|eslint|mocha)"},"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false}},"args":[{"name":"path","description":"path to project, defaults to current directory","required":false}]},"promote":{"id":"promote","description":"promote CLI builds to a S3 release channel","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to the oclif CLI project root","required":true,"default":"."},"version":{"name":"version","type":"option","description":"semantic version of the CLI to promote","required":true},"sha":{"name":"sha","type":"option","description":"7-digit short git commit SHA of the CLI to promote","required":true},"channel":{"name":"channel","type":"option","description":"which channel to promote to","required":true,"default":"stable"},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to promote (e.g.: linux-arm,win32-x64)","default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64"},"deb":{"name":"deb","type":"boolean","char":"d","description":"promote debian artifacts","allowNo":false},"macos":{"name":"macos","type":"boolean","char":"m","description":"promote macOS pkg","allowNo":false},"win":{"name":"win","type":"boolean","char":"w","description":"promote Windows exe","allowNo":false},"max-age":{"name":"max-age","type":"option","char":"a","description":"cache control max-age in seconds","default":"86400"},"xz":{"name":"xz","type":"boolean","description":"also upload xz","allowNo":true},"indexes":{"name":"indexes","type":"boolean","description":"append the promoted urls into the index files","allowNo":false}},"args":[]},"readme":{"id":"readme","description":"adds commands to README.md in current directory\nThe readme must have any of the following tags inside of it for it to be replaced or else it will do nothing:\n# Usage\n<!-- usage -->\n# Commands\n<!-- commands -->\n\nCustomize the code URL prefix by setting oclif.repositoryPrefix in package.json.\n","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"output directory for multi docs","required":true,"default":"docs"},"multi":{"name":"multi","type":"boolean","description":"create a different markdown page for each topic","allowNo":false}},"args":[]},"single":{"id":"single","description":"generate a new single-command CLI","pluginName":"oclif","pluginType":"core","aliases":[],"flags":{"defaults":{"name":"defaults","type":"boolean","description":"use defaults for every setting","allowNo":false},"options":{"name":"options","type":"option","description":"(yarn|typescript|eslint|mocha)"},"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false}},"args":[{"name":"path","description":"path to project, defaults to current directory","required":false}]},"pack:deb":{"id":"pack:deb","description":"pack CLI into debian package","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"default":"."}},"args":[]},"pack:macos":{"id":"pack:macos","description":"pack CLI into macOS .pkg","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"default":"."}},"args":[]},"pack:tarballs":{"id":"pack:tarballs","description":"packages oclif CLI into tarballs\n\nThis can be used to create oclif CLIs that use the system node or that come preloaded with a node binary.\n","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"default":"."},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to pack (e.g.: linux-arm,win32-x64)","default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64"},"xz":{"name":"xz","type":"boolean","description":"also build xz","allowNo":true}},"args":[]},"pack:win":{"id":"pack:win","description":"create windows installer from oclif CLI","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"default":"."}},"args":[]},"upload:deb":{"id":"upload:deb","description":"upload deb package built with pack:deb","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"default":"."}},"args":[]},"upload:macos":{"id":"upload:macos","description":"upload macos installers built with pack:macos","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"default":"."}},"args":[]},"upload:tarballs":{"id":"upload:tarballs","description":"upload an oclif CLI to S3\n\n\"aws-sdk\" will need to be installed as a devDependency to upload.\n","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"default":"."},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to upload (e.g.: linux-arm,win32-x64)","default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64"},"xz":{"name":"xz","type":"boolean","description":"also upload xz","allowNo":true}},"args":[]},"upload:win":{"id":"upload:win","description":"upload windows installers built with pack:win","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"default":"."}},"args":[]}}}
package/CHANGELOG.md CHANGED
@@ -2,68 +2,21 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ## [2.0.0-main.6](https://github.com/oclif/oclif/compare/v2.0.0-main.5...v2.0.0-main.6) (2021-10-05)
6
-
7
-
8
- ### Features
9
-
10
- * add generate cmd ([#665](https://github.com/oclif/oclif/issues/665)) ([731ed49](https://github.com/oclif/oclif/commit/731ed490bc3bc1857d414dfd56d0d8dfd7b6be2b))
11
- * unhide releasing related cmds ([#670](https://github.com/oclif/oclif/issues/670)) ([25ace5f](https://github.com/oclif/oclif/commit/25ace5f0641cbda3bf8ee0c204be8e6a47f187c6))
12
-
13
-
14
- ### Bug Fixes
15
-
16
- * bump oclif/core to 1.0.0 ([#687](https://github.com/oclif/oclif/issues/687)) [skip-validate-pr] ([430bb19](https://github.com/oclif/oclif/commit/430bb19068133f3622f660f614e3fa69009cb73c))
17
-
18
- ## [2.0.0-main.5](https://github.com/oclif/oclif/compare/v2.0.0-main.4...v2.0.0-main.5) (2021-09-20)
5
+ ## [2.0.0-master.0](https://github.com/oclif/oclif/compare/v1.18.1...v2.0.0-master.0) (2021-12-01)
19
6
 
20
7
 
21
8
  ### ⚠ BREAKING CHANGES
22
9
 
23
- * require node 12+ (#668)
24
-
25
- ### build
26
-
27
- * require node 12+ ([#668](https://github.com/oclif/oclif/issues/668)) ([99ceef1](https://github.com/oclif/oclif/commit/99ceef1e761a5f53f25435c8d733cb7a6fb01ba1))
28
-
29
- ## [2.0.0-main.4](https://github.com/oclif/oclif/compare/v2.0.0-main.3...v2.0.0-main.4) (2021-09-20)
30
-
31
- ## [2.0.0-main.3](https://github.com/oclif/oclif/compare/v2.0.0-main.2...v2.0.0-main.3) (2021-09-16)
32
-
10
+ * require node 12+ (#676)
33
11
 
34
12
  ### Bug Fixes
35
13
 
36
- * use summary field if available ([#667](https://github.com/oclif/oclif/issues/667)) ([60db19f](https://github.com/oclif/oclif/commit/60db19f89b44d451cfd6579f982b6545dec49ee6))
14
+ * bump deps ([#723](https://github.com/oclif/oclif/issues/723)) ([78640ad](https://github.com/oclif/oclif/commit/78640adb106350e1abe747559dc0ae65c853d7c8))
37
15
 
38
- ## [2.0.0-main.2](https://github.com/oclif/oclif/compare/v2.0.0-main.1...v2.0.0-main.2) (2021-08-30)
39
16
 
17
+ ### build
40
18
 
41
- ### Bug Fixes
42
-
43
- * force build to pickup latest oclif/core ([#648](https://github.com/oclif/oclif/issues/648)) ([4ed1e9a](https://github.com/oclif/oclif/commit/4ed1e9a568a88ef37b51b95f66419cf52e16a3b7))
44
- * remove context var ([#652](https://github.com/oclif/oclif/issues/652)) ([d8f12fa](https://github.com/oclif/oclif/commit/d8f12faa82566b562cd2c658013a6722e38872fc))
45
-
46
- ## [2.0.0-main.1](https://github.com/oclif/oclif/compare/v2.0.0-main.0...v2.0.0-main.1) (2021-07-08)
47
-
48
-
49
- ### Bug Fixes
50
-
51
- * throw error if WINDOWS_SIGNING_PASS is not set ([0dc68b0](https://github.com/oclif/oclif/commit/0dc68b09fd7f52719d45440e4faf85782ced9680))
52
-
53
- ## [2.0.0-main.0](https://github.com/oclif/oclif/compare/v2.0.0-v2.0...v2.0.0-main.0) (2021-07-08)
54
-
55
-
56
- ### Bug Fixes
57
-
58
- * change npm tag ([9d07724](https://github.com/oclif/oclif/commit/9d07724cd8b4a200bb6212425311cca2029fa752))
59
- * prerelease name ([084e890](https://github.com/oclif/oclif/commit/084e8909ea93300a86bf6ddf6319b87a0d3ee5b1))
60
-
61
- ## [2.0.0-v2.0](https://github.com/oclif/oclif/compare/v1.18.1...v2.0.0-v2.0) (2021-07-08)
62
-
63
-
64
- ### Bug Fixes
65
-
66
- * use @oclif/core for readme/manifest ([#607](https://github.com/oclif/oclif/issues/607)) ([15ade45](https://github.com/oclif/oclif/commit/15ade4596e4888c2e343d81331132e4ded494338))
19
+ * require node 12+ ([#676](https://github.com/oclif/oclif/issues/676)) ([f4b648c](https://github.com/oclif/oclif/commit/f4b648c244c8806c999ad2e636c446414b14c5a5))
67
20
 
68
21
  ### [1.18.1](https://github.com/oclif/oclif/compare/v1.18.0...v1.18.1) (2021-07-01)
69
22
 
package/README.md CHANGED
@@ -123,38 +123,30 @@ hello world from ./src/hello.js!
123
123
  # 🔨 Commands
124
124
 
125
125
  <!-- commands -->
126
- * [`oclif generate NAME`](#oclif-generate-name)
126
+ * [`oclif command NAME`](#oclif-command-name)
127
127
  * [`oclif help [COMMAND]`](#oclif-help-command)
128
- * [`oclif manifest [PATH]`](#oclif-manifest-path)
129
- * [`oclif pack:deb`](#oclif-packdeb)
130
- * [`oclif pack:macos`](#oclif-packmacos)
131
- * [`oclif pack:tarballs`](#oclif-packtarballs)
132
- * [`oclif pack:win`](#oclif-packwin)
133
- * [`oclif promote`](#oclif-promote)
134
- * [`oclif readme`](#oclif-readme)
135
- * [`oclif upload:deb`](#oclif-uploaddeb)
136
- * [`oclif upload:macos`](#oclif-uploadmacos)
137
- * [`oclif upload:tarballs`](#oclif-uploadtarballs)
138
- * [`oclif upload:win`](#oclif-uploadwin)
139
-
140
- ## `oclif generate NAME`
141
-
142
- generate a new CLI
128
+ * [`oclif hook NAME`](#oclif-hook-name)
129
+ * [`oclif multi [PATH]`](#oclif-multi-path)
130
+ * [`oclif plugin [PATH]`](#oclif-plugin-path)
131
+ * [`oclif single [PATH]`](#oclif-single-path)
132
+
133
+ ## `oclif command NAME`
134
+
135
+ add a command to an existing CLI or plugin
143
136
 
144
137
  ```
145
138
  USAGE
146
- $ oclif generate [NAME]
139
+ $ oclif command NAME
147
140
 
148
141
  ARGUMENTS
149
- NAME directory name of new project
150
-
151
- DESCRIPTION
152
- generate a new CLI
142
+ NAME name of command
153
143
 
154
- This will clone the template repo 'oclif/hello-world' and update package properties
144
+ OPTIONS
145
+ --defaults use defaults for every setting
146
+ --force overwrite existing files
155
147
  ```
156
148
 
157
- _See code: [src/commands/generate.ts](https://github.com/oclif/oclif/blob/v2.0.0-main.5/src/commands/generate.ts)_
149
+ _See code: [src/commands/command.ts](https://github.com/oclif/oclif/blob/v1.18.1/src/commands/command.ts)_
158
150
 
159
151
  ## `oclif help [COMMAND]`
160
152
 
@@ -162,244 +154,92 @@ display help for oclif
162
154
 
163
155
  ```
164
156
  USAGE
165
- $ oclif help [COMMAND] [--all]
157
+ $ oclif help [COMMAND]
166
158
 
167
159
  ARGUMENTS
168
160
  COMMAND command to show help for
169
161
 
170
- FLAGS
162
+ OPTIONS
171
163
  --all see all commands in CLI
172
-
173
- DESCRIPTION
174
- display help for oclif
175
164
  ```
176
165
 
177
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.2/src/commands/help.ts)_
166
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.9/src/commands/help.ts)_
178
167
 
179
- ## `oclif manifest [PATH]`
168
+ ## `oclif hook NAME`
180
169
 
181
- generates plugin manifest json
170
+ add a hook to an existing CLI or plugin
182
171
 
183
172
  ```
184
173
  USAGE
185
- $ oclif manifest [PATH]
174
+ $ oclif hook NAME
186
175
 
187
176
  ARGUMENTS
188
- PATH [default: .] path to plugin
189
-
190
- DESCRIPTION
191
- generates plugin manifest json
192
- ```
193
-
194
- _See code: [src/commands/manifest.ts](https://github.com/oclif/oclif/blob/v2.0.0-main.5/src/commands/manifest.ts)_
195
-
196
- ## `oclif pack:deb`
197
-
198
- pack CLI into debian package
199
-
200
- ```
201
- USAGE
202
- $ oclif pack:deb -r <value>
203
-
204
- FLAGS
205
- -r, --root=<value> (required) [default: .] path to oclif CLI root
177
+ NAME name of hook (snake_case)
206
178
 
207
- DESCRIPTION
208
- pack CLI into debian package
179
+ OPTIONS
180
+ --defaults use defaults for every setting
181
+ --event=event [default: init] event to run hook on
182
+ --force overwrite existing files
209
183
  ```
210
184
 
211
- _See code: [src/commands/pack/deb.ts](https://github.com/oclif/oclif/blob/v2.0.0-main.5/src/commands/pack/deb.ts)_
185
+ _See code: [src/commands/hook.ts](https://github.com/oclif/oclif/blob/v1.18.1/src/commands/hook.ts)_
212
186
 
213
- ## `oclif pack:macos`
187
+ ## `oclif multi [PATH]`
214
188
 
215
- pack CLI into macOS .pkg
189
+ generate a new multi-command CLI
216
190
 
217
191
  ```
218
192
  USAGE
219
- $ oclif pack:macos -r <value>
220
-
221
- FLAGS
222
- -r, --root=<value> (required) [default: .] path to oclif CLI root
223
-
224
- DESCRIPTION
225
- pack CLI into macOS .pkg
226
- ```
227
-
228
- _See code: [src/commands/pack/macos.ts](https://github.com/oclif/oclif/blob/v2.0.0-main.5/src/commands/pack/macos.ts)_
229
-
230
- ## `oclif pack:tarballs`
231
-
232
- packages oclif CLI into tarballs
233
-
234
- ```
235
- USAGE
236
- $ oclif pack:tarballs -r <value> [-t <value>] [--xz]
237
-
238
- FLAGS
239
- -r, --root=<value> (required) [default: .] path to oclif CLI root
240
- -t, --targets=<value> [default: linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64] comma-separated targets to pack
241
- (e.g.: linux-arm,win32-x64)
242
- --[no-]xz also build xz
243
-
244
- DESCRIPTION
245
- packages oclif CLI into tarballs
246
-
247
- This can be used to create oclif CLIs that use the system node or that come preloaded with a node binary.
248
- ```
249
-
250
- _See code: [src/commands/pack/tarballs.ts](https://github.com/oclif/oclif/blob/v2.0.0-main.5/src/commands/pack/tarballs.ts)_
251
-
252
- ## `oclif pack:win`
253
-
254
- create windows installer from oclif CLI
255
-
256
- ```
257
- USAGE
258
- $ oclif pack:win -r <value>
259
-
260
- FLAGS
261
- -r, --root=<value> (required) [default: .] path to oclif CLI root
262
-
263
- DESCRIPTION
264
- create windows installer from oclif CLI
265
-
266
- This command requires WINDOWS_SIGNING (prefixed with the name of your executable, e.g. OCLIF_WINDOWS_SIGNING_PASS) to
267
- be set in the environment
268
- ```
269
-
270
- _See code: [src/commands/pack/win.ts](https://github.com/oclif/oclif/blob/v2.0.0-main.5/src/commands/pack/win.ts)_
271
-
272
- ## `oclif promote`
273
-
274
- promote CLI builds to a S3 release channel
193
+ $ oclif multi [PATH]
275
194
 
276
- ```
277
- USAGE
278
- $ oclif promote -r <value> --version <value> --sha <value> --channel <value> [-t <value>] [-d] [-m] [-w]
279
- [-a <value>] [--xz] [--indexes]
280
-
281
- FLAGS
282
- -a, --max-age=<value> [default: 86400] cache control max-age in seconds
283
- -d, --deb promote debian artifacts
284
- -m, --macos promote macOS pkg
285
- -r, --root=<value> (required) [default: .] path to the oclif CLI project root
286
- -t, --targets=<value> [default: linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64] comma-separated targets to
287
- promote (e.g.: linux-arm,win32-x64)
288
- -w, --win promote Windows exe
289
- --channel=<value> (required) [default: stable] which channel to promote to
290
- --indexes append the promoted urls into the index files
291
- --sha=<value> (required) 7-digit short git commit SHA of the CLI to promote
292
- --version=<value> (required) semantic version of the CLI to promote
293
- --[no-]xz also upload xz
294
-
295
- DESCRIPTION
296
- promote CLI builds to a S3 release channel
297
- ```
298
-
299
- _See code: [src/commands/promote.ts](https://github.com/oclif/oclif/blob/v2.0.0-main.5/src/commands/promote.ts)_
300
-
301
- ## `oclif readme`
302
-
303
- adds commands to README.md in current directory
304
-
305
- ```
306
- USAGE
307
- $ oclif readme --dir <value> [--multi]
308
-
309
- FLAGS
310
- --dir=<value> (required) [default: docs] output directory for multi docs
311
- --multi create a different markdown page for each topic
312
-
313
- DESCRIPTION
314
- adds commands to README.md in current directory
315
-
316
- The readme must have any of the following tags inside of it for it to be replaced or else it will do nothing:
317
-
318
- # Usage
319
-
320
- <!-- usage -->
321
-
322
- # Commands
323
-
324
- <!-- commands -->
325
-
326
- Customize the code URL prefix by setting oclif.repositoryPrefix in package.json.
327
- ```
328
-
329
- _See code: [src/commands/readme.ts](https://github.com/oclif/oclif/blob/v2.0.0-main.5/src/commands/readme.ts)_
330
-
331
- ## `oclif upload:deb`
332
-
333
- upload deb package built with pack:deb
334
-
335
- ```
336
- USAGE
337
- $ oclif upload:deb -r <value>
338
-
339
- FLAGS
340
- -r, --root=<value> (required) [default: .] path to oclif CLI root
341
-
342
- DESCRIPTION
343
- upload deb package built with pack:deb
344
- ```
345
-
346
- _See code: [src/commands/upload/deb.ts](https://github.com/oclif/oclif/blob/v2.0.0-main.5/src/commands/upload/deb.ts)_
347
-
348
- ## `oclif upload:macos`
349
-
350
- upload macos installers built with pack:macos
351
-
352
- ```
353
- USAGE
354
- $ oclif upload:macos -r <value>
355
-
356
- FLAGS
357
- -r, --root=<value> (required) [default: .] path to oclif CLI root
195
+ ARGUMENTS
196
+ PATH path to project, defaults to current directory
358
197
 
359
- DESCRIPTION
360
- upload macos installers built with pack:macos
198
+ OPTIONS
199
+ --defaults use defaults for every setting
200
+ --force overwrite existing files
201
+ --options=options (yarn|typescript|eslint|mocha)
361
202
  ```
362
203
 
363
- _See code: [src/commands/upload/macos.ts](https://github.com/oclif/oclif/blob/v2.0.0-main.5/src/commands/upload/macos.ts)_
204
+ _See code: [src/commands/multi.ts](https://github.com/oclif/oclif/blob/v1.18.1/src/commands/multi.ts)_
364
205
 
365
- ## `oclif upload:tarballs`
206
+ ## `oclif plugin [PATH]`
366
207
 
367
- upload an oclif CLI to S3
208
+ create a new CLI plugin
368
209
 
369
210
  ```
370
211
  USAGE
371
- $ oclif upload:tarballs -r <value> [-t <value>] [--xz]
372
-
373
- FLAGS
374
- -r, --root=<value> (required) [default: .] path to oclif CLI root
375
- -t, --targets=<value> [default: linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64] comma-separated targets to upload
376
- (e.g.: linux-arm,win32-x64)
377
- --[no-]xz also upload xz
212
+ $ oclif plugin [PATH]
378
213
 
379
- DESCRIPTION
380
- upload an oclif CLI to S3
214
+ ARGUMENTS
215
+ PATH path to project, defaults to current directory
381
216
 
382
- "aws-sdk" will need to be installed as a devDependency to upload.
217
+ OPTIONS
218
+ --defaults use defaults for every setting
219
+ --force overwrite existing files
220
+ --options=options (yarn|typescript|eslint|mocha)
383
221
  ```
384
222
 
385
- _See code: [src/commands/upload/tarballs.ts](https://github.com/oclif/oclif/blob/v2.0.0-main.5/src/commands/upload/tarballs.ts)_
223
+ _See code: [src/commands/plugin.ts](https://github.com/oclif/oclif/blob/v1.18.1/src/commands/plugin.ts)_
386
224
 
387
- ## `oclif upload:win`
225
+ ## `oclif single [PATH]`
388
226
 
389
- upload windows installers built with pack:win
227
+ generate a new single-command CLI
390
228
 
391
229
  ```
392
230
  USAGE
393
- $ oclif upload:win -r <value>
231
+ $ oclif single [PATH]
394
232
 
395
- FLAGS
396
- -r, --root=<value> (required) [default: .] path to oclif CLI root
233
+ ARGUMENTS
234
+ PATH path to project, defaults to current directory
397
235
 
398
- DESCRIPTION
399
- upload windows installers built with pack:win
236
+ OPTIONS
237
+ --defaults use defaults for every setting
238
+ --force overwrite existing files
239
+ --options=options (yarn|typescript|eslint|mocha)
400
240
  ```
401
241
 
402
- _See code: [src/commands/upload/win.ts](https://github.com/oclif/oclif/blob/v2.0.0-main.5/src/commands/upload/win.ts)_
242
+ _See code: [src/commands/single.ts](https://github.com/oclif/oclif/blob/v1.18.1/src/commands/single.ts)_
403
243
  <!-- commandsstop -->
404
244
 
405
245
  # 🏭 Related Repositories
package/bin/run CHANGED
@@ -1,7 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const oclif = require('@oclif/core')
4
-
5
- oclif.settings.disableJsonFlag = true
6
-
7
- oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'))
3
+ require('..').run()
4
+ .catch(require('@oclif/errors/handle'))
@@ -0,0 +1,12 @@
1
+ import { flags } from '@oclif/command';
2
+ import Base from './command-base';
3
+ export default abstract class AppCommand extends Base {
4
+ static flags: flags.Input<any>;
5
+ static args: {
6
+ name: string;
7
+ required: boolean;
8
+ description: string;
9
+ }[];
10
+ abstract type: string;
11
+ run(): Promise<void>;
12
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const command_1 = require("@oclif/command");
4
+ const command_base_1 = require("./command-base");
5
+ class AppCommand extends command_base_1.default {
6
+ async run() {
7
+ const { flags, args } = this.parse(AppCommand);
8
+ const options = flags.options ? flags.options.split(',') : [];
9
+ await super.generate('app', {
10
+ type: this.type,
11
+ path: args.path,
12
+ options,
13
+ defaults: flags.defaults,
14
+ force: flags.force,
15
+ });
16
+ }
17
+ }
18
+ exports.default = AppCommand;
19
+ AppCommand.flags = {
20
+ defaults: command_1.flags.boolean({ description: 'use defaults for every setting' }),
21
+ options: command_1.flags.string({ description: '(yarn|typescript|eslint|mocha)' }),
22
+ force: command_1.flags.boolean({ description: 'overwrite existing files' }),
23
+ };
24
+ AppCommand.args = [
25
+ { name: 'path', required: false, description: 'path to project, defaults to current directory' },
26
+ ];
package/lib/aws.d.ts CHANGED
@@ -11,13 +11,13 @@ export declare namespace upload {
11
11
  }
12
12
  declare const _default: {
13
13
  readonly cloudfront: {
14
- createCloudfrontInvalidation: (options: CloudFront.Types.CreateInvalidationRequest) => Promise<unknown>;
14
+ createCloudfrontInvalidation: (options: CloudFront.CreateInvalidationRequest) => Promise<unknown>;
15
15
  };
16
16
  readonly s3: {
17
- uploadFile: (local: string, options: S3.Types.PutObjectRequest) => Promise<unknown>;
18
- headObject: (options: S3.Types.HeadObjectRequest) => Promise<S3.HeadObjectOutput>;
19
- copyObject: (options: S3.Types.CopyObjectRequest) => Promise<unknown>;
20
- getObject: (options: S3.Types.GetObjectRequest) => Promise<S3.GetObjectOutput>;
17
+ uploadFile: (local: string, options: S3.PutObjectRequest) => Promise<unknown>;
18
+ headObject: (options: S3.HeadObjectRequest) => Promise<S3.HeadObjectOutput>;
19
+ copyObject: (options: S3.CopyObjectRequest) => Promise<unknown>;
20
+ getObject: (options: S3.GetObjectRequest) => Promise<S3.GetObjectOutput>;
21
21
  };
22
22
  };
23
23
  export default _default;
package/lib/aws.js CHANGED
@@ -38,12 +38,12 @@ exports.default = {
38
38
  get cloudfront() {
39
39
  return {
40
40
  createCloudfrontInvalidation: (options) => new Promise((resolve, reject) => {
41
- (0, log_1.log)('createCloudfrontInvalidation', options.DistributionId, options.InvalidationBatch.Paths.Items);
41
+ log_1.log('createCloudfrontInvalidation', options.DistributionId, options.InvalidationBatch.Paths.Items);
42
42
  aws.cloudfront.createInvalidation(options, err => {
43
43
  if (err)
44
44
  reject(err);
45
45
  else
46
- resolve(null);
46
+ resolve();
47
47
  });
48
48
  }),
49
49
  };
@@ -51,13 +51,13 @@ exports.default = {
51
51
  get s3() {
52
52
  return {
53
53
  uploadFile: (local, options) => new Promise((resolve, reject) => {
54
- (0, log_1.log)('s3:uploadFile', qq.prettifyPaths(local), `s3://${options.Bucket}/${options.Key}`);
54
+ log_1.log('s3:uploadFile', qq.prettifyPaths(local), `s3://${options.Bucket}/${options.Key}`);
55
55
  options.Body = fs.createReadStream(local);
56
56
  aws.s3.upload(options, err => {
57
57
  if (err)
58
58
  reject(err);
59
59
  else
60
- resolve(null);
60
+ resolve();
61
61
  });
62
62
  }),
63
63
  headObject: (options) => new Promise((resolve, reject) => {
@@ -70,7 +70,7 @@ exports.default = {
70
70
  });
71
71
  }),
72
72
  copyObject: (options) => new Promise((resolve, reject) => {
73
- (0, log_1.log)('s3:copyObject', `from s3://${options.CopySource}`, `to s3://${options.Bucket}/${options.Key}`);
73
+ log_1.log('s3:copyObject', `from s3://${options.CopySource}`, `to s3://${options.Bucket}/${options.Key}`);
74
74
  aws.s3.copyObject(options, function (err, data) {
75
75
  if (err)
76
76
  reject(err);
@@ -1,4 +1,4 @@
1
- import { Command } from '@oclif/core';
1
+ import Command from '@oclif/command';
2
2
  export default abstract class CommandBase extends Command {
3
- protected generate(type: string, generatorOptions?: object): Promise<void>;
3
+ protected generate(type: string, generatorOptions?: {}): Promise<void>;
4
4
  }
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const core_1 = require("@oclif/core");
3
+ const command_1 = require("@oclif/command");
4
4
  const yeoman_environment_1 = require("yeoman-environment");
5
- class CommandBase extends core_1.Command {
5
+ class CommandBase extends command_1.default {
6
6
  async generate(type, generatorOptions = {}) {
7
- const env = (0, yeoman_environment_1.createEnv)();
7
+ const env = yeoman_environment_1.createEnv();
8
8
  env.register(require.resolve(`./generators/${type}`), `oclif:${type}`);
9
9
  await new Promise((resolve, reject) => {
10
10
  env.run(`oclif:${type}`, generatorOptions, ((err, results) => {
@@ -0,0 +1,5 @@
1
+ import AppCommand from '../app-command';
2
+ export default class extends AppCommand {
3
+ static hidden: boolean;
4
+ type: string;
5
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const app_command_1 = require("../app-command");
4
+ class default_1 extends app_command_1.default {
5
+ constructor() {
6
+ super(...arguments);
7
+ this.type = 'base';
8
+ }
9
+ }
10
+ exports.default = default_1;
11
+ default_1.hidden = true;
@@ -0,0 +1,17 @@
1
+ import { flags } from '@oclif/command';
2
+ import Base from '../command-base';
3
+ export interface Options {
4
+ name: string;
5
+ defaults?: boolean;
6
+ force?: boolean;
7
+ }
8
+ export default abstract class AppCommand extends Base {
9
+ static description: string;
10
+ static flags: flags.Input<any>;
11
+ static args: {
12
+ name: string;
13
+ description: string;
14
+ required: boolean;
15
+ }[];
16
+ run(): Promise<void>;
17
+ }