New:Socket for Asana Is Now Available.Learn more
Get Started

@briefroom/cli

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@briefroom/cli - npm Package Compare versions

Comparing version
0.2.0
to
0.3.0
+46
-15
dist/commands/deploy.js

@@ -24,2 +24,20 @@ import crypto from 'node:crypto';

const EXCLUDED_SUFFIXES = ['.pem', '.key'];
export function buildDeployMeta(input) {
const meta = { slug: input.slug };
if (input.roomIdFromJson && !input.isNew && !input.hasRoomArg) {
meta.room_id = input.roomIdFromJson;
}
if (input.isNew) {
meta.force_new = true;
}
if (input.expires)
meta.expires = input.expires;
if (input.password !== undefined)
meta.password = input.password;
if (input.visibility !== undefined)
meta.visibility = input.visibility;
if (input.name !== undefined)
meta.name = input.name;
return meta;
}
function shouldExcludeFile(name) {

@@ -103,2 +121,6 @@ if (EXCLUDED_FILES.has(name))

},
name: {
type: 'string',
description: 'Display name of the room (any language, e.g. Japanese). Defaults to slug on first deploy; on redeploy it updates the existing room name when set explicitly.',
},
password: {

@@ -222,2 +244,14 @@ type: 'string',

}
// ===== 4c. --name (判断 #105) =====
// 表示名は日本語含む任意言語可 (API 側 metaSchema は max100・文字種制約なし)。
// trim 後空文字は API 400 に任せず CLI 側で早期に弾く (無意味な空 name の送信を防止)。
let metaName;
if (args.name !== undefined) {
const rawName = typeof args.name === 'string' ? args.name : String(args.name);
const trimmed = rawName.trim();
if (trimmed.length === 0) {
fail('--name must not be empty.');
}
metaName = trimmed;
}
// ===== 5. briefroom.json + slug 解決 =====

@@ -265,17 +299,14 @@ // - `--new` 時は briefroom.json を無視し、auto-generate slug に 4hex suffix を付与して

info('Uploading...', jsonMode);
const meta = { slug };
if (roomIdFromJson && !args.new && !roomArg) {
meta.room_id = roomIdFromJson;
}
if (args.new) {
// force_new=true で server 側の (owner, slug) lookup をスキップさせ、必ず新規 INSERT させる
meta.force_new = true;
}
if (expires)
meta.expires = expires;
// 判断 #88: password の set は文字列、解除は visibility='unlisted' で送る。
if (metaPassword !== undefined)
meta.password = metaPassword;
if (metaVisibility !== undefined)
meta.visibility = metaVisibility;
const meta = buildDeployMeta({
slug,
roomIdFromJson,
isNew: Boolean(args.new),
hasRoomArg: roomArg !== null,
expires,
// 判断 #88: password の set は文字列、解除は visibility='unlisted' で送る。
password: metaPassword,
visibility: metaVisibility,
// 判断 #105: 明示 --name のみ送る (未指定は API 側で既存名維持)。
name: metaName,
});
const formData = new FormData();

@@ -282,0 +313,0 @@ const blob = new Blob([new Uint8Array(zipBuffer)], {

{
"name": "@briefroom/cli",
"version": "0.2.0",
"version": "0.3.0",
"description": "briefroom command-line interface — share AI-generated HTML, get feedback, loop back to your agent.",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -36,2 +36,3 @@ # @briefroom/cli

briefroom deploy ./ --room my-proposal # target a specific room slug
briefroom deploy ./ --name '企画書 v2' # room display name (any language)
briefroom deploy ./ --expires 7d # expiry: 7d (default) | 30d | never

@@ -47,2 +48,8 @@ briefroom deploy ./ --password 's3cret' # password-protect the link (Pro+ plans)

resets a "never" expiry or an existing password.
- `--name` sets the room **display name** shown on the dashboard and in the viewer (1-100 chars,
any language including Japanese). It is not the same thing as `--room`: the room slug is an ascii
identifier used only to decide which existing room to redeploy into, and it never appears in the
share URL (that always ends in an auto-issued random token). Without `--name`, the first deploy
falls back to the slug and a **redeploy keeps the current name**, so a room you renamed on the
dashboard is never silently overwritten by a local value.
- `--password` requires a **Pro+** plan (Free returns an error). It also reads the

@@ -49,0 +56,0 @@ `BRIEFROOM_SHARE_PASSWORD` environment variable, which is preferred over `--password` because it