@leeguoo/wrangler-accounts 0.1.2 → 0.1.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.
package/README.md CHANGED
@@ -75,3 +75,4 @@ The profiles directory defaults to:
75
75
 
76
76
  - Profile names accept only letters, numbers, dot, underscore, and dash.
77
77
  - On `use`, the current config is backed up into `__backup-YYYYMMDD-HHMMSS` unless you pass `--no-backup`.
78
+ - `login <name>` overwrites an existing profile with the same name.
@@ -350,8 +350,11 @@ function main() {
350
350
  if (!fs.existsSync(configPath)) {
351
351
  die(`Config file not found after login: ${configPath}`);
352
352
  }
353
- saveProfile(name, configPath, profilesDir, opts.force);
354
- console.log(`Logged in and saved profile '${name}' from ${configPath}`);
353
+ const profileDir = path.join(profilesDir, name);
354
+ const existed = fs.existsSync(profileDir);
355
+ saveProfile(name, configPath, profilesDir, true);
356
+ const note = existed ? " (overwritten)" : "";
357
+ console.log(`Logged in and saved profile '${name}' from ${configPath}${note}`);
355
358
  return;
356
359
  }
357
360
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leeguoo/wrangler-accounts",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Local CLI to manage multiple Cloudflare Wrangler login profiles.",
5
5
  "license": "MIT",
6
6
  "bin": {