@shortcut-cli/shortcut-cli 4.0.0 → 5.0.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 (48) hide show
  1. package/README.md +428 -8
  2. package/build/bin/{short-api.cjs → short-api.js} +13 -16
  3. package/build/bin/short-create.js +76 -0
  4. package/build/bin/short-custom-field.js +50 -0
  5. package/build/bin/short-custom-fields.js +29 -0
  6. package/build/bin/{short-doc.cjs → short-doc.js} +34 -36
  7. package/build/bin/{short-docs.cjs → short-docs.js} +23 -15
  8. package/build/bin/short-epic.js +186 -0
  9. package/build/bin/short-epics.js +36 -0
  10. package/build/bin/short-find.js +6 -0
  11. package/build/bin/short-install.js +87 -0
  12. package/build/bin/{short-iteration.cjs → short-iteration.js} +41 -45
  13. package/build/bin/{short-iterations.cjs → short-iterations.js} +15 -19
  14. package/build/bin/short-label.js +130 -0
  15. package/build/bin/short-labels.js +27 -0
  16. package/build/bin/short-members.js +31 -0
  17. package/build/bin/short-objective.js +151 -0
  18. package/build/bin/short-objectives.js +63 -0
  19. package/build/bin/short-projects.js +31 -0
  20. package/build/bin/short-search.js +45 -0
  21. package/build/bin/short-story.js +458 -0
  22. package/build/bin/short-team.js +78 -0
  23. package/build/bin/short-teams.js +28 -0
  24. package/build/bin/short-workflows.js +29 -0
  25. package/build/bin/short-workspace.js +63 -0
  26. package/build/bin/short.js +8 -0
  27. package/build/lib/client.js +9 -0
  28. package/build/lib/{configure.cjs → configure.js} +18 -27
  29. package/build/lib/spinner.js +12 -0
  30. package/build/lib/{stories.cjs → stories.js} +116 -78
  31. package/build/package.js +5 -0
  32. package/package.json +44 -44
  33. package/build/_virtual/rolldown_runtime.cjs +0 -29
  34. package/build/bin/short-create.cjs +0 -58
  35. package/build/bin/short-epic.cjs +0 -74
  36. package/build/bin/short-epics.cjs +0 -36
  37. package/build/bin/short-find.cjs +0 -7
  38. package/build/bin/short-install.cjs +0 -42
  39. package/build/bin/short-members.cjs +0 -34
  40. package/build/bin/short-projects.cjs +0 -34
  41. package/build/bin/short-search.cjs +0 -49
  42. package/build/bin/short-story.cjs +0 -213
  43. package/build/bin/short-workflows.cjs +0 -32
  44. package/build/bin/short-workspace.cjs +0 -64
  45. package/build/bin/short.cjs +0 -10
  46. package/build/lib/client.cjs +0 -11
  47. package/build/lib/spinner.cjs +0 -17
  48. package/build/package.cjs +0 -18
