@codiac.io/codiac-cli 1.3.151 → 1.3.153
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 +1 -1
- package/dist/commands/login.d.ts +2 -0
- package/dist/commands/login.js +29 -1
- package/dist/commands/login.js.map +1 -1
- package/dist/relay/relay-container.js +1 -1
- package/oclif.manifest.json +28 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ $ npm install -g @codiac.io/codiac-cli
|
|
|
21
21
|
$ codiac COMMAND
|
|
22
22
|
running command...
|
|
23
23
|
$ codiac (--version|-v)
|
|
24
|
-
@codiac.io/codiac-cli/1.3.
|
|
24
|
+
@codiac.io/codiac-cli/1.3.153 linux-x64 node-v22.15.1
|
|
25
25
|
$ codiac --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ codiac COMMAND
|
package/dist/commands/login.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
1
2
|
import { CommandBaseEnterprise } from '../command-base-enterprise';
|
|
2
3
|
export default class Login extends CommandBaseEnterprise {
|
|
3
4
|
static description: string;
|
|
@@ -12,6 +13,7 @@ export default class Login extends CommandBaseEnterprise {
|
|
|
12
13
|
silent: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
};
|
|
14
15
|
static args: {};
|
|
16
|
+
static examples: Command.Example[];
|
|
15
17
|
/************ HACK!!! ***********
|
|
16
18
|
* we're disabling this because our api clients fail on some machines.
|
|
17
19
|
* https://github.com/axios/axios/issues/535
|
package/dist/commands/login.js
CHANGED
|
@@ -40,6 +40,8 @@ class Login extends command_base_enterprise_1.CommandBaseEnterprise {
|
|
|
40
40
|
if (flags.passwordIn === true) {
|
|
41
41
|
defaultPassword = yield (0, read_stdin_1.default)();
|
|
42
42
|
}
|
|
43
|
+
if (defaultPassword != undefined)
|
|
44
|
+
defaultPassword = defaultPassword.trim();
|
|
43
45
|
let dialoger = new uilogic_1.TenantContextualizer(this.cliEnviro, this._projCfg, this.authClient, this.projCfgRepo, this._ui, this._styler, this.logger);
|
|
44
46
|
let defaultUserName = (this._userCntx) ? this._userCntx.userName : undefined;
|
|
45
47
|
defaultUserName = (_a = flags.username) !== null && _a !== void 0 ? _a : defaultUserName;
|
|
@@ -83,9 +85,35 @@ Login.flags = {
|
|
|
83
85
|
password: core_1.Flags.string({ char: 'p', description: "password on Codiac" }),
|
|
84
86
|
passwordIn: core_1.Flags.boolean({ char: 'i', exclusive: ["password"], description: "Reads the password directly from the standard input stream. Enables users to avoid explicitly rendering it in a command string. eg: `cat mypass.txt | cod login -u joecool --passwordIn`. Invokes `--silent` mode, so interaction will be disabled." }),
|
|
85
87
|
tenantCode: core_1.Flags.string({ char: 't', description: "Human-readable Identifier for the Codiac tenant to log in under (optional: defaults to the tenant code for the current project or prompts you to select one from your profile)." }),
|
|
86
|
-
tokenOut: core_1.Flags.boolean({ char: 'o', required: false, dependsOn: ["username"
|
|
88
|
+
tokenOut: core_1.Flags.boolean({ char: 'o', required: false, dependsOn: ["username"], description: "Writes the token as the sole stdout content (so that it is available to be piped or redirected elsewhere, eg `cod login > mycodiactoken.txt`). Leaves stdout empty on errors. Invokes `--silent` mode, so interaction will be disabled." }),
|
|
87
89
|
silent: core_1.Flags.boolean({ char: 'y', dependsOn: ["username", "password"], required: false, description: `(Optional: defaults to false) Prevents interactive user-interface and throws if interaction is needed. Requires arguments: [--username -u, --passwordIn -i]` })
|
|
88
90
|
// useNode: Flags.boolean({ char: 'n', required: false, description: `Replaces ui prompts with node env vars that match the requested prompt` })
|
|
89
91
|
};
|
|
90
92
|
Login.args = {};
|
|
93
|
+
Login.examples = [
|
|
94
|
+
{
|
|
95
|
+
description: "Interactive login",
|
|
96
|
+
command: '<%= config.bin %> <%= command.id %>'
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
description: "Scripted login (non-TTY, eg: in a pipeline) with password piped in from an env variable.",
|
|
100
|
+
command: 'echo $PW | <%= config.bin %> <%= command.id %> -u joe.cool@yaml.dev --passwordIn'
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
description: "Scripted login to specific tenant (non-TTY, eg: in a pipeline) with password piped in from an env variable. Use this when the current user is a member of more than one codiac tenant.",
|
|
104
|
+
command: 'echo $PW | <%= config.bin %> <%= command.id %> --tenantCode acme -u joe.cool@yaml.dev --passwordIn'
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
description: "Scripted login to specific tenant (non-TTY, eg: in a pipeline) with password read from an env variable. Use this when the current user is a member of more than one codiac tenant.",
|
|
108
|
+
command: '<%= config.bin %> <%= command.id %> --tenantCode acme -u joe.cool@yaml.dev --password $PW'
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
description: "Login and capture token (with password read from a file) (Non-TTY)",
|
|
112
|
+
command: "cat mypassword.txt | <%= config.bin %> <%= command.id %> -u joe.cool@fyaml.dev --passwordIn --tokenOut"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
description: "Login and capture token (with clear-text password read an env variable) (Non-TTY)",
|
|
116
|
+
command: "<%= config.bin %> <%= command.id %> -u joe.cool@fyaml.dev --password $PW --tokenOut"
|
|
117
|
+
}
|
|
118
|
+
];
|
|
91
119
|
//# sourceMappingURL=login.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":";;;AAAA,sCAA6C;AAE7C,gCAAwE;AACxE,wCAAkD;AAElD,8CAAsC;AACtC,wEAAmE;AAEnE,MAAqB,KAAM,SAAQ,+CAAqB;IA6CtD;;;4BAGwB;IACxB,iDAAiD;IAGjD,qBAAqB;IACrB,uCAAuC;IACvC,eAAe;IACf,2DAA2D;IAC3D,sDAAsD;IACtD,6D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OAAO,EAAE,qCAAqC;KAC/C;IACD;QACE,WAAW,EAAE,0FAA0F;QACvG,OAAO,EAAE,kFAAkF;KAC5F;IACD;QACE,WAAW,EAAE,yLAAyL;QACtM,OAAO,EAAE,oGAAoG;KAC9G;IACD;QACE,WAAW,EAAE,sLAAsL;QACnM,OAAO,EAAE,2FAA2F;KACrG;IACD;QACE,WAAW,EAAE,oEAAoE;QACjF,OAAO,EAAE,wGAAwG;KAClH;IACD;QACE,WAAW,EAAE,mFAAmF;QAChG,OAAO,EAAE,qFAAqF;KAC/F;CAEF,CAAA"}
|
|
@@ -18,7 +18,7 @@ const entities_1 = require("../ops/entities");
|
|
|
18
18
|
// Configuration defaults
|
|
19
19
|
const DEFAULT_CONFIG = {
|
|
20
20
|
IMAGE_NAME: "codiacimages/codiac-relay",
|
|
21
|
-
IMAGE_TAG: "1.6.
|
|
21
|
+
IMAGE_TAG: "1.6.64",
|
|
22
22
|
CONTAINER_NAME: "codiac-relay",
|
|
23
23
|
HEALTH_CHECK_URL: "http://localhost:5799/heartbeat-json",
|
|
24
24
|
RETRY_TIMEOUT_MINUTES: 1,
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.3.
|
|
2
|
+
"version": "1.3.153",
|
|
3
3
|
"commands": {
|
|
4
4
|
"branch": {
|
|
5
5
|
"id": "branch",
|
|
@@ -558,6 +558,32 @@
|
|
|
558
558
|
"user:login"
|
|
559
559
|
],
|
|
560
560
|
"hiddenAliases": [],
|
|
561
|
+
"examples": [
|
|
562
|
+
{
|
|
563
|
+
"description": "Interactive login",
|
|
564
|
+
"command": "<%= config.bin %> <%= command.id %>"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"description": "Scripted login (non-TTY, eg: in a pipeline) with password piped in from an env variable.",
|
|
568
|
+
"command": "echo $PW | <%= config.bin %> <%= command.id %> -u joe.cool@yaml.dev --passwordIn"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"description": "Scripted login to specific tenant (non-TTY, eg: in a pipeline) with password piped in from an env variable. Use this when the current user is a member of more than one codiac tenant.",
|
|
572
|
+
"command": "echo $PW | <%= config.bin %> <%= command.id %> --tenantCode acme -u joe.cool@yaml.dev --passwordIn"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"description": "Scripted login to specific tenant (non-TTY, eg: in a pipeline) with password read from an env variable. Use this when the current user is a member of more than one codiac tenant.",
|
|
576
|
+
"command": "<%= config.bin %> <%= command.id %> --tenantCode acme -u joe.cool@yaml.dev --password $PW"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"description": "Login and capture token (with password read from a file) (Non-TTY)",
|
|
580
|
+
"command": "cat mypassword.txt | <%= config.bin %> <%= command.id %> -u joe.cool@fyaml.dev --passwordIn --tokenOut"
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"description": "Login and capture token (with clear-text password read an env variable) (Non-TTY)",
|
|
584
|
+
"command": "<%= config.bin %> <%= command.id %> -u joe.cool@fyaml.dev --password $PW --tokenOut"
|
|
585
|
+
}
|
|
586
|
+
],
|
|
561
587
|
"flags": {
|
|
562
588
|
"help": {
|
|
563
589
|
"name": "help",
|
|
@@ -605,8 +631,7 @@
|
|
|
605
631
|
"required": false,
|
|
606
632
|
"allowNo": false,
|
|
607
633
|
"dependsOn": [
|
|
608
|
-
"username"
|
|
609
|
-
"passwordIn"
|
|
634
|
+
"username"
|
|
610
635
|
]
|
|
611
636
|
},
|
|
612
637
|
"silent": {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codiac.io/codiac-cli",
|
|
3
3
|
"description": "Local command line interface for managing enterprise assets and environments.",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.153",
|
|
5
5
|
"author": "Codiac",
|
|
6
6
|
"bin": {
|
|
7
7
|
"codiac": "./bin/run",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@codiac.io/cli-tools": "1.1.12",
|
|
34
34
|
"@codiac.io/codiac-common": "^1.4.5",
|
|
35
35
|
"@codiac.io/codiac-domain": "^1.10.2",
|
|
36
|
-
"@codiac.io/codiac-messaging": "^1.2.
|
|
36
|
+
"@codiac.io/codiac-messaging": "^1.2.2",
|
|
37
37
|
"@codiac.io/codiac-ops-common": "1.5.3",
|
|
38
38
|
"@codiac.io/codiac-relay-contracts": "^1.3.1",
|
|
39
39
|
"@codiac.io/jwt-lib": "1.1.7",
|