@lapius/bin-cli 0.2.2 → 0.2.4

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.
Files changed (3) hide show
  1. package/README.md +1 -0
  2. package/bin/bin +2 -0
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -30,6 +30,7 @@ cat build.log | bin create -f build.log --private
30
30
  bin list # 自分のGist(-u <handle> で他人の公開Gist)
31
31
  bin view <id> # 表示(-f <file> で1ファイルだけ生出力)
32
32
  bin edit <id> main.go --remove old.go -t "新しいタイトル" --public
33
+ bin patch <id> main.go --insert 3 --text "// 追加" # 特定の行だけ追加(--append / --replace 4-6 / --delete 2-3、--from <ファイル>[:A-B]、`-`で標準入力)
33
34
  bin clone <id> [dir] # ファイルをダウンロード
34
35
  bin fork <id> -t "派生版" # コピーして自分の新しいGistを作る(自分のGistも可、公開範囲は元のまま)
35
36
  bin delete <id> # 削除(確認あり、-yで省略)
package/bin/bin CHANGED
@@ -20,6 +20,8 @@ try {
20
20
  // Windows は npm が node 経由の .cmd を作るので置き換えない
21
21
  if (process.platform !== 'win32') {
22
22
  try {
23
+ // npm は bin をシンボリックリンクで置くので置き換えてよい。pnpm は node で起動するシムを作るため、置き換えると壊れる
24
+ if (!fs.lstatSync(process.argv[1]).isSymbolicLink()) throw new Error('not a symlink');
23
25
  const self = fs.realpathSync(__filename);
24
26
  const tmp = `${self}.${process.pid}.tmp`;
25
27
  fs.copyFileSync(bin, tmp);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lapius/bin-cli",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "bin.lapius7.com(LapBin)の CLI クライアント",
5
5
  "keywords": [
6
6
  "cli",
@@ -30,10 +30,10 @@
30
30
  "arm64"
31
31
  ],
32
32
  "optionalDependencies": {
33
- "@lapius/bin-cli-linux-x64": "0.2.2",
34
- "@lapius/bin-cli-linux-arm64": "0.2.2",
35
- "@lapius/bin-cli-darwin-x64": "0.2.2",
36
- "@lapius/bin-cli-darwin-arm64": "0.2.2",
37
- "@lapius/bin-cli-win32-x64": "0.2.2"
33
+ "@lapius/bin-cli-linux-x64": "0.2.4",
34
+ "@lapius/bin-cli-linux-arm64": "0.2.4",
35
+ "@lapius/bin-cli-darwin-x64": "0.2.4",
36
+ "@lapius/bin-cli-darwin-arm64": "0.2.4",
37
+ "@lapius/bin-cli-win32-x64": "0.2.4"
38
38
  }
39
39
  }