pdf-lite 1.0.0 → 1.0.1-alpha.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 (339) hide show
  1. package/.github/workflows/docs.yaml +2 -0
  2. package/EXAMPLES.md +1 -4
  3. package/docs/README.md +127 -0
  4. package/docs/core/README.md +43 -0
  5. package/docs/core/decoder/README.md +11 -0
  6. package/docs/core/decoder/classes/PdfDecoder.md +362 -0
  7. package/docs/core/generators/README.md +14 -0
  8. package/docs/core/generators/functions/bytesToPdfObjects.md +26 -0
  9. package/docs/core/generators/functions/pdfDecoder.md +36 -0
  10. package/docs/core/generators/functions/pdfDecoderAsync.md +26 -0
  11. package/docs/core/generators/functions/stringToPdfObjects.md +25 -0
  12. package/docs/core/incremental-parser/README.md +13 -0
  13. package/docs/core/incremental-parser/classes/EofReachedError.md +55 -0
  14. package/docs/core/incremental-parser/classes/IncrementalParser.md +299 -0
  15. package/docs/core/incremental-parser/classes/NoMoreTokensError.md +55 -0
  16. package/docs/core/objects/pdf-array/README.md +11 -0
  17. package/docs/core/objects/pdf-array/classes/PdfArray.md +305 -0
  18. package/docs/core/objects/pdf-boolean/README.md +11 -0
  19. package/docs/core/objects/pdf-boolean/classes/PdfBoolean.md +265 -0
  20. package/docs/core/objects/pdf-comment/README.md +11 -0
  21. package/docs/core/objects/pdf-comment/classes/PdfComment.md +329 -0
  22. package/docs/core/objects/pdf-date/README.md +11 -0
  23. package/docs/core/objects/pdf-date/classes/PdfDate.md +317 -0
  24. package/docs/core/objects/pdf-dictionary/README.md +17 -0
  25. package/docs/core/objects/pdf-dictionary/classes/PdfDictionary.md +396 -0
  26. package/docs/core/objects/pdf-dictionary/type-aliases/PdfDictionaryEntries.md +9 -0
  27. package/docs/core/objects/pdf-dictionary/type-aliases/PdfDictionaryEntry.md +9 -0
  28. package/docs/core/objects/pdf-dictionary/type-aliases/PdfDictionaryMap.md +9 -0
  29. package/docs/core/objects/pdf-hexadecimal/README.md +11 -0
  30. package/docs/core/objects/pdf-hexadecimal/classes/PdfHexadecimal.md +320 -0
  31. package/docs/core/objects/pdf-indirect-object/README.md +11 -0
  32. package/docs/core/objects/pdf-indirect-object/classes/PdfIndirectObject.md +411 -0
  33. package/docs/core/objects/pdf-name/README.md +11 -0
  34. package/docs/core/objects/pdf-name/classes/PdfName.md +271 -0
  35. package/docs/core/objects/pdf-null/README.md +11 -0
  36. package/docs/core/objects/pdf-null/classes/PdfNull.md +259 -0
  37. package/docs/core/objects/pdf-number/README.md +12 -0
  38. package/docs/core/objects/pdf-number/classes/PdfByteOffsetNumber.md +369 -0
  39. package/docs/core/objects/pdf-number/classes/PdfNumber.md +345 -0
  40. package/docs/core/objects/pdf-object/README.md +11 -0
  41. package/docs/core/objects/pdf-object/classes/PdfObject.md +214 -0
  42. package/docs/core/objects/pdf-object-reference/README.md +11 -0
  43. package/docs/core/objects/pdf-object-reference/classes/PdfObjectReference.md +279 -0
  44. package/docs/core/objects/pdf-start-xref/README.md +11 -0
  45. package/docs/core/objects/pdf-start-xref/classes/PdfStartXRef.md +265 -0
  46. package/docs/core/objects/pdf-stream/README.md +23 -0
  47. package/docs/core/objects/pdf-stream/classes/PdfObjStream.md +699 -0
  48. package/docs/core/objects/pdf-stream/classes/PdfStream.md +570 -0
  49. package/docs/core/objects/pdf-stream/classes/PdfXRefStream.md +723 -0
  50. package/docs/core/objects/pdf-stream/classes/PdfXRefStreamCompressedEntry.md +51 -0
  51. package/docs/core/objects/pdf-stream/type-aliases/PdfXRefStreamEntry.md +9 -0
  52. package/docs/core/objects/pdf-stream/type-aliases/PdfXRefStreamStandardEntry.md +9 -0
  53. package/docs/core/objects/pdf-stream/variables/PdfXRefStreamStandardEntry.md +9 -0
  54. package/docs/core/objects/pdf-string/README.md +11 -0
  55. package/docs/core/objects/pdf-string/classes/PdfString.md +301 -0
  56. package/docs/core/objects/pdf-trailer/README.md +16 -0
  57. package/docs/core/objects/pdf-trailer/classes/PdfTrailer.md +271 -0
  58. package/docs/core/objects/pdf-trailer/type-aliases/PdfTrailerDictionary.md +9 -0
  59. package/docs/core/objects/pdf-trailer/type-aliases/PdfTrailerEntries.md +51 -0
  60. package/docs/core/objects/pdf-xref-table/README.md +13 -0
  61. package/docs/core/objects/pdf-xref-table/classes/PdfXRefTable.md +331 -0
  62. package/docs/core/objects/pdf-xref-table/classes/PdfXRefTableEntry.md +297 -0
  63. package/docs/core/objects/pdf-xref-table/classes/PdfXRefTableSectionHeader.md +277 -0
  64. package/docs/core/parser/README.md +11 -0
  65. package/docs/core/parser/classes/Parser.md +74 -0
  66. package/docs/core/ref/README.md +15 -0
  67. package/docs/core/ref/classes/Ref.md +149 -0
  68. package/docs/core/ref/type-aliases/RefUpdateCallback.md +33 -0
  69. package/docs/core/serializer/README.md +11 -0
  70. package/docs/core/serializer/classes/PdfTokenSerializer.md +106 -0
  71. package/docs/core/streams/object-stream/README.md +11 -0
  72. package/docs/core/streams/object-stream/classes/PdfObjectStream.md +69 -0
  73. package/docs/core/tokeniser/README.md +21 -0
  74. package/docs/core/tokeniser/classes/PdfByteStreamTokeniser.md +366 -0
  75. package/docs/core/tokeniser/classes/PdfObjectTokeniser.md +69 -0
  76. package/docs/core/tokeniser/functions/objectToTokens.md +25 -0
  77. package/docs/core/tokeniser/functions/pdfObjectStreamTokeniser.md +27 -0
  78. package/docs/core/tokeniser/type-aliases/PdfTokeniser.md +11 -0
  79. package/docs/core/tokens/boolean-token/README.md +11 -0
  80. package/docs/core/tokens/boolean-token/classes/PdfBooleanToken.md +139 -0
  81. package/docs/core/tokens/byte-offset-token/README.md +11 -0
  82. package/docs/core/tokens/byte-offset-token/classes/PdfByteOffsetToken.md +153 -0
  83. package/docs/core/tokens/comment-token/README.md +11 -0
  84. package/docs/core/tokens/comment-token/classes/PdfCommentToken.md +161 -0
  85. package/docs/core/tokens/end-array-token/README.md +11 -0
  86. package/docs/core/tokens/end-array-token/classes/PdfEndArrayToken.md +115 -0
  87. package/docs/core/tokens/end-dictionary-token/README.md +11 -0
  88. package/docs/core/tokens/end-dictionary-token/classes/PdfEndDictionaryToken.md +115 -0
  89. package/docs/core/tokens/end-object-token/README.md +11 -0
  90. package/docs/core/tokens/end-object-token/classes/PdfEndObjectToken.md +115 -0
  91. package/docs/core/tokens/end-stream-token/README.md +11 -0
  92. package/docs/core/tokens/end-stream-token/classes/PdfEndStreamToken.md +121 -0
  93. package/docs/core/tokens/hexadecimal-token/README.md +11 -0
  94. package/docs/core/tokens/hexadecimal-token/classes/PdfHexadecimalToken.md +127 -0
  95. package/docs/core/tokens/name-token/README.md +11 -0
  96. package/docs/core/tokens/name-token/classes/PdfNameToken.md +127 -0
  97. package/docs/core/tokens/null-token/README.md +11 -0
  98. package/docs/core/tokens/null-token/classes/PdfNullToken.md +115 -0
  99. package/docs/core/tokens/number-token/README.md +11 -0
  100. package/docs/core/tokens/number-token/classes/PdfNumberToken.md +271 -0
  101. package/docs/core/tokens/object-reference-token/README.md +11 -0
  102. package/docs/core/tokens/object-reference-token/classes/PdfObjectReferenceToken.md +137 -0
  103. package/docs/core/tokens/start-array-token/README.md +11 -0
  104. package/docs/core/tokens/start-array-token/classes/PdfStartArrayToken.md +115 -0
  105. package/docs/core/tokens/start-dictionary-token/README.md +11 -0
  106. package/docs/core/tokens/start-dictionary-token/classes/PdfStartDictionaryToken.md +115 -0
  107. package/docs/core/tokens/start-object-token/README.md +11 -0
  108. package/docs/core/tokens/start-object-token/classes/PdfStartObjectToken.md +147 -0
  109. package/docs/core/tokens/start-stream-token/README.md +11 -0
  110. package/docs/core/tokens/start-stream-token/classes/PdfStartStreamToken.md +147 -0
  111. package/docs/core/tokens/start-xref-token/README.md +11 -0
  112. package/docs/core/tokens/start-xref-token/classes/PdfStartXRefToken.md +115 -0
  113. package/docs/core/tokens/stream-chunk-token/README.md +11 -0
  114. package/docs/core/tokens/stream-chunk-token/classes/PdfStreamChunkToken.md +121 -0
  115. package/docs/core/tokens/string-token/README.md +11 -0
  116. package/docs/core/tokens/string-token/classes/PdfStringToken.md +127 -0
  117. package/docs/core/tokens/token/README.md +11 -0
  118. package/docs/core/tokens/token/classes/PdfToken.md +116 -0
  119. package/docs/core/tokens/trailer-token/README.md +11 -0
  120. package/docs/core/tokens/trailer-token/classes/PdfTrailerToken.md +127 -0
  121. package/docs/core/tokens/whitespace-token/README.md +11 -0
  122. package/docs/core/tokens/whitespace-token/classes/PdfWhitespaceToken.md +161 -0
  123. package/docs/core/tokens/xref-table-entry-token/README.md +11 -0
  124. package/docs/core/tokens/xref-table-entry-token/classes/PdfXRefTableEntryToken.md +157 -0
  125. package/docs/core/tokens/xref-table-section-start-token/README.md +11 -0
  126. package/docs/core/tokens/xref-table-section-start-token/classes/PdfXRefTableSectionStartToken.md +137 -0
  127. package/docs/core/tokens/xref-table-start-token/README.md +11 -0
  128. package/docs/core/tokens/xref-table-start-token/classes/PdfXRefTableStartToken.md +127 -0
  129. package/docs/crypto/ciphers/aes128/README.md +11 -0
  130. package/docs/crypto/ciphers/aes128/functions/aes128.md +39 -0
  131. package/docs/crypto/ciphers/aes256/README.md +11 -0
  132. package/docs/crypto/ciphers/aes256/functions/aes256.md +35 -0
  133. package/docs/crypto/ciphers/rc4/README.md +11 -0
  134. package/docs/crypto/ciphers/rc4/functions/rc4.md +35 -0
  135. package/docs/crypto/constants/README.md +11 -0
  136. package/docs/crypto/constants/variables/DEFAULT_PADDING.md +13 -0
  137. package/docs/crypto/key-derivation/key-derivation/README.md +13 -0
  138. package/docs/crypto/key-derivation/key-derivation/functions/computeMasterKey.md +57 -0
  139. package/docs/crypto/key-derivation/key-derivation/functions/deriveObjectKey.md +50 -0
  140. package/docs/crypto/key-derivation/key-derivation/functions/padPassword.md +33 -0
  141. package/docs/crypto/key-derivation/key-derivation-aes256/README.md +13 -0
  142. package/docs/crypto/key-derivation/key-derivation-aes256/functions/computeAlgorithm2bHash.md +45 -0
  143. package/docs/crypto/key-derivation/key-derivation-aes256/functions/getFileKey.md +66 -0
  144. package/docs/crypto/key-derivation/key-derivation-aes256/functions/validatePasswordHash.md +52 -0
  145. package/docs/crypto/key-gen/key-gen-aes256/README.md +12 -0
  146. package/docs/crypto/key-gen/key-gen-aes256/functions/generateOandOe.md +44 -0
  147. package/docs/crypto/key-gen/key-gen-aes256/functions/generateUandUe.md +38 -0
  148. package/docs/crypto/key-gen/key-gen-rc4-128/README.md +13 -0
  149. package/docs/crypto/key-gen/key-gen-rc4-128/functions/computeOValueRc4_128.md +38 -0
  150. package/docs/crypto/key-gen/key-gen-rc4-128/functions/computeUValueRc4_128.md +62 -0
  151. package/docs/crypto/key-gen/key-gen-rc4-128/functions/decryptUserPasswordRc4_128.md +38 -0
  152. package/docs/crypto/key-gen/key-gen-rc4-40/README.md +14 -0
  153. package/docs/crypto/key-gen/key-gen-rc4-40/functions/computeEncryptionKeyRc4_40.md +49 -0
  154. package/docs/crypto/key-gen/key-gen-rc4-40/functions/computeORc4_40.md +38 -0
  155. package/docs/crypto/key-gen/key-gen-rc4-40/functions/computeURc4_40.md +50 -0
  156. package/docs/crypto/key-gen/key-gen-rc4-40/functions/decryptUserPasswordRc4_40.md +38 -0
  157. package/docs/crypto/types/README.md +11 -0
  158. package/docs/crypto/types/interfaces/Cipher.md +39 -0
  159. package/docs/crypto/utils/README.md +13 -0
  160. package/docs/crypto/utils/functions/int32ToLittleEndianBytes.md +31 -0
  161. package/docs/crypto/utils/functions/padPassword.md +33 -0
  162. package/docs/crypto/utils/functions/removePdfPasswordPadding.md +32 -0
  163. package/docs/filters/ascii85/README.md +11 -0
  164. package/docs/filters/ascii85/functions/ascii85.md +27 -0
  165. package/docs/filters/asciihex/README.md +11 -0
  166. package/docs/filters/asciihex/functions/asciiHex.md +27 -0
  167. package/docs/filters/flate/README.md +11 -0
  168. package/docs/filters/flate/functions/flate.md +26 -0
  169. package/docs/filters/lzw/README.md +11 -0
  170. package/docs/filters/lzw/functions/lzw.md +27 -0
  171. package/docs/filters/pass-through/README.md +11 -0
  172. package/docs/filters/pass-through/functions/passthroughFilter.md +25 -0
  173. package/docs/filters/runlength/README.md +11 -0
  174. package/docs/filters/runlength/functions/runLength.md +27 -0
  175. package/docs/filters/types/README.md +19 -0
  176. package/docs/filters/types/interfaces/PdfFilter.md +39 -0
  177. package/docs/filters/types/type-aliases/PdfStreamFilterType.md +9 -0
  178. package/docs/filters/types/variables/PDF_FILTER_TYPES.md +51 -0
  179. package/docs/index/README.md +235 -0
  180. package/docs/pdf/README.md +31 -0
  181. package/docs/pdf/errors/README.md +11 -0
  182. package/docs/pdf/errors/classes/FoundCompressedObjectError.md +56 -0
  183. package/docs/pdf/pdf-document/README.md +11 -0
  184. package/docs/pdf/pdf-document/classes/PdfDocument.md +876 -0
  185. package/docs/pdf/pdf-reader/README.md +11 -0
  186. package/docs/pdf/pdf-reader/classes/PdfReader.md +82 -0
  187. package/docs/pdf/pdf-revision/README.md +11 -0
  188. package/docs/pdf/pdf-revision/classes/PdfRevision.md +508 -0
  189. package/docs/pdf/pdf-xref-lookup/README.md +11 -0
  190. package/docs/pdf/pdf-xref-lookup/classes/PdfXrefLookup.md +421 -0
  191. package/docs/security/crypt-filters/aesv2/README.md +11 -0
  192. package/docs/security/crypt-filters/aesv2/classes/AesV2CryptFilter.md +274 -0
  193. package/docs/security/crypt-filters/aesv3/README.md +11 -0
  194. package/docs/security/crypt-filters/aesv3/classes/AesV3CryptFilter.md +275 -0
  195. package/docs/security/crypt-filters/base/README.md +15 -0
  196. package/docs/security/crypt-filters/base/classes/PdfCryptFilter.md +221 -0
  197. package/docs/security/crypt-filters/base/type-aliases/CryptFilterOptions.md +43 -0
  198. package/docs/security/crypt-filters/identity/README.md +11 -0
  199. package/docs/security/crypt-filters/identity/classes/IdentityCryptFilter.md +249 -0
  200. package/docs/security/crypt-filters/v2/README.md +11 -0
  201. package/docs/security/crypt-filters/v2/classes/V2CryptFilter.md +279 -0
  202. package/docs/security/handlers/base/README.md +17 -0
  203. package/docs/security/handlers/base/classes/PdfSecurityHandler.md +384 -0
  204. package/docs/security/handlers/base/classes/PdfStandardSecurityHandler.md +694 -0
  205. package/docs/security/handlers/base/type-aliases/PdfSecurityHandlerOptions.md +27 -0
  206. package/docs/security/handlers/base/type-aliases/PdfStandardSecurityHandlerOptions.md +43 -0
  207. package/docs/security/handlers/pubSec/README.md +11 -0
  208. package/docs/security/handlers/pubSec/classes/PdfPublicKeySecurityHandler.md +503 -0
  209. package/docs/security/handlers/utils/README.md +14 -0
  210. package/docs/security/handlers/utils/functions/createFromDictionary.md +56 -0
  211. package/docs/security/handlers/utils/functions/createFromEncryptionOptions.md +40 -0
  212. package/docs/security/handlers/utils/functions/createStandardSecurityHandlerFromDictionary.md +55 -0
  213. package/docs/security/handlers/utils/functions/getCryptFilter.md +35 -0
  214. package/docs/security/handlers/v1/README.md +11 -0
  215. package/docs/security/handlers/v1/classes/PdfV1SecurityHandler.md +779 -0
  216. package/docs/security/handlers/v2/README.md +11 -0
  217. package/docs/security/handlers/v2/classes/PdfV2SecurityHandler.md +783 -0
  218. package/docs/security/handlers/v4/README.md +11 -0
  219. package/docs/security/handlers/v4/classes/PdfV4SecurityHandler.md +907 -0
  220. package/docs/security/handlers/v5/README.md +11 -0
  221. package/docs/security/handlers/v5/classes/PdfV5SecurityHandler.md +926 -0
  222. package/docs/security/types/README.md +19 -0
  223. package/docs/security/types/type-aliases/CryptFilterType.md +15 -0
  224. package/docs/security/types/type-aliases/PdfCryptFilterDictionary.md +12 -0
  225. package/docs/security/types/type-aliases/PdfEncryptionAlgorithmOptions.md +11 -0
  226. package/docs/security/types/type-aliases/PdfEncryptionAlgorithmType.md +17 -0
  227. package/docs/security/types/type-aliases/PdfEncryptionDictionary.md +13 -0
  228. package/docs/security/types/type-aliases/PdfEncryptionDictionaryObject.md +11 -0
  229. package/docs/security/types/type-aliases/PdfEncryptionOptions.md +90 -0
  230. package/docs/security/types/type-aliases/PdfEncryptionRecipient.md +24 -0
  231. package/docs/security/types/type-aliases/PdfId.md +13 -0
  232. package/docs/signing/README.md +127 -0
  233. package/docs/signing/document-security-store/README.md +19 -0
  234. package/docs/signing/document-security-store/classes/PdfCertObject.md +443 -0
  235. package/docs/signing/document-security-store/classes/PdfCrlObject.md +443 -0
  236. package/docs/signing/document-security-store/classes/PdfDocumentSecurityStoreDictionary.md +416 -0
  237. package/docs/signing/document-security-store/classes/PdfDocumentSecurityStoreObject.md +563 -0
  238. package/docs/signing/document-security-store/classes/PdfOcspObject.md +443 -0
  239. package/docs/signing/document-security-store/type-aliases/PdfVriObject.md +12 -0
  240. package/docs/signing/signatures/README.md +55 -0
  241. package/docs/signing/signatures/adbe-pkcs7-detached/README.md +11 -0
  242. package/docs/signing/signatures/adbe-pkcs7-detached/classes/PdfAdbePkcs7DetachedSignatureObject.md +669 -0
  243. package/docs/signing/signatures/adbe-pkcs7-sha1/README.md +11 -0
  244. package/docs/signing/signatures/adbe-pkcs7-sha1/classes/PdfAdbePkcs7Sha1SignatureObject.md +667 -0
  245. package/docs/signing/signatures/adbe-x509-rsa-sha1/README.md +11 -0
  246. package/docs/signing/signatures/adbe-x509-rsa-sha1/classes/PdfAdbePkcsX509RsaSha1SignatureObject.md +651 -0
  247. package/docs/signing/signatures/base/README.md +16 -0
  248. package/docs/signing/signatures/base/classes/PdfSignatureDictionary.md +420 -0
  249. package/docs/signing/signatures/base/classes/PdfSignatureObject.md +584 -0
  250. package/docs/signing/signatures/base/type-aliases/PdfSignatureSignOptions.md +51 -0
  251. package/docs/signing/signatures/etsi-cades-detached/README.md +11 -0
  252. package/docs/signing/signatures/etsi-cades-detached/classes/PdfEtsiCadesDetachedSignatureObject.md +693 -0
  253. package/docs/signing/signatures/etsi-rfc3161/README.md +11 -0
  254. package/docs/signing/signatures/etsi-rfc3161/classes/PdfEtsiRfc3161SignatureObject.md +614 -0
  255. package/docs/signing/signer/README.md +11 -0
  256. package/docs/signing/signer/classes/PdfSigner.md +58 -0
  257. package/docs/signing/types/README.md +16 -0
  258. package/docs/signing/types/type-aliases/PdfSignatureDictionaryEntries.md +95 -0
  259. package/docs/signing/types/type-aliases/PdfSignatureSubType.md +17 -0
  260. package/docs/signing/types/type-aliases/PdfSignatureType.md +14 -0
  261. package/docs/signing/types/type-aliases/RevocationInfo.md +43 -0
  262. package/docs/signing/types/type-aliases/SignaturePolicyDocument.md +35 -0
  263. package/docs/signing/types/type-aliases/TimeStampAuthority.md +35 -0
  264. package/docs/signing/utils/README.md +11 -0
  265. package/docs/signing/utils/functions/fetchRevocationInfo.md +70 -0
  266. package/docs/types/README.md +21 -0
  267. package/docs/types/type-aliases/ByteArray.md +9 -0
  268. package/docs/types/type-aliases/ChangeType.md +9 -0
  269. package/docs/types/type-aliases/DecodeParms.md +33 -0
  270. package/docs/types/type-aliases/HashAlgorithm.md +9 -0
  271. package/docs/types/type-aliases/PdfEncryptionAlgorithm.md +9 -0
  272. package/docs/types/type-aliases/PdfPermissions.md +63 -0
  273. package/docs/types/type-aliases/PdfVersion.md +9 -0
  274. package/docs/types/variables/PERMISSION_FLAGS.md +9 -0
  275. package/docs/utils/IterableReadableStream/README.md +11 -0
  276. package/docs/utils/IterableReadableStream/classes/IterableReadableStream.md +103 -0
  277. package/docs/utils/algos/README.md +28 -0
  278. package/docs/utils/algos/functions/aes128CbcNoPaddingEncrypt.md +43 -0
  279. package/docs/utils/algos/functions/aes128cbcDecrypt.md +47 -0
  280. package/docs/utils/algos/functions/aes128cbcEncrypt.md +47 -0
  281. package/docs/utils/algos/functions/aes256CbcNoPaddingDecrypt.md +43 -0
  282. package/docs/utils/algos/functions/aes256CbcNoPaddingEncrypt.md +43 -0
  283. package/docs/utils/algos/functions/aes256cbcDecrypt.md +43 -0
  284. package/docs/utils/algos/functions/aes256cbcEncrypt.md +43 -0
  285. package/docs/utils/algos/functions/aes256ecbDecrypt.md +41 -0
  286. package/docs/utils/algos/functions/aes256ecbEncrypt.md +41 -0
  287. package/docs/utils/algos/functions/deflateData.md +31 -0
  288. package/docs/utils/algos/functions/getRandomBytes.md +35 -0
  289. package/docs/utils/algos/functions/hash.md +41 -0
  290. package/docs/utils/algos/functions/inflateData.md +35 -0
  291. package/docs/utils/algos/functions/md5.md +31 -0
  292. package/docs/utils/algos/functions/sha1.md +31 -0
  293. package/docs/utils/algos/functions/sha256.md +31 -0
  294. package/docs/utils/algos/functions/sha384.md +31 -0
  295. package/docs/utils/algos/functions/sha512.md +31 -0
  296. package/docs/utils/assert/README.md +12 -0
  297. package/docs/utils/assert/functions/assert.md +39 -0
  298. package/docs/utils/assert/functions/assertIfDefined.md +46 -0
  299. package/docs/utils/bytesToHex/README.md +11 -0
  300. package/docs/utils/bytesToHex/functions/bytesToHex.md +31 -0
  301. package/docs/utils/bytesToHexBytes/README.md +11 -0
  302. package/docs/utils/bytesToHexBytes/functions/bytesToHexBytes.md +32 -0
  303. package/docs/utils/bytesToString/README.md +11 -0
  304. package/docs/utils/bytesToString/functions/bytesToString.md +31 -0
  305. package/docs/utils/concatUint8Arrays/README.md +11 -0
  306. package/docs/utils/concatUint8Arrays/functions/concatUint8Arrays.md +31 -0
  307. package/docs/utils/escapeString/README.md +11 -0
  308. package/docs/utils/escapeString/functions/escapeString.md +32 -0
  309. package/docs/utils/hexBytesToBytes/README.md +11 -0
  310. package/docs/utils/hexBytesToBytes/functions/hexBytesToBytes.md +33 -0
  311. package/docs/utils/hexBytesToString/README.md +11 -0
  312. package/docs/utils/hexBytesToString/functions/hexBytesToString.md +31 -0
  313. package/docs/utils/hexToBytes/README.md +11 -0
  314. package/docs/utils/hexToBytes/functions/hexToBytes.md +31 -0
  315. package/docs/utils/padBytes/README.md +11 -0
  316. package/docs/utils/padBytes/functions/padBytes.md +41 -0
  317. package/docs/utils/predictors/README.md +11 -0
  318. package/docs/utils/predictors/classes/Predictor.md +306 -0
  319. package/docs/utils/replaceInBuffer/README.md +11 -0
  320. package/docs/utils/replaceInBuffer/functions/replaceInBuffer.md +65 -0
  321. package/docs/utils/stringToBytes/README.md +11 -0
  322. package/docs/utils/stringToBytes/functions/stringToBytes.md +32 -0
  323. package/docs/utils/stringToHexBytes/README.md +11 -0
  324. package/docs/utils/stringToHexBytes/functions/stringToHexBytes.md +33 -0
  325. package/docs/utils/unescapeString/README.md +11 -0
  326. package/docs/utils/unescapeString/functions/unescapeString.md +34 -0
  327. package/package.json +63 -71
  328. package/packages/pdf-lite/node_modules/.bin/playwright +16 -0
  329. package/packages/pdf-lite/node_modules/.bin/tsc +16 -0
  330. package/packages/pdf-lite/node_modules/.bin/tsserver +16 -0
  331. package/packages/pdf-lite/node_modules/.bin/vitest +16 -0
  332. package/packages/pdf-lite/package.json +2 -2
  333. package/packages/pdf-lite/scripts/create-encryption-tests.sh +0 -0
  334. package/packages/pdf-lite/scripts/gen-signing-keys.sh +0 -0
  335. package/packages/pdf-lite/scripts/generate-all-signing-keys.sh +0 -0
  336. package/scripts/bump-version.sh +0 -0
  337. package/scripts/gen-html-docs.sh +0 -0
  338. package/scripts/gen-md-docs.sh +0 -0
  339. package/scripts/prepare-release.sh +0 -0
