@futpib/parser 1.0.0 → 1.0.2

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 (380) hide show
  1. package/build/allSettledStream.js +32 -14
  2. package/build/allSettledStream.test.js +32 -0
  3. package/build/androidPackage.d.ts +39 -0
  4. package/build/androidPackageParser.d.ts +17 -0
  5. package/build/androidPackageParser.js +183 -0
  6. package/build/{apkParser.test.js → androidPackageParser.test.js} +7 -7
  7. package/build/androidPackageUnparser.d.ts +4 -0
  8. package/build/androidPackageUnparser.js +90 -0
  9. package/build/androidPackageUnparser.test.js +26 -0
  10. package/build/arbitrarilySlicedAsyncInterable.d.ts +3 -1
  11. package/build/arbitrarilySlicedAsyncInterable.js +3 -3
  12. package/build/arbitraryFileSystemEntry.js +1 -1
  13. package/build/arbitraryZip.d.ts +1 -1
  14. package/build/arbitraryZip.js +13 -19
  15. package/build/arbitraryZipPermissions.d.ts +1 -8
  16. package/build/arbitraryZipPermissions.js +1 -16
  17. package/build/arbitraryZipStream.d.ts +1 -1
  18. package/build/arbitraryZipStream.js +3 -3
  19. package/build/arrayParser.d.ts +1 -1
  20. package/build/arrayParser.js +2 -2
  21. package/build/arrayParser.test.js +4 -4
  22. package/build/arrayUnparser.d.ts +2 -0
  23. package/build/arrayUnparser.js +8 -0
  24. package/build/backsmali.d.ts +1 -0
  25. package/build/backsmali.js +22 -0
  26. package/build/bsonParser.js +6 -2
  27. package/build/bsonParser.test.js +2 -2
  28. package/build/{parserInvariant.d.ts → customInvariant.d.ts} +1 -1
  29. package/build/{parserInvariant.js → customInvariant.js} +1 -1
  30. package/build/dalvikBytecodeParser/formatParsers.d.ts +97 -0
  31. package/build/dalvikBytecodeParser/formatParsers.js +169 -0
  32. package/build/dalvikBytecodeParser.d.ts +107 -0
  33. package/build/dalvikBytecodeParser.js +836 -0
  34. package/build/dalvikExecutable.d.ts +158 -0
  35. package/build/dalvikExecutable.js +20 -0
  36. package/build/dalvikExecutableParser/stringSyntaxParser.d.ts +4 -0
  37. package/build/dalvikExecutableParser/stringSyntaxParser.js +76 -0
  38. package/build/dalvikExecutableParser/typeParsers.d.ts +10 -0
  39. package/build/dalvikExecutableParser/typeParsers.js +34 -0
  40. package/build/dalvikExecutableParser/typedNumbers.d.ts +90 -0
  41. package/build/dalvikExecutableParser/typedNumbers.js +19 -0
  42. package/build/dalvikExecutableParser.d.ts +5 -0
  43. package/build/dalvikExecutableParser.js +1439 -0
  44. package/build/dalvikExecutableParser.test.js +70 -0
  45. package/build/dalvikExecutableParserAgainstSmaliParser.test.js +298 -0
  46. package/build/debugLogInputParser.d.ts +4 -0
  47. package/build/debugLogInputParser.js +16 -0
  48. package/build/debugLogParser.d.ts +1 -1
  49. package/build/debugLogParser.js +15 -4
  50. package/build/disjunctionParser.d.ts +2 -1
  51. package/build/disjunctionParser.js +4 -2
  52. package/build/elementParser.d.ts +2 -2
  53. package/build/elementParser.js +1 -1
  54. package/build/elementTerminatedArrayParser.d.ts +3 -0
  55. package/build/elementTerminatedArrayParser.js +18 -0
  56. package/build/elementTerminatedArrayParser.test.js +52 -0
  57. package/build/elementTerminatedSequenceArrayParser.d.ts +3 -0
  58. package/build/elementTerminatedSequenceArrayParser.js +32 -0
  59. package/build/elementTerminatedSequenceArrayParser.test.js +34 -0
  60. package/build/elementTerminatedSequenceParser.d.ts +3 -0
  61. package/build/elementTerminatedSequenceParser.js +27 -0
  62. package/build/elementTerminatedSequenceParser.test.js +34 -0
  63. package/build/endOfInputParser.d.ts +2 -2
  64. package/build/exactElementParser.d.ts +1 -1
  65. package/build/exactElementParser.js +10 -5
  66. package/build/exactSequenceParser.d.ts +2 -1
  67. package/build/exactSequenceParser.js +12 -2
  68. package/build/fetchCid.d.ts +1 -0
  69. package/build/fetchCid.js +107 -0
  70. package/build/fixedLengthSequenceParser.d.ts +1 -0
  71. package/build/fixedLengthSequenceParser.js +18 -1
  72. package/build/fixedLengthSequenceParser.test.js +41 -0
  73. package/build/hasExecutable.d.ts +1 -0
  74. package/build/hasExecutable.js +8 -0
  75. package/build/highResolutionTimer.d.ts +16 -0
  76. package/build/highResolutionTimer.js +42 -0
  77. package/build/index.d.ts +5 -2
  78. package/build/index.js +3 -0
  79. package/build/inputReader.d.ts +14 -3
  80. package/build/inputReader.js +43 -6
  81. package/build/inputReader.test.js +172 -7
  82. package/build/inputReaderState.d.ts +10 -0
  83. package/build/inputReaderState.js +16 -0
  84. package/build/inspect.d.ts +1 -0
  85. package/build/inspect.js +7 -0
  86. package/build/javaKeyStoreParser.d.ts +2 -0
  87. package/build/javaKeyStoreParser.js +67 -0
  88. package/build/javaKeyStoreParser.test.d.ts +1 -0
  89. package/build/javaKeyStoreParser.test.js +16 -0
  90. package/build/jsonParser.d.ts +2 -0
  91. package/build/jsonParser.js +13 -15
  92. package/build/jsonParser.test.js +2 -2
  93. package/build/leb128Parser.d.ts +7 -0
  94. package/build/leb128Parser.js +82 -0
  95. package/build/leb128Parser.test.d.ts +1 -0
  96. package/build/leb128Parser.test.js +107 -0
  97. package/build/listParser.d.ts +1 -1
  98. package/build/listParser.js +5 -5
  99. package/build/lookaheadParser.d.ts +2 -0
  100. package/build/lookaheadParser.js +14 -0
  101. package/build/{negativeLookahead.d.ts → negativeLookaheadParser.d.ts} +1 -1
  102. package/build/negativeLookaheadParser.js +24 -0
  103. package/build/negativeLookaheadParser.test.d.ts +1 -0
  104. package/build/negativeLookaheadParser.test.js +30 -0
  105. package/build/nonEmptyArrayParser.d.ts +2 -0
  106. package/build/nonEmptyArrayParser.js +32 -0
  107. package/build/nonEmptyArrayParser.test.d.ts +1 -0
  108. package/build/nonEmptyArrayParser.test.js +16 -0
  109. package/build/optionalParser.d.ts +1 -1
  110. package/build/optionalParser.js +2 -2
  111. package/build/parser.d.ts +13 -4
  112. package/build/parser.js +67 -32
  113. package/build/parser.test.js +94 -27
  114. package/build/parserAccessorParser.d.ts +1 -1
  115. package/build/parserAccessorParser.js +9 -1
  116. package/build/parserConsumedSequenceParser.d.ts +2 -0
  117. package/build/parserConsumedSequenceParser.js +22 -0
  118. package/build/parserContext.d.ts +20 -6
  119. package/build/parserContext.js +70 -40
  120. package/build/parserContext.test.js +34 -7
  121. package/build/parserCreatorCompose.d.ts +4 -3
  122. package/build/parserCreatorCompose.js +9 -3
  123. package/build/parserError.d.ts +6 -0
  124. package/build/parserError.js +6 -6
  125. package/build/parserImplementationInvariant.d.ts +1 -1
  126. package/build/parserImplementationInvariant.js +2 -2
  127. package/build/parserInputCompanion.d.ts +35 -0
  128. package/build/parserInputCompanion.js +68 -0
  129. package/build/promiseCompose.d.ts +1 -1
  130. package/build/promiseCompose.js +12 -1
  131. package/build/promiseSettled.d.ts +1 -0
  132. package/build/promiseSettled.js +4 -0
  133. package/build/quantifierParser.d.ts +2 -0
  134. package/build/quantifierParser.js +17 -0
  135. package/build/separatedArrayParser.d.ts +2 -0
  136. package/build/separatedArrayParser.js +39 -0
  137. package/build/separatedArrayParser.test.d.ts +1 -0
  138. package/build/separatedArrayParser.test.js +21 -0
  139. package/build/sequenceBuffer.d.ts +13 -3
  140. package/build/sequenceBuffer.js +60 -8
  141. package/build/sequenceBuffer.test.js +59 -2
  142. package/build/sequenceTerminatedSequenceParser.d.ts +5 -0
  143. package/build/sequenceTerminatedSequenceParser.js +32 -0
  144. package/build/sequenceTerminatedSequenceParser.test.d.ts +1 -0
  145. package/build/sequenceTerminatedSequenceParser.test.js +37 -0
  146. package/build/sequenceUnparser.d.ts +2 -0
  147. package/build/sequenceUnparser.js +6 -0
  148. package/build/skipParser.d.ts +1 -1
  149. package/build/skipParser.js +4 -2
  150. package/build/skipToParser.d.ts +2 -0
  151. package/build/skipToParser.js +11 -0
  152. package/build/sliceBoundedParser.d.ts +2 -2
  153. package/build/sliceBoundedParser.js +8 -3
  154. package/build/sliceBoundedParser.test.js +37 -3
  155. package/build/smali.d.ts +1 -0
  156. package/build/smali.js +17 -0
  157. package/build/smaliParser.d.ts +12 -0
  158. package/build/smaliParser.js +656 -0
  159. package/build/smaliParser.test.d.ts +1 -0
  160. package/build/smaliParser.test.js +115 -0
  161. package/build/terminatedArrayParser.d.ts +4 -2
  162. package/build/terminatedArrayParser.js +82 -5
  163. package/build/terminatedArrayParser.test.d.ts +1 -0
  164. package/build/terminatedArrayParser.test.js +131 -0
  165. package/build/toAsyncIterable.d.ts +1 -0
  166. package/build/toAsyncIterable.js +7 -0
  167. package/build/toAsyncIterator.d.ts +1 -0
  168. package/build/toAsyncIterator.js +33 -0
  169. package/build/tupleParser.d.ts +4 -0
  170. package/build/tupleParser.js +1 -5
  171. package/build/uint8Array.d.ts +1 -0
  172. package/build/uint8Array.js +7 -0
  173. package/build/unionParser.d.ts +2 -1
  174. package/build/unionParser.js +27 -12
  175. package/build/unionParser.test.d.ts +1 -0
  176. package/build/unionParser.test.js +60 -0
  177. package/build/unparser.d.ts +8 -0
  178. package/build/unparser.js +104 -0
  179. package/build/unparser.test.d.ts +1 -0
  180. package/build/unparser.test.js +150 -0
  181. package/build/unparserContext.d.ts +31 -0
  182. package/build/unparserContext.js +74 -0
  183. package/build/unparserError.d.ts +9 -0
  184. package/build/unparserError.js +9 -0
  185. package/build/unparserImplementationInvariant.d.ts +2 -0
  186. package/build/unparserImplementationInvariant.js +5 -0
  187. package/build/unparserOutputCompanion.d.ts +15 -0
  188. package/build/unparserOutputCompanion.js +13 -0
  189. package/build/zip.d.ts +9 -17
  190. package/build/zipParser.d.ts +20 -12
  191. package/build/zipParser.js +83 -71
  192. package/build/zipParser.test.js +2 -7
  193. package/build/zipUnparser.d.ts +8 -0
  194. package/build/zipUnparser.js +200 -0
  195. package/build/zipUnparser.test.d.ts +1 -0
  196. package/build/zipUnparser.test.js +80 -0
  197. package/package.json +26 -8
  198. package/src/allSettledStream.test.ts +40 -0
  199. package/src/allSettledStream.ts +47 -15
  200. package/src/androidPackage.ts +48 -0
  201. package/src/{apkParser.test.ts → androidPackageParser.test.ts} +7 -8
  202. package/src/androidPackageParser.test.ts.md +271 -0
  203. package/src/androidPackageParser.test.ts.snap +0 -0
  204. package/src/androidPackageParser.ts +440 -0
  205. package/src/androidPackageUnparser.test.ts +36 -0
  206. package/src/androidPackageUnparser.ts +120 -0
  207. package/src/arbitrarilySlicedAsyncInterable.ts +7 -2
  208. package/src/arbitraryFileSystemEntry.ts +2 -4
  209. package/src/arbitraryZip.ts +20 -27
  210. package/src/arbitraryZipPermissions.ts +0 -25
  211. package/src/arbitraryZipStream.ts +4 -4
  212. package/src/arrayParser.test.ts +4 -4
  213. package/src/arrayParser.ts +3 -2
  214. package/src/arrayUnparser.ts +13 -0
  215. package/src/backsmali.ts +30 -0
  216. package/src/bsonParser.test.ts +2 -2
  217. package/src/bsonParser.ts +16 -5
  218. package/src/{parserInvariant.ts → customInvariant.ts} +2 -2
  219. package/src/dalvikBytecodeParser/formatParsers.ts +421 -0
  220. package/src/dalvikBytecodeParser.ts +2074 -0
  221. package/src/dalvikExecutable.ts +220 -0
  222. package/src/dalvikExecutableParser/stringSyntaxParser.ts +145 -0
  223. package/src/dalvikExecutableParser/typeParsers.ts +65 -0
  224. package/src/dalvikExecutableParser/typedNumbers.ts +57 -0
  225. package/src/dalvikExecutableParser.test.ts +89 -0
  226. package/src/dalvikExecutableParser.test.ts.md +634 -0
  227. package/src/dalvikExecutableParser.test.ts.snap +0 -0
  228. package/src/dalvikExecutableParser.ts +2768 -0
  229. package/src/dalvikExecutableParserAgainstSmaliParser.test.ts +346 -0
  230. package/src/debugLogInputParser.ts +28 -0
  231. package/src/debugLogParser.ts +20 -4
  232. package/src/disjunctionParser.ts +10 -5
  233. package/src/elementParser.ts +3 -3
  234. package/src/elementTerminatedArrayParser.test.ts +99 -0
  235. package/src/elementTerminatedArrayParser.ts +31 -0
  236. package/src/elementTerminatedSequenceArrayParser.test.ts +54 -0
  237. package/src/elementTerminatedSequenceArrayParser.ts +52 -0
  238. package/src/elementTerminatedSequenceParser.test.ts +54 -0
  239. package/src/elementTerminatedSequenceParser.ts +43 -0
  240. package/src/endOfInputParser.ts +4 -4
  241. package/src/exactElementParser.ts +18 -12
  242. package/src/exactSequenceParser.ts +24 -3
  243. package/src/fetchCid.ts +125 -0
  244. package/src/fixedLengthSequenceParser.test.ts +77 -0
  245. package/src/fixedLengthSequenceParser.ts +28 -1
  246. package/src/hasExecutable.ts +11 -0
  247. package/src/highResolutionTimer.ts +49 -0
  248. package/src/index.ts +15 -2
  249. package/src/inputReader.test.ts +216 -7
  250. package/src/inputReader.ts +80 -5
  251. package/src/inputReaderState.ts +33 -0
  252. package/src/inspect.ts +9 -0
  253. package/src/javaKeyStore.ts +0 -0
  254. package/src/javaKeyStoreParser.test.ts +22 -0
  255. package/src/javaKeyStoreParser.test.ts.md +103 -0
  256. package/src/javaKeyStoreParser.test.ts.snap +0 -0
  257. package/src/javaKeyStoreParser.ts +136 -0
  258. package/src/jsonParser.test.ts +2 -2
  259. package/src/jsonParser.ts +23 -34
  260. package/src/leb128Parser.test.ts +171 -0
  261. package/src/leb128Parser.ts +125 -0
  262. package/src/listParser.ts +6 -6
  263. package/src/lookaheadParser.ts +19 -0
  264. package/src/negativeLookaheadParser.test.ts +53 -0
  265. package/src/negativeLookaheadParser.ts +36 -0
  266. package/src/nonEmptyArrayParser.test.ts +20 -0
  267. package/src/nonEmptyArrayParser.ts +44 -0
  268. package/src/optionalParser.ts +4 -3
  269. package/src/parser.test.ts +148 -27
  270. package/src/parser.test.ts.md +21 -21
  271. package/src/parser.test.ts.snap +0 -0
  272. package/src/parser.ts +153 -49
  273. package/src/parserAccessorParser.ts +12 -2
  274. package/src/parserConsumedSequenceParser.ts +29 -0
  275. package/src/parserContext.test.ts +38 -7
  276. package/src/parserContext.ts +127 -51
  277. package/src/parserCreatorCompose.ts +25 -7
  278. package/src/parserError.ts +9 -6
  279. package/src/parserImplementationInvariant.ts +2 -2
  280. package/src/parserInputCompanion.ts +102 -0
  281. package/src/promiseCompose.ts +17 -3
  282. package/src/promiseSettled.ts +6 -0
  283. package/src/quantifierParser.ts +25 -0
  284. package/src/separatedArrayParser.test.ts +34 -0
  285. package/src/separatedArrayParser.ts +55 -0
  286. package/src/sequenceBuffer.test.ts +72 -2
  287. package/src/sequenceBuffer.ts +93 -7
  288. package/src/sequenceTerminatedSequenceParser.test.ts +60 -0
  289. package/src/sequenceTerminatedSequenceParser.ts +62 -0
  290. package/src/sequenceUnparser.ts +9 -0
  291. package/src/skipParser.ts +7 -5
  292. package/src/skipToParser.ts +16 -0
  293. package/src/sliceBoundedParser.test.ts +45 -3
  294. package/src/sliceBoundedParser.ts +21 -3
  295. package/src/smali.ts +24 -0
  296. package/src/smaliParser.test.ts +132 -0
  297. package/src/smaliParser.test.ts.md +2320 -0
  298. package/src/smaliParser.test.ts.snap +0 -0
  299. package/src/smaliParser.ts +1166 -0
  300. package/src/terminatedArrayParser.test.ts +258 -0
  301. package/src/terminatedArrayParser.ts +111 -6
  302. package/src/toAsyncIterable.ts +7 -0
  303. package/src/toAsyncIterator.ts +48 -0
  304. package/src/tupleParser.ts +8 -5
  305. package/src/uint8Array.ts +10 -0
  306. package/src/unionParser.test.ts +79 -0
  307. package/src/unionParser.ts +44 -16
  308. package/src/unparser.test.ts +221 -0
  309. package/src/unparser.ts +209 -0
  310. package/src/unparserContext.ts +127 -0
  311. package/src/unparserError.ts +12 -0
  312. package/src/unparserImplementationInvariant.ts +6 -0
  313. package/src/unparserOutputCompanion.ts +24 -0
  314. package/src/zip.ts +10 -22
  315. package/src/zipParser.test.ts +2 -8
  316. package/src/zipParser.ts +223 -146
  317. package/src/zipUnparser.test.ts +119 -0
  318. package/src/zipUnparser.ts +300 -0
  319. package/build/apk.d.ts +0 -13
  320. package/build/apkParser.d.ts +0 -3
  321. package/build/apkParser.js +0 -135
  322. package/build/arbitraryDosDate.d.ts +0 -2
  323. package/build/arbitraryDosDate.js +0 -8
  324. package/build/arbitraryZipEntry.d.ts +0 -3
  325. package/build/arbitraryZipEntry.js +0 -26
  326. package/build/createDisjunctionParser.d.ts +0 -2
  327. package/build/createDisjunctionParser.js +0 -47
  328. package/build/createExactParser.d.ts +0 -2
  329. package/build/createExactParser.js +0 -12
  330. package/build/createSequentialUnionParser.d.ts +0 -2
  331. package/build/createSequentialUnionParser.js +0 -69
  332. package/build/fixedLengthChunkParser.d.ts +0 -2
  333. package/build/fixedLengthChunkParser.js +0 -12
  334. package/build/fixedLengthParser.d.ts +0 -2
  335. package/build/fixedLengthParser.js +0 -12
  336. package/build/inputChunkBuffer.d.ts +0 -15
  337. package/build/inputChunkBuffer.js +0 -40
  338. package/build/inputChunkBuffer.test.js +0 -34
  339. package/build/inputCompanion.d.ts +0 -18
  340. package/build/inputCompanion.js +0 -28
  341. package/build/invariantDefined.d.ts +0 -1
  342. package/build/invariantDefined.js +0 -5
  343. package/build/invariantIdentity.d.ts +0 -3
  344. package/build/invariantIdentity.js +0 -5
  345. package/build/jsonParser2.d.ts +0 -3
  346. package/build/jsonParser2.js +0 -52
  347. package/build/jsonParser2.test.js +0 -22
  348. package/build/negativeLookahead.js +0 -20
  349. package/build/parserCompose.d.ts +0 -3
  350. package/build/parserCompose.js +0 -7
  351. package/build/parserImplementationInvariantInvariant.d.ts +0 -3
  352. package/build/parserImplementationInvariantInvariant.js +0 -15
  353. package/build/promiseFish.d.ts +0 -1
  354. package/build/promiseFish.js +0 -3
  355. package/build/sequenceParser.d.ts +0 -3
  356. package/build/sequenceParser.js +0 -10
  357. package/build/terminatedSequenceParser.d.ts +0 -2
  358. package/build/terminatedSequenceParser.js +0 -24
  359. package/build/zipEntry.d.ts +0 -28
  360. package/build/zipFile.d.ts +0 -32
  361. package/build/zipFileEntry.d.ts +0 -6
  362. package/src/apk.ts +0 -16
  363. package/src/apkParser.test.ts.md +0 -268
  364. package/src/apkParser.test.ts.snap +0 -0
  365. package/src/apkParser.ts +0 -327
  366. package/src/inputCompanion.ts +0 -43
  367. package/src/invariantDefined.ts +0 -6
  368. package/src/invariantIdentity.ts +0 -8
  369. package/src/negativeLookahead.ts +0 -26
  370. /package/build/{apk.js → androidPackage.js} +0 -0
  371. /package/build/{apkParser.test.d.ts → androidPackageParser.test.d.ts} +0 -0
  372. /package/build/{arbitraryDosPermissions.d.ts → androidPackageUnparser.test.d.ts} +0 -0
  373. /package/build/{arbitraryDosPermissions.js → dalvikExecutableParser.test.d.ts} +0 -0
  374. /package/build/{inputChunkBuffer.test.d.ts → dalvikExecutableParserAgainstSmaliParser.test.d.ts} +0 -0
  375. /package/build/{jsonParser2.test.d.ts → elementTerminatedArrayParser.test.d.ts} +0 -0
  376. /package/build/{parserParsingInvariant.d.ts → elementTerminatedSequenceArrayParser.test.d.ts} +0 -0
  377. /package/build/{parserParsingInvariant.js → elementTerminatedSequenceParser.test.d.ts} +0 -0
  378. /package/build/{zipEntry.js → fixedLengthSequenceParser.test.d.ts} +0 -0
  379. /package/build/{zipFile.js → javaKeyStore.d.ts} +0 -0
  380. /package/build/{zipFileEntry.js → javaKeyStore.js} +0 -0
