wsemi 1.9.13 → 1.9.15

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 (516) hide show
  1. package/README.md +1 -1
  2. package/dist/wsemi.umd.js +7 -7
  3. package/dist/wsemi.umd.js.map +1 -1
  4. package/docs/-_class.mjs.html +1 -1
  5. package/docs/-_const.mjs.html +1 -1
  6. package/docs/-_detector.mjs.html +1 -1
  7. package/docs/-_optNum.mjs.html +1 -1
  8. package/docs/ab2blob.mjs.html +1 -1
  9. package/docs/ab2u8arr.mjs.html +1 -1
  10. package/docs/addExcelWorksheetFromData.mjs.html +1 -1
  11. package/docs/addMonth.mjs.html +1 -1
  12. package/docs/aes2str.mjs.html +1 -1
  13. package/docs/alive.mjs.html +106 -5
  14. package/docs/arr2dt.mjs.html +1 -1
  15. package/docs/arrAccum.mjs.html +1 -1
  16. package/docs/arrAdd.mjs.html +1 -1
  17. package/docs/arrAt.mjs.html +1 -1
  18. package/docs/arrDiff.mjs.html +1 -1
  19. package/docs/arrFilterByKeywords.mjs.html +1 -1
  20. package/docs/arrFilterByNum.mjs.html +1 -1
  21. package/docs/arrFilterByPnum.mjs.html +1 -1
  22. package/docs/arrFilterByPnumAndToLog.mjs.html +1 -1
  23. package/docs/arrFind.mjs.html +1 -1
  24. package/docs/arrGroupByMaxmin.mjs.html +1 -1
  25. package/docs/arrHas.mjs.html +1 -1
  26. package/docs/arrInsert.mjs.html +1 -1
  27. package/docs/arrLookupByMaxmin.mjs.html +1 -1
  28. package/docs/arrMax.mjs.html +1 -1
  29. package/docs/arrMin.mjs.html +1 -1
  30. package/docs/arrMulti.mjs.html +1 -1
  31. package/docs/arrNorm.mjs.html +1 -1
  32. package/docs/arrProduct.mjs.html +1 -1
  33. package/docs/arrPull.mjs.html +1 -1
  34. package/docs/arrPullAt.mjs.html +1 -1
  35. package/docs/arrReduce.mjs.html +1 -1
  36. package/docs/arrReverse.mjs.html +1 -1
  37. package/docs/arrSep.mjs.html +1 -1
  38. package/docs/arrSort.mjs.html +1 -1
  39. package/docs/asind.mjs.html +1 -1
  40. package/docs/atan2d.mjs.html +1 -1
  41. package/docs/atand.mjs.html +1 -1
  42. package/docs/attstr.mjs.html +1 -1
  43. package/docs/b642obj.mjs.html +1 -1
  44. package/docs/b642str.mjs.html +1 -1
  45. package/docs/b642u16arr.mjs.html +1 -1
  46. package/docs/b642u8arr.mjs.html +1 -1
  47. package/docs/binstr.mjs.html +1 -1
  48. package/docs/blob2ab.mjs.html +1 -1
  49. package/docs/blob2b64.mjs.html +1 -1
  50. package/docs/blob2str.mjs.html +1 -1
  51. package/docs/blob2u8arr.mjs.html +1 -1
  52. package/docs/blobs2b64s.mjs.html +1 -1
  53. package/docs/blobs2u8arrs.mjs.html +1 -1
  54. package/docs/bodyLog.mjs.html +1 -1
  55. package/docs/browserView.mjs.html +1 -1
  56. package/docs/browserViewFromBlob.mjs.html +1 -1
  57. package/docs/browserViewFromText.mjs.html +1 -1
  58. package/docs/browserViewFromU8arr.mjs.html +1 -1
  59. package/docs/bs2u8arr.mjs.html +1 -1
  60. package/docs/bufRead.mjs.html +1 -1
  61. package/docs/bufReadDbl.mjs.html +1 -1
  62. package/docs/bufWrite.mjs.html +1 -1
  63. package/docs/bufWriteDbl.mjs.html +1 -1
  64. package/docs/cache.mjs.html +3 -3
  65. package/docs/cacheBd.mjs.html +1 -1
  66. package/docs/cacheSt.mjs.html +2 -2
  67. package/docs/cbol.mjs.html +1 -1
  68. package/docs/cdbl.mjs.html +1 -1
  69. package/docs/ceil.mjs.html +1 -1
  70. package/docs/cfilesize.mjs.html +1 -1
  71. package/docs/cfinancial.mjs.html +1 -1
  72. package/docs/cint.mjs.html +1 -1
  73. package/docs/clearXSS.mjs.html +1 -1
  74. package/docs/clearXSSDyn.mjs.html +1 -1
  75. package/docs/color.mjs.html +1 -1
  76. package/docs/composeToTree.mjs.html +1 -1
  77. package/docs/convertToTree.mjs.html +1 -1
  78. package/docs/copyStrToClipboard.mjs.html +1 -1
  79. package/docs/cosd.mjs.html +1 -1
  80. package/docs/cotd.mjs.html +1 -1
  81. package/docs/createExcelWorkbook.mjs.html +1 -1
  82. package/docs/cscd.mjs.html +1 -1
  83. package/docs/cstr.mjs.html +1 -1
  84. package/docs/day2cht.mjs.html +1 -1
  85. package/docs/debounce.mjs.html +1 -1
  86. package/docs/delay.mjs.html +1 -1
  87. package/docs/detectXSS.mjs.html +1 -1
  88. package/docs/detectXSSDyn.mjs.html +1 -1
  89. package/docs/dig.mjs.html +1 -1
  90. package/docs/digExp.mjs.html +1 -1
  91. package/docs/domAlert.mjs.html +1 -1
  92. package/docs/domAppend.mjs.html +1 -1
  93. package/docs/domCancelEvent.mjs.html +1 -1
  94. package/docs/domCompareText.mjs.html +1 -1
  95. package/docs/domConvertToPic.mjs.html +1 -1
  96. package/docs/domConvertToPicDyn.mjs.html +1 -1
  97. package/docs/domDetect.mjs.html +1 -1
  98. package/docs/domDrag.mjs.html +1 -1
  99. package/docs/domDragBarAndScroll.mjs.html +1 -1
  100. package/docs/domDragPointer.mjs.html +1 -1
  101. package/docs/domDragPreview.mjs.html +1 -1
  102. package/docs/domDropFiles.mjs.html +1 -1
  103. package/docs/domElementsFromPoint.mjs.html +1 -1
  104. package/docs/domFadeIn.mjs.html +1 -1
  105. package/docs/domFadeOut.mjs.html +1 -1
  106. package/docs/domFind.mjs.html +1 -1
  107. package/docs/domFinds.mjs.html +1 -1
  108. package/docs/domGetAttr.mjs.html +1 -1
  109. package/docs/domGetBoudRect.mjs.html +1 -1
  110. package/docs/domGetBoudRectRefSelf.mjs.html +1 -1
  111. package/docs/domGetFileAccept.mjs.html +1 -1
  112. package/docs/domGetFiles.mjs.html +1 -1
  113. package/docs/domGetParents.mjs.html +1 -1
  114. package/docs/domGetPointFromEvent.mjs.html +1 -1
  115. package/docs/domGetScrollableParent.mjs.html +1 -1
  116. package/docs/domGetWindowSize.mjs.html +1 -1
  117. package/docs/domIsClientXYIn.mjs.html +1 -1
  118. package/docs/domIsFocused.mjs.html +1 -1
  119. package/docs/domIsRendered.mjs.html +1 -1
  120. package/docs/domIsStable.mjs.html +1 -1
  121. package/docs/domIsVisible.mjs.html +1 -1
  122. package/docs/domPrepend.mjs.html +1 -1
  123. package/docs/domRemove.mjs.html +1 -1
  124. package/docs/domRenderMarkdownMind.mjs.html +1 -1
  125. package/docs/domRenderMarkdownMindDyn.mjs.html +1 -1
  126. package/docs/domRipple.mjs.html +1 -1
  127. package/docs/domScrollIntoView.mjs.html +1 -1
  128. package/docs/domScrollTo.mjs.html +1 -1
  129. package/docs/domSetAttr.mjs.html +1 -1
  130. package/docs/domShowImages.mjs.html +1 -1
  131. package/docs/domShowImagesDyn.mjs.html +1 -1
  132. package/docs/domShowInputAndGetFiles.mjs.html +1 -1
  133. package/docs/domShowInputAndGetFilesU8Arrs.mjs.html +1 -1
  134. package/docs/domShowInputDatatime.mjs.html +1 -1
  135. package/docs/domTooltip.mjs.html +1 -1
  136. package/docs/domTriggerEvent.mjs.html +1 -1
  137. package/docs/domVirtualCreate.mjs.html +1 -1
  138. package/docs/domVirtualCreateQueue.mjs.html +1 -1
  139. package/docs/downloadExcelFileFromData.mjs.html +1 -1
  140. package/docs/downloadExcelFileFromDataDyn.mjs.html +1 -1
  141. package/docs/downloadFileFromB64.mjs.html +1 -1
  142. package/docs/downloadFileFromBlob.mjs.html +1 -1
  143. package/docs/downloadFileFromText.mjs.html +1 -1
  144. package/docs/downloadFileFromU8Arr.mjs.html +1 -1
  145. package/docs/dtmapping.mjs.html +1 -1
  146. package/docs/dtpick.mjs.html +1 -1
  147. package/docs/estimateTicks.mjs.html +1 -1
  148. package/docs/evEmit.mjs.html +2 -2
  149. package/docs/evEmitDelay.mjs.html +1 -1
  150. package/docs/evem.mjs.html +1 -1
  151. package/docs/examples/ex-blob2b64.html +1 -1
  152. package/docs/examples/ex-clearXSS.html +1 -1
  153. package/docs/examples/ex-clearXSSDyn.html +1 -1
  154. package/docs/examples/ex-colorConverter.html +1 -1
  155. package/docs/examples/ex-detectXSS.html +1 -1
  156. package/docs/examples/ex-detectXSSDyn.html +1 -1
  157. package/docs/examples/ex-domCompareText.html +1 -1
  158. package/docs/examples/ex-domConvertToPic.html +1 -1
  159. package/docs/examples/ex-domDrag.html +1 -1
  160. package/docs/examples/ex-domDropFiles.html +1 -1
  161. package/docs/examples/ex-domIsVisible.html +1 -1
  162. package/docs/examples/ex-domRenderMarkdownMind.html +1 -1
  163. package/docs/examples/ex-domRenderMarkdownMindDyn.html +1 -1
  164. package/docs/examples/ex-domRipple.html +1 -1
  165. package/docs/examples/ex-domScrollIntoView.html +1 -1
  166. package/docs/examples/ex-domScrollTo.html +1 -1
  167. package/docs/examples/ex-domShowImages.html +1 -1
  168. package/docs/examples/ex-domShowImagesDyn.html +1 -1
  169. package/docs/examples/ex-domShowInputAndGetFiles.html +1 -1
  170. package/docs/examples/ex-domTooltip.html +1 -1
  171. package/docs/examples/ex-getFileHash.html +1 -1
  172. package/docs/examples/ex-getUserAgent.html +1 -1
  173. package/docs/examples/ex-getUserAgentDyn.html +1 -1
  174. package/docs/examples/ex-html2str.html +1 -1
  175. package/docs/examples/ex-obj2u8arr-u8arr2obj.html +1 -1
  176. package/docs/examples/ex-openLink.html +1 -1
  177. package/docs/examples/ex-str2aes-aes2str.html +1 -1
  178. package/docs/examples/ex-str2b64-b642str.html +1 -1
  179. package/docs/examples/ex-strFindFuzz.html +1 -1
  180. package/docs/examples/ex-timeTZ2expire-timeTZ2past.html +1 -1
  181. package/docs/examples/ex-xlsx.html +1 -1
  182. package/docs/execCli.mjs.html +67 -33
  183. package/docs/execCliCore.mjs.html +4 -1
  184. package/docs/execCliJsonRpc.mjs.html +3 -3
  185. package/docs/execCliSession.mjs.html +24 -12
  186. package/docs/execJsCode.mjs.html +1 -1
  187. package/docs/execProcess.mjs.html +58 -35
  188. package/docs/execProcessKillPid.mjs.html +5 -3
  189. package/docs/filepathToTree.mjs.html +1 -1
  190. package/docs/files2data.mjs.html +1 -1
  191. package/docs/flattenToConn.mjs.html +1 -1
  192. package/docs/flattenTree.mjs.html +1 -1
  193. package/docs/floor.mjs.html +1 -1
  194. package/docs/fsBuildReadStreamText.mjs.html +1 -1
  195. package/docs/fsBuildWriteStreamText.mjs.html +1 -1
  196. package/docs/fsCleanFolder.mjs.html +1 -1
  197. package/docs/fsCleanFolderCore.mjs.html +1 -1
  198. package/docs/fsCopyFile.mjs.html +1 -1
  199. package/docs/fsCopyFileCore.mjs.html +1 -1
  200. package/docs/fsCopyFolder.mjs.html +1 -1
  201. package/docs/fsCopyFolderCore.mjs.html +1 -1
  202. package/docs/fsCreateFile.mjs.html +1 -1
  203. package/docs/fsCreateFileCore.mjs.html +1 -1
  204. package/docs/fsCreateFolder.mjs.html +1 -1
  205. package/docs/fsCreateFolderCore.mjs.html +1 -1
  206. package/docs/fsDeleteFile.mjs.html +1 -1
  207. package/docs/fsDeleteFileCore.mjs.html +1 -1
  208. package/docs/fsDeleteFileSafe.mjs.html +1 -1
  209. package/docs/fsDeleteFileSafeCore.mjs.html +1 -1
  210. package/docs/fsDeleteFolder.mjs.html +1 -1
  211. package/docs/fsDeleteFolderCore.mjs.html +1 -1
  212. package/docs/fsDeleteFolderSafe.mjs.html +1 -1
  213. package/docs/fsDeleteFolderSafeCore.mjs.html +1 -1
  214. package/docs/fsDownloadFile.mjs.html +1 -1
  215. package/docs/fsDownloadFileCore.mjs.html +1 -1
  216. package/docs/fsEvem.mjs.html +1 -1
  217. package/docs/fsExists.mjs.html +1 -1
  218. package/docs/fsExistsCore.mjs.html +1 -1
  219. package/docs/fsGetFileBasicHash.mjs.html +1 -1
  220. package/docs/fsGetFileBasicHashCore.mjs.html +1 -1
  221. package/docs/fsGetFileHash.mjs.html +1 -1
  222. package/docs/fsGetFileHashCore.mjs.html +1 -1
  223. package/docs/fsGetFileXxHash.mjs.html +1 -1
  224. package/docs/fsGetFileXxHashCore.mjs.html +1 -1
  225. package/docs/fsGetFilesInFolder.mjs.html +1 -1
  226. package/docs/fsGetFilesInFolderCore.mjs.html +1 -1
  227. package/docs/fsGetFilesWithHashInFolder.mjs.html +1 -1
  228. package/docs/fsGetFilesWithHashInFolderCore.mjs.html +1 -1
  229. package/docs/fsGetFolderBasicHash.mjs.html +1 -1
  230. package/docs/fsGetFolderBasicHashCore.mjs.html +1 -1
  231. package/docs/fsGetFoldersInFolder.mjs.html +1 -1
  232. package/docs/fsGetFoldersInFolderCore.mjs.html +1 -1
  233. package/docs/fsIsFile.mjs.html +1 -1
  234. package/docs/fsIsFileCore.mjs.html +1 -1
  235. package/docs/fsIsFolder.mjs.html +1 -1
  236. package/docs/fsIsFolderCore.mjs.html +1 -1
  237. package/docs/fsMergeFiles.mjs.html +1 -1
  238. package/docs/fsMergeFilesCore.mjs.html +1 -1
  239. package/docs/fsReadJson.mjs.html +1 -1
  240. package/docs/fsReadText.mjs.html +1 -1
  241. package/docs/fsReadTextCore.mjs.html +1 -1
  242. package/docs/fsRenameFile.mjs.html +1 -1
  243. package/docs/fsRenameFileCore.mjs.html +1 -1
  244. package/docs/fsRenameFolder.mjs.html +1 -1
  245. package/docs/fsRenameFolderCore.mjs.html +1 -1
  246. package/docs/fsSrlog.mjs.html +1 -1
  247. package/docs/fsSyncFolder.mjs.html +1 -1
  248. package/docs/fsSyncFolderCore.mjs.html +1 -1
  249. package/docs/fsTask.mjs.html +1 -1
  250. package/docs/fsTaskCp.mjs.html +1 -1
  251. package/docs/fsTreeFolder.mjs.html +1 -1
  252. package/docs/fsTreeFolderCore.mjs.html +1 -1
  253. package/docs/fsTreeFolderWithHash.mjs.html +1 -1
  254. package/docs/fsTreeFolderWithHashCore.mjs.html +1 -1
  255. package/docs/fsWatchFile.mjs.html +1 -1
  256. package/docs/fsWatchFolder.mjs.html +1 -1
  257. package/docs/fsWriteJson.mjs.html +1 -1
  258. package/docs/fsWriteText.mjs.html +1 -1
  259. package/docs/fsWriteTextCore.mjs.html +1 -1
  260. package/docs/genGradientColor.mjs.html +1 -1
  261. package/docs/genID.mjs.html +1 -1
  262. package/docs/genIDSeq.mjs.html +1 -1
  263. package/docs/genPm.mjs.html +1 -1
  264. package/docs/getBufferSize.mjs.html +1 -1
  265. package/docs/getClearPathName.mjs.html +1 -1
  266. package/docs/getCsvStrFromData.mjs.html +1 -1
  267. package/docs/getDataFromExcelFileU8Arr.mjs.html +1 -1
  268. package/docs/getDataFromExcelFileU8ArrDyn.mjs.html +1 -1
  269. package/docs/getEnv.mjs.html +1 -1
  270. package/docs/getErrorMessage.mjs.html +1 -1
  271. package/docs/getExcelU8ArrFromData.mjs.html +1 -1
  272. package/docs/getExcelU8ArrFromWorkbook.mjs.html +1 -1
  273. package/docs/getExcelWorkbookFromData.mjs.html +1 -1
  274. package/docs/getExcelWorkbookFromWorksheet.mjs.html +1 -1
  275. package/docs/getExcelWorksheetFromData.mjs.html +1 -1
  276. package/docs/getFileAccept.mjs.html +1 -1
  277. package/docs/getFileBasicHash.mjs.html +1 -1
  278. package/docs/getFileHash.mjs.html +1 -1
  279. package/docs/getFileName.mjs.html +1 -1
  280. package/docs/getFileNameExt.mjs.html +1 -1
  281. package/docs/getFileTrueName.mjs.html +1 -1
  282. package/docs/getFileType.mjs.html +1 -1
  283. package/docs/getFileXxHash.mjs.html +1 -1
  284. package/docs/getGlobal.mjs.html +1 -1
  285. package/docs/getObjSize.mjs.html +1 -1
  286. package/docs/getPathParent.mjs.html +1 -1
  287. package/docs/getTimeBetween.mjs.html +1 -1
  288. package/docs/getTimeFromUnit.mjs.html +1 -1
  289. package/docs/getTimeHp.mjs.html +1 -1
  290. package/docs/getTimeObject.mjs.html +1 -1
  291. package/docs/getTimeRange.mjs.html +1 -1
  292. package/docs/getUserAgent.mjs.html +1 -1
  293. package/docs/getUserAgentDyn.mjs.html +1 -1
  294. package/docs/getltdtkeys.mjs.html +1 -1
  295. package/docs/global.html +7 -7
  296. package/docs/haskey.mjs.html +1 -1
  297. package/docs/html2str.mjs.html +1 -1
  298. package/docs/htmlDecode.mjs.html +1 -1
  299. package/docs/htmlEncode.mjs.html +1 -1
  300. package/docs/importResources.mjs.html +1 -1
  301. package/docs/index.html +1 -1
  302. package/docs/interp1.mjs.html +1 -1
  303. package/docs/isDate.mjs.html +1 -1
  304. package/docs/isDev.mjs.html +1 -1
  305. package/docs/isEle.mjs.html +1 -1
  306. package/docs/isEleExistByID.mjs.html +1 -1
  307. package/docs/isEmail.mjs.html +1 -1
  308. package/docs/isErr.mjs.html +1 -1
  309. package/docs/isIE.mjs.html +1 -1
  310. package/docs/isNarrow.mjs.html +1 -1
  311. package/docs/isStrHasCapital.mjs.html +1 -1
  312. package/docs/isStrHasLetter.mjs.html +1 -1
  313. package/docs/isStrHasLowerCase.mjs.html +1 -1
  314. package/docs/isStrHasNumber.mjs.html +1 -1
  315. package/docs/isStrHasSpace.mjs.html +1 -1
  316. package/docs/isStrHasSymbol.mjs.html +1 -1
  317. package/docs/isUserIdentify.mjs.html +1 -1
  318. package/docs/isUserName.mjs.html +1 -1
  319. package/docs/isUserPw.mjs.html +1 -1
  320. package/docs/isWindow.mjs.html +1 -1
  321. package/docs/isab.mjs.html +1 -1
  322. package/docs/isarr.mjs.html +1 -1
  323. package/docs/isarr0.mjs.html +1 -1
  324. package/docs/isarr1.mjs.html +1 -1
  325. package/docs/isbigint.mjs.html +1 -1
  326. package/docs/isblob.mjs.html +1 -1
  327. package/docs/isbol.mjs.html +1 -1
  328. package/docs/isday.mjs.html +1 -1
  329. package/docs/isearr.mjs.html +1 -1
  330. package/docs/iseobj.mjs.html +1 -1
  331. package/docs/iser.mjs.html +1 -1
  332. package/docs/isernot.mjs.html +1 -1
  333. package/docs/isestr.mjs.html +1 -1
  334. package/docs/isfile.mjs.html +1 -1
  335. package/docs/isfun.mjs.html +1 -1
  336. package/docs/isint.mjs.html +1 -1
  337. package/docs/ismonth.mjs.html +1 -1
  338. package/docs/isn0int.mjs.html +1 -1
  339. package/docs/isn0num.mjs.html +1 -1
  340. package/docs/isnan.mjs.html +1 -1
  341. package/docs/isnbr.mjs.html +1 -1
  342. package/docs/isnint.mjs.html +1 -1
  343. package/docs/isnnum.mjs.html +1 -1
  344. package/docs/isnull.mjs.html +1 -1
  345. package/docs/isnum.mjs.html +1 -1
  346. package/docs/isobj.mjs.html +1 -1
  347. package/docs/isobj0.mjs.html +1 -1
  348. package/docs/isp0int.mjs.html +1 -1
  349. package/docs/isp0num.mjs.html +1 -1
  350. package/docs/ispint.mjs.html +1 -1
  351. package/docs/ispm.mjs.html +1 -1
  352. package/docs/ispnum.mjs.html +1 -1
  353. package/docs/isstr.mjs.html +1 -1
  354. package/docs/isstr0.mjs.html +1 -1
  355. package/docs/istime.mjs.html +1 -1
  356. package/docs/istimeTZ.mjs.html +1 -1
  357. package/docs/istimems.mjs.html +1 -1
  358. package/docs/istimemsTZ.mjs.html +1 -1
  359. package/docs/isu16arr.mjs.html +1 -1
  360. package/docs/isu8arr.mjs.html +1 -1
  361. package/docs/isundefined.mjs.html +1 -1
  362. package/docs/j2o.mjs.html +1 -1
  363. package/docs/judge.mjs.html +1 -1
  364. package/docs/keysmat2ltdt.mjs.html +1 -1
  365. package/docs/ltdt2vrtsable.mjs.html +1 -1
  366. package/docs/ltdtDiff.mjs.html +1 -1
  367. package/docs/ltdtDiffByKey.mjs.html +1 -1
  368. package/docs/ltdtkeys2mat.mjs.html +1 -1
  369. package/docs/ltdtkeysheads2mat.mjs.html +1 -1
  370. package/docs/ltdtmapping.mjs.html +1 -1
  371. package/docs/ltdtmerge.mjs.html +1 -1
  372. package/docs/ltdtpick.mjs.html +1 -1
  373. package/docs/ltdtpull.mjs.html +1 -1
  374. package/docs/mat2ltdt.mjs.html +1 -1
  375. package/docs/matConcat.mjs.html +1 -1
  376. package/docs/matDiff.mjs.html +1 -1
  377. package/docs/matat.mjs.html +1 -1
  378. package/docs/now2str.mjs.html +1 -1
  379. package/docs/now2strp.mjs.html +1 -1
  380. package/docs/nowDay2str.mjs.html +1 -1
  381. package/docs/nowms2str.mjs.html +1 -1
  382. package/docs/nowms2strp.mjs.html +1 -1
  383. package/docs/o2j.mjs.html +1 -1
  384. package/docs/obj2b64.mjs.html +1 -1
  385. package/docs/obj2pb64.mjs.html +1 -1
  386. package/docs/obj2str.mjs.html +1 -1
  387. package/docs/obj2stru8arr.mjs.html +1 -1
  388. package/docs/obj2u8arr.mjs.html +1 -1
  389. package/docs/objSortBy.mjs.html +1 -1
  390. package/docs/objSortByKeys.mjs.html +1 -1
  391. package/docs/oo.mjs.html +1 -1
  392. package/docs/openLink.mjs.html +1 -1
  393. package/docs/pb642obj.mjs.html +1 -1
  394. package/docs/pmChain.mjs.html +1 -1
  395. package/docs/pmConvertResolve.mjs.html +1 -1
  396. package/docs/pmDebounce.mjs.html +1 -1
  397. package/docs/pmHook.mjs.html +1 -1
  398. package/docs/pmHookReject.mjs.html +1 -1
  399. package/docs/pmIni.mjs.html +1 -1
  400. package/docs/pmInvResolve.mjs.html +1 -1
  401. package/docs/pmKeyMutex.mjs.html +1 -1
  402. package/docs/pmMap.mjs.html +1 -1
  403. package/docs/pmQueue.mjs.html +1 -1
  404. package/docs/pmSeries.mjs.html +1 -1
  405. package/docs/pmThrottle.mjs.html +1 -1
  406. package/docs/pmTimeout.mjs.html +1 -1
  407. package/docs/preciseNum.mjs.html +1 -1
  408. package/docs/pseudoRandom.mjs.html +1 -1
  409. package/docs/pseudoRandomIntRange.mjs.html +1 -1
  410. package/docs/pseudoRandomIntsNdpRange.mjs.html +1 -1
  411. package/docs/pseudoRandomIntsRange.mjs.html +1 -1
  412. package/docs/pseudoRandomRange.mjs.html +1 -1
  413. package/docs/pseudoRandomsRange.mjs.html +1 -1
  414. package/docs/queue.mjs.html +1 -1
  415. package/docs/random.mjs.html +1 -1
  416. package/docs/randomIntRange.mjs.html +1 -1
  417. package/docs/randomIntsNdpRange.mjs.html +1 -1
  418. package/docs/randomIntsRange.mjs.html +1 -1
  419. package/docs/randomRange.mjs.html +1 -1
  420. package/docs/randomsRange.mjs.html +1 -1
  421. package/docs/rang.mjs.html +1 -1
  422. package/docs/rep.mjs.html +1 -1
  423. package/docs/repObj.mjs.html +1 -1
  424. package/docs/replace.mjs.html +1 -1
  425. package/docs/replaceObj.mjs.html +1 -1
  426. package/docs/replacePlus.mjs.html +1 -1
  427. package/docs/round.mjs.html +1 -1
  428. package/docs/secd.mjs.html +1 -1
  429. package/docs/sep.mjs.html +1 -1
  430. package/docs/sepInt.mjs.html +1 -1
  431. package/docs/setIntervalHp.mjs.html +1 -1
  432. package/docs/setTimeoutHp.mjs.html +1 -1
  433. package/docs/sind.mjs.html +1 -1
  434. package/docs/split.mjs.html +1 -1
  435. package/docs/str2aes.mjs.html +1 -1
  436. package/docs/str2b64.mjs.html +1 -1
  437. package/docs/str2hint.mjs.html +1 -1
  438. package/docs/str2md5.mjs.html +1 -1
  439. package/docs/str2obj.mjs.html +1 -1
  440. package/docs/str2sha.mjs.html +1 -1
  441. package/docs/str2sha512.mjs.html +1 -1
  442. package/docs/str2u8arr.mjs.html +1 -1
  443. package/docs/strCompare.mjs.html +1 -1
  444. package/docs/strCompareForVersion.mjs.html +1 -1
  445. package/docs/strDiff.mjs.html +1 -1
  446. package/docs/strDiffToHtml.mjs.html +1 -1
  447. package/docs/strFindFuzz.mjs.html +1 -1
  448. package/docs/strFindSimilar.mjs.html +1 -1
  449. package/docs/strTruncate.mjs.html +1 -1
  450. package/docs/strdelleft.mjs.html +1 -1
  451. package/docs/strdelright.mjs.html +1 -1
  452. package/docs/strleft.mjs.html +1 -1
  453. package/docs/strmid.mjs.html +1 -1
  454. package/docs/strright.mjs.html +1 -1
  455. package/docs/stru8arr2obj.mjs.html +1 -1
  456. package/docs/tand.mjs.html +1 -1
  457. package/docs/time2day.mjs.html +1 -1
  458. package/docs/time2hour.mjs.html +1 -1
  459. package/docs/time2min.mjs.html +1 -1
  460. package/docs/timeTZ2day.mjs.html +1 -1
  461. package/docs/timeTZ2expire.mjs.html +1 -1
  462. package/docs/timeTZ2hour.mjs.html +1 -1
  463. package/docs/timeTZ2min.mjs.html +1 -1
  464. package/docs/timeTZ2past.mjs.html +1 -1
  465. package/docs/timems2day.mjs.html +1 -1
  466. package/docs/timems2hour.mjs.html +1 -1
  467. package/docs/timems2min.mjs.html +1 -1
  468. package/docs/timems2time.mjs.html +1 -1
  469. package/docs/timemsTZ2day.mjs.html +1 -1
  470. package/docs/timemsTZ2expire.mjs.html +1 -1
  471. package/docs/timemsTZ2hour.mjs.html +1 -1
  472. package/docs/timemsTZ2min.mjs.html +1 -1
  473. package/docs/timemsTZ2past.mjs.html +1 -1
  474. package/docs/timemsTZ2time.mjs.html +1 -1
  475. package/docs/treeObj.mjs.html +1 -1
  476. package/docs/treeToFilepath.mjs.html +1 -1
  477. package/docs/trim.mjs.html +1 -1
  478. package/docs/u16arr2b64.mjs.html +1 -1
  479. package/docs/u16arr2u8arr.mjs.html +1 -1
  480. package/docs/u8arr2ab.mjs.html +1 -1
  481. package/docs/u8arr2b64.mjs.html +1 -1
  482. package/docs/u8arr2blob.mjs.html +1 -1
  483. package/docs/u8arr2bs.mjs.html +1 -1
  484. package/docs/u8arr2obj.mjs.html +1 -1
  485. package/docs/u8arr2str.mjs.html +1 -1
  486. package/docs/u8arr2u16arr.mjs.html +1 -1
  487. package/docs/urlParse.mjs.html +1 -1
  488. package/docs/verifyValue.mjs.html +1 -1
  489. package/docs/waitFun.mjs.html +1 -1
  490. package/docs/wsemi.html +24 -23
  491. package/package.json +2 -2
  492. package/script.txt +1 -1
  493. package/src/_execSpawnError.mjs +41 -0
  494. package/src/alive.mjs +105 -4
  495. package/src/cache.mjs +2 -2
  496. package/src/cacheSt.mjs +1 -1
  497. package/src/evEmit.mjs +1 -1
  498. package/src/execCli.mjs +66 -32
  499. package/src/execCliCore.mjs +3 -0
  500. package/src/execCliJsonRpc.mjs +2 -2
  501. package/src/execCliSession.mjs +23 -11
  502. package/src/execProcess.mjs +57 -34
  503. package/src/execProcessKillPid.mjs +4 -2
  504. package/test/_execSpawnError.test.mjs +81 -0
  505. package/test/alive.test.mjs +201 -0
  506. package/test/cache.test.mjs +26 -0
  507. package/test/cacheSt.test.mjs +40 -0
  508. package/test/execCli.test.mjs +95 -0
  509. package/test/execCliJsonRpc.test.mjs +27 -0
  510. package/test/execCliSession.test.mjs +82 -0
  511. package/test/execProcess.test.mjs +135 -3
  512. package/test/execProcessKillPid.test.mjs +34 -0
  513. package/test/tools/spawnEmfileRunner.mjs +55 -0
  514. package/toolfp/dist/wsemip.umd.js +1 -1
  515. package/toolparfor/dist/wpf.umd.js +1 -1
  516. package/toolparfor/dist/wpf_pmSeries.umd.js +1 -1
