replicas-cli 0.2.26 → 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.
- package/dist/index.js +10 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
#!/usr/bin/env node
|
|
3
2
|
"use strict";
|
|
4
3
|
var __create = Object.create;
|
|
5
4
|
var __defProp = Object.defineProperty;
|
|
@@ -2380,12 +2379,20 @@ async function replicaCreateCommand(name, options) {
|
|
|
2380
2379
|
let repository = options.repository;
|
|
2381
2380
|
let instanceType = options.instanceType;
|
|
2382
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
|
+
}
|
|
2383
2386
|
if (!replicaName) {
|
|
2384
2387
|
const response2 = await (0, import_prompts3.default)({
|
|
2385
2388
|
type: "text",
|
|
2386
2389
|
name: "name",
|
|
2387
2390
|
message: "Enter replica name (without spaces):",
|
|
2388
|
-
validate: (value) =>
|
|
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
|
+
}
|
|
2389
2396
|
});
|
|
2390
2397
|
if (!response2.name) {
|
|
2391
2398
|
console.log(import_chalk16.default.yellow("\nCancelled."));
|
|
@@ -2654,7 +2661,7 @@ Repositories (${response.repositories.length}):
|
|
|
2654
2661
|
}
|
|
2655
2662
|
|
|
2656
2663
|
// src/index.ts
|
|
2657
|
-
var CLI_VERSION = "0.2.
|
|
2664
|
+
var CLI_VERSION = "0.2.28";
|
|
2658
2665
|
var program = new import_commander.Command();
|
|
2659
2666
|
program.name("replicas").description("CLI for managing Replicas workspaces").version(CLI_VERSION);
|
|
2660
2667
|
program.command("login").description("Authenticate with your Replicas account").action(async () => {
|