nadesiko3 3.7.20 → 3.7.22

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 (162) hide show
  1. package/batch/command.txt +483 -445
  2. package/batch/jsplugin2text.nako3 +1 -1
  3. package/batch/pickup_command.nako3 +12 -0
  4. package/core/command/snako.mts +5 -1
  5. package/core/deno/snako.ts +5 -1
  6. package/core/package-lock.json +382 -21
  7. package/core/package.json +4 -4
  8. package/core/src/README.md +98 -0
  9. package/core/src/nako3.mts +178 -614
  10. package/core/src/nako_basic_plugins.mts +39 -0
  11. package/core/src/nako_core_version.mts +2 -2
  12. package/core/src/nako_csv.mts +0 -1
  13. package/core/src/nako_event.mts +49 -0
  14. package/core/src/nako_gen.mts +291 -202
  15. package/core/src/nako_indent_inline.mts +2 -2
  16. package/core/src/nako_lex_rules.mts +1 -1
  17. package/core/src/nako_parser3.mts +106 -165
  18. package/core/src/nako_parser_async.mts +97 -0
  19. package/core/src/nako_parser_base.mts +4 -55
  20. package/core/src/nako_parser_message.mts +105 -0
  21. package/core/src/nako_parser_operator.mts +93 -0
  22. package/core/src/nako_plugin_manager.mts +260 -0
  23. package/core/src/nako_require.mts +292 -0
  24. package/core/src/nako_runner.mts +191 -0
  25. package/core/src/nako_tokenizer.mts +221 -0
  26. package/core/src/plugin_csv.mts +1 -1
  27. package/core/src/plugin_system.mts +34 -3259
  28. package/core/src/plugin_system_array.mts +699 -0
  29. package/core/src/plugin_system_datetime.mts +368 -0
  30. package/core/src/plugin_system_debug.mts +403 -0
  31. package/core/src/plugin_system_dict.mts +85 -0
  32. package/core/src/plugin_system_json.mts +73 -0
  33. package/core/src/plugin_system_math.mts +383 -0
  34. package/core/src/plugin_system_regexp.mts +120 -0
  35. package/core/src/plugin_system_stdio.mts +86 -0
  36. package/core/src/plugin_system_string.mts +666 -0
  37. package/core/src/plugin_system_timer.mts +152 -0
  38. package/core/src/plugin_system_types.mts +151 -0
  39. package/core/src/plugin_system_url.mts +193 -0
  40. package/core/src/plugin_toml.mts +3 -3
  41. package/core/test/fixtures/README.md +39 -0
  42. package/core/test/fixtures/make_parser_ast_golden.mjs +31 -0
  43. package/core/test/fixtures/parser_ast_golden.json +8027 -0
  44. package/core/test/fixtures/parser_corpus.mjs +120 -0
  45. package/core/test/indent_test.mjs +6 -0
  46. package/core/test/nako_basic_plugins_test.mjs +44 -0
  47. package/core/test/nako_event_test.mjs +85 -0
  48. package/core/test/nako_gen_perf_test.mjs +178 -0
  49. package/core/test/nako_parser_async_test.mjs +112 -0
  50. package/core/test/nako_parser_test.mjs +160 -0
  51. package/core/test/nako_plugin_manager_test.mjs +185 -0
  52. package/core/test/nako_require_test.mjs +153 -0
  53. package/core/test/nako_runner_test.mjs +114 -0
  54. package/core/test/nako_tokenizer_test.mjs +115 -0
  55. package/core/test/plugin_system_debug_test.mjs +141 -0
  56. package/core/test/plugin_system_split_test.mjs +179 -0
  57. package/core/test/plugin_system_test.mjs +6 -0
  58. package/core/tsconfig.json +0 -1
  59. package/package.json +24 -34
  60. package/release/_hash.txt +40 -40
  61. package/release/_script-tags.txt +16 -16
  62. package/release/command.json +1 -1
  63. package/release/command.json.js +1 -1
  64. package/release/command_cnako3.json +1 -1
  65. package/release/command_list.json +1 -1
  66. package/release/edit_main.js +6 -6
  67. package/release/edit_main.js.map +3 -3
  68. package/release/editor.js +6 -6
  69. package/release/plugin_datetime.js +1 -1
  70. package/release/plugin_datetime.js.map +3 -3
  71. package/release/plugin_keigo.js.map +3 -3
  72. package/release/plugin_markup.js +47 -47
  73. package/release/plugin_markup.js.map +3 -3
  74. package/release/plugin_weykturtle3d.js +1 -1
  75. package/release/plugin_weykturtle3d.js.map +3 -3
  76. package/release/version.js +2 -2
  77. package/release/version_main.js +2 -2
  78. package/release/version_main.js.map +2 -2
  79. package/release/wnako3.js +187 -214
  80. package/release/wnako3.js.map +4 -4
  81. package/release/wnako3webworker.js +172 -199
  82. package/release/wnako3webworker.js.map +4 -4
  83. package/src/cnako3mod.mjs +8 -4
  84. package/src/cnako3mod.mts +8 -4
  85. package/src/nako_version.mjs +2 -2
  86. package/src/nako_version.mts +2 -2
  87. package/src/plugin_browser_ajax.mjs +4 -4
  88. package/src/plugin_browser_ajax.mts +4 -4
  89. package/src/plugin_browser_audio.mjs +10 -10
  90. package/src/plugin_browser_audio.mts +10 -10
  91. package/src/plugin_browser_camera.mjs +4 -4
  92. package/src/plugin_browser_camera.mts +4 -4
  93. package/src/plugin_browser_canvas.mjs +2 -2
  94. package/src/plugin_browser_canvas.mts +2 -2
  95. package/src/plugin_browser_crypto.mjs +3 -3
  96. package/src/plugin_browser_crypto.mts +3 -3
  97. package/src/plugin_browser_dom_event.mjs +1 -1
  98. package/src/plugin_browser_dom_event.mts +1 -1
  99. package/src/plugin_browser_geolocation.mjs +1 -1
  100. package/src/plugin_browser_geolocation.mts +1 -1
  101. package/src/plugin_browser_hotkey.mjs +1 -1
  102. package/src/plugin_browser_hotkey.mts +1 -1
  103. package/src/plugin_browser_html.mjs +1 -1
  104. package/src/plugin_browser_html.mts +1 -1
  105. package/src/plugin_browser_location.mjs +1 -1
  106. package/src/plugin_browser_location.mts +1 -1
  107. package/src/plugin_browser_speech.mjs +1 -1
  108. package/src/plugin_browser_speech.mts +1 -1
  109. package/src/plugin_browser_storage.mjs +2 -2
  110. package/src/plugin_browser_storage.mts +2 -2
  111. package/src/plugin_httpserver.mjs +186 -15
  112. package/src/plugin_httpserver.mts +178 -12
  113. package/src/plugin_keigo.mjs +2 -2
  114. package/src/plugin_keigo.mts +2 -2
  115. package/src/plugin_node.mjs +48 -49
  116. package/src/plugin_node.mts +53 -54
  117. package/src/plugin_weykturtle3d.mjs +56 -56
  118. package/src/plugin_weykturtle3d.mts +56 -56
  119. package/src/wnako3.mjs +1 -1
  120. package/src/wnako3.mts +1 -1
  121. package/src/wnako3_editor.mjs +5 -5
  122. package/src/wnako3_editor.mts +5 -5
  123. package/src/wnako3mod.mjs +5 -2
  124. package/src/wnako3mod.mts +5 -2
  125. package/test/common/wnako3mod_test.mjs +48 -0
  126. package/test/node/package_json_test.mjs +17 -0
  127. package/test/node/plugin_httpserver_test.mjs +239 -0
  128. package/tools/nako3server/index.nako3 +4 -2
  129. package/core/src/nako3.mjs +0 -1021
  130. package/core/src/nako_ast.mjs +0 -4
  131. package/core/src/nako_colors.mjs +0 -77
  132. package/core/src/nako_core_version.mjs +0 -8
  133. package/core/src/nako_csv.mjs +0 -193
  134. package/core/src/nako_errors.mjs +0 -166
  135. package/core/src/nako_from_dncl.mjs +0 -285
  136. package/core/src/nako_from_dncl2.mjs +0 -347
  137. package/core/src/nako_gen.mjs +0 -2500
  138. package/core/src/nako_global.mjs +0 -138
  139. package/core/src/nako_indent.mjs +0 -442
  140. package/core/src/nako_indent_chars.mjs +0 -29
  141. package/core/src/nako_indent_inline.mjs +0 -361
  142. package/core/src/nako_josi_list.mjs +0 -47
  143. package/core/src/nako_lex_rules.mjs +0 -319
  144. package/core/src/nako_lexer.mjs +0 -794
  145. package/core/src/nako_logger.mjs +0 -221
  146. package/core/src/nako_parser3.mjs +0 -3250
  147. package/core/src/nako_parser_base.mjs +0 -403
  148. package/core/src/nako_parser_const.mjs +0 -37
  149. package/core/src/nako_prepare.mjs +0 -329
  150. package/core/src/nako_reserved_words.mjs +0 -42
  151. package/core/src/nako_source_mapping.mjs +0 -207
  152. package/core/src/nako_test.mjs +0 -37
  153. package/core/src/nako_token.mjs +0 -1
  154. package/core/src/nako_tools.mjs +0 -53
  155. package/core/src/nako_types.mjs +0 -14
  156. package/core/src/plugin_api.mjs +0 -4
  157. package/core/src/plugin_csv.mjs +0 -97
  158. package/core/src/plugin_math.mjs +0 -352
  159. package/core/src/plugin_promise.mjs +0 -102
  160. package/core/src/plugin_system.mjs +0 -3810
  161. package/core/src/plugin_test.mjs +0 -52
  162. package/core/src/plugin_toml.mjs +0 -39
