@tsed/cli-tasks 7.0.0-rc.3 → 7.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 (2) hide show
  1. package/package.json +3 -6
  2. package/readme.md +78 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tsed/cli-tasks",
3
3
  "description": "Task runner helpers shared across Ts.ED CLI packages",
4
- "version": "7.0.0-rc.3",
4
+ "version": "7.0.0",
5
5
  "type": "module",
6
6
  "main": "./lib/esm/index.js",
7
7
  "source": "./src/index.ts",
@@ -35,7 +35,7 @@
35
35
  "@tsed/logger": ">=8.0.3"
36
36
  },
37
37
  "devDependencies": {
38
- "@tsed/typescript": "7.0.0-rc.3",
38
+ "@tsed/typescript": "7.0.0",
39
39
  "typescript": "5.6.2",
40
40
  "vitest": "3.2.4"
41
41
  },
@@ -46,8 +46,5 @@
46
46
  },
47
47
  "homepage": "https://github.com/tsedio/tsed-cli/tree/master/packages/cli-tasks",
48
48
  "author": "Romain Lenzotti",
49
- "license": "MIT",
50
- "publishConfig": {
51
- "tag": "rc"
52
- }
49
+ "license": "MIT"
53
50
  }
package/readme.md ADDED
@@ -0,0 +1,78 @@
1
+ # @tsed/cli-tasks
2
+
3
+ <p style="text-align: center" align="center">
4
+ <a href="https://tsed.dev" target="_blank"><img src="https://tsed.dev/tsed-og.png" width="200" alt="Ts.ED logo"/></a>
5
+ </p>
6
+
7
+ [![Build & Release](https://github.com/tsedio/tsed-cli/workflows/Build%20&%20Release/badge.svg?branch=master)](https://github.com/tsedio/tsed-cli/actions?query=workflow%3A%22Build+%26+Release%22)
8
+ [![TypeScript](https://badges.frapsoft.com/typescript/love/typescript.svg?v=100)](https://github.com/ellerbrock/typescript-badges/)
9
+
10
+ Terminal-friendly task runner shared by every Ts.ED CLI command. Tasks return ordered steps, receive a `TaskLogger`, and can stream child-process output without depending on Listr/Listr2.
11
+
12
+ ## Documentation
13
+
14
+ - [CLI task guide](https://cli.tsed.dev/guide/cli/tasks) – explains lifecycle, progress tips, and cancellation patterns.
15
+
16
+ ## Quick example
17
+
18
+ ```ts
19
+ import type {Task} from "@tsed/cli-tasks";
20
+ import {execa} from "execa";
21
+
22
+ export interface DeployContext {
23
+ projectDir: string;
24
+ install: boolean;
25
+ onCancel(handler: () => void): void;
26
+ }
27
+
28
+ export const deployTasks: Task<DeployContext>[] = [
29
+ {
30
+ title: "Install dependencies",
31
+ skip: (ctx) => (!ctx.install ? "Skipped with --no-install" : false),
32
+ async task(ctx, logger) {
33
+ const subprocess = execa("npm", ["install"], {cwd: ctx.projectDir});
34
+ ctx.onCancel(() => subprocess.kill("SIGINT"));
35
+ subprocess.stdout?.on("data", (chunk) => logger.info(chunk.toString().trim()));
36
+ await subprocess;
37
+ }
38
+ }
39
+ ];
40
+ ```
41
+
42
+ The snippet is lifted from the docs example above; update one file and both locations stay in sync.
43
+
44
+ ## Contributors
45
+
46
+ Please read [contributing guidelines here](https://tsed.dev/CONTRIBUTING.html)
47
+
48
+ <a href="https://github.com/tsedio/ts-express-decorators/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
49
+
50
+ ## Backers
51
+
52
+ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/tsed#backer)]
53
+
54
+ <a href="https://opencollective.com/tsed#backers" target="_blank"><img src="https://opencollective.com/tsed/tiers/backer.svg?width=890"></a>
55
+
56
+ ## Sponsors
57
+
58
+ Support this project by becoming a sponsor. Your logo will show up here with a link to your
59
+ website. [[Become a sponsor](https://opencollective.com/tsed#sponsor)]
60
+
61
+ ## License
62
+
63
+ The MIT License (MIT)
64
+
65
+ Copyright (c) 2016 - Today Romain Lenzotti
66
+
67
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
68
+ documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
69
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
70
+ persons to whom the Software is furnished to do so, subject to the following conditions:
71
+
72
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
73
+ Software.
74
+
75
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
76
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
77
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
78
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.