@42ws/cli 0.0.4 → 0.0.5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../src/commands/logout.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../src/commands/logout.ts"],"names":[],"mappings":"AAIA,wBAAsB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CA0B5C"}
|
package/dist/commands/logout.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { loadConfig, saveConfig } from '../lib/config.js';
|
|
2
|
+
import { apiRequest } from '../lib/api.js';
|
|
2
3
|
import { success, successMessage, isJsonMode } from '../lib/output.js';
|
|
3
4
|
export async function logout() {
|
|
4
5
|
const config = loadConfig();
|
|
@@ -11,7 +12,13 @@ export async function logout() {
|
|
|
11
12
|
}
|
|
12
13
|
return;
|
|
13
14
|
}
|
|
14
|
-
//
|
|
15
|
+
// Best-effort: invalidate the token on the server too
|
|
16
|
+
try {
|
|
17
|
+
await apiRequest(config, 'DELETE', '/v1/cli/session');
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
// ignore — local cleanup is what matters
|
|
21
|
+
}
|
|
15
22
|
saveConfig({ removeToken: true, apiUrl: config.apiUrl });
|
|
16
23
|
if (isJsonMode()) {
|
|
17
24
|
success({ status: 'logged-out' });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logout.js","sourceRoot":"","sources":["../../src/commands/logout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEvE,MAAM,CAAC,KAAK,UAAU,MAAM;IAC1B,MAAM,MAAM,GAAG,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AY,EAAE,CAAC,CAAC;IACpC,CAAC;SAAM,CAAC;QACN,cAAc,CAAC,aAAa,CAAC,CAAC;IAChC,CAAC;AACH,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { open } from './commands/open.js';
|
|
|
7
7
|
import { init } from './commands/init.js';
|
|
8
8
|
import { pull } from './commands/pull.js';
|
|
9
9
|
import { setJsonMode } from './lib/output.js';
|
|
10
|
-
const VERSION = '0.0.
|
|
10
|
+
const VERSION = '0.0.5';
|
|
11
11
|
const HELP = `
|
|
12
12
|
42ws — Publish static sites in one command
|
|
13
13
|
|