neatlogs-cli 0.1.0-team-test.1 → 0.1.0-team-test.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to `neatlogs-cli` are documented in this file.
4
4
 
5
+ ## 0.1.0-team-test.2
6
+
7
+ - Resolve `auth login` host and profile context from the selected saved profile.
8
+
5
9
  ## 0.1.0-team-test.1
6
10
 
7
11
  - Team-testing prerelease of the NeatLogs public API CLI.
package/dist/bin.js CHANGED
@@ -592,7 +592,7 @@ import { Command, CommanderError } from "commander";
592
592
  // package.json
593
593
  var package_default = {
594
594
  name: "neatlogs-cli",
595
- version: "0.1.0-team-test.1",
595
+ version: "0.1.0-team-test.2",
596
596
  description: "Non-interactive CLI for the NeatLogs public API",
597
597
  license: "UNLICENSED",
598
598
  type: "module",
@@ -177233,15 +177233,18 @@ function registerAuthCommands(program, context) {
177233
177233
  ).option("--scope <scope...>", "OAuth scopes to request").action(
177234
177234
  async (options) => {
177235
177235
  const global = context.options();
177236
- const host = resolveHost(global.host, context.env);
177237
- const profile = global.profile ?? "default";
177236
+ const identity3 = requireIdentity(context);
177237
+ const configuredHost = global.host ?? context.env.NEATLOGS_HOST;
177238
+ const savedProfile = configuredHost ? void 0 : await identity3.showProfile(global.profile);
177239
+ const host = savedProfile ? savedProfile.profile.host : resolveHost(global.host, context.env);
177240
+ const profile = savedProfile?.name ?? global.profile ?? "default";
177238
177241
  const common2 = {
177239
177242
  allowFileCredentials: options.allowFileCredentials === true,
177240
177243
  host,
177241
177244
  profile,
177242
177245
  scopes: options.scope ?? DEFAULT_CLI_OAUTH_SCOPES
177243
177246
  };
177244
- const result = options.device ? await requireIdentity(context).loginDevice({
177247
+ const result = options.device ? await identity3.loginDevice({
177245
177248
  ...common2,
177246
177249
  showAuthorization: async (display) => {
177247
177250
  if (context.machine()) {
@@ -177260,7 +177263,7 @@ Code: ${display.userCode}
177260
177263
  );
177261
177264
  }
177262
177265
  }
177263
- }) : await requireIdentity(context).loginBrowser(common2);
177266
+ }) : await identity3.loginBrowser(common2);
177264
177267
  if (result.credentialSource === "file") {
177265
177268
  context.stderr.write(
177266
177269
  "WARNING: credentials are stored in the explicitly enabled protected file fallback.\n"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neatlogs-cli",
3
- "version": "0.1.0-team-test.1",
3
+ "version": "0.1.0-team-test.2",
4
4
  "description": "Non-interactive CLI for the NeatLogs public API",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",