Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: discord name regex

Louis Beaumontcb549708ff9c
diff --git a/screenpipe-js/cli/dist/index.js b/screenpipe-js/cli/dist/index.js
index b4a384df9..4b9604f6e 100755
--- a/screenpipe-js/cli/dist/index.js
+++ b/screenpipe-js/cli/dist/index.js
@@ -19979,11 +19979,13 @@ var registerCommand = new Command3().name("register").description("register a ne
if (value.includes(" ")) {
throw new Error("name cannot contain spaces");
}
- if (!/^[a-zA-Z0-9-]+$/.test(value)) {
- throw new Error("name can only contain letters, numbers, and hyphens");
+ if (!/^[a-zA-Z0-9-_.]+$/.test(value)) {
+ throw new Error(
+ "name can only contain letters, numbers, hyphens, underscores, and periods"
+ );
}
- if (value.length > 10) {
- throw new Error("name cannot be longer than 10 characters");
+ if (value.length > 20) {
+ throw new Error("name cannot be longer than 20 characters");
}
return value;
}).option("--paid", "set this flag to create a paid pipe").option(
diff --git a/screenpipe-js/cli/package.json b/screenpipe-js/cli/package.json
index a7a110c63..670f53d70 100644
--- a/screenpipe-js/cli/package.json
+++ b/screenpipe-js/cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@screenpipe/dev",
- "version": "1.1.27",
+ "version": "1.1.29",
"description": "screenpipe development CLI",
"type": "module",
"main": "dist/index.js",
diff --git a/screenpipe-js/cli/src/commands/pipe/register.ts b/screenpipe-js/cli/src/commands/pipe/register.ts
index b4920eb9f..cc313e855 100644
--- a/screenpipe-js/cli/src/commands/pipe/register.ts
+++ b/screenpipe-js/cli/src/commands/pipe/register.ts
@@ -14,9 +14,11 @@ export const registerCommand = new Command()
if (value.includes(" ")) {
throw new Error("name cannot contain spaces");
}
- // Check for valid characters (only letters, hyphens, and numbers)
- if (!/^[a-zA-Z0-9-]+$/.test(value)) {
- throw new Error("name can only contain letters, numbers, and hyphens");
+ // Check for valid characters (letters, numbers, hyphens, underscores, and periods)
+ if (!/^[a-zA-Z0-9-_.]+$/.test(value)) {
+ throw new Error(
+ "name can only contain letters, numbers, hyphens, underscores, and periods"
+ );
}
// Check maximum length
if (value.length > 20) {