@mp-lb/forum-cli 0.1.55 → 0.1.56

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 CHANGED
@@ -35031,7 +35031,7 @@ Usage:
35031
35031
  fm file info <filePath> [--store <storeId>] [--token <jwt>]
35032
35032
  fm file move <sourcePath> <destinationPath> [--store <storeId>] [--token <jwt>]
35033
35033
  fm file delete <filePath> [--store <storeId>] [--token <jwt>]
35034
- fm file write <filePath> (<text>|--file|-f <localPath>) [--store <storeId>] [--token <jwt>] [--force]
35034
+ fm file write <filePath> [<text>|--file|-f <localPath>] [--store <storeId>] [--token <jwt>] [--force]
35035
35035
  fm hash <filePath> [--store <storeId>] [--token <jwt>] [--local]
35036
35036
  fm encrypt (<text>|--file|-f <localPath>) [--password <password>] [--token <jwt>]
35037
35037
  fm decrypt (<encrypted-json>|--file|-f <localPath>) [--secret <recipient-secret>] [--password <password>] [--token <jwt>]
@@ -35063,7 +35063,8 @@ Usage:
35063
35063
  fm tree [path-filter] [--store <storeId>] [--token <jwt>]
35064
35064
  fm delete <filePath> [--store <storeId>] [--token <jwt>]
35065
35065
  fm rm <filePath> [--store <storeId>] [--token <jwt>]
35066
- fm write <filename-or-path> (<text>|--file|-f <localPath>) [-s <storeIds>] [--token <jwt>] [--force]
35066
+ fm write <filename-or-path> [<text>|--file|-f <localPath>] [-s <storeIds>] [--token <jwt>] [--force]
35067
+ write and file write read stdin when text and --file are omitted.
35067
35068
 
35068
35069
  fm skills --help
35069
35070
 
@@ -35915,10 +35916,10 @@ var runFileCommand = async (subcommand, args, parsed, client) => {
35915
35916
  }
35916
35917
  if (subcommand === "write") {
35917
35918
  const filePath = args[0];
35918
- const text = await readWriteTextInput(args[1], parsed.inputFilePath);
35919
+ const text = filePath ? await readCommandTextInput(args[1], parsed.inputFilePath) : null;
35919
35920
  if (!filePath || text === null) {
35920
35921
  throw new Error(
35921
- `Missing arguments. Usage: ${commandNames} file write <filePath> <text|--file localPath>`
35922
+ `Missing arguments. Usage: ${commandNames} file write <filePath> [<text>|--file localPath] (or pipe text via stdin)`
35922
35923
  );
35923
35924
  }
35924
35925
  const file2 = await writeTextFile(
@@ -40592,10 +40593,10 @@ var main = async (argv = process.argv.slice(2)) => {
40592
40593
  }
40593
40594
  if (command === "write") {
40594
40595
  const query = rest[0];
40595
- const text = await readWriteTextInput(rest[1], parsed.inputFilePath);
40596
+ const text = query ? await readCommandTextInput(rest[1], parsed.inputFilePath) : null;
40596
40597
  if (!query || text === null) {
40597
40598
  throw new Error(
40598
- `Missing arguments. Usage: ${commandNames} write <filename-or-path> <text|--file localPath>`
40599
+ `Missing arguments. Usage: ${commandNames} write <filename-or-path> [<text>|--file localPath] (or pipe text via stdin)`
40599
40600
  );
40600
40601
  }
40601
40602
  const storeRef = await resolveOptionalSingleStoreRef(