@@ -0,0 +1,306 @@
1
+ [**pdf-lite**](../../../README.md)
2
+
3
+ ---
4
+
5
+ [pdf-lite](../../../README.md) / [utils/predictors](../README.md) / Predictor
6
+
7
+ # Class: Predictor
8
+
9
+ Handles PNG and TIFF predictor encoding and decoding for PDF streams.
10
+ Predictors are used to improve compression efficiency by transforming
11
+ image data before or after compression.
12
+
13
+ ## Constructors
14
+
15
+ ### Constructor
16
+
17
+ > **new Predictor**(): `Predictor`
18
+
19
+ #### Returns
20
+
21
+ `Predictor`
22
+
23
+ ## Methods
24
+
25
+ ### canHandleDecodeParms()
26
+
27
+ > `static` **canHandleDecodeParms**(`decodeParms?`): `boolean`
28
+
29
+ Checks if the decode parameters can be handled by this predictor.
30
+
31
+ #### Parameters
32
+
33
+ ##### decodeParms?
34
+
35
+ [`PdfDictionary`](../../../core/objects/pdf-dictionary/classes/PdfDictionary.md)\<[`PdfDictionaryEntries`](../../../core/objects/pdf-dictionary/type-aliases/PdfDictionaryEntries.md)\>
36
+
37
+ Optional PDF dictionary containing decode parameters.
38
+
39
+ #### Returns
40
+
41
+ `boolean`
42
+
43
+ True if the parameters can be handled, false otherwise.
44
+
45
+ #### Example
46
+
47
+ ```typescript
48
+ if (Predictor.canHandleDecodeParms(dictionary)) {
49
+ // Process with predictor
50
+ }
51
+ ```
52
+
53
+ ---
54
+
55
+ ### decode()
56
+
57
+ > `static` **decode**(`data`, `params`): [`ByteArray`](../../../types/type-aliases/ByteArray.md)
58
+
59
+ Decodes data that was encoded with a predictor.
60
+
61
+ #### Parameters
62
+
63
+ ##### data
64
+
65
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
66
+
67
+ The encoded data to decode.
68
+
69
+ ##### params
70
+
71
+ [`DecodeParms`](../../../types/type-aliases/DecodeParms.md) = `{}`
72
+
73
+ Optional decode parameters including Predictor, Columns, Colors, and BitsPerComponent.
74
+
75
+ #### Returns
76
+
77
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
78
+
79
+ The decoded byte array.
80
+
81
+ #### Example
82
+
83
+ ```typescript
84
+ const decoded = Predictor.decode(encodedData, { Predictor: 12, Columns: 100 })
85
+ ```
86
+
87
+ ---
88
+
89
+ ### encode()
90
+
91
+ > `static` **encode**(`data`, `params`, `PdfStreamFilterType`): [`ByteArray`](../../../types/type-aliases/ByteArray.md)
92
+
93
+ Encodes data using a predictor algorithm.
94
+
95
+ #### Parameters
96
+
97
+ ##### data
98
+
99
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
100
+
101
+ The data to encode.
102
+
103
+ ##### params
104
+
105
+ [`DecodeParms`](../../../types/type-aliases/DecodeParms.md) = `{}`
106
+
107
+ Optional encode parameters including Predictor, Columns, Colors, and BitsPerComponent.
108
+
109
+ ##### PdfStreamFilterType
110
+
111
+ `number` = `0`
112
+
113
+ The PNG filter type to use for encoding.
114
+
115
+ #### Returns
116
+
117
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
118
+
119
+ The encoded byte array.
120
+
121
+ #### Example
122
+
123
+ ```typescript
124
+ const encoded = Predictor.encode(rawData, { Predictor: 12, Columns: 100 }, 1)
125
+ ```
126
+
127
+ ---
128
+
129
+ ### getDecodeParms()
130
+
131
+ > `static` **getDecodeParms**(`decodeParms?`): [`DecodeParms`](../../../types/type-aliases/DecodeParms.md) \| `null`
132
+
133
+ Extracts decode parameters from a PDF dictionary.
134
+
135
+ #### Parameters
136
+
137
+ ##### decodeParms?
138
+
139
+ [`PdfDictionary`](../../../core/objects/pdf-dictionary/classes/PdfDictionary.md)\<[`PdfDictionaryEntries`](../../../core/objects/pdf-dictionary/type-aliases/PdfDictionaryEntries.md)\>
140
+
141
+ Optional PDF dictionary containing decode parameters.
142
+
143
+ #### Returns
144
+
145
+ [`DecodeParms`](../../../types/type-aliases/DecodeParms.md) \| `null`
146
+
147
+ The decode parameters object or null if not applicable.
148
+
149
+ #### Example
150
+
151
+ ```typescript
152
+ const params = Predictor.getDecodeParms(dictionary)
153
+ if (params) {
154
+ console.log(params.Predictor)
155
+ }
156
+ ```
157
+
158
+ ---
159
+
160
+ ### pngDecode()
161
+
162
+ > `static` **pngDecode**(`data`, `columns`, `bpp`): [`ByteArray`](../../../types/type-aliases/ByteArray.md)
163
+
164
+ Decodes PNG predictor encoded data.
165
+
166
+ #### Parameters
167
+
168
+ ##### data
169
+
170
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
171
+
172
+ The PNG encoded data.
173
+
174
+ ##### columns
175
+
176
+ `number`
177
+
178
+ The number of columns in the image.
179
+
180
+ ##### bpp
181
+
182
+ `number`
183
+
184
+ Bytes per pixel.
185
+
186
+ #### Returns
187
+
188
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
189
+
190
+ The decoded byte array.
191
+
192
+ #### Throws
193
+
194
+ Error if an unsupported PNG filter type is encountered.
195
+
196
+ ---
197
+
198
+ ### pngEncode()
199
+
200
+ > `static` **pngEncode**(`data`, `columns`, `bpp`, `PdfStreamFilterType`): [`ByteArray`](../../../types/type-aliases/ByteArray.md)
201
+
202
+ Encodes data using PNG predictor.
203
+
204
+ #### Parameters
205
+
206
+ ##### data
207
+
208
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
209
+
210
+ The data to encode.
211
+
212
+ ##### columns
213
+
214
+ `number`
215
+
216
+ The number of columns in the image.
217
+
218
+ ##### bpp
219
+
220
+ `number`
221
+
222
+ Bytes per pixel.
223
+
224
+ ##### PdfStreamFilterType
225
+
226
+ `number`
227
+
228
+ The PNG filter type (0-4) to use.
229
+
230
+ #### Returns
231
+
232
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
233
+
234
+ The PNG encoded byte array.
235
+
236
+ #### Throws
237
+
238
+ Error if an unsupported PNG filter type is specified.
239
+
240
+ ---
241
+
242
+ ### tiffDecode()
243
+
244
+ > `static` **tiffDecode**(`data`, `columns`, `bpp`): [`ByteArray`](../../../types/type-aliases/ByteArray.md)
245
+
246
+ Decodes TIFF predictor encoded data.
247
+
248
+ #### Parameters
249
+
250
+ ##### data
251
+
252
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
253
+
254
+ The TIFF encoded data.
255
+
256
+ ##### columns
257
+
258
+ `number`
259
+
260
+ The number of columns in the image.
261
+
262
+ ##### bpp
263
+
264
+ `number`
265
+
266
+ Bytes per pixel.
267
+
268
+ #### Returns
269
+
270
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
271
+
272
+ The decoded byte array.
273
+
274
+ ---
275
+
276
+ ### tiffEncode()
277
+
278
+ > `static` **tiffEncode**(`data`, `columns`, `bpp`): [`ByteArray`](../../../types/type-aliases/ByteArray.md)
279
+
280
+ Encodes data using TIFF predictor.
281
+
282
+ #### Parameters
283
+
284
+ ##### data
285
+
286
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
287
+
288
+ The data to encode.
289
+
290
+ ##### columns
291
+
292
+ `number`
293
+
294
+ The number of columns in the image.
295
+
296
+ ##### bpp
297
+
298
+ `number`
299
+
300
+ Bytes per pixel.
301
+
302
+ #### Returns
303
+
304
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
305
+
306
+ The TIFF encoded byte array.
@@ -0,0 +1,11 @@
1
+ [**pdf-lite**](../../README.md)
2
+
3
+ ---
4
+
5
+ [pdf-lite](../../README.md) / utils/replaceInBuffer
6
+
7
+ # utils/replaceInBuffer
8
+
9
+ ## Functions
10
+
11
+ - [replaceInBuffer](functions/replaceInBuffer.md)
@@ -0,0 +1,65 @@
1
+ [**pdf-lite**](../../../README.md)
2
+
3
+ ---
4
+
5
+ [pdf-lite](../../../README.md) / [utils/replaceInBuffer](../README.md) / replaceInBuffer
6
+
7
+ # Function: replaceInBuffer()
8
+
9
+ > **replaceInBuffer**\<`T`\>(`searchBuffer`, `replaceBuffer`, `targetBuffer`, `multiple`): [`ByteArray`](../../../types/type-aliases/ByteArray.md)
10
+
11
+ Replaces occurrences of a search buffer with a replacement buffer within a target buffer.
12
+
13
+ ## Type Parameters
14
+
15
+ ### T
16
+
17
+ `T` _extends_ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
18
+
19
+ The type of the target buffer, extending ByteArray.
20
+
21
+ ## Parameters
22
+
23
+ ### searchBuffer
24
+
25
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
26
+
27
+ The byte pattern to search for.
28
+
29
+ ### replaceBuffer
30
+
31
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
32
+
33
+ The byte pattern to replace with.
34
+
35
+ ### targetBuffer
36
+
37
+ `T`
38
+
39
+ The buffer to search within.
40
+
41
+ ### multiple
42
+
43
+ `boolean` = `false`
44
+
45
+ Whether to replace all occurrences or just the first. Defaults to false.
46
+
47
+ ## Returns
48
+
49
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
50
+
51
+ A new byte array with the replacements made.
52
+
53
+ ## Throws
54
+
55
+ Error if the search buffer is not found in the target buffer.
56
+
57
+ ## Example
58
+
59
+ ```typescript
60
+ const result = replaceInBuffer(
61
+ new Uint8Array([1, 2]),
62
+ new Uint8Array([3, 4, 5]),
63
+ new Uint8Array([0, 1, 2, 6]),
64
+ ) // Returns Uint8Array([0, 3, 4, 5, 6])
65
+ ```
@@ -0,0 +1,11 @@
1
+ [**pdf-lite**](../../README.md)
2
+
3
+ ---
4
+
5
+ [pdf-lite](../../README.md) / utils/stringToBytes
6
+
7
+ # utils/stringToBytes
8
+
9
+ ## Functions
10
+
11
+ - [stringToBytes](functions/stringToBytes.md)
@@ -0,0 +1,32 @@
1
+ [**pdf-lite**](../../../README.md)
2
+
3
+ ---
4
+
5
+ [pdf-lite](../../../README.md) / [utils/stringToBytes](../README.md) / stringToBytes
6
+
7
+ # Function: stringToBytes()
8
+
9
+ > **stringToBytes**(`str`): [`ByteArray`](../../../types/type-aliases/ByteArray.md)
10
+
11
+ Converts a string or byte array to a byte array using UTF-8 encoding.
12
+ If the input is already a byte array, it is returned as-is.
13
+
14
+ ## Parameters
15
+
16
+ ### str
17
+
18
+ The string or byte array to convert.
19
+
20
+ `string` | [`ByteArray`](../../../types/type-aliases/ByteArray.md)
21
+
22
+ ## Returns
23
+
24
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
25
+
26
+ The input as a byte array.
27
+
28
+ ## Example
29
+
30
+ ```typescript
31
+ stringToBytes('Hello') // Returns Uint8Array([72, 101, 108, 108, 111])
32
+ ```
@@ -0,0 +1,11 @@
1
+ [**pdf-lite**](../../README.md)
2
+
3
+ ---
4
+
5
+ [pdf-lite](../../README.md) / utils/stringToHexBytes
6
+
7
+ # utils/stringToHexBytes
8
+
9
+ ## Functions
10
+
11
+ - [stringToHexBytes](functions/stringToHexBytes.md)
@@ -0,0 +1,33 @@
1
+ [**pdf-lite**](../../../README.md)
2
+
3
+ ---
4
+
5
+ [pdf-lite](../../../README.md) / [utils/stringToHexBytes](../README.md) / stringToHexBytes
6
+
7
+ # Function: stringToHexBytes()
8
+
9
+ > **stringToHexBytes**(`str`): [`ByteArray`](../../../types/type-aliases/ByteArray.md)
10
+
11
+ Converts a hexadecimal string (optionally with angle brackets) to a byte array.
12
+ Strips any surrounding angle brackets before conversion.
13
+
14
+ ## Parameters
15
+
16
+ ### str
17
+
18
+ `string`
19
+
20
+ The hexadecimal string to convert, optionally wrapped in angle brackets.
21
+
22
+ ## Returns
23
+
24
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
25
+
26
+ A byte array with the decoded values.
27
+
28
+ ## Example
29
+
30
+ ```typescript
31
+ stringToHexBytes('<FF00>') // Returns Uint8Array([255, 0])
32
+ stringToHexBytes('FF00') // Also returns Uint8Array([255, 0])
33
+ ```
@@ -0,0 +1,11 @@
1
+ [**pdf-lite**](../../README.md)
2
+
3
+ ---
4
+
5
+ [pdf-lite](../../README.md) / utils/unescapeString
6
+
7
+ # utils/unescapeString
8
+
9
+ ## Functions
10
+
11
+ - [unescapeString](functions/unescapeString.md)
@@ -0,0 +1,34 @@
1
+ [**pdf-lite**](../../../README.md)
2
+
3
+ ---
4
+
5
+ [pdf-lite](../../../README.md) / [utils/unescapeString](../README.md) / unescapeString
6
+
7
+ # Function: unescapeString()
8
+
9
+ > **unescapeString**(`input`): [`ByteArray`](../../../types/type-aliases/ByteArray.md)
10
+
11
+ Unescapes a PDF literal string by processing escape sequences.
12
+ Handles escape sequences for special characters including newlines, tabs,
13
+ backslashes, parentheses, and octal character codes.
14
+
15
+ ## Parameters
16
+
17
+ ### input
18
+
19
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
20
+
21
+ The escaped byte array to unescape.
22
+
23
+ ## Returns
24
+
25
+ [`ByteArray`](../../../types/type-aliases/ByteArray.md)
26
+
27
+ A new byte array with escape sequences converted to their literal values.
28
+
29
+ ## Example
30
+
31
+ ```typescript
32
+ // Unescapes '\n' to a literal newline
33
+ unescapeString(new Uint8Array([0x5c, 0x6e])) // Returns Uint8Array([0x0a])
34
+ ```
package/package.json CHANGED
@@ -1,72 +1,64 @@
1
1
  {
2
- "name": "pdf-lite",
3
- "version": "1.0.0",
4
- "type": "module",
5
- "description": "A lightweight PDF library for Node.js and the browser",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "scripts": {
9
- "compile": "pnpm -r run compile && pnpm compile:examples && pnpm compile:test",
10
- "compile:examples": "tsx ./scripts/build-examples.ts && prettier --write EXAMPLES.md",
11
- "compile:test": "tsc --noEmit",
12
- "prepublish": "pnpm -r run compile",
13
- "test": "pnpm -r --no-sort run test",
14
- "prepare": "husky || true",
15
- "lint:staged": "lint-staged --allow-empty",
16
- "lint:commit": "commitlint --edit $1",
17
- "format": "prettier --write '**/*.{js,ts,json,md,yaml,yml}'",
18
- "docs:gen": "sh -c 'pnpm docs:gen:md \"$@\" && pnpm docs:gen:html \"$@\"' --",
19
- "docs:gen:md": "./scripts/gen-md-docs.sh",
20
- "docs:gen:html": "./scripts/gen-html-docs.sh"
21
- },
22
- "keywords": [
23
- "pdf",
24
- "typescript",
25
- "browser",
26
- "nodejs",
27
- "zero-dependency",
28
- "type-safe",
29
- "pdf-parser",
30
- "pdf-reader",
31
- "pdf-writer",
32
- "digital-signature",
33
- "encryption",
34
- "decryption"
35
- ],
36
- "author": "Jacob Shirley",
37
- "license": "MIT",
38
- "repository": {
39
- "type": "git",
40
- "url": "git+https://github.com/jacobshirley/pdf-lite.git"
41
- },
42
- "bugs": {
43
- "url": "https://github.com/jacobshirley/pdf-lite/issues"
44
- },
45
- "homepage": "https://jacobshirley.github.io/pdf-lite",
46
- "packageManager": "pnpm@10.23.0",
47
- "lint-staged": {
48
- "*.{js,ts,json,md}": "pnpm format"
49
- },
50
- "pnpm": {
51
- "overrides": {
52
- "playwright": "$playwright",
53
- "typescript": "$typescript"
54
- }
55
- },
56
- "devDependencies": {
57
- "@commitlint/cli": "^20.1.0",
58
- "@commitlint/config-conventional": "^20.0.0",
59
- "@types/node": "^24",
60
- "husky": "^9.1.7",
61
- "lint-staged": "^16.2.7",
62
- "playwright": "^1.56.1",
63
- "prettier": "^3.6.2",
64
- "tsx": "^4.20.6",
65
- "typedoc": "^0.28.14",
66
- "typedoc-plugin-markdown": "^4.9.0",
67
- "typescript": "5.9.3"
68
- },
69
- "dependencies": {
70
- "pdf-lite": "^1.0.0"
71
- }
72
- }
2
+ "name": "pdf-lite",
3
+ "version": "1.0.1-alpha.2",
4
+ "type": "module",
5
+ "description": "A lightweight PDF library for Node.js and the browser",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "keywords": [
9
+ "pdf",
10
+ "typescript",
11
+ "browser",
12
+ "nodejs",
13
+ "zero-dependency",
14
+ "type-safe",
15
+ "pdf-parser",
16
+ "pdf-reader",
17
+ "pdf-writer",
18
+ "digital-signature",
19
+ "encryption",
20
+ "decryption"
21
+ ],
22
+ "author": "Jacob Shirley",
23
+ "license": "MIT",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/jacobshirley/pdf-lite.git"
27
+ },
28
+ "bugs": {
29
+ "url": "https://github.com/jacobshirley/pdf-lite/issues"
30
+ },
31
+ "homepage": "https://jacobshirley.github.io/pdf-lite",
32
+ "lint-staged": {
33
+ "*.{js,ts,json,md}": "pnpm format"
34
+ },
35
+ "devDependencies": {
36
+ "@commitlint/cli": "^20.1.0",
37
+ "@commitlint/config-conventional": "^20.0.0",
38
+ "@types/node": "^24",
39
+ "husky": "^9.1.7",
40
+ "lint-staged": "^16.2.7",
41
+ "playwright": "^1.56.1",
42
+ "prettier": "^3.6.2",
43
+ "tsx": "^4.20.6",
44
+ "typedoc": "^0.28.14",
45
+ "typedoc-plugin-markdown": "^4.9.0",
46
+ "typescript": "5.9.3"
47
+ },
48
+ "dependencies": {
49
+ "pdf-lite": "^1.0.1-alpha.2"
50
+ },
51
+ "scripts": {
52
+ "compile": "pnpm -r run compile && pnpm compile:examples && pnpm compile:test",
53
+ "compile:examples": "tsx ./scripts/build-examples.ts && prettier --write EXAMPLES.md",
54
+ "compile:test": "tsc --noEmit",
55
+ "prepublish": "pnpm -r run compile",
56
+ "test": "pnpm -r --no-sort run test",
57
+ "lint:staged": "lint-staged --allow-empty",
58
+ "lint:commit": "commitlint --edit $1",
59
+ "format": "prettier --write '**/*.{js,ts,json,md,yaml,yml}'",
60
+ "docs:gen": "sh -c 'pnpm docs:gen:md \"$@\" && pnpm docs:gen:html \"$@\"' --",
61
+ "docs:gen:md": "./scripts/gen-md-docs.sh",
62
+ "docs:gen:html": "./scripts/gen-html-docs.sh"
63
+ }
64
+ }
@@ -0,0 +1,16 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -x "$basedir/node" ]; then
13
+ exec "$basedir/node" "$basedir/../playwright/cli.js" "$@"
14
+ else
15
+ exec node "$basedir/../playwright/cli.js" "$@"
16
+ fi
@@ -0,0 +1,16 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -x "$basedir/node" ]; then
13
+ exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
14
+ else
15
+ exec node "$basedir/../typescript/bin/tsc" "$@"
16
+ fi