@@ -133,7 +133,7 @@ export default u8arr2bs
133
133
  <br class="clear">
134
134
 
135
135
  <footer>
136
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Oct 12 2026 12:18:17 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
136
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Tue Oct 13 2026 23:59:17 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
137
137
  </footer>
138
138
 
139
139
  <script>prettyPrint();</script>
@@ -200,7 +200,7 @@ export default u8arr2obj
200
200
  <br class="clear">
201
201
 
202
202
  <footer>
203
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Oct 12 2026 12:18:17 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
203
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Tue Oct 13 2026 23:59:17 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
204
204
  </footer>
205
205
 
206
206
  <script>prettyPrint();</script>
@@ -132,7 +132,7 @@ export default u8arr2str
132
132
  <br class="clear">
133
133
 
134
134
  <footer>
135
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Oct 12 2026 12:18:17 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
135
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Tue Oct 13 2026 23:59:17 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
136
136
  </footer>
137
137
 
138
138
  <script>prettyPrint();</script>
@@ -130,7 +130,7 @@ export default u8arr2u16arr
130
130
  <br class="clear">
131
131
 
132
132
  <footer>
133
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Oct 12 2026 12:18:17 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
133
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Tue Oct 13 2026 23:59:17 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
134
134
  </footer>
135
135
 
