nadesiko3 3.3.66 → 3.3.69
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/batch/command.txt +84 -84
- package/core/.github/workflows/nodejs.yml +2 -6
- package/core/batch/build_nako_version.nako3 +1 -1
- package/core/command/plugin_snako.mjs +102 -0
- package/core/command/plugin_snako.mts +98 -0
- package/core/command/snako.mjs +5 -3
- package/core/command/snako.mts +6 -4
- package/core/package.json +7 -3
- package/core/src/nako_core_version.mjs +2 -2
- package/core/src/nako_core_version.mts +2 -2
- package/package.json +5 -3
- package/release/_hash.txt +16 -16
- package/release/_script-tags.txt +14 -14
- package/release/nako_gen_async.js +1 -1
- package/release/stats.json +1 -1
- package/release/version.js +1 -1
- package/release/wnako3.js +1 -1
- package/release/wnako3webworker.js +1 -1
- package/src/cnako3mod.mjs +1 -1
- package/src/cnako3mod.mts +1 -1
- package/src/nako_version.mjs +2 -2
- package/src/nako_version.mts +2 -2
- package/src/plugin_node.mjs +4 -2
- package/src/plugin_node.mts +4 -2
- package/test/node/plugin_node_test.mjs +23 -0
- package/core/.github/workflows/super-linter.yml +0 -61
package/batch/command.txt
CHANGED
|
@@ -641,102 +641,102 @@
|
|
|
641
641
|
|
|
642
642
|
■plugin_node(基本プラグイン,cnako,phpnako)
|
|
643
643
|
●ファイル入出力
|
|
644
|
-
| 関数 | 開 | Sを/Sから | ファイルSを開く | ひらく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
645
|
-
| 関数 | 読 | Sを/Sから | ファイルSを開く | よむ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
646
|
-
| 関数 | バイナリ読 | Sを/Sから | ファイルSをバイナリ(Buffer)として開く | ばいなりよむ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
647
|
-
| 関数 | 保存 | SをFへ/Fに | データSをファイルFヘ書き込む | ほぞん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
648
|
-
| 関数 | SJISファイル読 | Sを/Sから | SJIS形式のファイルSを読み込む | SJISふぁいるよむ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
649
|
-
| 関数 | SJISファイル保存 | SをFへ/Fに | SをSJIS形式でファイルFへ書き込む | SJISふぁいるほぞん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
650
|
-
| 関数 | 起動待機 | Sを | シェルコマンドSを起動し実行終了まで待機する | きどうたいき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
651
|
-
| 関数 | 起動 | Sを | シェルコマンドSを起動 | きどう | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
652
|
-
| 関数 | 起動時 | CALLBACKでSを | シェルコマンドSを起動 | きどうしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
653
|
-
| 関数 | ブラウザ起動 | URLを | ブラウザでURLを起動 | ぶらうざきどう | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
654
|
-
| 関数 | ファイル列挙 | Sの/Sを/Sで | パスSのファイル名(フォルダ名)一覧を取得する。ワイルドカード可能。「*.jpg;*.png」など複数の拡張子を指定可能。 | ふぁいるれっきょ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
655
|
-
| 関数 | 全ファイル列挙 | Sの/Sを/Sで | パスS以下の全ファイル名を取得する。ワイルドカード可能。「*.jpg;*.png」のように複数の拡張子を指定可能。 | ぜんふぁいるれっきょ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
656
|
-
| 関数 | 存在 | PATHが/PATHの | ファイルPATHが存在するか確認して返す | そんざい | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
657
|
-
| 関数 | フォルダ存在 | PATHが/PATHの | ディレクトリPATHが存在するか確認して返す | ふぉるだそんざい | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
658
|
-
| 関数 | フォルダ作成 | PATHの/PATHを/PATHに/PATHへ | ディレクトリPATHを作成して返す(再帰的に作成) | ふぉるださくせい | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
659
|
-
| 関数 | ファイルコピー | AからBに/AをBへ | パスAをパスBへファイルコピーする | ふぁいるこぴー | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
660
|
-
| 関数 | ファイルコピー時 | CALLBACKでAからBに/AをBへ | パスAをパスBへファイルコピーしてcallbackを実行 | ふぁいるこぴーしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
661
|
-
| 関数 | ファイル移動 | AからBに/AをBへ | パスAをパスBへ移動する | ふぁいるいどう | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
662
|
-
| 関数 | ファイル移動時 | CALLBACKでAからBに/AをBへ | パスAをパスBへ移動してcallbackを実行 | ふぁいるいどうしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
663
|
-
| 関数 | ファイル削除 | PATHの/PATHを | パスPATHを削除する | ふぁいるさくじょ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
664
|
-
| 関数 | ファイル削除時 | CALLBACKでPATHの/PATHを | パスPATHを削除してcallbackを実行 | ふぁいるさくじょしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
665
|
-
| 関数 | ファイル情報取得 | PATHの/PATHから | パスPATHの情報を調べてオブジェクトで返す | ふぁいるじょうほうしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
666
|
-
| 関数 | ファイルサイズ取得 | PATHの/PATHから | パスPATHのファイルサイズを調べて返す | ふぁいるさいずしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
644
|
+
| 関数 | 開 | Sを/Sから | ファイルSを開く | ひらく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L72
|
|
645
|
+
| 関数 | 読 | Sを/Sから | ファイルSを開く | よむ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L80
|
|
646
|
+
| 関数 | バイナリ読 | Sを/Sから | ファイルSをバイナリ(Buffer)として開く | ばいなりよむ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L88
|
|
647
|
+
| 関数 | 保存 | SをFへ/Fに | データSをファイルFヘ書き込む | ほぞん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L96
|
|
648
|
+
| 関数 | SJISファイル読 | Sを/Sから | SJIS形式のファイルSを読み込む | SJISふぁいるよむ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L109
|
|
649
|
+
| 関数 | SJISファイル保存 | SをFへ/Fに | SをSJIS形式でファイルFへ書き込む | SJISふぁいるほぞん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L120
|
|
650
|
+
| 関数 | 起動待機 | Sを | シェルコマンドSを起動し実行終了まで待機する | きどうたいき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L131
|
|
651
|
+
| 関数 | 起動 | Sを | シェルコマンドSを起動 | きどう | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L140
|
|
652
|
+
| 関数 | 起動時 | CALLBACKでSを | シェルコマンドSを起動 | きどうしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L151
|
|
653
|
+
| 関数 | ブラウザ起動 | URLを | ブラウザでURLを起動 | ぶらうざきどう | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L161
|
|
654
|
+
| 関数 | ファイル列挙 | Sの/Sを/Sで | パスSのファイル名(フォルダ名)一覧を取得する。ワイルドカード可能。「*.jpg;*.png」など複数の拡張子を指定可能。 | ふぁいるれっきょ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L169
|
|
655
|
+
| 関数 | 全ファイル列挙 | Sの/Sを/Sで | パスS以下の全ファイル名を取得する。ワイルドカード可能。「*.jpg;*.png」のように複数の拡張子を指定可能。 | ぜんふぁいるれっきょ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L188
|
|
656
|
+
| 関数 | 存在 | PATHが/PATHの | ファイルPATHが存在するか確認して返す | そんざい | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L234
|
|
657
|
+
| 関数 | フォルダ存在 | PATHが/PATHの | ディレクトリPATHが存在するか確認して返す | ふぉるだそんざい | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L242
|
|
658
|
+
| 関数 | フォルダ作成 | PATHの/PATHを/PATHに/PATHへ | ディレクトリPATHを作成して返す(再帰的に作成) | ふぉるださくせい | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L250
|
|
659
|
+
| 関数 | ファイルコピー | AからBに/AをBへ | パスAをパスBへファイルコピーする | ふぁいるこぴー | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L258
|
|
660
|
+
| 関数 | ファイルコピー時 | CALLBACKでAからBに/AをBへ | パスAをパスBへファイルコピーしてcallbackを実行 | ふぁいるこぴーしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L266
|
|
661
|
+
| 関数 | ファイル移動 | AからBに/AをBへ | パスAをパスBへ移動する | ふぁいるいどう | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L278
|
|
662
|
+
| 関数 | ファイル移動時 | CALLBACKでAからBに/AをBへ | パスAをパスBへ移動してcallbackを実行 | ふぁいるいどうしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L286
|
|
663
|
+
| 関数 | ファイル削除 | PATHの/PATHを | パスPATHを削除する | ふぁいるさくじょ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L298
|
|
664
|
+
| 関数 | ファイル削除時 | CALLBACKでPATHの/PATHを | パスPATHを削除してcallbackを実行 | ふぁいるさくじょしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L306
|
|
665
|
+
| 関数 | ファイル情報取得 | PATHの/PATHから | パスPATHの情報を調べてオブジェクトで返す | ふぁいるじょうほうしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L318
|
|
666
|
+
| 関数 | ファイルサイズ取得 | PATHの/PATHから | パスPATHのファイルサイズを調べて返す | ふぁいるさいずしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L326
|
|
667
667
|
●パス操作
|
|
668
|
-
| 関数 | ファイル名抽出 | Sから/Sの | フルパスのファイル名Sからファイル名部分を抽出して返す | ふぁいるめいちゅうしゅつ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
669
|
-
| 関数 | パス抽出 | Sから/Sの | ファイル名Sからパス部分を抽出して返す | ぱすちゅうしゅつ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
670
|
-
| 関数 | 絶対パス変換 | Aを/Aの | 相対パスから絶対パスに変換して返す | ぜったいぱすへんかん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
671
|
-
| 関数 | 相対パス展開 | AをBで | ファイル名AからパスBを展開して返す | そうたいぱすてんかい | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
668
|
+
| 関数 | ファイル名抽出 | Sから/Sの | フルパスのファイル名Sからファイル名部分を抽出して返す | ふぁいるめいちゅうしゅつ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L337
|
|
669
|
+
| 関数 | パス抽出 | Sから/Sの | ファイル名Sからパス部分を抽出して返す | ぱすちゅうしゅつ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L345
|
|
670
|
+
| 関数 | 絶対パス変換 | Aを/Aの | 相対パスから絶対パスに変換して返す | ぜったいぱすへんかん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L353
|
|
671
|
+
| 関数 | 相対パス展開 | AをBで | ファイル名AからパスBを展開して返す | そうたいぱすてんかい | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L361
|
|
672
672
|
●フォルダ取得
|
|
673
|
-
| 関数 | カレントディレクトリ取得 | | カレントディレクトリを返す | かれんとでぃれくとりしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
674
|
-
| 関数 | カレントディレクトリ変更 | DIRに/DIRへ | カレントディレクトリをDIRに変更する | かれんとでぃれくとりへんこう | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
675
|
-
| 関数 | 作業フォルダ取得 | | カレントディレクトリを返す | さぎょうふぉるだしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
676
|
-
| 関数 | 作業フォルダ変更 | DIRに/DIRへ | カレントディレクトリをDIRに変更する | さぎょうふぉるだへんこう | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
677
|
-
| 関数 | ホームディレクトリ取得 | | ホームディレクトリを取得して返す | ほーむでぃれくとりしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
678
|
-
| 関数 | デスクトップ | | デスクトップパスを取得して返す | ですくとっぷ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
679
|
-
| 関数 | マイドキュメント | | マイドキュメントのパスを取得して返す | まいどきゅめんと | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
680
|
-
| 定数 | 母艦パス | | '' | ぼかんぱす | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
681
|
-
| 関数 | 母艦パス取得 | | スクリプトのあるディレクトリを返す | ぼかんぱすしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
682
|
-
| 関数 | テンポラリフォルダ | | テンポラリフォルダのパスを取得して返す | てんぽらりふぉるだ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
683
|
-
| 関数 | 一時フォルダ作成 | DIRに/DIRへ | 指定のフォルダに作業用の一時フォルダを作成して取得して返す | いちじふぉるださくせい | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
673
|
+
| 関数 | カレントディレクトリ取得 | | カレントディレクトリを返す | かれんとでぃれくとりしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L370
|
|
674
|
+
| 関数 | カレントディレクトリ変更 | DIRに/DIRへ | カレントディレクトリをDIRに変更する | かれんとでぃれくとりへんこう | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L379
|
|
675
|
+
| 関数 | 作業フォルダ取得 | | カレントディレクトリを返す | さぎょうふぉるだしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L388
|
|
676
|
+
| 関数 | 作業フォルダ変更 | DIRに/DIRへ | カレントディレクトリをDIRに変更する | さぎょうふぉるだへんこう | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L397
|
|
677
|
+
| 関数 | ホームディレクトリ取得 | | ホームディレクトリを取得して返す | ほーむでぃれくとりしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L406
|
|
678
|
+
| 関数 | デスクトップ | | デスクトップパスを取得して返す | ですくとっぷ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L414
|
|
679
|
+
| 関数 | マイドキュメント | | マイドキュメントのパスを取得して返す | まいどきゅめんと | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L423
|
|
680
|
+
| 定数 | 母艦パス | | '' | ぼかんぱす | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L428
|
|
681
|
+
| 関数 | 母艦パス取得 | | スクリプトのあるディレクトリを返す | ぼかんぱすしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L433
|
|
682
|
+
| 関数 | テンポラリフォルダ | | テンポラリフォルダのパスを取得して返す | てんぽらりふぉるだ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L441
|
|
683
|
+
| 関数 | 一時フォルダ作成 | DIRに/DIRへ | 指定のフォルダに作業用の一時フォルダを作成して取得して返す | いちじふぉるださくせい | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L450
|
|
684
684
|
●環境変数
|
|
685
|
-
| 関数 | 環境変数取得 | Sの | 環境変数Sを返す | かんきょうへんすうしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
686
|
-
| 関数 | 環境変数一覧取得 | | 環境変数の一覧を返す | かんきょうへんすういちらんしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
685
|
+
| 関数 | 環境変数取得 | Sの | 環境変数Sを返す | かんきょうへんすうしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L463
|
|
686
|
+
| 関数 | 環境変数一覧取得 | | 環境変数の一覧を返す | かんきょうへんすういちらんしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L471
|
|
687
687
|
●圧縮・解凍
|
|
688
|
-
| 定数 | 圧縮解凍ツールパス | | '7z' | あっしゅくかいとうつーるぱす | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
689
|
-
| 関数 | 圧縮解凍ツールパス変更 | Vに/Vへ | 圧縮解凍に使うツールを取得変更する | あっしゅくかいとうつーるぱすへんこう | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
690
|
-
| 関数 | 解凍 | AをBに/AからBへ | (v1非互換)ZIPファイルAをBに解凍(実行には7-zipが必要-https://goo.gl/LmKswH) | かいとう | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
691
|
-
| 関数 | 解凍時 | CALLBACKでAをBに/AからBへ | 解凍処理を行い、処理が完了したときにcallback処理を実行 | かいとうしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
692
|
-
| 関数 | 圧縮 | AをBに/AからBへ | (v1非互換)ファイルAをBにZIP圧縮(実行には7-zipが必要-https://goo.gl/LmKswH) | あっしゅく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
693
|
-
| 関数 | 圧縮時 | CALLBACKでAをBに/AからBへ | 圧縮処理を行い完了したときにcallback処理を指定 | あっしゅくしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
688
|
+
| 定数 | 圧縮解凍ツールパス | | '7z' | あっしゅくかいとうつーるぱす | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L476
|
|
689
|
+
| 関数 | 圧縮解凍ツールパス変更 | Vに/Vへ | 圧縮解凍に使うツールを取得変更する | あっしゅくかいとうつーるぱすへんこう | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L481
|
|
690
|
+
| 関数 | 解凍 | AをBに/AからBへ | (v1非互換)ZIPファイルAをBに解凍(実行には7-zipが必要-https://goo.gl/LmKswH) | かいとう | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L490
|
|
691
|
+
| 関数 | 解凍時 | CALLBACKでAをBに/AからBへ | 解凍処理を行い、処理が完了したときにcallback処理を実行 | かいとうしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L503
|
|
692
|
+
| 関数 | 圧縮 | AをBに/AからBへ | (v1非互換)ファイルAをBにZIP圧縮(実行には7-zipが必要-https://goo.gl/LmKswH) | あっしゅく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L519
|
|
693
|
+
| 関数 | 圧縮時 | CALLBACKでAをBに/AからBへ | 圧縮処理を行い完了したときにcallback処理を指定 | あっしゅくしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L532
|
|
694
694
|
●Nodeプロセス
|
|
695
|
-
| 関数 | 終 | | Nodeでプログラム実行を強制終了する | おわる | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
696
|
-
| 関数 | 強制終了時 | FUNCを | Nodeでctrl+cでプログラムの実行が終了した時FUNCを実行する。もしFUNCが偽を返すと終了しない。非同期処理のとき動作する(#1010) | きょうせいしゅうりょうしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
697
|
-
| 関数 | 終了 | | Nodeでプログラム実行を強制終了する | しゅうりょう | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
698
|
-
| 関数 | OS取得 | | OSプラットフォームを返す(darwin/win32/linux) | OSしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
699
|
-
| 関数 | OSアーキテクチャ取得 | | OSアーキテクチャを返す | OSあーきてくちゃしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
695
|
+
| 関数 | 終 | | Nodeでプログラム実行を強制終了する | おわる | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L549
|
|
696
|
+
| 関数 | 強制終了時 | FUNCを | Nodeでctrl+cでプログラムの実行が終了した時FUNCを実行する。もしFUNCが偽を返すと終了しない。非同期処理のとき動作する(#1010) | きょうせいしゅうりょうしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L558
|
|
697
|
+
| 関数 | 終了 | | Nodeでプログラム実行を強制終了する | しゅうりょう | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L573
|
|
698
|
+
| 関数 | OS取得 | | OSプラットフォームを返す(darwin/win32/linux) | OSしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L582
|
|
699
|
+
| 関数 | OSアーキテクチャ取得 | | OSアーキテクチャを返す | OSあーきてくちゃしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L590
|
|
700
700
|
●コマンドラインと標準入出力
|
|
701
|
-
| 定数 | コマンドライン | | '' | こまんどらいん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
702
|
-
| 定数 | ナデシコランタイム | | '' | なでしこらんたいむ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
703
|
-
| 定数 | ナデシコランタイムパス | | '' | なでしこらんたいむぱす | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
704
|
-
| 関数 | 標準入力取得時 | CALLBACKを | 標準入力を一行取得した時に、無名関数(あるいは、文字列で関数名を指定)F(s: string)を実行する | ひょうじゅんにゅうりょくしゅとくしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
705
|
-
| 関数 | 尋 | MSGと/MSGを | 標準入力を一行取得する | たずねる | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
701
|
+
| 定数 | コマンドライン | | '' | こまんどらいん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L595
|
|
702
|
+
| 定数 | ナデシコランタイム | | '' | なでしこらんたいむ | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L596
|
|
703
|
+
| 定数 | ナデシコランタイムパス | | '' | なでしこらんたいむぱす | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L597
|
|
704
|
+
| 関数 | 標準入力取得時 | CALLBACKを | 標準入力を一行取得した時に、無名関数(あるいは、文字列で関数名を指定)F(s: string)を実行する | ひょうじゅんにゅうりょくしゅとくしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L602
|
|
705
|
+
| 関数 | 尋 | MSGと/MSGを | 標準入力を一行取得する | たずねる | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L617
|
|
706
706
|
●テスト
|
|
707
|
-
| 関数 | ASSERT等 | AとBが | mochaによるテストで、ASSERTでAとBが正しいことを報告する | ASSERTひとしい | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
707
|
+
| 関数 | ASSERT等 | AとBが | mochaによるテストで、ASSERTでAとBが正しいことを報告する | ASSERTひとしい | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L637
|
|
708
708
|
●ネットワーク
|
|
709
|
-
| 関数 | 自分IPアドレス取得 | | ネットワークアダプターからIPアドレス(IPv4)を取得して配列で返す | じぶんIPあどれすしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
710
|
-
| 関数 | 自分IPV6アドレス取得 | | ネットワークアダプターからIPアドレス(IPv6)を取得して配列で返す | じぶんIPV6あどれすしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
709
|
+
| 関数 | 自分IPアドレス取得 | | ネットワークアダプターからIPアドレス(IPv4)を取得して配列で返す | じぶんIPあどれすしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L646
|
|
710
|
+
| 関数 | 自分IPV6アドレス取得 | | ネットワークアダプターからIPアドレス(IPv6)を取得して配列で返す | じぶんIPV6あどれすしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L668
|
|
711
711
|
●Ajax
|
|
712
|
-
| 関数 | AJAX送信時 | CALLBACKのURLまで/URLへ/URLに | 非同期通信(Ajax)でURLにデータを送信し、成功するとcallbackが実行される。その際『対象』にデータが代入される。 | AJAXそうしんしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
713
|
-
| 関数 | AJAX受信時 | CALLBACKでURLから/URLを | 非同期通信(Ajax)でURLにデータを送信し、成功するとcallbackが実行される。その際『対象』にデータが代入される。 | AJAXそうしんしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
714
|
-
| 関数 | GET送信時 | CALLBACKのURLまで/URLへ/URLに | 非同期通信(Ajax)でURLにデータを送信し、成功するとcallbackが実行される。その際『対象』にデータが代入される。 | GETそうしんしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
715
|
-
| 関数 | POST送信時 | CALLBACKのURLまでPARAMSを/URLへ/URLに | AjaxでURLにPARAMSをPOST送信し『対象』にデータを設定 | POSTそうしんしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
716
|
-
| 関数 | POSTフォーム送信時 | CALLBACKのURLまでPARAMSを/URLへ/URLに | AjaxでURLにPARAMSをフォームとしてPOST送信し『対象』にデータを設定 | POSTふぉーむそうしんしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
717
|
-
| 関数 | AJAX失敗時 | CALLBACKの | Ajax命令でエラーが起きたとき | AJAXえらーしっぱいしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
718
|
-
| 定数 | AJAXオプション | | '' | Ajax関連のオプションを指定 | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
719
|
-
| 関数 | AJAXオプション設定 | OPTIONに/OPTIONへ/OPTIONと | Ajax命令でオプションを設定 | AJAXおぷしょんせってい | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
720
|
-
| 関数 | AJAX保障送信 | URLまで/URLへ/URLに | 非同期通信(Ajax)でURLにデータの送信を開始する非同期処理オブジェクト(Promise)を作成する。 | AJAXほしょうそうしん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
721
|
-
| 関数 | HTTP保障取得 | URLの/URLから/URLを | 非同期通信(Ajax)でURLにデータの送信を開始する非同期処理オブジェクト(Promise)を作成する。 | HTTPほしょうしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
722
|
-
| 関数 | GET保障送信 | URLまで/URLへ/URLに | 非同期通信(Ajax)でURLにデータの送信を開始する非同期処理オブジェクト(Promise)を作成する。 | GETほしょうそうしん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
723
|
-
| 関数 | POST保障送信 | URLまでPARAMSを/URLへ/URLに | 非同期通信(Ajax)でURLにPARAMSをPOST送信を開始する非同期処理オブジェクト(Promise)を作成する。 | POSTほしょうそうしん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
724
|
-
| 関数 | POSTフォーム保障送信 | URLまでPARAMSを/URLへ/URLに | 非同期通信(Ajax)でURLにPARAMSをフォームとしてPOST送信を開始する非同期処理オブジェクト(Promise)を作成する。 | POSTふぉーむほしょうそうしん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
725
|
-
| 関数 | AJAX内容取得 | RESからTYPEで | 非同期通信(Ajax)の応答から内容を指定した形式で取り出すための非同期処理オブジェクト(Promise)を返す。 | AJAXないようしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
726
|
-
| 関数 | AJAX受信 | URLから/URLを | 「!非同期モード」で非同期通信(Ajax)でURLからデータを受信する。『AJAXオプション』を指定できる。結果は変数『対象』に入る | AJAXじゅしん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
712
|
+
| 関数 | AJAX送信時 | CALLBACKのURLまで/URLへ/URLに | 非同期通信(Ajax)でURLにデータを送信し、成功するとcallbackが実行される。その際『対象』にデータが代入される。 | AJAXそうしんしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L688
|
|
713
|
+
| 関数 | AJAX受信時 | CALLBACKでURLから/URLを | 非同期通信(Ajax)でURLにデータを送信し、成功するとcallbackが実行される。その際『対象』にデータが代入される。 | AJAXそうしんしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L707
|
|
714
|
+
| 関数 | GET送信時 | CALLBACKのURLまで/URLへ/URLに | 非同期通信(Ajax)でURLにデータを送信し、成功するとcallbackが実行される。その際『対象』にデータが代入される。 | GETそうしんしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L716
|
|
715
|
+
| 関数 | POST送信時 | CALLBACKのURLまでPARAMSを/URLへ/URLに | AjaxでURLにPARAMSをPOST送信し『対象』にデータを設定 | POSTそうしんしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L725
|
|
716
|
+
| 関数 | POSTフォーム送信時 | CALLBACKのURLまでPARAMSを/URLへ/URLに | AjaxでURLにPARAMSをフォームとしてPOST送信し『対象』にデータを設定 | POSTふぉーむそうしんしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L754
|
|
717
|
+
| 関数 | AJAX失敗時 | CALLBACKの | Ajax命令でエラーが起きたとき | AJAXえらーしっぱいしたとき | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L779
|
|
718
|
+
| 定数 | AJAXオプション | | '' | Ajax関連のオプションを指定 | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L783
|
|
719
|
+
| 関数 | AJAXオプション設定 | OPTIONに/OPTIONへ/OPTIONと | Ajax命令でオプションを設定 | AJAXおぷしょんせってい | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L788
|
|
720
|
+
| 関数 | AJAX保障送信 | URLまで/URLへ/URLに | 非同期通信(Ajax)でURLにデータの送信を開始する非同期処理オブジェクト(Promise)を作成する。 | AJAXほしょうそうしん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L797
|
|
721
|
+
| 関数 | HTTP保障取得 | URLの/URLから/URLを | 非同期通信(Ajax)でURLにデータの送信を開始する非同期処理オブジェクト(Promise)を作成する。 | HTTPほしょうしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L808
|
|
722
|
+
| 関数 | GET保障送信 | URLまで/URLへ/URLに | 非同期通信(Ajax)でURLにデータの送信を開始する非同期処理オブジェクト(Promise)を作成する。 | GETほしょうそうしん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L817
|
|
723
|
+
| 関数 | POST保障送信 | URLまでPARAMSを/URLへ/URLに | 非同期通信(Ajax)でURLにPARAMSをPOST送信を開始する非同期処理オブジェクト(Promise)を作成する。 | POSTほしょうそうしん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L826
|
|
724
|
+
| 関数 | POSTフォーム保障送信 | URLまでPARAMSを/URLへ/URLに | 非同期通信(Ajax)でURLにPARAMSをフォームとしてPOST送信を開始する非同期処理オブジェクト(Promise)を作成する。 | POSTふぉーむほしょうそうしん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L849
|
|
725
|
+
| 関数 | AJAX内容取得 | RESからTYPEで | 非同期通信(Ajax)の応答から内容を指定した形式で取り出すための非同期処理オブジェクト(Promise)を返す。 | AJAXないようしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L865
|
|
726
|
+
| 関数 | AJAX受信 | URLから/URLを | 「!非同期モード」で非同期通信(Ajax)でURLからデータを受信する。『AJAXオプション』を指定できる。結果は変数『対象』に入る | AJAXじゅしん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L890
|
|
727
727
|
●新AJAX
|
|
728
|
-
| 関数 | AJAXテキスト取得 | URLから | AJAXでURLにアクセスしテキスト形式で結果を得る。送信時AJAXオプションの値を参照。 | AJAXてきすとしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
729
|
-
| 関数 | AJAX_JSON取得 | URLから | AJAXでURLにアクセスしJSONの結果を得て、送信時AJAXオプションの値を参照。 | AJAX_JSONしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
730
|
-
| 関数 | AJAXバイナリ取得 | URLから | AJAXでURLにアクセスしバイナリ(arrayBuffer)形式で結果を得る。送信時AJAXオプションの値を参照。 | AJAXばいなりしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
728
|
+
| 関数 | AJAXテキスト取得 | URLから | AJAXでURLにアクセスしテキスト形式で結果を得る。送信時AJAXオプションの値を参照。 | AJAXてきすとしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L920
|
|
729
|
+
| 関数 | AJAX_JSON取得 | URLから | AJAXでURLにアクセスしJSONの結果を得て、送信時AJAXオプションの値を参照。 | AJAX_JSONしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L934
|
|
730
|
+
| 関数 | AJAXバイナリ取得 | URLから | AJAXでURLにアクセスしバイナリ(arrayBuffer)形式で結果を得る。送信時AJAXオプションの値を参照。 | AJAXばいなりしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L948
|
|
731
731
|
●文字コード
|
|
732
|
-
| 関数 | 文字コード変換サポート判定 | CODEの/CODEを | 文字コードCODEをサポートしているか確認 | もじこーどさぽーとはんてい | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
733
|
-
| 関数 | SJIS変換 | STRに/STRへ/STRを | (v1非互換)文字列をShift_JISのバイナリバッファに変換 | SJISへんかん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
734
|
-
| 関数 | SJIS取得 | BUFから/BUFを/BUFで | Shift_JISのバイナリバッファを文字列に変換 | SJISしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
735
|
-
| 関数 | エンコーディング変換 | SをCODEへ/CODEで | 文字列SをCODEへ変換してバイナリバッファを返す | えんこーでぃんぐへんかん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
736
|
-
| 関数 | エンコーディング取得 | BUFをCODEから/CODEで | バイナリバッファBUFをCODEから変換して返す | えんこーでぃんぐしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
732
|
+
| 関数 | 文字コード変換サポート判定 | CODEの/CODEを | 文字コードCODEをサポートしているか確認 | もじこーどさぽーとはんてい | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L962
|
|
733
|
+
| 関数 | SJIS変換 | STRに/STRへ/STRを | (v1非互換)文字列をShift_JISのバイナリバッファに変換 | SJISへんかん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L970
|
|
734
|
+
| 関数 | SJIS取得 | BUFから/BUFを/BUFで | Shift_JISのバイナリバッファを文字列に変換 | SJISしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L979
|
|
735
|
+
| 関数 | エンコーディング変換 | SをCODEへ/CODEで | 文字列SをCODEへ変換してバイナリバッファを返す | えんこーでぃんぐへんかん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L988
|
|
736
|
+
| 関数 | エンコーディング取得 | BUFをCODEから/CODEで | バイナリバッファBUFをCODEから変換して返す | えんこーでぃんぐしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L997
|
|
737
737
|
●ハッシュ関数
|
|
738
|
-
| 関数 | ハッシュ関数一覧取得 | | 利用可能なハッシュ関数の一覧を返す | はっしゅかんすういちらんしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
739
|
-
| 関数 | ハッシュ値計算 | SをALGのENCで | データSをアルゴリズムALG(sha256/sha512/md5)のエンコーディングENC(hex/base64)でハッシュ値を計算して返す | はっしゅちけいさん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#
|
|
738
|
+
| 関数 | ハッシュ関数一覧取得 | | 利用可能なハッシュ関数の一覧を返す | はっしゅかんすういちらんしゅとく | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L1007
|
|
739
|
+
| 関数 | ハッシュ値計算 | SをALGのENCで | データSをアルゴリズムALG(sha256/sha512/md5)のエンコーディングENC(hex/base64)でハッシュ値を計算して返す | はっしゅちけいさん | https://github.com/kujirahand/nadesiko3/tree/master/src/plugin_node.mts#L1015
|
|
740
740
|
|
|
741
741
|
|
|
742
742
|
■plugin_httpserver(基本プラグイン,cnako)
|
|
@@ -27,13 +27,9 @@ jobs:
|
|
|
27
27
|
|
|
28
28
|
steps:
|
|
29
29
|
- name: Checkout
|
|
30
|
-
uses: actions/checkout@
|
|
31
|
-
with:
|
|
32
|
-
fetch-depth: 0
|
|
33
|
-
token: ${{ secrets.SUBMODULE_TOKEN }}
|
|
34
|
-
submodules: recursive
|
|
30
|
+
uses: actions/checkout@v3
|
|
35
31
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
36
|
-
uses: actions/setup-node@
|
|
32
|
+
uses: actions/setup-node@v3
|
|
37
33
|
with:
|
|
38
34
|
node-version: ${{ matrix.node-version }}
|
|
39
35
|
# 各種ライブラリをインストール
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ●説明
|
|
6
6
|
# package.json の内容を読んで ./src/nako_core_version.mts を生成
|
|
7
7
|
# -----------------------------------------------------
|
|
8
|
-
|
|
8
|
+
母艦パスからパス抽出して、基本パスに代入。
|
|
9
9
|
「{基本パス}/package.json」を読んでJSONデコードして、Pに代入。
|
|
10
10
|
VER=P@"version"
|
|
11
11
|
定数[MAJOR,MINOR,PATCH]=(VERを「.」で区切る)
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* file: plugin_snako.js
|
|
3
|
+
* 簡単なファイル読み書きのプラグイン
|
|
4
|
+
*/
|
|
5
|
+
import fs from 'fs';
|
|
6
|
+
import { execSync } from 'child_process';
|
|
7
|
+
import path from 'path';
|
|
8
|
+
export default {
|
|
9
|
+
'初期化': {
|
|
10
|
+
type: 'func',
|
|
11
|
+
josi: [],
|
|
12
|
+
pure: true,
|
|
13
|
+
fn: function (sys) {
|
|
14
|
+
sys.__getBokanPath = () => {
|
|
15
|
+
let nakofile;
|
|
16
|
+
const cmd = path.basename(process.argv[1]);
|
|
17
|
+
if (cmd.indexOf('snako') < 0) {
|
|
18
|
+
nakofile = process.argv[1];
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
nakofile = process.argv[2];
|
|
22
|
+
}
|
|
23
|
+
return path.dirname(path.resolve(nakofile));
|
|
24
|
+
};
|
|
25
|
+
sys.__v0['コマンドライン'] = process.argv;
|
|
26
|
+
sys.__v0['ナデシコランタイムパス'] = process.argv[0];
|
|
27
|
+
sys.__v0['ナデシコランタイム'] = path.basename(process.argv[0]);
|
|
28
|
+
sys.__v0['母艦パス'] = sys.__getBokanPath();
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
// @SNAKO
|
|
32
|
+
'コマンドライン': { type: 'const', value: '' },
|
|
33
|
+
'ナデシコランタイムパス': { type: 'const', value: '' },
|
|
34
|
+
'ナデシコランタイム': { type: 'const', value: '' },
|
|
35
|
+
'母艦パス': { type: 'const', value: '' },
|
|
36
|
+
'読': {
|
|
37
|
+
type: 'func',
|
|
38
|
+
josi: [['を', 'から']],
|
|
39
|
+
pure: true,
|
|
40
|
+
fn: function (f) {
|
|
41
|
+
return '' + fs.readFileSync(f);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
'開': {
|
|
45
|
+
type: 'func',
|
|
46
|
+
josi: [['を', 'から']],
|
|
47
|
+
pure: true,
|
|
48
|
+
fn: function (f) {
|
|
49
|
+
return '' + fs.readFileSync(f);
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
'保存': {
|
|
53
|
+
type: 'func',
|
|
54
|
+
josi: [['を'], ['に', 'へ']],
|
|
55
|
+
pure: true,
|
|
56
|
+
fn: function (s, f) {
|
|
57
|
+
fs.writeFileSync(f, s, 'utf-8');
|
|
58
|
+
},
|
|
59
|
+
return_none: true
|
|
60
|
+
},
|
|
61
|
+
'起動待機': {
|
|
62
|
+
type: 'func',
|
|
63
|
+
josi: [['を']],
|
|
64
|
+
pure: true,
|
|
65
|
+
fn: function (s) {
|
|
66
|
+
const r = execSync(s);
|
|
67
|
+
return r.toString();
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
'ファイル名抽出': {
|
|
71
|
+
type: 'func',
|
|
72
|
+
josi: [['から', 'の']],
|
|
73
|
+
pure: true,
|
|
74
|
+
fn: function (s) {
|
|
75
|
+
return path.basename(s);
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
'パス抽出': {
|
|
79
|
+
type: 'func',
|
|
80
|
+
josi: [['から', 'の']],
|
|
81
|
+
pure: true,
|
|
82
|
+
fn: function (s) {
|
|
83
|
+
return path.dirname(s);
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
'絶対パス変換': {
|
|
87
|
+
type: 'func',
|
|
88
|
+
josi: [['を', 'の']],
|
|
89
|
+
pure: true,
|
|
90
|
+
fn: function (a) {
|
|
91
|
+
return path.resolve(a);
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
'相対パス展開': {
|
|
95
|
+
type: 'func',
|
|
96
|
+
josi: [['を'], ['で']],
|
|
97
|
+
pure: true,
|
|
98
|
+
fn: function (a, b) {
|
|
99
|
+
return path.resolve(path.join(a, b));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* file: plugin_snako.js
|
|
3
|
+
* 簡単なファイル読み書きのプラグイン
|
|
4
|
+
*/
|
|
5
|
+
import fs from 'fs'
|
|
6
|
+
import { execSync } from 'child_process'
|
|
7
|
+
import path from 'path'
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
'初期化': {
|
|
11
|
+
type: 'func',
|
|
12
|
+
josi: [],
|
|
13
|
+
pure: true,
|
|
14
|
+
fn: function (sys: any) {
|
|
15
|
+
sys.__getBokanPath = () => {
|
|
16
|
+
let nakofile
|
|
17
|
+
const cmd = path.basename(process.argv[1])
|
|
18
|
+
if (cmd.indexOf('snako') < 0) { nakofile = process.argv[1] } else { nakofile = process.argv[2] }
|
|
19
|
+
return path.dirname(path.resolve(nakofile))
|
|
20
|
+
}
|
|
21
|
+
sys.__v0['コマンドライン'] = process.argv
|
|
22
|
+
sys.__v0['ナデシコランタイムパス'] = process.argv[0]
|
|
23
|
+
sys.__v0['ナデシコランタイム'] = path.basename(process.argv[0])
|
|
24
|
+
sys.__v0['母艦パス'] = sys.__getBokanPath()
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
// @SNAKO
|
|
28
|
+
'コマンドライン': { type: 'const', value: '' },
|
|
29
|
+
'ナデシコランタイムパス': { type: 'const', value: '' },
|
|
30
|
+
'ナデシコランタイム': { type: 'const', value: '' },
|
|
31
|
+
'母艦パス': { type: 'const', value: '' },
|
|
32
|
+
'読': { // @ ファイルFの内容を読む // @よむ
|
|
33
|
+
type: 'func',
|
|
34
|
+
josi: [['を', 'から']],
|
|
35
|
+
pure: true,
|
|
36
|
+
fn: function (f: string): string {
|
|
37
|
+
return '' + fs.readFileSync(f)
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
'開': { // @ ファイルFの内容を読む // @ひらく
|
|
41
|
+
type: 'func',
|
|
42
|
+
josi: [['を', 'から']],
|
|
43
|
+
pure: true,
|
|
44
|
+
fn: function (f: string): string {
|
|
45
|
+
return '' + fs.readFileSync(f)
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
'保存': { // @ 文字列SをファイルFに保存 // @ほぞん
|
|
49
|
+
type: 'func',
|
|
50
|
+
josi: [['を'], ['に', 'へ']],
|
|
51
|
+
pure: true,
|
|
52
|
+
fn: function (s: string, f: string): void {
|
|
53
|
+
fs.writeFileSync(f, s, 'utf-8')
|
|
54
|
+
},
|
|
55
|
+
return_none: true
|
|
56
|
+
},
|
|
57
|
+
'起動待機': { // @シェルコマンドSを起動し実行終了まで待機する // @きどうたいき
|
|
58
|
+
type: 'func',
|
|
59
|
+
josi: [['を']],
|
|
60
|
+
pure: true,
|
|
61
|
+
fn: function (s: string) {
|
|
62
|
+
const r = execSync(s)
|
|
63
|
+
return r.toString()
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
'ファイル名抽出': { // @フルパスのファイル名Sからファイル名部分を抽出して返す // @ふぁいるめいちゅうしゅつ
|
|
67
|
+
type: 'func',
|
|
68
|
+
josi: [['から', 'の']],
|
|
69
|
+
pure: true,
|
|
70
|
+
fn: function (s: string) {
|
|
71
|
+
return path.basename(s)
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
'パス抽出': { // @ファイル名Sからパス部分を抽出して返す // @ぱすちゅうしゅつ
|
|
75
|
+
type: 'func',
|
|
76
|
+
josi: [['から', 'の']],
|
|
77
|
+
pure: true,
|
|
78
|
+
fn: function (s: string) {
|
|
79
|
+
return path.dirname(s)
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
'絶対パス変換': { // @相対パスから絶対パスに変換して返す // @ぜったいぱすへんかん
|
|
83
|
+
type: 'func',
|
|
84
|
+
josi: [['を', 'の']],
|
|
85
|
+
pure: true,
|
|
86
|
+
fn: function (a: string) {
|
|
87
|
+
return path.resolve(a)
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
'相対パス展開': { // @ファイル名AからパスBを展開して返す // @そうたいぱすてんかい
|
|
91
|
+
type: 'func',
|
|
92
|
+
josi: [['を'], ['で']],
|
|
93
|
+
pure: true,
|
|
94
|
+
fn: function (a: string, b: string) {
|
|
95
|
+
return path.resolve(path.join(a, b))
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
package/core/command/snako.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import path from 'path';
|
|
|
4
4
|
import com from '../index.mjs';
|
|
5
5
|
import * as url from 'url';
|
|
6
6
|
import { NakoGenOptions } from '../src/nako_gen.mjs';
|
|
7
|
+
import PluginSnako from './plugin_snako.mjs';
|
|
7
8
|
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
|
|
8
9
|
/** コマンドラインオプション */
|
|
9
10
|
class CommandOptions {
|
|
@@ -17,7 +18,7 @@ class CommandOptions {
|
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
/** メイン処理 */
|
|
20
|
-
function main(argvOrg) {
|
|
21
|
+
async function main(argvOrg) {
|
|
21
22
|
// コマンドラインオプションを確認
|
|
22
23
|
const argv = [...argvOrg];
|
|
23
24
|
const opt = new CommandOptions();
|
|
@@ -43,6 +44,7 @@ function main(argvOrg) {
|
|
|
43
44
|
}
|
|
44
45
|
// なでしこのコンパイラを生成
|
|
45
46
|
const nako = new com.NakoCompiler();
|
|
47
|
+
nako.addPluginObject('PluginSnako', PluginSnako);
|
|
46
48
|
// 実行前にイベントを挟みたいとき
|
|
47
49
|
nako.addListener('beforeRun', (g) => {
|
|
48
50
|
g.__varslist[0]['ナデシコ種類'] = 'snako';
|
|
@@ -59,7 +61,7 @@ function main(argvOrg) {
|
|
|
59
61
|
});
|
|
60
62
|
// -e オプションを実行したとき
|
|
61
63
|
if (opt.evalStr) {
|
|
62
|
-
nako.
|
|
64
|
+
await nako.runAsync(opt.evalStr, 'main.nako3');
|
|
63
65
|
return;
|
|
64
66
|
}
|
|
65
67
|
// パラメータが空だったとき
|
|
@@ -74,7 +76,7 @@ function main(argvOrg) {
|
|
|
74
76
|
convert(nako, code, opt);
|
|
75
77
|
}
|
|
76
78
|
// 実行
|
|
77
|
-
nako.
|
|
79
|
+
await nako.runAsync(code, opt.filename);
|
|
78
80
|
}
|
|
79
81
|
// -c オプションを指定したとき
|
|
80
82
|
function convert(nako, code, opt) {
|
package/core/command/snako.mts
CHANGED
|
@@ -7,6 +7,7 @@ import { NakoGlobal } from '../src/nako_global.mjs'
|
|
|
7
7
|
import * as url from 'url'
|
|
8
8
|
import { NakoGenOptions } from '../src/nako_gen.mjs'
|
|
9
9
|
import { NakoCompiler } from '../src/nako3.mjs'
|
|
10
|
+
import PluginSnako from './plugin_snako.mjs'
|
|
10
11
|
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
|
|
11
12
|
|
|
12
13
|
/** コマンドラインオプション */
|
|
@@ -28,7 +29,7 @@ class CommandOptions {
|
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
/** メイン処理 */
|
|
31
|
-
function main (argvOrg: string[])
|
|
32
|
+
async function main (argvOrg: string[]) {
|
|
32
33
|
// コマンドラインオプションを確認
|
|
33
34
|
const argv: string[] = [...argvOrg]
|
|
34
35
|
const opt: CommandOptions = new CommandOptions()
|
|
@@ -52,6 +53,7 @@ function main (argvOrg: string[]): void {
|
|
|
52
53
|
}
|
|
53
54
|
// なでしこのコンパイラを生成
|
|
54
55
|
const nako = new com.NakoCompiler()
|
|
56
|
+
nako.addPluginObject('PluginSnako', PluginSnako)
|
|
55
57
|
// 実行前にイベントを挟みたいとき
|
|
56
58
|
nako.addListener('beforeRun', (g: NakoGlobal) => {
|
|
57
59
|
g.__varslist[0]['ナデシコ種類'] = 'snako'
|
|
@@ -68,7 +70,7 @@ function main (argvOrg: string[]): void {
|
|
|
68
70
|
})
|
|
69
71
|
// -e オプションを実行したとき
|
|
70
72
|
if (opt.evalStr) {
|
|
71
|
-
nako.
|
|
73
|
+
await nako.runAsync(opt.evalStr, 'main.nako3')
|
|
72
74
|
return
|
|
73
75
|
}
|
|
74
76
|
// パラメータが空だったとき
|
|
@@ -81,14 +83,14 @@ function main (argvOrg: string[]): void {
|
|
|
81
83
|
// -c オプションが指定されたとき
|
|
82
84
|
if (opt.flagConvert) { convert(nako, code, opt) }
|
|
83
85
|
// 実行
|
|
84
|
-
nako.
|
|
86
|
+
await nako.runAsync(code, opt.filename)
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
// -c オプションを指定したとき
|
|
88
90
|
function convert (nako: NakoCompiler, code: string, opt: CommandOptions): void {
|
|
89
91
|
// オプションを指定
|
|
90
92
|
const genOpt = new NakoGenOptions(
|
|
91
|
-
false,
|
|
93
|
+
false,
|
|
92
94
|
['nako_errors.mjs', 'nako_core_version.mjs', 'plugin_system.mjs'],
|
|
93
95
|
'self.__varslist[0][\'ナデシコ種類\'] = \'snako\'')
|
|
94
96
|
// スタンドアロンコードを生成
|
package/core/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nadesiko3core",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.68",
|
|
4
4
|
"description": "Japanese Programming Language Nadesiko v3 core",
|
|
5
5
|
"main": "index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
"test:indent": "mocha ./test/indent_test.mjs",
|
|
11
11
|
"test:indent_inline": "mocha ./test/inline_indent_test.mjs",
|
|
12
12
|
"tsc": "tsc --watch",
|
|
13
|
-
"build": "
|
|
13
|
+
"build": "node command/snako.mjs batch/build_nako_version.nako3 && tsc",
|
|
14
14
|
"eslint": "eslint ./src/*.mts",
|
|
15
|
-
"eslint:fix": "eslint ./src/*.mts --fix"
|
|
15
|
+
"eslint:fix": "eslint ./src/*.mts --fix",
|
|
16
|
+
"hello": "node command/snako.mjs -e '「hello」を表示'"
|
|
16
17
|
},
|
|
17
18
|
"bin": {
|
|
18
19
|
"snako": "command/snako.mjs"
|
|
@@ -46,5 +47,8 @@
|
|
|
46
47
|
"eslint-plugin-promise": "^5.2.0",
|
|
47
48
|
"mocha": "^10.0.0",
|
|
48
49
|
"typescript": "^4.6.4"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"cross-env": "^7.0.3"
|
|
49
53
|
}
|
|
50
54
|
}
|