@@ -9,17 +9,16 @@ import path from 'node:path'
9
9
  import assert from 'node:assert'
10
10
  // ハッシュ関数で利用
11
11
  import crypto from 'node:crypto'
12
- import os, { platform } from 'node:os'
12
+ import os from 'node:os'
13
13
  import url from 'node:url'
14
14
  import opener from 'opener'
15
15
  import iconv from 'iconv-lite'
16
16
  import shellQuote from 'shell-quote'
17
- import fetch, { FormData, Blob } from 'node-fetch'
18
17
  import fse from 'fs-extra'
19
18
  import { NakoSystem } from '../core/src/plugin_api.mjs'
20
19
 
21
20
 
22
- import { getEnv, isWindows, getCommandLineArgs, exit } from './deno_wrapper.mjs'
21
+ import { getEnv, isWindows, getCommandLineArgs } from './deno_wrapper.mjs'
23
22
 
24
23
  const __filename = url.fileURLToPath(import.meta.url)
25
24
  const __dirname = path.dirname(__filename)
@@ -29,8 +28,8 @@ function fileExists(f: string): boolean {
29
28
  try {
30
29
  fs.statSync(f)
31
30
  return true
32
-
33
- } catch (err) {
31
+
32
+ } catch {
34
33
  return false
35
34
  }
36
35
  }
