@lpm-registry/cli 0.2.2 → 0.2.3

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.
@@ -22,6 +22,7 @@ import {
22
22
  deleteConfigValue,
23
23
  getAllConfig,
24
24
  getConfigValue,
25
+ getToken,
25
26
  setConfigValue,
26
27
  } from "../config.js"
27
28
 
@@ -59,7 +60,18 @@ async function listConfig() {
59
60
  * Get a specific configuration value.
60
61
  * @param {string} key - The config key to get
61
62
  */
62
- function getConfig(key) {
63
+ async function getConfig(key) {
64
+ // Token lives in secure storage, not the general config store
65
+ if (key === "token") {
66
+ const token = await getToken()
67
+ if (!token) {
68
+ console.log(chalk.yellow("No token found. Run `lpm login` first."))
69
+ return
70
+ }
71
+ console.log(token)
72
+ return
73
+ }
74
+
63
75
  const value = getConfigValue(key)
64
76
 
65
77
  if (value === undefined) {
@@ -141,7 +153,7 @@ export async function config(action, key, value) {
141
153
  console.log(chalk.dim("Usage: lpm config get <key>"))
142
154
  process.exit(1)
143
155
  }
144
- getConfig(key)
156
+ await getConfig(key)
145
157
  break
146
158
 
147
159
  case "set":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lpm-registry/cli",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "CLI for Licensed Package Manager",
5
5
  "author": "LPM <hello@lpm.dev> (https://lpm.dev)",
6
6
  "repository": {