Skip to content

Commit

Permalink
feat: adding pipe and create commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mshick committed Jun 11, 2020
1 parent 834edde commit 0084888
Show file tree
Hide file tree
Showing 14 changed files with 192 additions and 6 deletions.
6 changes: 5 additions & 1 deletion README.md
Expand Up @@ -10,6 +10,8 @@ The focus here is on a clear, easy-to-use interface for the most commonly needed
- `set` - Sets a variable
- `unset` - Unset a variable
- `print` - Print the whole config to stdout in env or json format
- `create` - Create a new config with the provided name
- `pipe` - Pipe env-formatted stdin to the named config, loading it with variables. [EXPERIMENTAL]

## Installation

Expand All @@ -36,9 +38,11 @@ $ grcutil set my-project base64-val simpleval --to-base64
# c2ltcGxldmFs
$ grcutil print my-project --constant-case --print-format json
# { "FOO": "bar", "BASE64_VAL": "c2ltcGxldmFs" }
$ echo 'FOO=bar' | grcutil pipe my-project
# FOO=bar
```

For a full
For a full list of functionality and more examples:

```sh
$ grcutil --help
Expand Down
41 changes: 40 additions & 1 deletion dist/cli.js 100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cli.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions dist/grcutil.d.ts
@@ -1,3 +1,4 @@
import { runtimeconfig_v1beta1 } from 'googleapis';
export interface GrcVariable {
name: string;
value: string | null;
Expand All @@ -13,6 +14,7 @@ export declare enum GrcPrintFormat {
Env = "ENV",
Json = "JSON"
}
export declare function createConfig(configName: string, projectId?: string): Promise<runtimeconfig_v1beta1.Schema$RuntimeConfig>;
export declare function getValue(configName: string, variableName: string, projectId?: string): Promise<GrcVariable>;
export declare function setValue(configName: string, variableName: string, value: string, projectId?: string): Promise<GrcVariable>;
export declare function unsetValue(configName: string, variableName: string, projectId?: string): Promise<string>;
Expand Down
36 changes: 35 additions & 1 deletion dist/grcutil.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0084888

Please sign in to comment.