@@ -39,8 +38,8 @@ function isDir(f: string): boolean {
39
38
  try {
40
39
  const st = fs.statSync(f)
41
40
  return st.isDirectory()
42
-
43
- } catch (err) {
41
+
42
+ } catch {
44
43
  return false
45
44
  }
46
45
  }
@@ -49,7 +48,7 @@ function commandExists(command: string): boolean {
49
48
  try {
50
49
  const r = spawnSync('which', [command], { stdio: 'ignore' })
51
50
  return r.status === 0
52
- } catch (_err) {
51
+ } catch {
53
52
  return false
54
53
  }
55
54
  }
@@ -172,7 +171,7 @@ async function listFilesRecursive(baseDir: string, curPath: string): Promise<Arr
172
171
  let stat: any
173
172
  try {
174
173
  stat = await fs.promises.stat(curPath)
175
- } catch (_e) {
174
+ } catch {
176
175
  return []
177
176
  }
178
177
  if (stat.isFile()) {
@@ -338,7 +337,7 @@ export default {
338
337
  const emitLine = (line: string) => {
339
338
  // 永続ハンドラーへ通知(『標準入力取得時』など)
340
339
  for (const h of sys.tags.__lineHandlers) {
341
- try { h(line) } catch (e) { /* ignore */ }
340
+ try { h(line) } catch { /* ignore */ }
342
341
  }
343
342
  // 一度きりの待機者(『尋』『文字尋』)へ優先的に配信、なければキュー
344
343
  if (sys.tags.__stdinWaiters.length > 0) {
@@ -350,7 +349,7 @@ export default {
350
349
  }
351
350
  nodeProcess.stdin.on('data', (buf: Buffer) => {
352
351
  // 生データも保持(『標準入力全取得』向け)
353
- try { sys.tags.__stdinRaw += buf.toString() } catch (_err) { /* ignore */ }
352
+ try { sys.tags.__stdinRaw += buf.toString() } catch { /* ignore */ }
354
353
  const bufStr = buf.toString()
355
354
  for (let i = 0; i < bufStr.length; i++) {
356
355
  const c = bufStr.charAt(i)
@@ -371,7 +370,7 @@ export default {
371
370
  sys.tags.__stdinEnded = true
372
371
  if (sys.tags.__endWaiters && Array.isArray(sys.tags.__endWaiters)) {
373
372
  for (const w of sys.tags.__endWaiters) {
374
- try { w() } catch (_err) { /* ignore */ }
373
+ try { w() } catch { /* ignore */ }
375
374
  }
376
375
  sys.tags.__endWaiters = []
377
376
  }
@@ -423,7 +422,7 @@ export default {
423
422
  type: 'func',
424
423
  josi: [['を', 'から']],
425
424
  pure: true,
426
- fn: function(s: string, sys: NakoSystem) {
425
+ fn: function(s: string, _sys: NakoSystem) {
427
426
  return fs.readFileSync(s)
428
427
  }
429
428
  },
@@ -454,7 +453,7 @@ export default {
454
453
  type: 'func',
455
454
  josi: [['を', 'から']],
456
455
  pure: true,
457
- fn: function(s: string, sys: NakoSystem) {
456
+ fn: function(s: string, _sys: NakoSystem) {
458
457
  // iconv.skipDecodeWarning = true
459
458
  const buf = fs.readFileSync(s)
460
459
  const text = iconv.decode(Buffer.from(buf), 'sjis')
@@ -465,7 +464,7 @@ export default {
465
464
  type: 'func',
466
465
  josi: [['を'], ['へ', 'に']],
467
466
  pure: true,
468
- fn: function(s: string, f: string, sys: NakoSystem) {
467
+ fn: function(s: string, f: string, _sys: NakoSystem) {
469
468
  // iconv.skipDecodeWarning = true
470
469
  const buf = iconv.encode(s, 'Shift_JIS')
471
470
  fs.writeFileSync(f, buf)
@@ -476,7 +475,7 @@ export default {
476
475
  type: 'func',
477
476
  josi: [['を', 'から']],
478
477
  pure: true,
479
- fn: function(s: string, sys: NakoSystem) {
478
+ fn: function(s: string, _sys: NakoSystem) {
480
479
  const buf = fs.readFileSync(s)
481
480
  const text = iconv.decode(Buffer.from(buf), 'euc-jp')
482
481
  return text
@@ -486,7 +485,7 @@ export default {
486
485
  type: 'func',
487
486
  josi: [['を'], ['へ', 'に']],
488
487
  pure: true,
489
- fn: function(s: string, f: string, sys: NakoSystem) {
488
+ fn: function(s: string, f: string, _sys: NakoSystem) {
490
489
  const buf = iconv.encode(s, 'euc-jp')
491
490
  fs.writeFileSync(f, buf)
492
491
  },
@@ -550,7 +549,7 @@ export default {
550
549
  type: 'func',
551
550
  josi: [['で'], ['を']],
552
551
  pure: true,
553
- fn: function(callback: any, s: string, sys: NakoSystem) {
552
+ fn: function(callback: any, s: string, _sys: NakoSystem) {
554
553
  exec(s, (err, stdout, stderr) => {
555
554
  if (err) { throw new Error(stderr) } else { callback(stdout) }
556
555
  })
@@ -643,8 +642,8 @@ export default {
643
642
  let st: fs.Stats
644
643
  try {
645
644
  st = fs.statSync(fullpath)
646
-
647
- } catch (e) {
645
+
646
+ } catch {
648
647
  continue
649
648
  }
650
649
  if (st.isDirectory()) {
@@ -714,7 +713,7 @@ export default {
714
713
  type: 'func',
715
714
  josi: [['で'], ['から', 'を'], ['に', 'へ']],
716
715
  pure: true,
717
- fn: function(callback: any, a: string, b: string, sys: NakoSystem) {
716
+ fn: function(callback: any, a: string, b: string, _sys: NakoSystem) {
718
717
  return fse.copy(a, b, (err: any) => {
719
718
  if (err) { throw new Error('ファイルコピー時:' + err) }
720
719
  callback()
@@ -779,7 +778,7 @@ export default {
779
778
  type: 'func',
780
779
  josi: [['で'], ['から', 'を'], ['に', 'へ']],
781
780
  pure: true,
782
- fn: function(callback: any, a: string, b: string, sys: NakoSystem) {
781
+ fn: function(callback: any, a: string, b: string, _sys: NakoSystem) {
783
782
  fse.move(a, b, (err: any) => {
784
783
  if (err) { throw new Error('ファイル移動時:' + err) }
785
784
  callback()
@@ -791,7 +790,7 @@ export default {
791
790
  type: 'func',
792
791
  josi: [['の', 'を']],
793
792
  pure: true,
794
- fn: function(path: string, sys: NakoSystem) {
793
+ fn: function(path: string, _sys: NakoSystem) {
795
794
  return fse.removeSync(path)
796
795
  }
797
796
  },
@@ -799,7 +798,7 @@ export default {
799
798
  type: 'func',
800
799
  josi: [['で'], ['の', 'を']],
801
800
  pure: true,
802
- fn: function(callback: any, path: string, sys: NakoSystem) {
801
+ fn: function(callback: any, path: string, _sys: NakoSystem) {
803
802
  return fse.remove(path, (err: any) => {
804
803
  if (err) { throw new Error('ファイル削除時:' + err) }
805
804
  callback()
@@ -811,7 +810,7 @@ export default {
811
810
  type: 'func',
812
811
  josi: [['の', 'から']],
813
812
  pure: true,
814
- fn: function(path: string, sys: NakoSystem) {
813
+ fn: function(path: string, _sys: NakoSystem) {
815
814
  return fs.statSync(path)
816
815
  }
817
816
  },
@@ -819,7 +818,7 @@ export default {
819
818
  type: 'func',
820
819
  josi: [['の', 'から']],
821
820
  pure: true,
822
- fn: function(path: string, sys: NakoSystem) {
821
+ fn: function(path: string, _sys: NakoSystem) {
823
822
  const st = fs.statSync(path)
824
823
  if (!st) { return -1 }
825
824
  return st.size
@@ -934,7 +933,7 @@ export default {
934
933
  type: 'func',
935
934
  josi: [],
936
935
  pure: true,
937
- fn: function(sys: NakoSystem) {
936
+ fn: function(_sys: NakoSystem) {
938
937
  // 環境変数からテンポラリフォルダを取得
939
938
  return os.tmpdir()
940
939
  }
@@ -943,7 +942,7 @@ export default {
943
942
  type: 'func',
944
943
  josi: [['に', 'へ']],
945
944
  pure: true,
946
- fn: function(dir: string, sys: NakoSystem) {
945
+ fn: function(dir: string, _sys: NakoSystem) {
947
946
  if (dir === '' || !dir) {
948
947
  dir = os.tmpdir()
949
948
  }
@@ -1002,7 +1001,7 @@ export default {
1002
1001
  b = sys.tags.__quotePath(b)
1003
1002
  const cmd = `${tpath} x ${a} -o${b} -y`
1004
1003
 
1005
- exec(cmd, (err, stdout, stderr) => {
1004
+ exec(cmd, (err, stdout, _stderr) => {
1006
1005
  if (err) { throw new Error('[エラー]『解凍時』' + (err as unknown as string)) }
1007
1006
  callback(stdout)
1008
1007
  })
@@ -1032,7 +1031,7 @@ export default {
1032
1031
  b = sys.tags.__quotePath(b)
1033
1032
  const cmd = `${tpath} a -r ${b} ${a} -y`
1034
1033
 
1035
- exec(cmd, (err, stdout, stderr) => {
1034
+ exec(cmd, (err, stdout, _stderr) => {
1036
1035
  if (err) { throw new Error('[エラー]『圧縮時』' + (err.message || JSON.stringify(err))) }
1037
1036
  callback(stdout)
1038
1037
  })
@@ -1058,7 +1057,7 @@ export default {
1058
1057
  func = sys.__findFunc(func, '強制終了時')
1059
1058
  }
1060
1059
 
1061
- nodeProcess.on('SIGINT', (signal: any) => {
1060
+ nodeProcess.on('SIGINT', (_signal: any) => {
1062
1061
  const flag = func(sys)
1063
1062
  if (flag) { nodeProcess.exit() }
1064
1063
  })
@@ -1078,7 +1077,7 @@ export default {
1078
1077
  type: 'func',
1079
1078
  josi: [],
1080
1079
  pure: true,
1081
- fn: function(sys: NakoSystem) {
1080
+ fn: function(_sys: NakoSystem) {
1082
1081
  return nodeProcess.platform
1083
1082
  }
1084
1083
  },
@@ -1086,7 +1085,7 @@ export default {
1086
1085
  type: 'func',
1087
1086
  josi: [],
1088
1087
  pure: true,
1089
- fn: function(sys: NakoSystem) {
1088
+ fn: function(_sys: NakoSystem) {
1090
1089
  return nodeProcess.arch
1091
1090
  }
1092
1091
  },
@@ -1164,7 +1163,7 @@ export default {
1164
1163
  type: 'func',
1165
1164
  josi: [['と'], ['が']],
1166
1165
  pure: true,
1167
- fn: function(a: any, b: any, sys: NakoSystem) {
1166
+ fn: function(a: any, b: any, _sys: NakoSystem) {
1168
1167
  assert.strictEqual(a, b)
1169
1168
  }
1170
1169
  },
@@ -1173,7 +1172,7 @@ export default {
1173
1172
  type: 'func',
1174
1173
  josi: [],
1175
1174
  pure: true,
1176
- fn: function(sys: NakoSystem) {
1175
+ fn: function(_sys: NakoSystem) {
1177
1176
  const nif = os.networkInterfaces()
1178
1177
  if (!nif) { throw new Error('『自分IPアドレス取得』でネットワークのインターフェイスが種畜できません。') }
1179
1178
  /**
@@ -1195,7 +1194,7 @@ export default {
1195
1194
  type: 'func',
1196
1195
  josi: [],
1197
1196
  pure: true,
1198
- fn: function(sys: NakoSystem) {
1197
+ fn: function(_sys: NakoSystem) {
1199
1198
  const nif = os.networkInterfaces()
1200
1199
  if (!nif) { throw new Error('『自分IPアドレス取得』でネットワークのインターフェイスが種畜できません。') }
1201
1200
  const result: string[] = []
@@ -1354,7 +1353,7 @@ export default {
1354
1353
  type: 'func',
1355
1354
  josi: [['まで', 'へ', 'に'], ['を']],
1356
1355
  pure: true,
1357
- fn: function(url: string, params: [key: string], sys: NakoSystem) {
1356
+ fn: function(url: string, params: [key: string], _sys: NakoSystem) {
1358
1357
  const flist: Array<string> = []
1359
1358
 
1360
1359
  for (const key in params) {
@@ -1378,7 +1377,7 @@ export default {
1378
1377
  type: 'func',
1379
1378
  josi: [['まで', 'へ', 'に'], ['を']],
1380
1379
  pure: true,
1381
- fn: function(url: string, params: any, sys: NakoSystem) {
1380
+ fn: function(url: string, params: any, _sys: NakoSystem) {
1382
1381
  const fd = new FormData()
1383
1382
  for (const key in params) { fd.set(key, params[key]) }
1384
1383
 
@@ -1394,7 +1393,7 @@ export default {
1394
1393
  type: 'func',
1395
1394
  josi: [['から'], ['で']],
1396
1395
  pure: true,
1397
- fn: function(res: any, type: string, sys: NakoSystem) {
1396
+ fn: function(res: any, type: string, _sys: NakoSystem) {
1398
1397
  type = type.toString().toUpperCase()
1399
1398
  if (type === 'TEXT' || type === 'テキスト') {
1400
1399
  return res.text()
@@ -1441,7 +1440,7 @@ export default {
1441
1440
  type: 'func',
1442
1441
  josi: [['の', 'を']],
1443
1442
  pure: true,
1444
- fn: function(params: any, sys: NakoSystem) {
1443
+ fn: function(params: any, _sys: NakoSystem) {
1445
1444
  const flist: Array<string> = []
1446
1445
  for (const key in params) {
1447
1446
  const v = params[key]
@@ -1481,7 +1480,7 @@ export default {
1481
1480
  josi: [['まで', 'へ', 'に'], ['を']],
1482
1481
  pure: true,
1483
1482
  asyncFn: true,
1484
- fn: function(url: any, params: any, sys: any) {
1483
+ fn: function(url: any, params: any, _sys: any) {
1485
1484
  return new Promise((resolve, reject) => {
1486
1485
  const fd = new FormData()
1487
1486
  for (const key in params) { fd.set(key, params[key]) }
@@ -1554,7 +1553,7 @@ export default {
1554
1553
  josi: [['へ', 'に'], ['を']],
1555
1554
  pure: true,
1556
1555
  asyncFn: true,
1557
- fn: async function(url: string, s: string, sys: NakoSystem) {
1556
+ fn: async function(url: string, s: string, _sys: NakoSystem) {
1558
1557
  const payload = { content: s }
1559
1558
  const res = await fetch(url, {
1560
1559
  method: 'POST',
@@ -1574,7 +1573,7 @@ export default {
1574
1573
  josi: [['へ', 'に'], ['と'], ['を']],
1575
1574
  pure: true,
1576
1575
  asyncFn: true,
1577
- fn: async function(url: string, f: string, s: string, sys: NakoSystem) {
1576
+ fn: async function(url: string, f: string, s: string, _sys: NakoSystem) {
1578
1577
  const formData = new FormData()
1579
1578
  formData.append('content', s)
1580
1579
  const imageData = fs.readFileSync(f)
@@ -1597,7 +1596,7 @@ export default {
1597
1596
  type: 'func',
1598
1597
  josi: [['へ', 'に'], ['を']],
1599
1598
  pure: true,
1600
- fn: function(token: string, message: string, sys: NakoSystem) {
1599
+ fn: function(_token: string, _message: string, _sys: NakoSystem) {
1601
1600
  throw new Error('『LINE送信』は2025年4月で使えなくなりました。[詳細URL] https://nadesi.com/v3/doc/go.php?4670')
1602
1601
  }
1603
1602
  },
@@ -1605,7 +1604,7 @@ export default {
1605
1604
  type: 'func',
1606
1605
  josi: [['へ', 'に'], ['と'], ['を']],
1607
1606
  pure: true,
1608
- fn: function(token: string, imageFile: string, message: string, sys: NakoSystem) {
1607
+ fn: function(_token: string, _imageFile: string, _message: string, _sys: NakoSystem) {
1609
1608
  throw new Error('『LINE画像送信』は2025年4月で使えなくなりました。[詳細URL] https://nadesi.com/v3/doc/go.php?4670')
1610
1609
  }
1611
1610
  },
@@ -1614,7 +1613,7 @@ export default {
1614
1613
  type: 'func',
1615
1614
  josi: [['の', 'を']],
1616
1615
  pure: true,
1617
- fn: function(code: string, sys: NakoSystem) {
1616
+ fn: function(code: string, _sys: NakoSystem) {
1618
1617
  return iconv.encodingExists(code)
1619
1618
  }
1620
1619
  },
@@ -1622,7 +1621,7 @@ export default {
1622
1621
  type: 'func',
1623
1622
  josi: [['に', 'へ', 'を']],
1624
1623
  pure: true,
1625
- fn: function(str: string, sys: NakoSystem) {
1624
+ fn: function(str: string, _sys: NakoSystem) {
1626
1625
  // iconv.skipDecodeWarning = true
1627
1626
  return iconv.encode(str, 'Shift_JIS')
1628
1627
  }
@@ -1631,7 +1630,7 @@ export default {
1631
1630
  type: 'func',
1632
1631
  josi: [['から', 'を', 'で']],
1633
1632
  pure: true,
1634
- fn: function(buf: any, sys: NakoSystem) {
1633
+ fn: function(buf: any, _sys: NakoSystem) {
1635
1634
  // iconv.skipDecodeWarning = true
1636
1635
  return iconv.decode(Buffer.from(buf), 'sjis')
1637
1636
  }
@@ -1640,7 +1639,7 @@ export default {
1640
1639
  type: 'func',
1641
1640
  josi: [['を'], ['へ', 'で']],
1642
1641
  pure: true,
1643
- fn: function(s: string, code: string, sys: NakoSystem) {
1642
+ fn: function(s: string, code: string, _sys: NakoSystem) {
1644
1643
  // iconv.skipDecodeWarning = true
1645
1644
  return iconv.encode(s, code)
1646
1645
  }
@@ -1649,7 +1648,7 @@ export default {
1649
1648
  type: 'func',
1650
1649
  josi: [['を'], ['から', 'で']],
1651
1650
  pure: true,
1652
- fn: function(buf: any, code: string, sys: NakoSystem) {
1651
+ fn: function(buf: any, code: string, _sys: NakoSystem) {
1653
1652
  // iconv.skipDecodeWarning = true
1654
1653
  return iconv.decode(Buffer.from(buf), code)
1655
1654
  }
@@ -1659,7 +1658,7 @@ export default {
1659
1658
  type: 'func',
1660
1659
  josi: [],
1661
1660
  pure: true,
1662
- fn: function(sys: NakoSystem) {
1661
+ fn: function(_sys: NakoSystem) {
1663
1662
  return crypto.getHashes()
1664
1663
  }
1665
1664
  },
@@ -1667,7 +1666,7 @@ export default {
1667
1666
  type: 'func',
1668
1667
  josi: [['を'], ['の'], ['で']],
1669
1668
  pure: true,
1670
- fn: function(s: any, alg: string, enc: any, sys: NakoSystem) {
1669
+ fn: function(s: any, alg: string, enc: any, _sys: NakoSystem) {
1671
1670
  const hashsum = crypto.createHash(alg)
1672
1671
  hashsum.update(s)
1673
1672
  return hashsum.digest(enc)
@@ -1677,7 +1676,7 @@ export default {
1677
1676
  type: 'func',
1678
1677
  josi: [],
1679
1678
  pure: true,
1680
- fn: function(sys: NakoSystem) {
1679
+ fn: function(_sys: NakoSystem) {
1681
1680
  const uuid = crypto.randomUUID()
1682
1681
  return uuid
1683
1682
  }
@@ -1686,7 +1685,7 @@ export default {
1686
1685
  type: 'func',
1687
1686
  josi: [['の']],
1688
1687
  pure: true,
1689
- fn: function(cnt: number, sys: NakoSystem) {
1688
+ fn: function(cnt: number, _sys: NakoSystem) {
1690
1689
  const a = new Uint8Array(cnt)
1691
1690
  crypto.getRandomValues(a)
1692
1691
  return a