@aiam/ciba 0.9.9 → 1.0.0

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/token.mjs +2 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiam/ciba",
3
- "version": "0.9.9",
3
+ "version": "1.0.0",
4
4
  "description": "OAuth 2.0 Device Authorization Grant CLI with cross-device push approval (Yjs sync, ECDH-encrypted token delivery, persistent device id)",
5
5
  "type": "module",
6
6
  "bin": {
package/token.mjs CHANGED
@@ -130,7 +130,7 @@ function tryGet(resourcesMap, deviceDoc, res) {
130
130
 
131
131
  // ─── Output ───────────────────────────────────────────────────────────────────
132
132
 
133
- function log(msg) { process.stderr.write(msg + '\n'); }
133
+ function log(msg) { if (!jsonOut && !envOut) process.stderr.write(msg + '\n'); }
134
134
 
135
135
  function output(token) {
136
136
  if (jsonOut) {
@@ -147,7 +147,6 @@ function output(token) {
147
147
  const { jwt: deviceJwt, deviceId } = signDeviceJwt(privateKey, publicKey);
148
148
  log(`→ device: ${deviceId}`);
149
149
  log(`→ server: ${serverUrl}`);
150
- log(`→ resource: ${resource}`);
151
150
  log('');
152
151
 
153
152
  const cliUA = `ciba-cli/token (${process.platform} ${process.arch}; node ${process.version})`;
@@ -201,7 +200,7 @@ if (resource) {
201
200
  }
202
201
 
203
202
  log(`→ options: ${JSON.stringify(serverResources)}`);
204
- log(`→ resolved: ${resolvedResource}`);
203
+ log(`→ resource: ${resolvedResource}`);
205
204
  log(`→ resources: ${JSON.stringify([...resourcesMap.entries()])}`);
206
205
 
207
206
  // Refresh mode: write request and exit immediately.