@tsed/cli-core 7.0.0-beta.14 → 7.0.0-beta.16

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.
@@ -187,6 +187,7 @@ export class CliService {
187
187
  else {
188
188
  logger().level = "info";
189
189
  }
190
+ data.renderMode = $ctx.get("command")?.renderMode;
190
191
  data.logger = logger();
191
192
  $ctx.set("data", data);
192
193
  return data;
@@ -1,6 +1,6 @@
1
1
  import { isArrowFn, Store } from "@tsed/core";
2
2
  export function getCommandMetadata(token) {
3
- const { name, alias, args = {}, description, options = {}, enableFeatures, disableReadUpPkg, inputSchema, ...opts } = Store.from(token)?.get("command");
3
+ const { name, alias, args = {}, description, options = {}, enableFeatures, disableReadUpPkg, inputSchema, renderMode, ...opts } = Store.from(token)?.get("command");
4
4
  return {
5
5
  name,
6
6
  inputSchema,
@@ -8,6 +8,7 @@ export function getCommandMetadata(token) {
8
8
  description,
9
9
  enableFeatures: enableFeatures || [],
10
10
  disableReadUpPkg: !!disableReadUpPkg,
11
+ renderMode,
11
12
  ...opts,
12
13
  getOptions() {
13
14
  if (inputSchema) {
@@ -34,6 +34,7 @@ export declare function command<Input>(options: CommandOptions<Input>): TsED.Pro
34
34
  allowUnknownOption?: boolean;
35
35
  enableFeatures?: string[];
36
36
  disableReadUpPkg?: boolean;
37
+ renderMode?: import("@tsed/cli-tasks").TasksOptions["renderMode"];
37
38
  } | {
38
39
  $prompt: any;
39
40
  $exec: any;
@@ -52,5 +53,6 @@ export declare function command<Input>(options: CommandOptions<Input>): TsED.Pro
52
53
  allowUnknownOption?: boolean;
53
54
  enableFeatures?: string[];
54
55
  disableReadUpPkg?: boolean;
56
+ renderMode?: import("@tsed/cli-tasks").TasksOptions["renderMode"];
55
57
  }>> | TsED.ClassProviderBuilder<Type<CommandProvider<Input>>>;
56
58
  export {};
@@ -1,3 +1,4 @@
1
+ import type { TasksOptions } from "@tsed/cli-tasks";
1
2
  declare global {
2
3
  namespace TsED {
3
4
  interface InitialCommandData {
@@ -6,7 +7,8 @@ declare global {
6
7
  }
7
8
  export interface CommandData extends TsED.InitialCommandData {
8
9
  commandName?: string;
9
- verbose?: boolean;
10
+ verbose?: TasksOptions["verbose"];
11
+ renderMode?: TasksOptions["renderMode"];
10
12
  rawArgs?: string[];
11
13
  [key: string]: any;
12
14
  }
@@ -1,7 +1,9 @@
1
+ import type { TasksOptions } from "@tsed/cli-tasks";
1
2
  import type { BaseCommandOptions, CommandArg, CommandOpts } from "./CommandOptions.js";
2
3
  export interface CommandMetadata extends Omit<BaseCommandOptions<any>, "args" | "options" | "allowUnknownOption"> {
3
4
  enableFeatures: string[];
4
5
  disableReadUpPkg: boolean;
6
+ renderMode?: TasksOptions["renderMode"];
5
7
  getOptions(): {
6
8
  /**
7
9
  * CommandProvider arguments
@@ -1,5 +1,5 @@
1
1
  import type { PromptQuestion } from "@tsed/cli-prompts";
2
- import type { MaybePromise, Task } from "@tsed/cli-tasks";
2
+ import type { MaybePromise, Task, TasksOptions } from "@tsed/cli-tasks";
3
3
  import { Type } from "@tsed/core";
4
4
  import type { TokenProvider } from "@tsed/di";
5
5
  import type { JsonSchema } from "@tsed/schema";
@@ -79,6 +79,7 @@ export interface BaseCommandOptions<Input> {
79
79
  allowUnknownOption?: boolean;
80
80
  enableFeatures?: string[];
81
81
  disableReadUpPkg?: boolean;
82
+ renderMode?: TasksOptions["renderMode"];
82
83
  }
83
84
  interface FunctionalCommandOptions<Input> extends BaseCommandOptions<Input> {
84
85
  handler: (data: Input) => MaybePromise<Task<Input>[] | void>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tsed/cli-core",
3
3
  "description": "Build your CLI with TypeScript and Decorators",
4
- "version": "7.0.0-beta.14",
4
+ "version": "7.0.0-beta.16",
5
5
  "type": "module",
6
6
  "main": "./lib/esm/index.js",
7
7
  "source": "./src/index.ts",
@@ -33,8 +33,8 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "@ts-morph/common": "0.28.0",
36
- "@tsed/cli-prompts": "7.0.0-beta.14",
37
- "@tsed/cli-tasks": "7.0.0-beta.14",
36
+ "@tsed/cli-prompts": "7.0.0-beta.16",
37
+ "@tsed/cli-tasks": "7.0.0-beta.16",
38
38
  "@tsed/logger": ">=8.0.3",
39
39
  "@tsed/logger-pattern-layout": ">=8.0.3",
40
40
  "@tsed/logger-std": ">=8.0.3",
@@ -62,7 +62,7 @@
62
62
  "uuid": "^10.0.0"
63
63
  },
64
64
  "devDependencies": {
65
- "@tsed/typescript": "7.0.0-beta.14",
65
+ "@tsed/typescript": "7.0.0-beta.16",
66
66
  "@types/commander": "2.12.2",
67
67
  "@types/figures": "3.0.1",
68
68
  "@types/fs-extra": "^11.0.4",