@@ -1,64 +0,0 @@
1
- #!/usr/bin/env node
2
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
3
- const require_lib_configure = require('../lib/configure.cjs');
4
- const require_lib_stories = require('../lib/stories.cjs');
5
- const require_bin_short_search = require('./short-search.cjs');
6
- let commander = require("commander");
7
-
8
- //#region src/bin/short-workspace.ts
9
- const config = require_lib_configure.default.loadConfig();
10
- const log = console.log;
11
- const program = new commander.Command().description("List stories matching saved workspace query").option("-l, --list", "List saved workspaces").option("-q, --quiet", "Print only workspace story output, no loading dialog", "").option("-n, --name [name]", "Load named workspace", "").option("-u, --unset [name]", "Force unset saved workspace").parse(process.argv);
12
- const opts = program.opts();
13
- const toArgs = (obj) => Object.entries(obj).map(([k, v]) => `--${k} '${v}'`).join(" ");
14
- const main = async () => {
15
- if (!config || !config.token) {
16
- log("Not installed yet.");
17
- log("Please run: short install");
18
- return;
19
- } else if (!config.workspaces) {
20
- log("No workspace saved.");
21
- log("Please run:");
22
- log(" short search [options] --save");
23
- log("to create your first one.");
24
- return;
25
- } else if (opts.list) {
26
- log("Workspaces:");
27
- Object.keys(config.workspaces).map((w) => {
28
- log(" ", w + ":", toArgs(config.workspaces[w]));
29
- });
30
- return;
31
- } else if (opts.unset) {
32
- if (require_lib_configure.default.removeWorkspace(opts.unset)) log("Successfully removed %s workspace", opts.unset);
33
- else log("Failed to remove %s workspace", opts.unset);
34
- return;
35
- }
36
- const name = `${opts.name || program.args[0] || "default"}`;
37
- const workspace = config.workspaces[name];
38
- if (!workspace) {
39
- log("No workspace saved with name", name);
40
- log("Please run:");
41
- log(" short search [options] --save", name);
42
- log("to create it.");
43
- return;
44
- }
45
- const foundOpts = require_bin_short_search.program.parse(process.argv).opts();
46
- const additionalArgs = {
47
- ...workspace,
48
- ...Object.fromEntries(Object.entries(foundOpts).filter(([, v]) => v !== void 0))
49
- };
50
- if (!opts.quiet) {
51
- log("Loading %s workspace ...", name);
52
- log();
53
- }
54
- let stories = [];
55
- try {
56
- stories = await require_lib_stories.default.listStories(additionalArgs);
57
- } catch (e) {
58
- log("Error fetching stories:", e);
59
- }
60
- stories.map(require_lib_stories.default.printFormattedStory(additionalArgs));
61
- };
62
- main();
63
-
64
- //#endregion
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env node
2
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
3
- const require_package = require('../package.cjs');
4
- let commander = require("commander");
5
-
6
- //#region src/bin/short.ts
7
- process.on("unhandledRejection", console.log);
8
- new commander.Command().version(require_package.version).description(require_package.description).command("install [options]", "install and configure API access").command("search [options] [SEARCH OPERATORS]", "search stories with optional query").alias("s").command("find [options] [SEARCH OPERATORS]", "[DEPRECATED] search stories with optional query").command("story ID [options]", "view or manipulate stories").alias("st").command("create [options]", "create a story").alias("c").command("members [options]", "list members").alias("m").command("workflows [options]", "list workflows and their states").alias("wf").command("epics [options]", "list epics and their states").alias("e").command("epic [command] [options]", "create or view an epic").command("iterations [options]", "list iterations").alias("i").command("iteration [command] [options]", "view, create, update, or delete an iteration").command("docs [options]", "list and search docs").alias("d").command("doc [command] [options]", "view, create, or update a doc").command("projects [options]", "list projects and their states").alias("p").command("workspace [NAME] [options]", "list stories matching saved workspace query", { isDefault: true }).alias("w").command("api <path> [options]", "make a request to the Shortcut API").parse(process.argv);
9
-
10
- //#endregion
@@ -1,11 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
3
- const require_lib_configure = require('./configure.cjs');
4
- let _shortcut_client = require("@shortcut/client");
5
-
6
- //#region src/lib/client.ts
7
- const client = new _shortcut_client.ShortcutClient(require_lib_configure.loadConfig().token);
8
- var client_default = client;
9
-
10
- //#endregion
11
- exports.default = client_default;
@@ -1,17 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
3
- let cli_spinner = require("cli-spinner");
4
-
5
- //#region src/lib/spinner.ts
6
- const spinner = (text = "") => {
7
- const spin = new cli_spinner.Spinner({
8
- text: text ? text : "Loading... %s ",
9
- stream: process.stderr
10
- });
11
- spin.setSpinnerString(27);
12
- return spin;
13
- };
14
- var spinner_default = spinner;
15
-
16
- //#endregion
17
- exports.default = spinner_default;
package/build/package.cjs DELETED
@@ -1,18 +0,0 @@
1
-
2
- //#region package.json
3
- var version = "4.0.0";
4
- var description = "A community-driven command line tool for viewing, creating, and updating shortcut.com stories";
5
-
6
- //#endregion
7
- Object.defineProperty(exports, 'description', {
8
- enumerable: true,
9
- get: function () {
10
- return description;
11
- }
12
- });
13
- Object.defineProperty(exports, 'version', {
14
- enumerable: true,
15
- get: function () {
16
- return version;
17
- }
18
- });