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