@@ -1,10 +1,12 @@
1
1
  import test from 'ava';
2
2
  import { InputReaderImplementation } from './inputReader.js';
3
- import { stringInputCompanion } from './inputCompanion.js';
3
+ import { stringParserInputCompanion } from './parserInputCompanion.js';
4
4
  import { ParserImplementationError } from './parserError.js';
5
+ import { toAsyncIterable } from './toAsyncIterable.js';
6
+ import { InputReaderState } from './inputReaderState.js';
5
7
 
6
8
  test('inputReader', async t => {
7
- const inputReader = new InputReaderImplementation(stringInputCompanion, (async function * () {
9
+ const inputReader = new InputReaderImplementation(stringParserInputCompanion, (async function * () {
8
10
  yield '';
9
11
  yield 'abc';
10
12
  yield 'def';
@@ -46,8 +48,55 @@ test('inputReader', async t => {
46
48
  t.is(await inputReader.peek(0), undefined);
47
49
  });
48
50
 
51
+ test('inputReader peekSequence', async t => {
52
+ const inputReader = new InputReaderImplementation(stringParserInputCompanion, (async function * () {
53
+ yield '';
54
+ yield 'abc';
55
+ yield 'def';
56
+ yield '';
57
+ yield 'gh';
58
+ })());
59
+
60
+ t.is(await inputReader.peekSequence(0, 0), '');
61
+ t.is(await inputReader.peekSequence(0, 1), 'a');
62
+
63
+ inputReader.skip(0);
64
+
65
+ t.is(await inputReader.peekSequence(1, 2), 'b');
66
+
67
+ inputReader.skip(1);
68
+
69
+ t.is(await inputReader.peekSequence(1, 7), 'bcdefgh'.slice(1, 7));
70
+ t.is(await inputReader.peekSequence(1, 8), undefined);
71
+
72
+ inputReader.skip(6);
73
+
74
+ t.is(await inputReader.peekSequence(0, 0), '');
75
+ t.is(await inputReader.peekSequence(0, 1), 'h');
76
+ t.is(await inputReader.peekSequence(1, 2), undefined);
77
+ t.is(await inputReader.peekSequence(2, 2), undefined);
78
+
79
+ inputReader.skip(1);
80
+
81
+ t.is(await inputReader.peekSequence(0, 0), '');
82
+ t.is(await inputReader.peekSequence(0, 1), undefined);
83
+ t.is(await inputReader.peekSequence(1, 1), undefined);
84
+
85
+ inputReader.skip(0);
86
+
87
+ t.is(await inputReader.peekSequence(0, 0), '');
88
+ t.is(await inputReader.peekSequence(0, 1), undefined);
89
+ t.is(await inputReader.peekSequence(1, 1), undefined);
90
+
91
+ inputReader.skip(1);
92
+
93
+ t.is(await inputReader.peekSequence(0, 0), undefined);
94
+ t.is(await inputReader.peekSequence(0, 1), undefined);
95
+ t.is(await inputReader.peekSequence(1, 1), undefined);
96
+ });
97
+
49
98
  test('inputReader.peek concurrent', async t => {
50
- const inputReader = new InputReaderImplementation(stringInputCompanion, (async function * () {
99
+ const inputReader = new InputReaderImplementation(stringParserInputCompanion, (async function * () {
51
100
  yield * 'abcdefgh';
52
101
  })());
53
102
 
@@ -68,8 +117,66 @@ test('inputReader.peek concurrent', async t => {
68
117
  t.deepEqual(peeks, [ 'a', 'a', 'a', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h' ]);
69
118
  });
70
119
 
120
+ test('inputReader.peekSequence concurrent', async t => {
121
+ const inputReader = new InputReaderImplementation(stringParserInputCompanion, (async function * () {
122
+ yield * 'abcdefgh';
123
+ })());
124
+
125
+ const peeks = await Promise.all([1, 2, 3].flatMap(length => [
126
+ inputReader.peekSequence(0, 0 + length),
127
+ inputReader.peekSequence(0, 0 + length),
128
+ inputReader.peekSequence(0, 0 + length),
129
+ inputReader.peekSequence(0, 0 + length),
130
+ inputReader.peekSequence(1, 1 + length),
131
+ inputReader.peekSequence(2, 2 + length),
132
+ inputReader.peekSequence(3, 3 + length),
133
+ inputReader.peekSequence(4, 4 + length),
134
+ inputReader.peekSequence(5, 5 + length),
135
+ inputReader.peekSequence(6, 6 + length),
136
+ inputReader.peekSequence(7, 7 + length),
137
+ ]));
138
+
139
+ t.deepEqual(peeks, [
140
+ 'a',
141
+ 'a',
142
+ 'a',
143
+ 'a',
144
+ 'b',
145
+ 'c',
146
+ 'd',
147
+ 'e',
148
+ 'f',
149
+ 'g',
150
+ 'h',
151
+
152
+ 'ab',
153
+ 'ab',
154
+ 'ab',
155
+ 'ab',
156
+ 'bc',
157
+ 'cd',
158
+ 'de',
159
+ 'ef',
160
+ 'fg',
161
+ 'gh',
162
+ undefined,
163
+
164
+ 'abc',
165
+ 'abc',
166
+ 'abc',
167
+ 'abc',
168
+ 'bcd',
169
+ 'cde',
170
+ 'def',
171
+ 'efg',
172
+ 'fgh',
173
+ undefined,
174
+ undefined,
175
+ ]);
176
+ });
177
+
71
178
  test('inputReader skip while peeking', async t => {
72
- const inputReader = new InputReaderImplementation(stringInputCompanion, (async function * () {
179
+ const inputReader = new InputReaderImplementation(stringParserInputCompanion, (async function * () {
73
180
  yield * 'abcdefgh';
74
181
  })());
75
182
 
@@ -77,14 +184,39 @@ test('inputReader skip while peeking', async t => {
77
184
 
78
185
  inputReader.skip(1);
79
186
 
187
+ const peekAfterSkipPromise = inputReader.peek(0);
188
+ const peekSequenceAfterSkipPromise = inputReader.peekSequence(0, 5);
189
+
80
190
  t.is(await peekPromise, 'a');
81
191
  t.is(await inputReader.peek(0), 'b');
192
+
193
+ t.is(await peekAfterSkipPromise, 'b');
194
+ t.is(await peekSequenceAfterSkipPromise, 'bcdef');
195
+ });
196
+
197
+ test('inputReader skip while peeking sequence', async t => {
198
+ const inputReader = new InputReaderImplementation(stringParserInputCompanion, (async function * () {
199
+ yield * 'abcdefgh';
200
+ })());
201
+
202
+ const peekPromise = inputReader.peekSequence(1, 5);
203
+
204
+ inputReader.skip(1);
205
+
206
+ const peekAfterSkipPromise = inputReader.peek(0);
207
+ const peekSequenceAfterSkipPromise = inputReader.peekSequence(0, 4);
208
+
209
+ t.is(await peekPromise, 'bcde', 'peekPromise');
210
+ t.is(await inputReader.peekSequence(0, 4), 'bcde', 'inputReader.peekSequence(0, 4)');
211
+
212
+ t.is(await peekAfterSkipPromise, 'b', 'peekAfterSkipPromise');
213
+ t.is(await peekSequenceAfterSkipPromise, 'bcde', 'peekSequenceAfterSkipPromise');
82
214
  });
83
215
 
84
216
  test('inputReader.lookahead', async t => {
85
217
  let read = 0;
86
218
 
87
- const inputReader = new InputReaderImplementation(stringInputCompanion, (async function * () {
219
+ const inputReader = new InputReaderImplementation(stringParserInputCompanion, (async function * () {
88
220
  for (const character of 'abcdefgh') {
89
221
  read++;
90
222
  yield character;
@@ -180,7 +312,7 @@ test('inputReader.lookahead', async t => {
180
312
  test('inputReader.lookahead concurrent', async t => {
181
313
  let read = 0;
182
314
 
183
- const inputReader = new InputReaderImplementation(stringInputCompanion, (async function * () {
315
+ const inputReader = new InputReaderImplementation(stringParserInputCompanion, (async function * () {
184
316
  for (const character of 'abcdefgh') {
185
317
  read++;
186
318
  yield character;
@@ -211,7 +343,7 @@ test('inputReader.lookahead concurrent', async t => {
211
343
  test('inputReader.lookahead skip position', async t => {
212
344
  let read = 0;
213
345
 
214
- const inputReader = new InputReaderImplementation(stringInputCompanion, (async function * () {
346
+ const inputReader = new InputReaderImplementation(stringParserInputCompanion, (async function * () {
215
347
  for (const character of 'abcdefgh') {
216
348
  read++;
217
349
  yield character;
@@ -236,3 +368,80 @@ test('inputReader.lookahead skip position', async t => {
236
368
  t.is(await lookahead.peek(0), 'c');
237
369
  t.is(await lookahead1.peek(0), 'd');
238
370
  });
371
+
372
+ const END_OF_CONSUMED_SEQUENCES = Symbol('END_OF_CONSUMED_SEQUENCES');
373
+ const END_OF_BUFFERED_SEQUENCES = Symbol('END_OF_BUFFERED_SEQUENCES');
374
+
375
+ async function inputReaderStateToArray<Sequence>({
376
+ unconsumedBufferedSequences,
377
+ consumedBufferedSequences,
378
+ unbufferedSequences,
379
+ }: InputReaderState<Sequence>): Promise<(Sequence | typeof END_OF_CONSUMED_SEQUENCES | typeof END_OF_BUFFERED_SEQUENCES)[]> {
380
+ const unconsumedBufferedSequencesArray = unconsumedBufferedSequences.slice();
381
+ const consumedBufferedSequencesArray = consumedBufferedSequences.slice();
382
+
383
+ const unbufferedSequencesArray = [];
384
+ if (unbufferedSequences) {
385
+ for await (const sequence of toAsyncIterable(unbufferedSequences)) {
386
+ unbufferedSequencesArray.push(sequence);
387
+ }
388
+ }
389
+
390
+ return [
391
+ ...consumedBufferedSequencesArray,
392
+ END_OF_CONSUMED_SEQUENCES,
393
+ ...unconsumedBufferedSequencesArray,
394
+ END_OF_BUFFERED_SEQUENCES,
395
+ ...unbufferedSequencesArray,
396
+ ];
397
+ }
398
+
399
+ for (const [
400
+ input,
401
+ position,
402
+ expected,
403
+ ] of [
404
+ [
405
+ [ '', 'abc', 'def', '', 'gh' ],
406
+ 0,
407
+ [ END_OF_CONSUMED_SEQUENCES, 'abc', END_OF_BUFFERED_SEQUENCES, 'def', '', 'gh' ],
408
+ ],
409
+ [
410
+ [ '', 'abc', 'def', '', 'gh' ],
411
+ 1,
412
+ [ 'a', END_OF_CONSUMED_SEQUENCES, 'bc', END_OF_BUFFERED_SEQUENCES, 'def', '', 'gh' ],
413
+ ],
414
+ [
415
+ [ '', 'abc', 'def', '', 'gh' ],
416
+ 2,
417
+ [ 'ab', END_OF_CONSUMED_SEQUENCES, 'c', END_OF_BUFFERED_SEQUENCES, 'def', '', 'gh' ],
418
+ ],
419
+ [
420
+ [ '', 'abc', 'def', '', 'gh' ],
421
+ 3,
422
+ [ END_OF_CONSUMED_SEQUENCES, 'def', END_OF_BUFFERED_SEQUENCES, '', 'gh' ],
423
+ ],
424
+ [
425
+ [ '', 'abc', 'def', '', 'gh' ],
426
+ 4,
427
+ [ 'd', END_OF_CONSUMED_SEQUENCES, 'ef', END_OF_BUFFERED_SEQUENCES, '', 'gh' ],
428
+ ],
429
+ [
430
+ [ '', 'abc', 'def', '', 'gh' ],
431
+ 8,
432
+ [ END_OF_CONSUMED_SEQUENCES, END_OF_BUFFERED_SEQUENCES ],
433
+ ],
434
+ ] as const) {
435
+ test('inputReader.toInputReaderState ' + JSON.stringify({ input, position }), async t => {
436
+ const inputReader = new InputReaderImplementation(stringParserInputCompanion, (async function * () {
437
+ yield * input;
438
+ })());
439
+
440
+ inputReader.skip(position);
441
+ await inputReader.peek(0);
442
+
443
+ const actual = await inputReaderStateToArray(inputReader.toInputReaderState());
444
+
445
+ t.deepEqual(actual, expected);
446
+ });
447
+ }
@@ -1,16 +1,20 @@
1
1
  import PromiseMutex from 'p-mutex';
2
2
  import invariant from 'invariant';
3
3
  import { type SequenceBuffer, SequenceBufferImplementation } from './sequenceBuffer.js';
4
- import { type InputCompanion } from './inputCompanion.js';
4
+ import { type ParserInputCompanion } from './parserInputCompanion.js';
5
5
  import { parserImplementationInvariant } from './parserImplementationInvariant.js';
6
+ import { InputReaderState } from './inputReaderState.js';
6
7
 
7
8
  export type InputReader<Sequence, Element> = {
8
9
  get position(): number;
9
10
 
10
11
  peek(offset: number): Promise<Element | undefined>;
12
+ peekSequence(start: number, end: number): Promise<Sequence | undefined>;
11
13
  skip(offset: number): void;
12
14
 
13
15
  lookahead(): InputReader<Sequence, Element>;
16
+
17
+ toInputReaderState(): InputReaderState<Sequence>;
14
18
  };
15
19
 
16
20
  let inputReaderId = 0;
@@ -20,16 +24,17 @@ export class InputReaderImplementation<Sequence, Element> implements InputReader
20
24
 
21
25
  private _position = 0;
22
26
  private _uncommitedSkipOffset = 0;
27
+ private _inputAsyncIteratorDone = false;
23
28
 
24
29
  private readonly _promiseMutex = new PromiseMutex();
25
30
 
26
31
  private readonly _sequenceBuffer: SequenceBuffer<Sequence, Element>;
27
32
 
28
33
  constructor(
29
- private readonly _inputCompanion: InputCompanion<Sequence, Element>,
34
+ private readonly _parserInputCompanion: ParserInputCompanion<Sequence, Element>,
30
35
  private readonly _inputAsyncIterator: AsyncIterator<Sequence>,
31
36
  ) {
32
- this._sequenceBuffer = new SequenceBufferImplementation<Sequence, Element>(this._inputCompanion);
37
+ this._sequenceBuffer = new SequenceBufferImplementation<Sequence, Element>(this._parserInputCompanion);
33
38
  }
34
39
 
35
40
  get [Symbol.toStringTag]() {
@@ -66,18 +71,20 @@ export class InputReaderImplementation<Sequence, Element> implements InputReader
66
71
  const inputIteratorResult = await this._inputAsyncIterator.next();
67
72
 
68
73
  if (inputIteratorResult.done) {
74
+ this._inputAsyncIteratorDone = true;
75
+
69
76
  return undefined;
70
77
  }
71
78
 
72
79
  parserImplementationInvariant(
73
- this._inputCompanion.is(inputIteratorResult.value),
80
+ this._parserInputCompanion.is(inputIteratorResult.value),
74
81
  [
75
82
  'Input iterator result value (%s) is of unexpected type.',
76
83
  'Expected a sequence (a chunk of input) recognized by the input companion (%s).',
77
84
  'You may have provided a wrong input companion for the input.',
78
85
  ],
79
86
  inputIteratorResult.value,
80
- this._inputCompanion.constructor.name,
87
+ this._parserInputCompanion.constructor.name,
81
88
  );
82
89
 
83
90
  this._sequenceBuffer.push(inputIteratorResult.value);
@@ -85,6 +92,47 @@ export class InputReaderImplementation<Sequence, Element> implements InputReader
85
92
  });
86
93
  }
87
94
 
95
+ async peekSequence(start: number, end: number): Promise<Sequence | undefined> {
96
+ parserImplementationInvariant(
97
+ start >= 0,
98
+ 'start (%s) >= 0',
99
+ start,
100
+ );
101
+ parserImplementationInvariant(
102
+ end >= start,
103
+ 'end (%s) >= start (%s)',
104
+ start,
105
+ end,
106
+ );
107
+ parserImplementationInvariant(
108
+ Number.isSafeInteger(start),
109
+ 'start (%s) is not a safe integer',
110
+ start,
111
+ );
112
+ parserImplementationInvariant(
113
+ Number.isSafeInteger(end),
114
+ 'end (%s) is not a safe integer',
115
+ end,
116
+ );
117
+
118
+ start += this._uncommitedSkipOffset;
119
+ end += this._uncommitedSkipOffset;
120
+
121
+ const sequence = this._sequenceBuffer.peekSequence(start, end);
122
+
123
+ if (sequence !== undefined) {
124
+ return sequence;
125
+ }
126
+
127
+ const lastElement = await this.peek(Math.max(0, end - 1));
128
+
129
+ if (lastElement === undefined) {
130
+ return undefined;
131
+ }
132
+
133
+ return this._sequenceBuffer.peekSequence(start, end);
134
+ }
135
+
88
136
  skip(offset: number) {
89
137
  parserImplementationInvariant(offset >= 0, 'offset >= 0');
90
138
 
@@ -101,6 +149,20 @@ export class InputReaderImplementation<Sequence, Element> implements InputReader
101
149
  lookahead(): InputReader<Sequence, Element> {
102
150
  return new InputReaderLookaheadImplementation(this);
103
151
  }
152
+
153
+ toInputReaderState() {
154
+ const {
155
+ consumedBufferedSequences,
156
+ unconsumedBufferedSequences,
157
+ } = this._sequenceBuffer.toSequenceBufferState();
158
+
159
+ return {
160
+ consumedBufferedSequences,
161
+ unconsumedBufferedSequences,
162
+ unbufferedSequences: this._inputAsyncIteratorDone ? undefined : this._inputAsyncIterator,
163
+ position: this._position,
164
+ };
165
+ }
104
166
  }
105
167
 
106
168
  class InputReaderLookaheadImplementation<Sequence, Element> implements InputReader<Sequence, Element> {
@@ -134,6 +196,15 @@ class InputReaderLookaheadImplementation<Sequence, Element> implements InputRead
134
196
  return this._inputReader.peek(this._offset + offset);
135
197
  }
136
198
 
199
+ async peekSequence(start: number, end: number): Promise<Sequence | undefined> {
200
+ const inputReaderMovedForward = this._inputReader.position - this._initialInputReaderPosition;
201
+
202
+ this._initialInputReaderPosition = this._inputReader.position;
203
+ this._offset -= inputReaderMovedForward;
204
+
205
+ return this._inputReader.peekSequence(this._offset + start, this._offset + end);
206
+ }
207
+
137
208
  skip(offset: number) {
138
209
  parserImplementationInvariant(offset >= 0, 'offset >= 0');
139
210
 
@@ -156,4 +227,8 @@ class InputReaderLookaheadImplementation<Sequence, Element> implements InputRead
156
227
 
157
228
  return lookahead;
158
229
  }
230
+
231
+ toInputReaderState() {
232
+ return invariant(false, 'Not implemented');
233
+ }
159
234
  }
@@ -0,0 +1,33 @@
1
+ export type InputReaderState<Sequence> = {
2
+ position: number;
3
+ consumedBufferedSequences: Sequence[];
4
+ unconsumedBufferedSequences: Sequence[];
5
+ unbufferedSequences: undefined | AsyncIterator<Sequence>;
6
+ };
7
+
8
+ export const inputReaderStateCompanion = {
9
+ isDone<Sequence>({
10
+ unconsumedBufferedSequences,
11
+ unbufferedSequences,
12
+ }: InputReaderState<Sequence>): boolean {
13
+ return (
14
+ unconsumedBufferedSequences.length === 0
15
+ && unbufferedSequences === undefined
16
+ );
17
+ },
18
+
19
+ async * toRemainingInputAsyncIterator<Sequence>({
20
+ unconsumedBufferedSequences,
21
+ unbufferedSequences,
22
+ }: InputReaderState<Sequence>): AsyncIterable<Sequence> {
23
+ yield * unconsumedBufferedSequences;
24
+
25
+ if (unbufferedSequences !== undefined) {
26
+ yield * {
27
+ [Symbol.asyncIterator]() {
28
+ return unbufferedSequences;
29
+ },
30
+ };
31
+ }
32
+ },
33
+ };
package/src/inspect.ts ADDED
@@ -0,0 +1,9 @@
1
+ import { inspect as nodeInspect } from 'node:util';
2
+
3
+ export const inspect = (value: unknown) => {
4
+ if (value instanceof Uint8Array) {
5
+ value = Buffer.from(value);
6
+ }
7
+
8
+ return nodeInspect(value);
9
+ }
File without changes
@@ -0,0 +1,22 @@
1
+ import test from 'ava';
2
+ import { uint8ArrayParserInputCompanion } from './parserInputCompanion.js';
3
+ import { runParser } from './parser.js';
4
+ import { javaKeyStoreParser } from './javaKeyStoreParser.js';
5
+ import { fetchCid } from './fetchCid.js';
6
+
7
+ for (const javaKeyStoreCid of [
8
+ 'bafkreig6k53b6p7bdvfjxc5mcb4qv3mffqls5ymqerxkqd6ih2xy5cs3n4',
9
+ ]) {
10
+ test(
11
+ 'javaKeyStore ' + javaKeyStoreCid,
12
+ async t => {
13
+ const javaKeyStoreStream = await fetchCid(javaKeyStoreCid);
14
+
15
+ const actual = await runParser(javaKeyStoreParser, javaKeyStoreStream, uint8ArrayParserInputCompanion, {
16
+ errorJoinMode: 'all',
17
+ });
18
+
19
+ t.snapshot(actual);
20
+ },
21
+ );
22
+ }
@@ -0,0 +1,103 @@
1
+ # Snapshot report for `src/javaKeyStoreParser.test.ts`
2
+
3
+ The actual snapshot is saved in `javaKeyStoreParser.test.ts.snap`.
4
+
5
+ Generated by [AVA](https://avajs.dev).
6
+
7
+ ## javaKeyStore bafkreig6k53b6p7bdvfjxc5mcb4qv3mffqls5ymqerxkqd6ih2xy5cs3n4
8
+
9
+ > Snapshot 1
10
+
11
+ {
12
+ entries: [
13
+ {
14
+ alias: 'alias_name',
15
+ certificateChain: [
16
+ {
17
+ certificate: Uint8Array [
18
+ 3082037d 30820265 a0030201 02020862 1867f6fc b0aab430 0d06092a 864886f7
19
+ 0d01010b 0500306c 3110300e 06035504 06130755 6e6b6e6f 776e3110 300e0603
20
+ 55040813 07556e6b 6e6f776e 3110300e 06035504 07130755 6e6b6e6f 776e3110
21
+ 300e0603 55040a13 07556e6b 6e6f776e 3110300e 06035504 0b130755 6e6b6e6f
22
+ 776e3110 300e0603 55040313 07556e6b 6e6f776e 3020170d 32343132 30383133
23
+ 33343232 5a180f32 30353230 34323531 33333432 325a306c 3110300e 06035504
24
+ 06130755 6e6b6e6f 776e3110 300e0603 55040813 07556e6b 6e6f776e 3110300e
25
+ 06035504 07130755 6e6b6e6f 776e3110 300e0603 55040a13 07556e6b 6e6f776e
26
+ 3110300e 06035504 0b130755 6e6b6e6f 776e3110 300e0603 55040313 07556e6b
27
+ 6e6f776e 30820122 300d0609 2a864886 f70d0101 01050003 82010f00 3082010a
28
+ 02820101 00c4d6d9 6e38ae16 54e1f3a6 d7b68d49 23a01024 ded06818 5e88835e
29
+ 2edf5cdc 1839f148 864f20fc 355655a5 f1023e4f 6fced37e 0a55d77c d206c4f4
30
+ e6a7041e d16a439a 38bd824e 29e4d407 16a4a154 3e952838 79b5c1e6 1e376927
31
+ 9ed92d62 c94bfd06 261b3034 1c5420c7 ca6d7925 8deafdb3 252ada5f 2a571b11
32
+ fb265869 d2c9335b ca9d2c06 5ce9586c 006b371b c555c122 d734be38 e57486b5
33
+ ccad06c2 b532dd4f 1a025e04 2bdea06a 1056367c 92b2db6e 9c8f6353 1d4d28fd
34
+ d6d78a45 9fcb5ada 16a9988b 032d6c69 6d63f739 9d5664b8 c0adf5a2 f748e177
35
+ e019a4a3 23a7fd10 dcd2be1b 6b8cbdcf eb7e76cd f35698a1 2c77b508 0d1a7884
36
+ ce8f1980 2f020301 0001a321 301f301d 0603551d 0e041604 14fdef9a ebf342b2
37
+ 3bb007b1 6de4e2a8 0e953421 d4300d06 092a8648 86f70d01 010b0500 03820101
38
+ 00c12e4e 03282b2f 36ee57a6 144d1774 55e08149 ce8e5b46 5f340757 7b301880
39
+ f3e7c4bd 564c5aa6 5202100e b819ae3a fb8c4adf c9e13cdc 82fdab8d c3cab7d7
40
+ 68f01c41 18f67b0b 534eeb5c ab7ebeec af4cadd2 df3efe7c c4ec9311 9c3ec17e
41
+ 3152746f 39d99717 042557f9 eb8aa2fa e87eb332 833c75db 1d373e50 2ea3b3ef
42
+ 9bb847c0 8190fda7 318a0cac 374b507c 5db948e4 65c9ae38 4b304b8d d5c62014
43
+ ad01857b 5548dec0 b4c5b61f 0b21597a ede13707 e701dc44 933bb097 832e5158
44
+ 2d19c606 a2b540ec bb501ffc 5d772e08 44e57a7f eb026278 c69e6160 8cddc2df
45
+ b56418b6 1cea3698 f86fa91d c7bd9e4b 83e80666 d343b087 7a0117a2 f8773fcc
46
+ 31
47
+ ],
48
+ type: 'X.509',
49
+ },
50
+ ],
51
+ creationDate: Date 2024-12-08 13:34:25 771ms UTC {},
52
+ privateKey: Uint8Array [
53
+ 308204fd 300e060a 2b060104 012a0211 01010500 048204e9 6bafd40a 4a5b9ba7
54
+ d71d60e8 3f9d1d2b e8f1a677 d30c00f9 8c27a431 cf19c6cf 01527d3c 23490657
55
+ 9d30ee44 6f2a1c3d 8785c9e9 20cb403c 9c06bb6a 83eafd69 8a3e2a43 4a2340b1
56
+ 873bf5d7 766a4003 935463f8 5894dd90 79c940b8 d7b908e9 5dc7b7e8 e01a9f55
57
+ 7c31b465 cdf2b4e5 322f547c 74e28695 e49aff82 96144608 4e139e96 915022da
58
+ 106a61b2 cda01a71 dd195aa2 d3db85e0 8d5e52b6 649e358e 38cc2b63 a95496e7
59
+ f13b35da a3812622 b6a8ca99 e25baf66 70cf30b6 3097794a 14385807 7f2ffd85
60
+ cd6c8ef9 4c87cd48 46cca8c1 9dc4c73e a62d6f0a 7fc8054f 1408c9b6 f7dd750b
61
+ 595b6c60 2766bd8c db986cda 16829b4f a06f274f 5d540aac 814e5a50 9127bed4
62
+ a48dd702 f613b823 9218a9d0 344ba799 99e2caf2 8f9c976a 9db0fc39 d0d1c0a4
63
+ 0338e5c2 03632ffb 5e58200a 3921a5bd 1516e598 f6e912aa 0f08129a f082088f
64
+ 17165118 39fabef3 b6c93d25 1c35c8a5 b533546a 72e3dcb8 827b77b3 01b0bd60
65
+ a54ecae6 e37ab488 97ca7f26 014fe9f5 8b35c81e 5e201f05 43226ff7 fa41e019
66
+ 3ed3f47a 92167c6c a691814d 4883471e 4ffdd7e5 66e32235 dfcbe212 99ef4559
67
+ d2b6fc5c 26e23964 e4c0ccf2 9ef4a0c1 9078ef4f 04ec1a8c 91916f0b 85bd18eb
68
+ 1abe756c 9a90da9d 1293f95a db7edbc9 eb0aecd1 85ee554f 832dbb01 21dfacbf
69
+ 12be629e 5b33e3b5 f3ebdcd1 69bc40b5 67607be4 d38e6a22 f8b520ab 6d498d23
70
+ a7af72f0 9a57690d c11113f8 744b77e2 b45b52a5 19e5cffe 3e19e106 ae2454d7
71
+ 9741d01b 8cfbc4c0 16efaf4e d8ab96b3 bf04b7e1 81099b5f dcac9158 0636a33a
72
+ 2ce348ba ddaeef30 0bb27d8a d762f9b1 0a87c57c 0787667f e7542cbb 4077ade1
73
+ c2784b03 fa590107 deaea210 59920506 472a5983 fdc7706e e99ec034 55b17fe8
74
+ 8f8ed3a1 d43bde6e a392bbdd bdb81ff5 b6ad03de 8a46a97f 278f697a b0669db4
75
+ 967ef9b8 7bca57f4 8507d655 5f77bce4 901010bc cf69106a 407481b0 efe8f5df
76
+ 137aea5c cc6e1777 364809dd f39e2c80 437e11d4 692488ee 9760f10a 4b3078be
77
+ 3f6b363d 25ccd315 4caee2d7 f29e44c9 3bb899fe 141e4233 b44a4dd8 6a7a3ab3
78
+ 2ab7ecae 4c91bab1 a7223e88 d831ee3a 24fbca73 712dcd8c 22a22ea6 f74d52ff
79
+ 52df9e06 c42e57cb 6e615094 52a6489a c985d992 38ed1861 f9c668d6 bedfa6b7
80
+ 83f8f03f 66425389 fea1fd10 0cd78635 999194c9 54ea2233 99c8a384 7e034fe2
81
+ 6be1e2b1 652ccb10 59c23b48 a34a4732 47b61a90 baa39965 db02b59d e5258a5e
82
+ 6bd44e7b 46023f60 417c9a26 98d9435d cfed43cc c3235627 c4bc7589 bbbf520f
83
+ 16480c66 8a355d3f aa4693db 499051be b85350d4 c45eb43f 7f09461c 882a4168
84
+ 69135d31 db14dd3d bd49b28f 810f6cfc 70759172 66b79b43 951e020d 69bdb933
85
+ 01f722f2 d77be629 8d0027be 96373dc2 e862792c 20894f6b ed8ec5ca 2b99fea5
86
+ 4d37e8ca 01422458 025833bc 9bb4a8c8 491dee69 c8bb6b42 9eaa6bca 770b5a4d
87
+ 95e9931e 12cffaa0 54566c76 7c323b6f f6f60e97 1e5c54fe eefa57f7 e6f6b352
88
+ d8f0f43e dc9b224a c7678d6b 35532593 6c1aac3b 4ae05907 4c70bb40 07373e8c
89
+ 97126047 b3b23ae5 41e15db1 d251d5c5 e9a2dc51 6863ec2b ed2ad0b9 54d4ecc1
90
+ f184cba3 7e588d99 6be6caf1 72ba9771 650d92a7 3402ed51 4972e38e fb20b53e
91
+ 1442e461 49054fc6 f6899e65 b02c968f 97884dd1 1e5b1bd6 d394ff8d a5155836
92
+ 53d72788 e5de5454 5bbebefb 71b35c5d d63f9a1e 938210a8 d8f7e536 12494c5b
93
+ e5
94
+ ],
95
+ type: 'privateKey',
96
+ },
97
+ ],
98
+ hash: Uint8Array [
99
+ 9bbf5a41 f2b3fcd4 a9ac77fe 0820317e 6a8f05e9
100
+ ],
101
+ implementation: 'JKS',
102
+ version: 2,
103
+ }