squidcloudctl 3.0.8 → 3.0.9

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.
@@ -10,10 +10,13 @@ async function ensureApiKey() {
10
10
  const created = await apiPost('/keys', {
11
11
  name: `squidcloudctl-fs-${new Date().toISOString().slice(0, 10)}`,
12
12
  });
13
- const key = created?.key || created?.api_key || created?.data?.key;
13
+ // /keys returns { key: {…meta}, raw_key: '<64hex>' } — only raw_key is usable.
14
+ let key = (created?.raw_key || '');
15
+ if (!key && typeof created?.key === 'string')
16
+ key = created.key;
14
17
  if (!key)
15
18
  throw new Error('Could not provision a storage key for SquidFS — create one in Settings → API Keys.');
16
- return key;
19
+ return key.startsWith('cb_') ? key : `cb_${key}`;
17
20
  }
18
21
  export default async function fsMount(...args) {
19
22
  const strArgs = args.filter((a) => typeof a === 'string');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squidcloudctl",
3
- "version": "3.0.8",
3
+ "version": "3.0.9",
4
4
  "description": "SquidCloud CLI (squidcloudctl) — encrypted storage, shares and secrets from your terminal",
5
5
  "main": "dist/bin/squidcloud.js",
6
6
  "bin": {