@floomhq/floom 1.0.44 → 1.0.45
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/cli.js +17 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -105,7 +105,7 @@ function commandUsage() {
|
|
|
105
105
|
${c.dim("Advanced")}
|
|
106
106
|
${c.cyan("library")} Create, browse, and subscribe to libraries
|
|
107
107
|
${c.dim("Alias: lib")}
|
|
108
|
-
${c.cyan("move")} ${c.dim("<slug> --folder <path>")} Place a saved skill in a
|
|
108
|
+
${c.cyan("move")} ${c.dim("<slug> --folder <path>")} Place a saved skill in a relative folder
|
|
109
109
|
${c.cyan("mcp")} Print optional MCP setup guidance
|
|
110
110
|
${c.cyan("sync")} Preview pull of published, saved, and library skills
|
|
111
111
|
${c.dim(`Flags: --target ${TARGET_HINT} (default: claude)`)}
|
|
@@ -163,13 +163,13 @@ function moveUsage() {
|
|
|
163
163
|
process.stdout.write(`
|
|
164
164
|
${c.bold("Usage:")} ${c.cyan(`${CLI_COMMAND} move`)} ${c.dim("<slug> --folder <path> [--tag <tag>]")}
|
|
165
165
|
|
|
166
|
-
${c.bold("Place a saved or subscribed skill in a
|
|
166
|
+
${c.bold("Place a saved or subscribed skill in a portable library folder.")}
|
|
167
167
|
${c.cyan(`${CLI_COMMAND} move support-tone --folder support/tone`)}
|
|
168
168
|
${c.cyan(`${CLI_COMMAND} move support-tone --root`)}
|
|
169
169
|
${c.cyan(`${CLI_COMMAND} move support-tone --folder support --tags support,tone`)}
|
|
170
170
|
|
|
171
171
|
${c.bold("Flags")}
|
|
172
|
-
${c.cyan("--folder <path>")}
|
|
172
|
+
${c.cyan("--folder <path>")} Relative folder path for synced installs
|
|
173
173
|
${c.cyan("--root")} Put the skill at the root
|
|
174
174
|
${c.cyan("--tag <tag>")} Add one tag, repeatable
|
|
175
175
|
${c.cyan("--tags a,b")} Add comma-separated tags
|
|
@@ -589,7 +589,20 @@ function parseDoctorFlags(argv) {
|
|
|
589
589
|
return out;
|
|
590
590
|
}
|
|
591
591
|
function normalizeFolder(value) {
|
|
592
|
-
|
|
592
|
+
const normalized = value.trim().replace(/\\/g, "/").replace(/\/+/g, "/");
|
|
593
|
+
if (normalized === "root" || normalized === "/" || normalized === ".")
|
|
594
|
+
return null;
|
|
595
|
+
if (normalized.startsWith("/")) {
|
|
596
|
+
throw new FloomError("Invalid --folder: use a relative sync folder.", "Floom folders are portable library paths like `support/tone`, not absolute filesystem paths like `/tmp/floom-move-target`.");
|
|
597
|
+
}
|
|
598
|
+
if (normalized === ".." ||
|
|
599
|
+
normalized.startsWith("../") ||
|
|
600
|
+
normalized.includes("/../") ||
|
|
601
|
+
normalized.endsWith("/..")) {
|
|
602
|
+
throw new FloomError("Invalid --folder: path traversal is not allowed.", "Use a relative sync folder like `support/tone`, or use `--root`.");
|
|
603
|
+
}
|
|
604
|
+
const relative = normalized.startsWith("./") ? normalized.slice(2) : normalized;
|
|
605
|
+
return relative || null;
|
|
593
606
|
}
|
|
594
607
|
function parseFolderTagFlags(argv) {
|
|
595
608
|
const out = { tags: [], rest: [] };
|