136
136
  <script>prettyPrint();</script>
@@ -111,7 +111,7 @@ export default urlParse
111
111
  <br class="clear">
112
112
 
113
113
  <footer>
114
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Oct 12 2026 12:18:17 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
114
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Tue Oct 13 2026 23:59:17 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
115
115
  </footer>
116
116
 
117
117
  <script>prettyPrint();</script>
@@ -224,7 +224,7 @@ export default verifyValue
224
224
  <br class="clear">
225
225
 
226
226
  <footer>
227
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Oct 12 2026 12:18:17 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
227
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Tue Oct 13 2026 23:59:17 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
228
228
  </footer>
229
229
 
230
230
  <script>prettyPrint();</script>
@@ -215,7 +215,7 @@ export default waitFun
215
215
  <br class="clear">
216
216
 
217
217
  <footer>
218
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Oct 12 2026 12:18:17 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
218
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Tue Oct 13 2026 23:59:17 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
219
219
  </footer>
220
220
 
221
221
  <script>prettyPrint();</script>
package/docs/wsemi.html CHANGED
@@ -178,7 +178,7 @@
178
178
 
179
179
  <dt class="tag-source">Source:</dt>
180
180
  <dd class="tag-source"><ul class="dummy"><li>
181
- <a href="execCliCore.mjs.html">execCliCore.mjs</a>, <a href="execCliCore.mjs.html#line265">line 265</a>
181
+ <a href="execCliCore.mjs.html">execCliCore.mjs</a>, <a href="execCliCore.mjs.html#line268">line 268</a>
182
182
  </li></ul></dd>
