@travetto/cli 5.0.17 → 5.0.18

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/README.md CHANGED
@@ -60,7 +60,7 @@ This module also has a tight integration with the [VSCode plugin](https://market
60
60
  At it's heart, a cli command is the contract defined by what flags, and what arguments the command supports. Within the framework this requires three criteria to be met:
61
61
  * The file must be located in the `support/` folder, and have a name that matches `cli.*.ts`
62
62
  * The file must be a class that has a main method
63
- * The class must use the [@CliCommand](https://github.com/travetto/travetto/tree/main/module/cli/src/decorators.ts#L85) decorator
63
+ * The class must use the [@CliCommand](https://github.com/travetto/travetto/tree/main/module/cli/src/decorators.ts#L84) decorator
64
64
 
65
65
  **Code: Basic Command**
66
66
  ```typescript
@@ -94,7 +94,7 @@ Examples of mappings:
94
94
  The pattern is that underscores(_) translate to colons (:), and the `cli.` prefix, and `.ts` suffix are dropped.
95
95
 
96
96
  ## Binding Flags
97
- [@CliCommand](https://github.com/travetto/travetto/tree/main/module/cli/src/decorators.ts#L85) is a wrapper for [@Schema](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/schema.ts#L14), and so every class that uses the [@CliCommand](https://github.com/travetto/travetto/tree/main/module/cli/src/decorators.ts#L85) decorator is now a full [@Schema](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/schema.ts#L14) class. The fields of the class represent the flags that are available to the command.
97
+ [@CliCommand](https://github.com/travetto/travetto/tree/main/module/cli/src/decorators.ts#L84) is a wrapper for [@Schema](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/schema.ts#L14), and so every class that uses the [@CliCommand](https://github.com/travetto/travetto/tree/main/module/cli/src/decorators.ts#L84) decorator is now a full [@Schema](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/schema.ts#L14) class. The fields of the class represent the flags that are available to the command.
98
98
 
99
99
  **Code: Basic Command with Flag**
100
100
  ```typescript
@@ -131,7 +131,7 @@ $ trv basic:flag --loud
131
131
  HELLO
132
132
  ```
133
133
 
134
- The [@CliCommand](https://github.com/travetto/travetto/tree/main/module/cli/src/decorators.ts#L85) supports the following data types for flags:
134
+ The [@CliCommand](https://github.com/travetto/travetto/tree/main/module/cli/src/decorators.ts#L84) supports the following data types for flags:
135
135
  * Boolean values
136
136
  * Number values. The [@Integer](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/field.ts#L166), [@Float](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/field.ts#L172), [@Precision](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/field.ts#L160), [@Min](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/field.ts#L101) and [@Max](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/field.ts#L111) decorators help provide additional validation.
137
137
  * String values. [@MinLength](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/field.ts#L101), [@MaxLength](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/field.ts#L111), [@Match](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/field.ts#L93) and [@Enum](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/field.ts#L72) provide additional constraints
@@ -389,7 +389,7 @@ npx trv call:db --host localhost --port 3306 --username app --password <custom>
389
389
  ```
390
390
 
391
391
  ## VSCode Integration
392
- By default, cli commands do not expose themselves to the VSCode extension, as the majority of them are not intended for that sort of operation. [RESTful API](https://github.com/travetto/travetto/tree/main/module/rest#readme "Declarative api for RESTful APIs with support for the dependency injection module.") does expose a cli target `run:rest` that will show up, to help run/debug a rest application. Any command can mark itself as being a run target, and will be eligible for running from within the [VSCode plugin](https://marketplace.visualstudio.com/items?itemName=arcsine.travetto-plugin). This is achieved by setting the `runTarget` field on the [@CliCommand](https://github.com/travetto/travetto/tree/main/module/cli/src/decorators.ts#L85) decorator. This means the target will be visible within the editor tooling.
392
+ By default, cli commands do not expose themselves to the VSCode extension, as the majority of them are not intended for that sort of operation. [RESTful API](https://github.com/travetto/travetto/tree/main/module/rest#readme "Declarative api for RESTful APIs with support for the dependency injection module.") does expose a cli target `run:rest` that will show up, to help run/debug a rest application. Any command can mark itself as being a run target, and will be eligible for running from within the [VSCode plugin](https://marketplace.visualstudio.com/items?itemName=arcsine.travetto-plugin). This is achieved by setting the `runTarget` field on the [@CliCommand](https://github.com/travetto/travetto/tree/main/module/cli/src/decorators.ts#L84) decorator. This means the target will be visible within the editor tooling.
393
393
 
394
394
  **Code: Simple Run Target**
395
395
  ```typescript
@@ -548,14 +548,14 @@ Options:
548
548
 
549
549
  Available Services
550
550
  --------------------
551
- * dynamodb@2.0.0
552
- * elasticsearch@8.9.1
551
+ * dynamodb@2.5.3
552
+ * elasticsearch@8.17.0
553
553
  * firestore@latest
554
- * mongodb@7.0
554
+ * mongodb@8.0
555
555
  * mysql@8.0
556
- * postgresql@15.4
557
- * redis@7.2
558
- * s3@3.1.0
556
+ * postgresql@17.2
557
+ * redis@7.4
558
+ * s3@3.12.0
559
559
  ```
560
560
 
561
561
  A sample of all services available to the entire framework:
@@ -566,14 +566,14 @@ $ trv service status
566
566
 
567
567
  Service Version Status
568
568
  -------------------------------------------------
569
- dynamodb 2.0.0 Running 93af422e793a
570
- elasticsearch 8.9.1 Running ed76ee063d13
569
+ dynamodb 2.5.3 Running 93af422e793a
570
+ elasticsearch 8.17.0 Running ed76ee063d13
571
571
  firestore latest Running feec2e5e95b4
572
- mongodb 7.0 Running 5513eba6734e
572
+ mongodb 8.0 Running 5513eba6734e
573
573
  mysql 8.0 Running 307bc66d442a
574
- postgresql 15.4 Running e78291e71040
575
- redis 7.2 Running 77ba279b4e30
576
- s3 3.1.0 Running fdacfc55b9e3
574
+ postgresql 17.2 Running e78291e71040
575
+ redis 7.4 Running 77ba279b4e30
576
+ s3 3.12.0 Running fdacfc55b9e3
577
577
  ```
578
578
 
579
579
  ### Defining new Services
@@ -583,7 +583,7 @@ The services are defined as plain typescript files within the framework and can
583
583
  ```typescript
584
584
  import type { ServiceDescriptor } from '@travetto/cli';
585
585
 
586
- const version = process.env.MONGO_VERSION ?? '7.0';
586
+ const version = process.env.MONGO_VERSION || '8.0';
587
587
 
588
588
  export const service: ServiceDescriptor = {
589
589
  name: 'mongodb',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/cli",
3
- "version": "5.0.17",
3
+ "version": "5.0.18",
4
4
  "description": "CLI infrastructure for Travetto framework",
5
5
  "keywords": [
6
6
  "cli",
@@ -28,8 +28,8 @@
28
28
  "directory": "module/cli"
29
29
  },
30
30
  "dependencies": {
31
- "@travetto/schema": "^5.0.14",
32
- "@travetto/terminal": "^5.0.16"
31
+ "@travetto/schema": "^5.0.15",
32
+ "@travetto/terminal": "^5.0.17"
33
33
  },
34
34
  "travetto": {
35
35
  "displayName": "Command Line Interface",
package/src/decorators.ts CHANGED
@@ -76,7 +76,6 @@ const FIELD_CONFIG: {
76
76
  }
77
77
  ];
78
78
 
79
-
80
79
  /**
81
80
  * Decorator to register a CLI command
82
81
  * @augments `@travetto/schema:Schema`
package/src/error.ts CHANGED
@@ -46,7 +46,6 @@ ${{ identifier: install }}
46
46
  }
47
47
  }
48
48
 
49
-
50
49
  /**
51
50
  * Provides a basic error wrapper for cli validation issues
52
51
  */
package/src/parse.ts CHANGED
@@ -33,7 +33,6 @@ const getInput = (cfg: { field?: CliCommandInput, rawText?: string, input: strin
33
33
  }
34
34
  };
35
35
 
36
-
37
36
  /**
38
37
  * Parsing support for the cli
39
38
  */