replicas-cli 0.2.27 → 0.2.28

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/dist/index.js +10 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2379,12 +2379,20 @@ async function replicaCreateCommand(name, options) {
2379
2379
  let repository = options.repository;
2380
2380
  let instanceType = options.instanceType;
2381
2381
  let codingAgent = options.agent;
2382
+ if (replicaName && /\s/.test(replicaName)) {
2383
+ console.log(import_chalk16.default.red("Replica name cannot contain spaces."));
2384
+ process.exit(1);
2385
+ }
2382
2386
  if (!replicaName) {
2383
2387
  const response2 = await (0, import_prompts3.default)({
2384
2388
  type: "text",
2385
2389
  name: "name",
2386
2390
  message: "Enter replica name (without spaces):",
2387
- validate: (value) => value.trim() ? true : "Name is required"
2391
+ validate: (value) => {
2392
+ if (!value.trim()) return "Name is required";
2393
+ if (/\s/.test(value)) return "Name cannot contain spaces";
2394
+ return true;
2395
+ }
2388
2396
  });
2389
2397
  if (!response2.name) {
2390
2398
  console.log(import_chalk16.default.yellow("\nCancelled."));
@@ -2653,7 +2661,7 @@ Repositories (${response.repositories.length}):
2653
2661
  }
2654
2662
 
2655
2663
  // src/index.ts
2656
- var CLI_VERSION = "0.2.27";
2664
+ var CLI_VERSION = "0.2.28";
2657
2665
  var program = new import_commander.Command();
2658
2666
  program.name("replicas").description("CLI for managing Replicas workspaces").version(CLI_VERSION);
2659
2667
  program.command("login").description("Authenticate with your Replicas account").action(async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.2.27",
3
+ "version": "0.2.28",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.js",
6
6
  "bin": {