183
183
 
184
184
 
@@ -1689,7 +1689,7 @@ str與base64須與加密時str2aes所用之設定相同,否則解不出原文
1689
1689
 
1690
1690
  <dt class="tag-source">Source:</dt>
1691
1691
  <dd class="tag-source"><ul class="dummy"><li>
1692
- <a href="alive.mjs.html">alive.mjs</a>, <a href="alive.mjs.html#line88">line 88</a>
1692
+ <a href="alive.mjs.html">alive.mjs</a>, <a href="alive.mjs.html#line118">line 118</a>
1693
1693
  </li></ul></dd>
1694
1694
 
1695
1695
 
@@ -1736,7 +1736,7 @@ str與base64須與加密時str2aes所用之設定相同,否則解不出原文
1736
1736
 
1737
1737
  <h5 class="h5-examples">Example</h5>
1738
1738
 
1739
- <pre class="prettyprint"><code>async function topAsync() {
1740
1739
  function test1() {
1741
1740
  return new Promise((resolve, reject) => {
1742
1741
  let ms = []
1743
1742
  let oAL = alive({ timeAlive: 1500 })
1744
1743
  let t = Date.now()
1745
1744
  let a = { data: 123 }
1746
1745
  let b = { data: '34.56' }
1747
1746
  setTimeout(() => {
1748
1747
  console.log(parseInt((Date.now() - t)) + 'ms', 'trigger a1')
1749
1748
  oAL.trigger('a', a)
1750
1749
  }, 500)
1751
1750
  setTimeout(() => {
1752
1751
  console.log(parseInt((Date.now() - t)) + 'ms', 'trigger a2')
1753
1752
  oAL.trigger('a', a)
1754
1753
  }, 1900)
1755
1754
  setTimeout(() => {
1756
1755
  console.log(parseInt((Date.now() - t)) + 'ms', 'trigger b1')
1757
1756
  oAL.trigger('b', b)
1758
1757
  }, 1000)
1759
1758
  setTimeout(() => {
1760
1759
  console.log(parseInt((Date.now() - t)) + 'ms', 'trigger b2')
1761
1760
  oAL.trigger('b', b)
1762
1761
  }, 3000)
1763
1762
  oAL.on('message', function({ eventName, key, data, now }) {
1764
1763
  console.log(parseInt((Date.now() - t)) + 'ms', { eventName, key, data, now })
1765
1764
  ms.push(eventName + '|' + key)
1766
1765
  })
1767
1766
  setTimeout(() => {
1768
1767
  resolve(ms)
1769
1768
  }, 5000)
1770
1769
  })
1771
1770
  }
1772
1771
  console.log('test1')
1773
1772
  let r1 = await test1()
1774
1773
  console.log(JSON.stringify(r1))
1775
1774
  // test1
1776
1775
  // 503ms trigger a1
1777
1776
  // 508ms { eventName: 'enter', key: 'a', data: { data: 123 }, now: 1 }
1778
1777
  // 1001ms trigger b1
1779
1778
  // 1003ms { eventName: 'enter', key: 'b', data: { data: '34.56' }, now: 2 }
1780
1779
  // 1901ms trigger a2
1781
1780
  // 2523ms { eventName: 'leave', key: 'b', data: { data: '34.56' }, now: 1 }
1782
1781
  // 3002ms trigger b2
1783
1782
  // 3004ms { eventName: 'enter', key: 'b', data: { data: '34.56' }, now: 2 }
1784
1783
  // 3430ms { eventName: 'leave', key: 'a', data: { data: 123 }, now: 1 }
1785
1784
  // 4544ms { eventName: 'leave', key: 'b', data: { data: '34.56' }, now: 0 }
1786
1785
  // ["enter|a","enter|b","leave|b","enter|b","leave|a","leave|b"]
1786
+ <pre class="prettyprint"><code>async function topAsync() {
1787
1787
  function test1() {
1788
1788
  return new Promise((resolve, reject) => {
1789
1789
  let ms = []
1790
1790
  let oAL = alive({ timeAlive: 1500 })
1791
1791
  let t = Date.now()
1792
1792
  let a = { data: 123 }
1793
1793
  let b = { data: '34.56' }
1794
1794
  setTimeout(() => {
1795
1795
  console.log(parseInt((Date.now() - t)) + 'ms', 'trigger a1')
1796
1796
  oAL.trigger('a', a)
1797
1797
  }, 500)
1798
1798
  setTimeout(() => {
1799
1799
  console.log(parseInt((Date.now() - t)) + 'ms', 'trigger a2')
1800
1800
  oAL.trigger('a', a)
1801
1801
  }, 1900)
1802
1802
  setTimeout(() => {
1803
1803
  console.log(parseInt((Date.now() - t)) + 'ms', 'trigger b1')
1804
1804
  oAL.trigger('b', b)
1805
1805
  }, 1000)
1806
1806
  setTimeout(() => {
1807
1807
  console.log(parseInt((Date.now() - t)) + 'ms', 'trigger b2')
1808
1808
  oAL.trigger('b', b)
1809
1809
  }, 3000)
1810
1810
  oAL.on('message', function({ eventName, key, data, now }) {
1811
1811
  console.log(parseInt((Date.now() - t)) + 'ms', { eventName, key, data, now })
1812
1812
  ms.push(eventName + '|' + key)
1813
1813
  })
1814
1814
  setTimeout(() => {
1815
1815
  resolve(ms)
1816
1816
  }, 5000)
1817
1817
  })
1818
1818
  }
1819
1819
  console.log('test1')
1820
1820
  let r1 = await test1()
1821
1821
  console.log(JSON.stringify(r1))
1822
1822
  // test1
1823
1823
  // 503ms trigger a1
1824
1824
  // 508ms { eventName: 'enter', key: 'a', data: { data: 123 }, now: 1 }
1825
1825
  // 1001ms trigger b1
1826
1826
  // 1003ms { eventName: 'enter', key: 'b', data: { data: '34.56' }, now: 2 }
1827
1827
  // 1901ms trigger a2
1828
1828
  // 2523ms { eventName: 'leave', key: 'b', data: { data: '34.56' }, now: 1 }
1829
1829
  // 3002ms trigger b2
1830
1830
  // 3004ms { eventName: 'enter', key: 'b', data: { data: '34.56' }, now: 2 }
1831
1831
  // 3430ms { eventName: 'leave', key: 'a', data: { data: 123 }, now: 1 }
1832
1832
  // 4544ms { eventName: 'leave', key: 'b', data: { data: '34.56' }, now: 0 }
1833
1833
  // ["enter|a","enter|b","leave|b","enter|b","leave|a","leave|b"]
1834
1834
  function test2() {
1835
1835
  return new Promise((resolve, reject) => {
1836
1836
  let ms = []
1837
1837
  let oAL = alive({ timeAlive: 1500 })
1838
1838
  oAL.on('message', function({ eventName, key }) {
1839
1839
  ms.push(eventName + '|' + key)
1840
1840
  })
1841
1841
  oAL.trigger('a', { data: 123 })
1842
1842
  setTimeout(() => {
1843
1843
  oAL.trigger('b', { data: '34.56' })
1844
1844
  let r = oAL.clear() //b剛trigger尚未發出enter, 故只回傳a, 且b之enter不再發出
1845
1845
  ms.push('clear|' + r.map((v) => v.key).join(','))
1846
1846
  }, 500)
1847
1847
  setTimeout(() => {
1848
1848
  resolve(ms)
1849
1849
  }, 2500)
1850
1850
  })
1851
1851
  }
1852
1852
  console.log('test2')
1853
1853
  let r2 = await test2()
1854
1854
  console.log(JSON.stringify(r2))
1855
1855
  // test2
1856
1856
  // ["enter|a","clear|a"]
1857
1857
 
1858
1858
 
1859
1859
 
@@ -1869,7 +1869,7 @@ str與base64須與加密時str2aes所用之設定相同,否則解不出原文
1869
1869
 
1870
1870
 
1871
1871
  <div class="param-desc">
1872
- <p>回傳事件物件,可呼叫函數on、trigger、get。trigger給予單元的唯一key字串與攜帶數據data物件,on為監聽事件,需自行監聽message事件取得單元進出事件。get事件可取得alive內視為存活的單元清單。事件物件為原生EventEmitter(eventemitter3)。本模組於派發處以try攔截監聽器之同步拋錯,故其不會使行程崩潰,會改以error事件回報{ fun: 'listener', name, msg, args },無error監聽者則console.error;惟依EventEmitter規範,同一次派發中先拋錯之監聽器會中止該次派發,其後之監聽器不再被呼叫。async監聽器之reject不被攔截(規範上emit不觀察監聽器回傳值),須由監聽器自行處理,否則為unhandledRejection</p>
1872
+ <p>回傳事件物件,可呼叫函數on、trigger、get、clear。trigger給予單元的唯一key字串與攜帶數據data物件,on為監聽事件,需自行監聽message事件取得單元進出事件。get事件可取得alive內視為存活的單元清單(含剛trigger而尚未發出enter者)。clear為釋放:立即清除偵測計時器、取消尚未發出之enter、清空佇列,本身不發事件,其後不再發出任何事件、trigger無效、get回傳[],可重複呼叫(釋放為終態,需重新偵測者另建alive);clear回傳已發出enter且尚未leave之單元陣列[{ key, data }],供使用端補發離線通知,再次呼叫回傳[];監聽器於派發中呼叫clear亦安全,同一輪尚未處理之單元不再派發。事件物件為原生EventEmitter(eventemitter3)。本模組於派發處以try攔截監聽器之同步拋錯,故其不會使行程崩潰,會改以error事件回報{ fun: 'listener', name, msg, args },無error監聽者則console.error;惟依EventEmitter規範,同一次派發中先拋錯之監聽器會中止該次派發,其後之監聽器不再被呼叫。async監聽器之reject不被攔截(規範上emit不觀察監聽器回傳值),須由監聽器自行處理,否則為unhandledRejection</p>
1873
1873
  </div>
1874
1874
 
1875
1875
 
@@ -35253,7 +35253,7 @@ once自動移除等),封裝層自身反而成為「調用方拿到非預期
35253
35253
  <p>【為何不以setTimeout脫勾來迴避】</p>
35254
35254
  <p>setTimeout會開一個「沒有呼叫者」的堆疊,監聽器之同步拋錯於該處即為uncaughtException,
35255
35255
  且呼叫端無論如何try都攔不到(此與監聽器是否為async無關,純同步監聽器亦然)。
35256
- 於呼叫端之堆疊上派發,一個普通的try即可攔下。確實需要脫勾者請改用evEmitDefer,
35256
+ 於呼叫端之堆疊上派發,一個普通的try即可攔下。確實需要脫勾者請改用evEmitDelay,
35257
35257
  其內部即以本函數派發,故仍有攔截。</p>
35258
35258
  <p>【為何不處理async監聽器之reject】</p>
35259
35259
  <p>emit依EventEmitter規範丟棄監聽器之回傳值,其rejection無人觀察;nodejs文件亦明載
@@ -36366,14 +36366,14 @@ ev.emit('evName', data)</code></pre>
36366
36366
  <dd class="tag-description"><ul class="dummy"><li><p>通用CLI子程序調用,封裝逾時、進程樹清理、輸出驗證、結構化錯誤回報與自動重試
36367
36367
  各參數原樣傳遞給目標CLI,支援中文
36368
36368
  Windows下npm全域安裝之命令為.cmd批次檔,Node.js spawn無法直接執行(CVE-2024-27980安全修正後回EINVAL),內部已參考cross-spawn自動解析.cmd入口並繞過cmd.exe,故可支援含多行文字之參數
36369
- 本函數不throw,一律以結果物件之ok與error欄位回報成敗</p>
36369
+ 本函數不throw,一律以結果物件之ok與error欄位回報成敗,error不含args與env之值(子程序自身之輸出另見stdout、stderr)</p>
36370
36370
  <p>Unit Test: <a href="https://github.com/yuda-lyu/wsemi/blob/master/test/execCli.test.mjs">Github</a></p></li></ul></dd>
36371
36371
 
36372
36372
 
36373
36373
 
36374
36374
  <dt class="tag-source">Source:</dt>
36375
36375
  <dd class="tag-source"><ul class="dummy"><li>
36376
- <a href="execCli.mjs.html">execCli.mjs</a>, <a href="execCli.mjs.html#line373">line 373</a>
36376
+ <a href="execCli.mjs.html">execCli.mjs</a>, <a href="execCli.mjs.html#line404">line 404</a>
36377
36377
  </li></ul></dd>
36378
36378
 
36379
36379
 
@@ -36857,7 +36857,7 @@ test()
36857
36857
  </td>
36858
36858
 
36859
36859
 
36860
- <td class="description last"><p>輸入stdout串流回調函數,格式為(chunk)=&gt;{},預設undefined</p></td>
36860
+ <td class="description last"><p>輸入stdout串流回調函數,格式為(chunk)=&gt;{},回調內拋出之錯誤不會被攔截,將成為未捕捉例外,請於回調內自行處理,預設undefined</p></td>
36861
36861
  </tr>
36862
36862
 
36863
36863
 
@@ -36895,7 +36895,7 @@ test()
36895
36895
  </td>
36896
36896
 
36897
36897
 
36898
- <td class="description last"><p>輸入stderr串流回調函數,格式為(chunk)=&gt;{},預設undefined</p></td>
36898
+ <td class="description last"><p>輸入stderr串流回調函數,格式為(chunk)=&gt;{},行為同onStdout,預設undefined</p></td>
36899
36899
  </tr>
36900
36900
 
36901
36901
 
@@ -36973,7 +36973,7 @@ test()
36973
36973
  </td>
36974
36974
 
36975
36975
 
36976
- <td class="description last"><p>輸入失敗後最大重試次數非負整數,遇ENOENT(命令不存在)或exit code 2(參數錯誤)視為不可重試而立即中止,預設0</p></td>
36976
+ <td class="description last"><p>輸入失敗後最大重試次數非負整數,遇ENOENT(命令不存在)、exit code 2(參數錯誤)或無法啟動子進程之同步錯誤(如參數過長、權限不足、非有效執行檔、參數含空字元)視為不可重試而立即中止,預設0</p></td>
36977
36977
  </tr>
36978
36978
 
36979
36979
 
@@ -37085,7 +37085,7 @@ test()
37085
37085
  <dt class="tag-description">Description:</dt>
37086
37086
  <dd class="tag-description"><ul class="dummy"><li><p>對stdio協定型CLI依序送出一行一則JSON之請求並收集回應(疊於execCliSession之上),適用codex app-server、MCP之stdio伺服器等以換行分隔JSON之協定(LSP為Content-Length分幀,不適用)
37087
37087
  不內建任何協定知識,initialize/initialized等握手由呼叫端以請求陣列表達
37088
- 本函數不throw,一律以結果物件之ok與error、errorType欄位回報成敗</p>
37088
+ 本函數不throw,一律以結果物件之ok與error、errorType欄位回報成敗,error不含args與env之值</p>
37089
37089
  <p>規則:</p>
37090
37090
  <ul>
37091
37091
  <li>請求物件含method者為請求,自動配id(自0遞增)並等待同id之回應;含notify者為通知,不配id,送出即繼續</li>
@@ -37746,7 +37746,7 @@ test()
37746
37746
  </td>
37747
37747
 
37748
37748
 
37749
- <td class="description last"><p>輸入stderr片段回調函數,格式為(chunk)=&gt;{},預設undefined</p></td>
37749
+ <td class="description last"><p>輸入stderr片段回調函數,格式為(chunk)=&gt;{},預設undefined。onNotify、onServerRequest、onStderr內拋出之錯誤不會被攔截,將成為未捕捉例外,請於回調內自行處理</p></td>
37750
37750
  </tr>
37751
37751
 
37752
37752
 
@@ -37818,14 +37818,14 @@ test()
37818
37818
  <dt class="tag-description">Description:</dt>
37819
37819
  <dd class="tag-description"><ul class="dummy"><li><p>建立互動式stdio工作階段(session),用於stdio協定型之長駐CLI(如MCP之stdio伺服器、codex app-server等一行一則JSON之程式),與execCli「寫完input即關閉stdin並等待結束」之一次性契約不同,本函數維持stdin開啟,由呼叫端逐次write,直到呼叫stop()才關閉stdin並等待子進程自行退出,逾寬限期則以execProcessKillPid樹殺
37820
37820
  Windows下npm全域安裝之命令為.cmd批次檔,內部經execCliCore.buildSpawnArgs解析為以node執行其JS入口,不使用shell:true,故樹殺可確實涵蓋子孫程序
37821
- 本函數不throw亦不reject,spawn失敗(如ENOENT)以onExit與stop()之結果物件回報</p>
37821
+ 本函數不throw亦不reject,spawn失敗(如ENOENT)以onExit與stop()之結果物件回報,其error不含args與env之值</p>
37822
37822
  <p>Unit Test: <a href="https://github.com/yuda-lyu/wsemi/blob/master/test/execCliSession.test.mjs">Github</a></p></li></ul></dd>
37823
37823
 
37824
37824
 
37825
37825
 
37826
37826
  <dt class="tag-source">Source:</dt>
37827
37827
  <dd class="tag-source"><ul class="dummy"><li>
37828
- <a href="execCliSession.mjs.html">execCliSession.mjs</a>, <a href="execCliSession.mjs.html#line79">line 79</a>
37828
+ <a href="execCliSession.mjs.html">execCliSession.mjs</a>, <a href="execCliSession.mjs.html#line80">line 80</a>
37829
37829
  </li></ul></dd>
37830
37830
 
37831
37831
 
@@ -38463,7 +38463,7 @@ test()
38463
38463
  </td>
38464
38464
 
38465
38465
 
38466
- <td class="description last"><p>輸入子進程結束回調函數,格式為(result)=&gt;{},result同stop()之回傳,預設undefined</p></td>
38466
+ <td class="description last"><p>輸入子進程結束回調函數,格式為(result)=&gt;{},result同stop()之回傳,預設undefined。onLine、onStdout、onStderr、onExit內拋出之錯誤不會被攔截,將成為未捕捉例外,請於回調內自行處理</p></td>
38467
38467
  </tr>
38468
38468
 
38469
38469
 
@@ -38785,7 +38785,7 @@ if (true) {
38785
38785
 
38786
38786
  <dt class="tag-source">Source:</dt>
38787
38787
  <dd class="tag-source"><ul class="dummy"><li>
38788
- <a href="execProcess.mjs.html">execProcess.mjs</a>, <a href="execProcess.mjs.html#line61">line 61</a>
38788
+ <a href="execProcess.mjs.html">execProcess.mjs</a>, <a href="execProcess.mjs.html#line64">line 64</a>
38789
38789
  </li></ul></dd>
38790
38790
 
38791
38791
 
@@ -38847,6 +38847,7 @@ if (true) {
38847
38847
 
38848
38848
  if (true) {
38849
38849
  //execFile與spawn之args須為陣列, 每個元素為一個參數; 給字串會被當成單一參數而失敗
38850
+ //密碼置於命令列參數時同機其他使用者可由程序列表看到; 失敗訊息不含args, 但子程序自身之輸出可能回顯
38850
38851
  let prog = `C:\\Program Files\\7-Zip\\7z.exe`
38851
38852
  let pw = 'AbcD1234'
38852
38853
  let args = ['a', 'abc.7z', 'abc.txt', `-p${pw}`]
@@ -38959,7 +38960,7 @@ if (true) {
38959
38960
  </td>
38960
38961
 
38961
38962
 
38962
- <td class="description last"><p>輸入腳本檔案位置字串或參數</p></td>
38963
+ <td class="description last"><p>輸入參數陣列或字串,例如腳本檔案位置字串,空陣列或空字串代表無參數;非陣列亦非字串時reject錯誤訊息(不拋錯)</p></td>
38963
38964
  </tr>
38964
38965
 
38965
38966
 
@@ -39062,7 +39063,7 @@ if (true) {
39062
39063
  </td>
39063
39064
 
39064
39065
 
39065
- <td class="description last"><p>輸入執行模式字串,可選'spawn'、'exec'、'execFile',預設'spawn'。'spawn'不經shell直接執行,輸出以串流處理,適合大量輸出或長時間執行,prog與args不需也不可加引號;'exec'經shell執行,prog與args以空白串接成指令字串,適合須用到shell語法之情形,陣列型args之元素含空白且未含雙引號者會自動以雙引號包住,prog含空白亦同,已含雙引號者視為呼叫端自行處理而原樣串接,字串型args視為呼叫端已自組之指令列,原樣串接不加引號;'execFile'不經shell直接執行可執行檔,args須為陣列,給字串會被當成單一參數。三種模式之stdout與stderr皆以Buffer接收後走同一條解碼路徑</p></td>
39066
+ <td class="description last"><p>輸入執行模式字串,可選'spawn'、'exec'、'execFile',預設'spawn'。'spawn'不經shell直接執行,輸出以串流處理,適合大量輸出或長時間執行,prog與args不需也不可加引號;'exec'經shell執行,prog與args以空白串接成指令字串,適合須用到shell語法之情形,陣列型args之元素含空白且未含雙引號者會自動以雙引號包住,prog含空白亦同,已含雙引號者視為呼叫端自行處理而原樣串接,字串型args視為呼叫端已自組之指令列,原樣串接不加引號;'execFile'不經shell直接執行可執行檔,args須為陣列,給字串會被當成單一參數。三種模式之stdout與stderr皆以Buffer接收後走同一條解碼路徑;惟'exec'與'execFile'之stdout或stderr超過1MB(node之maxBuffer預設值)時子程序會被node終止,reject為<code>code[null]:\n訊息</code>,大量輸出請用'spawn'</p></td>
39066
39067
  </tr>
39067
39068
 
39068
39069
 
@@ -39102,7 +39103,7 @@ if (true) {
39102
39103
  </td>
39103
39104
 
39104
39105
 
39105
- <td class="description last"><p>輸入回調stdout函數,預設null。收到的是經串流解碼之字串,多位元組字元跨chunk時會等到完整才給,故不會收到空字串;codeCmd為'auto'時回調為盡力判定,該串流首次遇到非utf-8位元組後才改用系統字碼頁,之前已回調之字串不追溯,最終結果以resolve或reject之字串為準</p></td>
39106
+ <td class="description last"><p>輸入回調stdout函數,預設null。收到的是經串流解碼之字串,多位元組字元跨chunk時會等到完整才給,故不會收到空字串;codeCmd為'auto'時回調為盡力判定,該串流首次遇到非utf-8位元組後才改用系統字碼頁,之前已回調之字串不追溯,最終結果以resolve或reject之字串為準。回調內拋出之錯誤不會被攔截,將成為未捕捉例外,請於回調內自行處理</p></td>
39106
39107
  </tr>
39107
39108
 
39108
39109
 
@@ -39295,7 +39296,7 @@ if (true) {
39295
39296
 
39296
39297
 
39297
39298
  <div class="param-desc">
39298
- <p>回傳Promise,resolve回傳stdout與stderr依到達順序合併之字串,不另加換行,子程序自己的換行原樣保留;reject回傳錯誤訊息,離開碼非0時為<code>code[N]:\n訊息</code>,逾時為<code>timeout[Nms]:\n訊息</code></p>
39299
+ <p>回傳Promise,resolve回傳stdout與stderr依到達順序合併之字串,不另加換行,子程序自己的換行原樣保留;reject回傳錯誤訊息字串:離開碼非0時為<code>code[N]:\n訊息</code>,訊息為子程序之輸出,子程序因訊號結束時N為null;逾時為<code>timeout[Nms]:\n訊息</code>;無法啟動子程序時(找不到執行檔、權限不足、非有效執行檔、參數過長、參數含空字元、系統資源用盡等)為<code>spawn[錯誤碼]:\n訊息</code>,訊息為node之錯誤說明(可含執行檔路徑),不含args之內容;args型別不符、codeCmd不支援或spawn模式prog含引號時為說明字串</p>
39299
39300
  </div>
39300
39301
 
39301
39302
 
@@ -39339,7 +39340,7 @@ if (true) {
39339
39340
 
39340
39341
  <dt class="tag-source">Source:</dt>
39341
39342
  <dd class="tag-source"><ul class="dummy"><li>
39342
- <a href="execProcessKillPid.mjs.html">execProcessKillPid.mjs</a>, <a href="execProcessKillPid.mjs.html#line27">line 27</a>
39343
+ <a href="execProcessKillPid.mjs.html">execProcessKillPid.mjs</a>, <a href="execProcessKillPid.mjs.html#line28">line 28</a>
39343
39344
  </li></ul></dd>
39344
39345
 
39345
39346
 
@@ -39473,7 +39474,7 @@ if (true) {
39473
39474
 
39474
39475
 
39475
39476
  <div class="param-desc">
39476
- <p>回傳Promise,resolve回傳成功訊息,reject回傳錯誤訊息</p>
39477
+ <p>回傳Promise,resolve回傳成功訊息<code>pid[N] killed</code>,reject回傳錯誤訊息字串<code>pid[N] kill failed: 訊息</code>;Windows下訊息含taskkill之輸出,其為系統字碼頁而可能無法正確顯示</p>
39477
39478
  </div>
39478
39479
 
39479
39480
 
@@ -110651,7 +110652,7 @@ console.log(u8arr2u16arr('abc', { returnWithStateAndMsg: true }))
110651
110652
  <br class="clear">
110652
110653
 
110653
110654
  <footer>
110654
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Oct 12 2026 12:18:18 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
110655
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Tue Oct 13 2026 23:59:17 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
110655
110656
  </footer>
110656
110657
 
110657
110658
  <script>prettyPrint();</script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wsemi",
3
- "version": "1.9.13",
3
+ "version": "1.9.15",
4
4
  "main": "dist/wsemi.umd.js",
5
5
  "dependencies": {
6
6
  "@zumer/snapdom": "^3.3.0",
@@ -27,7 +27,7 @@
27
27
  "xxhash-wasm": "^1.1.0"
28
28
  },
29
29
  "devDependencies": {
30
- "w-package-tools": "^1.1.16"
30
+ "w-package-tools": "^1.1.17"
31
31
  },
32
32
  "scripts": {
33
33
  "test": "mocha --parallel \"test/*.test.mjs\" --timeout 180000",
package/script.txt CHANGED
@@ -6,7 +6,7 @@ node toolg/gPackageIndex.mjs
6
6
  node toolg/cleanFolder.mjs
7
7
  ./node_modules/.bin/jsdoc -c .jsdoc
8
8
  node toolg/gDocsExams.mjs
9
- node toolg/gDocsEditor.mjs
9
+ #node toolg/gDocsEditor.mjs
10
10
 
11
11
  node toolfp/gDistRollup.mjs
12
12
  node toolparfor/gDistRollup.mjs
@@ -0,0 +1,41 @@
1
+ import isestr from './isestr.mjs'
2
+
3
+
4
+ //execProcess、execCli、execCliSession回報「無法啟動子進程」之共用核心, 獨立成模組以便直接餵錯誤物件做單元測試
5
+ // 來源: node之spawn同步拋錯(EPERM、UNKNOWN、ENAMETOOLONG, 以及參數檢查之ERR_INVALID_ARG_VALUE、ERR_INVALID_ARG_TYPE等)與'error'事件(ENOENT、EACCES、EAGAIN、EMFILE、ENFILE)
6
+ // 只讀code、message與errno, 不讀spawnargs(node對非同步錯誤所附之完整參數陣列, exec模式為整條指令列)、cmd等可能含參數之屬性
7
+ // 有errno者為系統錯誤, message為「syscall 錯誤碼」, syscall為'spawn'或'spawn 執行檔', 不含參數, 原樣使用
8
+ // 無errno者為node之參數檢查錯誤, message以「. Received 值」結尾, 值為該參數或環境變數之內容(node以inspect取前128字元), 故去除, 保留參數名稱(如args[2])以利判讀
9
+
10
+
11
+ //execSpawnError, 輸入錯誤物件, 回傳{ code, message }, 缺code時為'UNKNOWN', 缺message時以code代之, 任何輸入皆不拋錯
12
+ function execSpawnError(err) {
13
+ let code = ''
14
+ let message = ''
15
+ let errno = null
16
+ try {
17
+ code = err.code
18
+ message = err.message
19
+ errno = err.errno
20
+ }
21
+ catch (e) {}
22
+ if (!isestr(code)) {
23
+ code = 'UNKNOWN'
24
+ }
25
+ if (!isestr(message)) {
26
+ message = ''
27
+ }
28
+ if (typeof errno !== 'number') {
29
+ let i = message.indexOf('. Received ')
30
+ if (i >= 0) {
31
+ message = message.slice(0, i)
32
+ }
33
+ }
34
+ if (message === '') {
35
+ message = code
36
+ }
37
+ return { code, message }
38
+ }
39
+
40
+
41
+ export default execSpawnError