@yugoo-design/dsh-design-knowledge-ladybug 0.2.8 → 0.3.0

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 (316) hide show
  1. package/licenses/dsh-distribution.json +42 -42
  2. package/licenses/prebuilt-embedding/SOURCE.json +1320 -0
  3. package/licenses/prebuilt-embedding/onnxruntime-1.21.0.LICENSE +21 -0
  4. package/licenses/prebuilt-embedding/onnxruntime-1.21.0.ThirdPartyNotices.txt +6082 -0
  5. package/node_modules/@huggingface/transformers/LICENSE +202 -0
  6. package/node_modules/@huggingface/transformers/README.md +467 -0
  7. package/node_modules/@huggingface/transformers/dist/transformers.node.cjs +37966 -0
  8. package/node_modules/@huggingface/transformers/dist/transformers.node.cjs.map +1 -0
  9. package/node_modules/@huggingface/transformers/dist/transformers.node.mjs +38699 -0
  10. package/node_modules/@huggingface/transformers/dist/transformers.node.mjs.map +1 -0
  11. package/node_modules/@huggingface/transformers/package.json +90 -0
  12. package/node_modules/@huggingface/transformers/types/backends/onnx.d.ts +37 -0
  13. package/node_modules/@huggingface/transformers/types/backends/onnx.d.ts.map +1 -0
  14. package/node_modules/@huggingface/transformers/types/base/feature_extraction_utils.d.ts +41 -0
  15. package/node_modules/@huggingface/transformers/types/base/feature_extraction_utils.d.ts.map +1 -0
  16. package/node_modules/@huggingface/transformers/types/base/image_processors_utils.d.ts +332 -0
  17. package/node_modules/@huggingface/transformers/types/base/image_processors_utils.d.ts.map +1 -0
  18. package/node_modules/@huggingface/transformers/types/base/processing_utils.d.ts +89 -0
  19. package/node_modules/@huggingface/transformers/types/base/processing_utils.d.ts.map +1 -0
  20. package/node_modules/@huggingface/transformers/types/configs.d.ts +93 -0
  21. package/node_modules/@huggingface/transformers/types/configs.d.ts.map +1 -0
  22. package/node_modules/@huggingface/transformers/types/env.d.ts +112 -0
  23. package/node_modules/@huggingface/transformers/types/env.d.ts.map +1 -0
  24. package/node_modules/@huggingface/transformers/types/generation/configuration_utils.d.ts +326 -0
  25. package/node_modules/@huggingface/transformers/types/generation/configuration_utils.d.ts.map +1 -0
  26. package/node_modules/@huggingface/transformers/types/generation/logits_process.d.ts +364 -0
  27. package/node_modules/@huggingface/transformers/types/generation/logits_process.d.ts.map +1 -0
  28. package/node_modules/@huggingface/transformers/types/generation/logits_sampler.d.ts +51 -0
  29. package/node_modules/@huggingface/transformers/types/generation/logits_sampler.d.ts.map +1 -0
  30. package/node_modules/@huggingface/transformers/types/generation/parameters.d.ts +47 -0
  31. package/node_modules/@huggingface/transformers/types/generation/parameters.d.ts.map +1 -0
  32. package/node_modules/@huggingface/transformers/types/generation/stopping_criteria.d.ts +81 -0
  33. package/node_modules/@huggingface/transformers/types/generation/stopping_criteria.d.ts.map +1 -0
  34. package/node_modules/@huggingface/transformers/types/generation/streamers.d.ts +88 -0
  35. package/node_modules/@huggingface/transformers/types/generation/streamers.d.ts.map +1 -0
  36. package/node_modules/@huggingface/transformers/types/models/audio_spectrogram_transformer/feature_extraction_audio_spectrogram_transformer.d.ts +25 -0
  37. package/node_modules/@huggingface/transformers/types/models/audio_spectrogram_transformer/feature_extraction_audio_spectrogram_transformer.d.ts.map +1 -0
  38. package/node_modules/@huggingface/transformers/types/models/auto/feature_extraction_auto.d.ts +5 -0
  39. package/node_modules/@huggingface/transformers/types/models/auto/feature_extraction_auto.d.ts.map +1 -0
  40. package/node_modules/@huggingface/transformers/types/models/auto/image_processing_auto.d.ts +5 -0
  41. package/node_modules/@huggingface/transformers/types/models/auto/image_processing_auto.d.ts.map +1 -0
  42. package/node_modules/@huggingface/transformers/types/models/auto/processing_auto.d.ts +39 -0
  43. package/node_modules/@huggingface/transformers/types/models/auto/processing_auto.d.ts.map +1 -0
  44. package/node_modules/@huggingface/transformers/types/models/beit/image_processing_beit.d.ts +4 -0
  45. package/node_modules/@huggingface/transformers/types/models/beit/image_processing_beit.d.ts.map +1 -0
  46. package/node_modules/@huggingface/transformers/types/models/bit/image_processing_bit.d.ts +4 -0
  47. package/node_modules/@huggingface/transformers/types/models/bit/image_processing_bit.d.ts.map +1 -0
  48. package/node_modules/@huggingface/transformers/types/models/chinese_clip/image_processing_chinese_clip.d.ts +4 -0
  49. package/node_modules/@huggingface/transformers/types/models/chinese_clip/image_processing_chinese_clip.d.ts.map +1 -0
  50. package/node_modules/@huggingface/transformers/types/models/clap/feature_extraction_clap.d.ts +57 -0
  51. package/node_modules/@huggingface/transformers/types/models/clap/feature_extraction_clap.d.ts.map +1 -0
  52. package/node_modules/@huggingface/transformers/types/models/clip/image_processing_clip.d.ts +6 -0
  53. package/node_modules/@huggingface/transformers/types/models/clip/image_processing_clip.d.ts.map +1 -0
  54. package/node_modules/@huggingface/transformers/types/models/convnext/image_processing_convnext.d.ts +12 -0
  55. package/node_modules/@huggingface/transformers/types/models/convnext/image_processing_convnext.d.ts.map +1 -0
  56. package/node_modules/@huggingface/transformers/types/models/dac/feature_extraction_dac.d.ts +4 -0
  57. package/node_modules/@huggingface/transformers/types/models/dac/feature_extraction_dac.d.ts.map +1 -0
  58. package/node_modules/@huggingface/transformers/types/models/deit/image_processing_deit.d.ts +6 -0
  59. package/node_modules/@huggingface/transformers/types/models/deit/image_processing_deit.d.ts.map +1 -0
  60. package/node_modules/@huggingface/transformers/types/models/detr/image_processing_detr.d.ts +42 -0
  61. package/node_modules/@huggingface/transformers/types/models/detr/image_processing_detr.d.ts.map +1 -0
  62. package/node_modules/@huggingface/transformers/types/models/dinov3_vit/image_processing_dinov3_vit.d.ts +4 -0
  63. package/node_modules/@huggingface/transformers/types/models/dinov3_vit/image_processing_dinov3_vit.d.ts.map +1 -0
  64. package/node_modules/@huggingface/transformers/types/models/donut/image_processing_donut.d.ts +7 -0
  65. package/node_modules/@huggingface/transformers/types/models/donut/image_processing_donut.d.ts.map +1 -0
  66. package/node_modules/@huggingface/transformers/types/models/dpt/image_processing_dpt.d.ts +6 -0
  67. package/node_modules/@huggingface/transformers/types/models/dpt/image_processing_dpt.d.ts.map +1 -0
  68. package/node_modules/@huggingface/transformers/types/models/efficientnet/image_processing_efficientnet.d.ts +6 -0
  69. package/node_modules/@huggingface/transformers/types/models/efficientnet/image_processing_efficientnet.d.ts.map +1 -0
  70. package/node_modules/@huggingface/transformers/types/models/encodec/feature_extraction_encodec.d.ts +13 -0
  71. package/node_modules/@huggingface/transformers/types/models/encodec/feature_extraction_encodec.d.ts.map +1 -0
  72. package/node_modules/@huggingface/transformers/types/models/feature_extractors.d.ts +16 -0
  73. package/node_modules/@huggingface/transformers/types/models/feature_extractors.d.ts.map +1 -0
  74. package/node_modules/@huggingface/transformers/types/models/florence2/processing_florence2.d.ts +39 -0
  75. package/node_modules/@huggingface/transformers/types/models/florence2/processing_florence2.d.ts.map +1 -0
  76. package/node_modules/@huggingface/transformers/types/models/gemma3n/feature_extraction_gemma3n.d.ts +35 -0
  77. package/node_modules/@huggingface/transformers/types/models/gemma3n/feature_extraction_gemma3n.d.ts.map +1 -0
  78. package/node_modules/@huggingface/transformers/types/models/gemma3n/processing_gemma3n.d.ts +31 -0
  79. package/node_modules/@huggingface/transformers/types/models/gemma3n/processing_gemma3n.d.ts.map +1 -0
  80. package/node_modules/@huggingface/transformers/types/models/glpn/image_processing_glpn.d.ts +4 -0
  81. package/node_modules/@huggingface/transformers/types/models/glpn/image_processing_glpn.d.ts.map +1 -0
  82. package/node_modules/@huggingface/transformers/types/models/grounding_dino/image_processing_grounding_dino.d.ts +20 -0
  83. package/node_modules/@huggingface/transformers/types/models/grounding_dino/image_processing_grounding_dino.d.ts.map +1 -0
  84. package/node_modules/@huggingface/transformers/types/models/grounding_dino/processing_grounding_dino.d.ts +27 -0
  85. package/node_modules/@huggingface/transformers/types/models/grounding_dino/processing_grounding_dino.d.ts.map +1 -0
  86. package/node_modules/@huggingface/transformers/types/models/idefics3/image_processing_idefics3.d.ts +40 -0
  87. package/node_modules/@huggingface/transformers/types/models/idefics3/image_processing_idefics3.d.ts.map +1 -0
  88. package/node_modules/@huggingface/transformers/types/models/idefics3/processing_idefics3.d.ts +19 -0
  89. package/node_modules/@huggingface/transformers/types/models/idefics3/processing_idefics3.d.ts.map +1 -0
  90. package/node_modules/@huggingface/transformers/types/models/image_processors.d.ts +44 -0
  91. package/node_modules/@huggingface/transformers/types/models/image_processors.d.ts.map +1 -0
  92. package/node_modules/@huggingface/transformers/types/models/janus/image_processing_janus.d.ts +7 -0
  93. package/node_modules/@huggingface/transformers/types/models/janus/image_processing_janus.d.ts.map +1 -0
  94. package/node_modules/@huggingface/transformers/types/models/janus/processing_janus.d.ts +77 -0
  95. package/node_modules/@huggingface/transformers/types/models/janus/processing_janus.d.ts.map +1 -0
  96. package/node_modules/@huggingface/transformers/types/models/jina_clip/image_processing_jina_clip.d.ts +5 -0
  97. package/node_modules/@huggingface/transformers/types/models/jina_clip/image_processing_jina_clip.d.ts.map +1 -0
  98. package/node_modules/@huggingface/transformers/types/models/jina_clip/processing_jina_clip.d.ts +9 -0
  99. package/node_modules/@huggingface/transformers/types/models/jina_clip/processing_jina_clip.d.ts.map +1 -0
  100. package/node_modules/@huggingface/transformers/types/models/llava/processing_llava.d.ts +12 -0
  101. package/node_modules/@huggingface/transformers/types/models/llava/processing_llava.d.ts.map +1 -0
  102. package/node_modules/@huggingface/transformers/types/models/llava_onevision/image_processing_llava_onevision.d.ts +4 -0
  103. package/node_modules/@huggingface/transformers/types/models/llava_onevision/image_processing_llava_onevision.d.ts.map +1 -0
  104. package/node_modules/@huggingface/transformers/types/models/mask2former/image_processing_mask2former.d.ts +4 -0
  105. package/node_modules/@huggingface/transformers/types/models/mask2former/image_processing_mask2former.d.ts.map +1 -0
  106. package/node_modules/@huggingface/transformers/types/models/maskformer/image_processing_maskformer.d.ts +22 -0
  107. package/node_modules/@huggingface/transformers/types/models/maskformer/image_processing_maskformer.d.ts.map +1 -0
  108. package/node_modules/@huggingface/transformers/types/models/mgp_str/processing_mgp_str.d.ts +64 -0
  109. package/node_modules/@huggingface/transformers/types/models/mgp_str/processing_mgp_str.d.ts.map +1 -0
  110. package/node_modules/@huggingface/transformers/types/models/mobilenet_v1/image_processing_mobilenet_v1.d.ts +6 -0
  111. package/node_modules/@huggingface/transformers/types/models/mobilenet_v1/image_processing_mobilenet_v1.d.ts.map +1 -0
  112. package/node_modules/@huggingface/transformers/types/models/mobilenet_v2/image_processing_mobilenet_v2.d.ts +6 -0
  113. package/node_modules/@huggingface/transformers/types/models/mobilenet_v2/image_processing_mobilenet_v2.d.ts.map +1 -0
  114. package/node_modules/@huggingface/transformers/types/models/mobilenet_v3/image_processing_mobilenet_v3.d.ts +6 -0
  115. package/node_modules/@huggingface/transformers/types/models/mobilenet_v3/image_processing_mobilenet_v3.d.ts.map +1 -0
  116. package/node_modules/@huggingface/transformers/types/models/mobilenet_v4/image_processing_mobilenet_v4.d.ts +6 -0
  117. package/node_modules/@huggingface/transformers/types/models/mobilenet_v4/image_processing_mobilenet_v4.d.ts.map +1 -0
  118. package/node_modules/@huggingface/transformers/types/models/mobilevit/image_processing_mobilevit.d.ts +6 -0
  119. package/node_modules/@huggingface/transformers/types/models/mobilevit/image_processing_mobilevit.d.ts.map +1 -0
  120. package/node_modules/@huggingface/transformers/types/models/moonshine/feature_extraction_moonshine.d.ts +13 -0
  121. package/node_modules/@huggingface/transformers/types/models/moonshine/feature_extraction_moonshine.d.ts.map +1 -0
  122. package/node_modules/@huggingface/transformers/types/models/moonshine/processing_moonshine.d.ts +17 -0
  123. package/node_modules/@huggingface/transformers/types/models/moonshine/processing_moonshine.d.ts.map +1 -0
  124. package/node_modules/@huggingface/transformers/types/models/nougat/image_processing_nougat.d.ts +4 -0
  125. package/node_modules/@huggingface/transformers/types/models/nougat/image_processing_nougat.d.ts.map +1 -0
  126. package/node_modules/@huggingface/transformers/types/models/owlv2/image_processing_owlv2.d.ts +4 -0
  127. package/node_modules/@huggingface/transformers/types/models/owlv2/image_processing_owlv2.d.ts.map +1 -0
  128. package/node_modules/@huggingface/transformers/types/models/owlvit/image_processing_owlvit.d.ts +10 -0
  129. package/node_modules/@huggingface/transformers/types/models/owlvit/image_processing_owlvit.d.ts.map +1 -0
  130. package/node_modules/@huggingface/transformers/types/models/owlvit/processing_owlvit.d.ts +8 -0
  131. package/node_modules/@huggingface/transformers/types/models/owlvit/processing_owlvit.d.ts.map +1 -0
  132. package/node_modules/@huggingface/transformers/types/models/paligemma/processing_paligemma.d.ts +12 -0
  133. package/node_modules/@huggingface/transformers/types/models/paligemma/processing_paligemma.d.ts.map +1 -0
  134. package/node_modules/@huggingface/transformers/types/models/parakeet/feature_extraction_parakeet.d.ts +22 -0
  135. package/node_modules/@huggingface/transformers/types/models/parakeet/feature_extraction_parakeet.d.ts.map +1 -0
  136. package/node_modules/@huggingface/transformers/types/models/phi3_v/image_processing_phi3_v.d.ts +17 -0
  137. package/node_modules/@huggingface/transformers/types/models/phi3_v/image_processing_phi3_v.d.ts.map +1 -0
  138. package/node_modules/@huggingface/transformers/types/models/phi3_v/processing_phi3_v.d.ts +21 -0
  139. package/node_modules/@huggingface/transformers/types/models/phi3_v/processing_phi3_v.d.ts.map +1 -0
  140. package/node_modules/@huggingface/transformers/types/models/pixtral/image_processing_pixtral.d.ts +4 -0
  141. package/node_modules/@huggingface/transformers/types/models/pixtral/image_processing_pixtral.d.ts.map +1 -0
  142. package/node_modules/@huggingface/transformers/types/models/pixtral/processing_pixtral.d.ts +12 -0
  143. package/node_modules/@huggingface/transformers/types/models/pixtral/processing_pixtral.d.ts.map +1 -0
  144. package/node_modules/@huggingface/transformers/types/models/processors.d.ts +25 -0
  145. package/node_modules/@huggingface/transformers/types/models/processors.d.ts.map +1 -0
  146. package/node_modules/@huggingface/transformers/types/models/pvt/image_processing_pvt.d.ts +4 -0
  147. package/node_modules/@huggingface/transformers/types/models/pvt/image_processing_pvt.d.ts.map +1 -0
  148. package/node_modules/@huggingface/transformers/types/models/pyannote/feature_extraction_pyannote.d.ts +31 -0
  149. package/node_modules/@huggingface/transformers/types/models/pyannote/feature_extraction_pyannote.d.ts.map +1 -0
  150. package/node_modules/@huggingface/transformers/types/models/pyannote/processing_pyannote.d.ts +19 -0
  151. package/node_modules/@huggingface/transformers/types/models/pyannote/processing_pyannote.d.ts.map +1 -0
  152. package/node_modules/@huggingface/transformers/types/models/qwen2_vl/image_processing_qwen2_vl.d.ts +11 -0
  153. package/node_modules/@huggingface/transformers/types/models/qwen2_vl/image_processing_qwen2_vl.d.ts.map +1 -0
  154. package/node_modules/@huggingface/transformers/types/models/qwen2_vl/processing_qwen2_vl.d.ts +17 -0
  155. package/node_modules/@huggingface/transformers/types/models/qwen2_vl/processing_qwen2_vl.d.ts.map +1 -0
  156. package/node_modules/@huggingface/transformers/types/models/rt_detr/image_processing_rt_detr.d.ts +8 -0
  157. package/node_modules/@huggingface/transformers/types/models/rt_detr/image_processing_rt_detr.d.ts.map +1 -0
  158. package/node_modules/@huggingface/transformers/types/models/sam/image_processing_sam.d.ts +103 -0
  159. package/node_modules/@huggingface/transformers/types/models/sam/image_processing_sam.d.ts.map +1 -0
  160. package/node_modules/@huggingface/transformers/types/models/sam/processing_sam.d.ts +9 -0
  161. package/node_modules/@huggingface/transformers/types/models/sam/processing_sam.d.ts.map +1 -0
  162. package/node_modules/@huggingface/transformers/types/models/sam2/image_processing_sam2.d.ts +2 -0
  163. package/node_modules/@huggingface/transformers/types/models/sam2/image_processing_sam2.d.ts.map +1 -0
  164. package/node_modules/@huggingface/transformers/types/models/sam2/processing_sam2.d.ts +6 -0
  165. package/node_modules/@huggingface/transformers/types/models/sam2/processing_sam2.d.ts.map +1 -0
  166. package/node_modules/@huggingface/transformers/types/models/sam3/image_processing_sam3.d.ts +2 -0
  167. package/node_modules/@huggingface/transformers/types/models/sam3/image_processing_sam3.d.ts.map +1 -0
  168. package/node_modules/@huggingface/transformers/types/models/sapiens/image_processing_sapiens.d.ts +10 -0
  169. package/node_modules/@huggingface/transformers/types/models/sapiens/image_processing_sapiens.d.ts.map +1 -0
  170. package/node_modules/@huggingface/transformers/types/models/seamless_m4t/feature_extraction_seamless_m4t.d.ts +34 -0
  171. package/node_modules/@huggingface/transformers/types/models/seamless_m4t/feature_extraction_seamless_m4t.d.ts.map +1 -0
  172. package/node_modules/@huggingface/transformers/types/models/segformer/image_processing_segformer.d.ts +10 -0
  173. package/node_modules/@huggingface/transformers/types/models/segformer/image_processing_segformer.d.ts.map +1 -0
  174. package/node_modules/@huggingface/transformers/types/models/siglip/image_processing_siglip.d.ts +4 -0
  175. package/node_modules/@huggingface/transformers/types/models/siglip/image_processing_siglip.d.ts.map +1 -0
  176. package/node_modules/@huggingface/transformers/types/models/smolvlm/image_processing_smolvlm.d.ts +2 -0
  177. package/node_modules/@huggingface/transformers/types/models/smolvlm/image_processing_smolvlm.d.ts.map +1 -0
  178. package/node_modules/@huggingface/transformers/types/models/smolvlm/processing_smolvlm.d.ts +2 -0
  179. package/node_modules/@huggingface/transformers/types/models/smolvlm/processing_smolvlm.d.ts.map +1 -0
  180. package/node_modules/@huggingface/transformers/types/models/snac/feature_extraction_snac.d.ts +4 -0
  181. package/node_modules/@huggingface/transformers/types/models/snac/feature_extraction_snac.d.ts.map +1 -0
  182. package/node_modules/@huggingface/transformers/types/models/speecht5/feature_extraction_speecht5.d.ts +4 -0
  183. package/node_modules/@huggingface/transformers/types/models/speecht5/feature_extraction_speecht5.d.ts.map +1 -0
  184. package/node_modules/@huggingface/transformers/types/models/speecht5/processing_speecht5.d.ts +14 -0
  185. package/node_modules/@huggingface/transformers/types/models/speecht5/processing_speecht5.d.ts.map +1 -0
  186. package/node_modules/@huggingface/transformers/types/models/swin2sr/image_processing_swin2sr.d.ts +5 -0
  187. package/node_modules/@huggingface/transformers/types/models/swin2sr/image_processing_swin2sr.d.ts.map +1 -0
  188. package/node_modules/@huggingface/transformers/types/models/ultravox/processing_ultravox.d.ts +16 -0
  189. package/node_modules/@huggingface/transformers/types/models/ultravox/processing_ultravox.d.ts.map +1 -0
  190. package/node_modules/@huggingface/transformers/types/models/vit/image_processing_vit.d.ts +6 -0
  191. package/node_modules/@huggingface/transformers/types/models/vit/image_processing_vit.d.ts.map +1 -0
  192. package/node_modules/@huggingface/transformers/types/models/vitmatte/image_processing_vitmatte.d.ts +12 -0
  193. package/node_modules/@huggingface/transformers/types/models/vitmatte/image_processing_vitmatte.d.ts.map +1 -0
  194. package/node_modules/@huggingface/transformers/types/models/vitpose/image_processing_vitpose.d.ts +26 -0
  195. package/node_modules/@huggingface/transformers/types/models/vitpose/image_processing_vitpose.d.ts.map +1 -0
  196. package/node_modules/@huggingface/transformers/types/models/voxtral/processing_voxtral.d.ts +16 -0
  197. package/node_modules/@huggingface/transformers/types/models/voxtral/processing_voxtral.d.ts.map +1 -0
  198. package/node_modules/@huggingface/transformers/types/models/wav2vec2/feature_extraction_wav2vec2.d.ts +19 -0
  199. package/node_modules/@huggingface/transformers/types/models/wav2vec2/feature_extraction_wav2vec2.d.ts.map +1 -0
  200. package/node_modules/@huggingface/transformers/types/models/wav2vec2/processing_wav2vec2.d.ts +14 -0
  201. package/node_modules/@huggingface/transformers/types/models/wav2vec2/processing_wav2vec2.d.ts.map +1 -0
  202. package/node_modules/@huggingface/transformers/types/models/wav2vec2_with_lm/processing_wav2vec2_with_lm.d.ts +14 -0
  203. package/node_modules/@huggingface/transformers/types/models/wav2vec2_with_lm/processing_wav2vec2_with_lm.d.ts.map +1 -0
  204. package/node_modules/@huggingface/transformers/types/models/wespeaker/feature_extraction_wespeaker.d.ts +23 -0
  205. package/node_modules/@huggingface/transformers/types/models/wespeaker/feature_extraction_wespeaker.d.ts.map +1 -0
  206. package/node_modules/@huggingface/transformers/types/models/whisper/common_whisper.d.ts +8 -0
  207. package/node_modules/@huggingface/transformers/types/models/whisper/common_whisper.d.ts.map +1 -0
  208. package/node_modules/@huggingface/transformers/types/models/whisper/feature_extraction_whisper.d.ts +23 -0
  209. package/node_modules/@huggingface/transformers/types/models/whisper/feature_extraction_whisper.d.ts.map +1 -0
  210. package/node_modules/@huggingface/transformers/types/models/whisper/generation_whisper.d.ts +76 -0
  211. package/node_modules/@huggingface/transformers/types/models/whisper/generation_whisper.d.ts.map +1 -0
  212. package/node_modules/@huggingface/transformers/types/models/whisper/processing_whisper.d.ts +17 -0
  213. package/node_modules/@huggingface/transformers/types/models/whisper/processing_whisper.d.ts.map +1 -0
  214. package/node_modules/@huggingface/transformers/types/models/yolos/image_processing_yolos.d.ts +10 -0
  215. package/node_modules/@huggingface/transformers/types/models/yolos/image_processing_yolos.d.ts.map +1 -0
  216. package/node_modules/@huggingface/transformers/types/models.d.ts +4396 -0
  217. package/node_modules/@huggingface/transformers/types/models.d.ts.map +1 -0
  218. package/node_modules/@huggingface/transformers/types/ops/registry.d.ts +13 -0
  219. package/node_modules/@huggingface/transformers/types/ops/registry.d.ts.map +1 -0
  220. package/node_modules/@huggingface/transformers/types/pipelines.d.ts +2433 -0
  221. package/node_modules/@huggingface/transformers/types/pipelines.d.ts.map +1 -0
  222. package/node_modules/@huggingface/transformers/types/tokenizers.d.ts +1002 -0
  223. package/node_modules/@huggingface/transformers/types/tokenizers.d.ts.map +1 -0
  224. package/node_modules/@huggingface/transformers/types/transformers.d.ts +27 -0
  225. package/node_modules/@huggingface/transformers/types/transformers.d.ts.map +1 -0
  226. package/node_modules/@huggingface/transformers/types/tsconfig.tsbuildinfo +1 -0
  227. package/node_modules/@huggingface/transformers/types/utils/audio.d.ts +160 -0
  228. package/node_modules/@huggingface/transformers/types/utils/audio.d.ts.map +1 -0
  229. package/node_modules/@huggingface/transformers/types/utils/constants.d.ts +8 -0
  230. package/node_modules/@huggingface/transformers/types/utils/constants.d.ts.map +1 -0
  231. package/node_modules/@huggingface/transformers/types/utils/core.d.ts +231 -0
  232. package/node_modules/@huggingface/transformers/types/utils/core.d.ts.map +1 -0
  233. package/node_modules/@huggingface/transformers/types/utils/data-structures.d.ts +294 -0
  234. package/node_modules/@huggingface/transformers/types/utils/data-structures.d.ts.map +1 -0
  235. package/node_modules/@huggingface/transformers/types/utils/devices.d.ts +18 -0
  236. package/node_modules/@huggingface/transformers/types/utils/devices.d.ts.map +1 -0
  237. package/node_modules/@huggingface/transformers/types/utils/dtypes.d.ts +20 -0
  238. package/node_modules/@huggingface/transformers/types/utils/dtypes.d.ts.map +1 -0
  239. package/node_modules/@huggingface/transformers/types/utils/generic.d.ts +11 -0
  240. package/node_modules/@huggingface/transformers/types/utils/generic.d.ts.map +1 -0
  241. package/node_modules/@huggingface/transformers/types/utils/hub.d.ts +175 -0
  242. package/node_modules/@huggingface/transformers/types/utils/hub.d.ts.map +1 -0
  243. package/node_modules/@huggingface/transformers/types/utils/image.d.ts +141 -0
  244. package/node_modules/@huggingface/transformers/types/utils/image.d.ts.map +1 -0
  245. package/node_modules/@huggingface/transformers/types/utils/maths.d.ts +282 -0
  246. package/node_modules/@huggingface/transformers/types/utils/maths.d.ts.map +1 -0
  247. package/node_modules/@huggingface/transformers/types/utils/tensor.d.ts +490 -0
  248. package/node_modules/@huggingface/transformers/types/utils/tensor.d.ts.map +1 -0
  249. package/node_modules/@huggingface/transformers/types/utils/video.d.ts +37 -0
  250. package/node_modules/@huggingface/transformers/types/utils/video.d.ts.map +1 -0
  251. package/node_modules/onnxruntime-node/README.md +51 -0
  252. package/node_modules/onnxruntime-node/bin/napi-v3/darwin/arm64/libonnxruntime.1.21.0.dylib +0 -0
  253. package/node_modules/onnxruntime-node/bin/napi-v3/darwin/arm64/onnxruntime_binding.node +0 -0
  254. package/node_modules/onnxruntime-node/bin/napi-v3/linux/x64/libonnxruntime.so.1 +0 -0
  255. package/node_modules/onnxruntime-node/bin/napi-v3/linux/x64/libonnxruntime.so.1.21.0 +0 -0
  256. package/node_modules/onnxruntime-node/bin/napi-v3/linux/x64/libonnxruntime_providers_shared.so +0 -0
  257. package/node_modules/onnxruntime-node/bin/napi-v3/linux/x64/onnxruntime_binding.node +0 -0
  258. package/node_modules/onnxruntime-node/bin/napi-v3/win32/x64/DirectML.dll +0 -0
  259. package/node_modules/onnxruntime-node/bin/napi-v3/win32/x64/onnxruntime.dll +0 -0
  260. package/node_modules/onnxruntime-node/bin/napi-v3/win32/x64/onnxruntime_binding.node +0 -0
  261. package/node_modules/onnxruntime-node/dist/backend.d.ts +9 -0
  262. package/node_modules/onnxruntime-node/dist/backend.js +79 -0
  263. package/node_modules/onnxruntime-node/dist/backend.js.map +1 -0
  264. package/node_modules/onnxruntime-node/dist/binding.d.ts +40 -0
  265. package/node_modules/onnxruntime-node/dist/binding.js +41 -0
  266. package/node_modules/onnxruntime-node/dist/binding.js.map +1 -0
  267. package/node_modules/onnxruntime-node/dist/index.d.ts +2 -0
  268. package/node_modules/onnxruntime-node/dist/index.js +31 -0
  269. package/node_modules/onnxruntime-node/dist/index.js.map +1 -0
  270. package/node_modules/onnxruntime-node/dist/version.d.ts +1 -0
  271. package/node_modules/onnxruntime-node/dist/version.js +9 -0
  272. package/node_modules/onnxruntime-node/dist/version.js.map +1 -0
  273. package/node_modules/onnxruntime-node/lib/backend.ts +81 -0
  274. package/node_modules/onnxruntime-node/lib/binding.ts +84 -0
  275. package/node_modules/onnxruntime-node/lib/index.ts +15 -0
  276. package/node_modules/onnxruntime-node/lib/version.ts +7 -0
  277. package/node_modules/onnxruntime-node/package.json +53 -0
  278. package/node_modules/onnxruntime-node/script/build.js +148 -0
  279. package/node_modules/onnxruntime-node/script/build.ts +130 -0
  280. package/node_modules/onnxruntime-node/script/install.js +199 -0
  281. package/node_modules/onnxruntime-node/script/prepack.js +42 -0
  282. package/node_modules/onnxruntime-node/script/prepack.ts +20 -0
  283. package/node_modules/sharp/LICENSE +191 -0
  284. package/node_modules/sharp/README.md +118 -0
  285. package/node_modules/sharp/install/build.js +38 -0
  286. package/node_modules/sharp/install/check.js +14 -0
  287. package/node_modules/sharp/lib/channel.js +177 -0
  288. package/node_modules/sharp/lib/colour.js +195 -0
  289. package/node_modules/sharp/lib/composite.js +212 -0
  290. package/node_modules/sharp/lib/constructor.js +499 -0
  291. package/node_modules/sharp/lib/index.d.ts +1971 -0
  292. package/node_modules/sharp/lib/index.js +16 -0
  293. package/node_modules/sharp/lib/input.js +809 -0
  294. package/node_modules/sharp/lib/is.js +143 -0
  295. package/node_modules/sharp/lib/libvips.js +207 -0
  296. package/node_modules/sharp/lib/operation.js +1016 -0
  297. package/node_modules/sharp/lib/output.js +1666 -0
  298. package/node_modules/sharp/lib/resize.js +595 -0
  299. package/node_modules/sharp/lib/sharp.js +121 -0
  300. package/node_modules/sharp/lib/utility.js +291 -0
  301. package/node_modules/sharp/package.json +201 -0
  302. package/node_modules/sharp/src/binding.gyp +298 -0
  303. package/node_modules/sharp/src/common.cc +1130 -0
  304. package/node_modules/sharp/src/common.h +402 -0
  305. package/node_modules/sharp/src/metadata.cc +346 -0
  306. package/node_modules/sharp/src/metadata.h +90 -0
  307. package/node_modules/sharp/src/operations.cc +499 -0
  308. package/node_modules/sharp/src/operations.h +137 -0
  309. package/node_modules/sharp/src/pipeline.cc +1814 -0
  310. package/node_modules/sharp/src/pipeline.h +408 -0
  311. package/node_modules/sharp/src/sharp.cc +43 -0
  312. package/node_modules/sharp/src/stats.cc +186 -0
  313. package/node_modules/sharp/src/stats.h +62 -0
  314. package/node_modules/sharp/src/utilities.cc +288 -0
  315. package/node_modules/sharp/src/utilities.h +22 -0
  316. package/package.json +23 -4
@@ -0,0 +1,130 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License.
3
+
4
+ import { spawnSync } from 'child_process';
5
+ import * as fs from 'fs-extra';
6
+ import minimist from 'minimist';
7
+ import * as os from 'os';
8
+ import * as path from 'path';
9
+
10
+ // command line flags
11
+ const buildArgs = minimist(process.argv.slice(2));
12
+
13
+ // --config=Debug|Release|RelWithDebInfo
14
+ const CONFIG: 'Debug' | 'Release' | 'RelWithDebInfo' =
15
+ buildArgs.config || (os.platform() === 'win32' ? 'RelWithDebInfo' : 'Release');
16
+ if (CONFIG !== 'Debug' && CONFIG !== 'Release' && CONFIG !== 'RelWithDebInfo') {
17
+ throw new Error(`unrecognized config: ${CONFIG}`);
18
+ }
19
+ // --arch=x64|ia32|arm64|arm
20
+ const ARCH: 'x64' | 'ia32' | 'arm64' | 'arm' = buildArgs.arch || os.arch();
21
+ if (ARCH !== 'x64' && ARCH !== 'ia32' && ARCH !== 'arm64' && ARCH !== 'arm') {
22
+ throw new Error(`unrecognized architecture: ${ARCH}`);
23
+ }
24
+ // --onnxruntime-build-dir=
25
+ const ONNXRUNTIME_BUILD_DIR = buildArgs['onnxruntime-build-dir'];
26
+ // --onnxruntime-generator=
27
+ const ONNXRUNTIME_GENERATOR = buildArgs['onnxruntime-generator'];
28
+ // --rebuild
29
+ const REBUILD = !!buildArgs.rebuild;
30
+ // --use_dml
31
+ const USE_DML = !!buildArgs.use_dml;
32
+ // --use_webgpu
33
+ const USE_WEBGPU = !!buildArgs.use_webgpu;
34
+ // --use_cuda
35
+ const USE_CUDA = !!buildArgs.use_cuda;
36
+ // --use_tensorrt
37
+ const USE_TENSORRT = !!buildArgs.use_tensorrt;
38
+ // --use_coreml
39
+ const USE_COREML = !!buildArgs.use_coreml;
40
+ // --use_qnn
41
+ const USE_QNN = !!buildArgs.use_qnn;
42
+ // --dll_deps=
43
+ const DLL_DEPS = buildArgs.dll_deps;
44
+
45
+ // build path
46
+ const ROOT_FOLDER = path.join(__dirname, '..');
47
+ const BIN_FOLDER = path.join(ROOT_FOLDER, 'bin');
48
+ const BUILD_FOLDER = path.join(ROOT_FOLDER, 'build');
49
+
50
+ // if rebuild, clean up the dist folders
51
+ if (REBUILD) {
52
+ fs.removeSync(BIN_FOLDER);
53
+ fs.removeSync(BUILD_FOLDER);
54
+ }
55
+
56
+ const args = [
57
+ 'cmake-js',
58
+ REBUILD ? 'reconfigure' : 'configure',
59
+ `--arch=${ARCH}`,
60
+ '--CDnapi_build_version=6',
61
+ `--CDCMAKE_BUILD_TYPE=${CONFIG}`,
62
+ ];
63
+ if (ONNXRUNTIME_BUILD_DIR && typeof ONNXRUNTIME_BUILD_DIR === 'string') {
64
+ args.push(`--CDONNXRUNTIME_BUILD_DIR=${ONNXRUNTIME_BUILD_DIR}`);
65
+ }
66
+ if (ONNXRUNTIME_GENERATOR && typeof ONNXRUNTIME_GENERATOR === 'string') {
67
+ args.push(`--CDONNXRUNTIME_GENERATOR=${ONNXRUNTIME_GENERATOR}`);
68
+ }
69
+ if (USE_DML) {
70
+ args.push('--CDUSE_DML=ON');
71
+ }
72
+ if (USE_WEBGPU) {
73
+ args.push('--CDUSE_WEBGPU=ON');
74
+ }
75
+ if (USE_CUDA) {
76
+ args.push('--CDUSE_CUDA=ON');
77
+ }
78
+ if (USE_TENSORRT) {
79
+ args.push('--CDUSE_TENSORRT=ON');
80
+ }
81
+ if (USE_COREML) {
82
+ args.push('--CDUSE_COREML=ON');
83
+ }
84
+ if (USE_QNN) {
85
+ args.push('--CDUSE_QNN=ON');
86
+ }
87
+ if (DLL_DEPS) {
88
+ args.push(`--CDORT_NODEJS_DLL_DEPS=${DLL_DEPS}`);
89
+ }
90
+
91
+ // set CMAKE_OSX_ARCHITECTURES for macOS build
92
+ if (os.platform() === 'darwin') {
93
+ if (ARCH === 'x64') {
94
+ args.push('--CDCMAKE_OSX_ARCHITECTURES=x86_64');
95
+ } else if (ARCH === 'arm64') {
96
+ args.push('--CDCMAKE_OSX_ARCHITECTURES=arm64');
97
+ } else {
98
+ throw new Error(`architecture not supported for macOS build: ${ARCH}`);
99
+ }
100
+ }
101
+
102
+ // In Windows, "npx cmake-js configure" uses a powershell script to detect the Visual Studio installation.
103
+ // The script uses the environment variable LIB. If an invalid path is specified in LIB, the script will fail.
104
+ // So we override the LIB environment variable to remove invalid paths.
105
+ const envOverride =
106
+ os.platform() === 'win32' && process.env.LIB
107
+ ? { ...process.env, LIB: process.env.LIB.split(';').filter(fs.existsSync).join(';') }
108
+ : process.env;
109
+
110
+ // launch cmake-js configure
111
+ const procCmakejs = spawnSync('npx', args, { shell: true, stdio: 'inherit', cwd: ROOT_FOLDER, env: envOverride });
112
+ if (procCmakejs.status !== 0) {
113
+ if (procCmakejs.error) {
114
+ console.error(procCmakejs.error);
115
+ }
116
+ process.exit(procCmakejs.status === null ? undefined : procCmakejs.status);
117
+ }
118
+
119
+ // launch cmake to build
120
+ const procCmake = spawnSync('cmake', ['--build', '.', '--config', CONFIG], {
121
+ shell: true,
122
+ stdio: 'inherit',
123
+ cwd: BUILD_FOLDER,
124
+ });
125
+ if (procCmake.status !== 0) {
126
+ if (procCmake.error) {
127
+ console.error(procCmake.error);
128
+ }
129
+ process.exit(procCmake.status === null ? undefined : procCmake.status);
130
+ }
@@ -0,0 +1,199 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License.
3
+
4
+ 'use strict';
5
+
6
+ // This script is written in JavaScript. This is because it is used in "install" script in package.json, which is called
7
+ // when the package is installed either as a dependency or from "npm ci"/"npm install" without parameters. TypeScript is
8
+ // not always available.
9
+
10
+ // The purpose of this script is to download the required binaries for the platform and architecture.
11
+ // Currently, most of the binaries are already bundled in the package, except for the following:
12
+ // - Linux/x64/CUDA 11
13
+ // - Linux/x64/CUDA 12
14
+ //
15
+ // The CUDA binaries are not bundled because they are too large to be allowed in the npm registry. Instead, they are
16
+ // downloaded from the GitHub release page of ONNX Runtime. The script will download the binaries if they are not
17
+ // already present in the package.
18
+
19
+ // Step.1: Check if we should exit early
20
+ const os = require('os');
21
+ const fs = require('fs');
22
+ const https = require('https');
23
+ const path = require('path');
24
+ const tar = require('tar');
25
+ const { execFileSync } = require('child_process');
26
+ const { bootstrap: globalAgentBootstrap } = require('global-agent');
27
+
28
+ // Bootstrap global-agent to honor the proxy settings in
29
+ // environment variables, e.g. GLOBAL_AGENT_HTTPS_PROXY.
30
+ // See https://github.com/gajus/global-agent/blob/v3.0.0/README.md#environment-variables for details.
31
+ globalAgentBootstrap();
32
+
33
+ // commandline flag:
34
+ // --onnxruntime-node-install-cuda Force install the CUDA EP binaries. Try to detect the CUDA version.
35
+ // --onnxruntime-node-install-cuda=v11 Force install the CUDA EP binaries for CUDA 11.
36
+ // --onnxruntime-node-install-cuda=v12 Force install the CUDA EP binaries for CUDA 12.
37
+ // --onnxruntime-node-install-cuda=skip Skip the installation of the CUDA EP binaries.
38
+ //
39
+ // Alternatively, use environment variable "ONNXRUNTIME_NODE_INSTALL_CUDA"
40
+ //
41
+ // If the flag is not provided, the script will only install the CUDA EP binaries when:
42
+ // - The platform is Linux/x64.
43
+ // - The binaries are not already present in the package.
44
+ // - The installation is not a local install (when used inside ONNX Runtime repo).
45
+ //
46
+ const INSTALL_CUDA_FLAG = parseInstallCudaFlag();
47
+ const NO_INSTALL = INSTALL_CUDA_FLAG === 'skip';
48
+ const FORCE_INSTALL = !NO_INSTALL && INSTALL_CUDA_FLAG;
49
+
50
+ const IS_LINUX_X64 = os.platform() === 'linux' && os.arch() === 'x64';
51
+ const BIN_FOLDER = path.join(__dirname, '..', 'bin/napi-v3/linux/x64');
52
+ const BIN_FOLDER_EXISTS = fs.existsSync(BIN_FOLDER);
53
+ const CUDA_DLL_EXISTS = fs.existsSync(path.join(BIN_FOLDER, 'libonnxruntime_providers_cuda.so'));
54
+ const ORT_VERSION = require('../package.json').version;
55
+
56
+ const npm_config_local_prefix = process.env.npm_config_local_prefix;
57
+ const npm_package_json = process.env.npm_package_json;
58
+ const SKIP_LOCAL_INSTALL =
59
+ npm_config_local_prefix && npm_package_json && path.dirname(npm_package_json) === npm_config_local_prefix;
60
+
61
+ const shouldInstall = FORCE_INSTALL || (!SKIP_LOCAL_INSTALL && IS_LINUX_X64 && BIN_FOLDER_EXISTS && !CUDA_DLL_EXISTS);
62
+ if (NO_INSTALL || !shouldInstall) {
63
+ process.exit(0);
64
+ }
65
+
66
+ // Step.2: Download the required binaries
67
+ const artifactUrl = {
68
+ get 11() {
69
+ // TODO: support ORT Cuda v11 binaries
70
+ throw new Error(`CUDA 11 binaries are not supported by this script yet.
71
+
72
+ To use ONNX Runtime Node.js binding with CUDA v11 support, please follow the manual steps:
73
+
74
+ 1. Use "--onnxruntime-node-install-cuda=skip" to skip the auto installation.
75
+ 2. Navigate to https://aiinfra.visualstudio.com/PublicPackages/_artifacts/feed/onnxruntime-cuda-11
76
+ 3. Download the binaries for your platform and architecture
77
+ 4. Extract the following binaries to "node_modules/onnxruntime-node/bin/napi-v3/linux/x64:
78
+ - libonnxruntime_providers_tensorrt.so
79
+ - libonnxruntime_providers_shared.so
80
+ - libonnxruntime.so.${ORT_VERSION}
81
+ - libonnxruntime_providers_cuda.so
82
+ `);
83
+ },
84
+ 12: `https://github.com/microsoft/onnxruntime/releases/download/v${ORT_VERSION}/onnxruntime-linux-x64-gpu-${
85
+ ORT_VERSION
86
+ }.tgz`,
87
+ }[INSTALL_CUDA_FLAG || tryGetCudaVersion()];
88
+ console.log(`Downloading "${artifactUrl}"...`);
89
+
90
+ const FILES = new Set([
91
+ 'libonnxruntime_providers_tensorrt.so',
92
+ 'libonnxruntime_providers_shared.so',
93
+ `libonnxruntime.so.${ORT_VERSION}`,
94
+ 'libonnxruntime_providers_cuda.so',
95
+ ]);
96
+
97
+ downloadAndExtract(artifactUrl, BIN_FOLDER, FILES);
98
+
99
+ async function downloadAndExtract(url, dest, files) {
100
+ return new Promise((resolve, reject) => {
101
+ https.get(url, (res) => {
102
+ const { statusCode } = res;
103
+ const contentType = res.headers['content-type'];
104
+
105
+ if (statusCode === 301 || statusCode === 302) {
106
+ downloadAndExtract(res.headers.location, dest, files).then(
107
+ (value) => resolve(value),
108
+ (reason) => reject(reason),
109
+ );
110
+ return;
111
+ } else if (statusCode !== 200) {
112
+ throw new Error(`Failed to download the binaries: ${res.statusCode} ${res.statusMessage}.
113
+
114
+ Use "--onnxruntime-node-install-cuda=skip" to skip the installation. You will still be able to use ONNX Runtime, but the CUDA EP will not be available.`);
115
+ }
116
+
117
+ if (!contentType || !/^application\/octet-stream/.test(contentType)) {
118
+ throw new Error(`unexpected content type: ${contentType}`);
119
+ }
120
+
121
+ res
122
+ .pipe(
123
+ tar.t({
124
+ strict: true,
125
+ onentry: (entry) => {
126
+ const filename = path.basename(entry.path);
127
+ if (entry.type === 'File' && files.has(filename)) {
128
+ console.log(`Extracting "${filename}" to "${dest}"...`);
129
+ entry.pipe(fs.createWriteStream(path.join(dest, filename)));
130
+ entry.on('finish', () => {
131
+ console.log(`Finished extracting "${filename}".`);
132
+ });
133
+ }
134
+ },
135
+ }),
136
+ )
137
+ .on('error', (err) => {
138
+ throw new Error(`Failed to extract the binaries: ${err.message}.
139
+
140
+ Use "--onnxruntime-node-install-cuda=skip" to skip the installation. You will still be able to use ONNX Runtime, but the CUDA EP will not be available.`);
141
+ });
142
+ });
143
+ });
144
+ }
145
+
146
+ function tryGetCudaVersion() {
147
+ // Should only return 11 or 12.
148
+
149
+ // try to get the CUDA version from the system ( `nvcc --version` )
150
+ let ver = 12;
151
+ try {
152
+ const nvccVersion = execFileSync('nvcc', ['--version'], { encoding: 'utf8' });
153
+ const match = nvccVersion.match(/release (\d+)/);
154
+ if (match) {
155
+ ver = parseInt(match[1]);
156
+ if (ver !== 11 && ver !== 12) {
157
+ throw new Error(`Unsupported CUDA version: ${ver}`);
158
+ }
159
+ }
160
+ } catch (e) {
161
+ if (e?.code === 'ENOENT') {
162
+ console.warn('`nvcc` not found. Assuming CUDA 12.');
163
+ } else {
164
+ console.warn('Failed to detect CUDA version from `nvcc --version`:', e.message);
165
+ }
166
+ }
167
+
168
+ // assume CUDA 12 if failed to detect
169
+ return ver;
170
+ }
171
+
172
+ function parseInstallCudaFlag() {
173
+ let flag = process.env.ONNXRUNTIME_NODE_INSTALL_CUDA || process.env.npm_config_onnxruntime_node_install_cuda;
174
+ if (!flag) {
175
+ for (let i = 0; i < process.argv.length; i++) {
176
+ if (process.argv[i].startsWith('--onnxruntime-node-install-cuda=')) {
177
+ flag = process.argv[i].split('=')[1];
178
+ break;
179
+ } else if (process.argv[i] === '--onnxruntime-node-install-cuda') {
180
+ flag = 'true';
181
+ }
182
+ }
183
+ }
184
+ switch (flag) {
185
+ case 'true':
186
+ case '1':
187
+ case 'ON':
188
+ return tryGetCudaVersion();
189
+ case 'v11':
190
+ return 11;
191
+ case 'v12':
192
+ return 12;
193
+ case 'skip':
194
+ case undefined:
195
+ return flag;
196
+ default:
197
+ throw new Error(`Invalid value for --onnxruntime-node-install-cuda: ${flag}`);
198
+ }
199
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation. All rights reserved.
3
+ // Licensed under the MIT License.
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
17
+ }) : function(o, v) {
18
+ o["default"] = v;
19
+ });
20
+ var __importStar = (this && this.__importStar) || function (mod) {
21
+ if (mod && mod.__esModule) return mod;
22
+ var result = {};
23
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
24
+ __setModuleDefault(result, mod);
25
+ return result;
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ const fs = __importStar(require("fs-extra"));
29
+ const path = __importStar(require("path"));
30
+ function updatePackageJson() {
31
+ const commonPackageJsonPath = path.join(__dirname, '..', '..', 'common', 'package.json');
32
+ const selfPackageJsonPath = path.join(__dirname, '..', 'package.json');
33
+ console.log(`=== start to update package.json: ${selfPackageJsonPath}`);
34
+ const packageCommon = fs.readJSONSync(commonPackageJsonPath);
35
+ const packageSelf = fs.readJSONSync(selfPackageJsonPath);
36
+ const version = packageCommon.version;
37
+ packageSelf.dependencies['onnxruntime-common'] = `${version}`;
38
+ fs.writeJSONSync(selfPackageJsonPath, packageSelf, { spaces: 2 });
39
+ console.log('=== finished updating package.json.');
40
+ }
41
+ // update version of dependency "onnxruntime-common" before packing
42
+ updatePackageJson();
@@ -0,0 +1,20 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License.
3
+
4
+ import * as fs from 'fs-extra';
5
+ import * as path from 'path';
6
+
7
+ function updatePackageJson() {
8
+ const commonPackageJsonPath = path.join(__dirname, '..', '..', 'common', 'package.json');
9
+ const selfPackageJsonPath = path.join(__dirname, '..', 'package.json');
10
+ console.log(`=== start to update package.json: ${selfPackageJsonPath}`);
11
+ const packageCommon = fs.readJSONSync(commonPackageJsonPath);
12
+ const packageSelf = fs.readJSONSync(selfPackageJsonPath);
13
+ const version = packageCommon.version;
14
+ packageSelf.dependencies['onnxruntime-common'] = `${version}`;
15
+ fs.writeJSONSync(selfPackageJsonPath, packageSelf, { spaces: 2 });
16
+ console.log('=== finished updating package.json.');
17
+ }
18
+
19
+ // update version of dependency "onnxruntime-common" before packing
20
+ updatePackageJson();
@@ -0,0 +1,191 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
13
+ owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities
16
+ that control, are controlled by, or are under common control with that entity.
17
+ For the purposes of this definition, "control" means (i) the power, direct or
18
+ indirect, to cause the direction or management of such entity, whether by
19
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
23
+ permissions granted by this License.
24
+
25
+ "Source" form shall mean the preferred form for making modifications, including
26
+ but not limited to software source code, documentation source, and configuration
27
+ files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical transformation or
30
+ translation of a Source form, including but not limited to compiled object code,
31
+ generated documentation, and conversions to other media types.
32
+
33
+ "Work" shall mean the work of authorship, whether in Source or Object form, made
34
+ available under the License, as indicated by a copyright notice that is included
35
+ in or attached to the work (an example is provided in the Appendix below).
36
+
37
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
38
+ is based on (or derived from) the Work and for which the editorial revisions,
39
+ annotations, elaborations, or other modifications represent, as a whole, an
40
+ original work of authorship. For the purposes of this License, Derivative Works
41
+ shall not include works that remain separable from, or merely link (or bind by
42
+ name) to the interfaces of, the Work and Derivative Works thereof.
43
+
44
+ "Contribution" shall mean any work of authorship, including the original version
45
+ of the Work and any modifications or additions to that Work or Derivative Works
46
+ thereof, that is intentionally submitted to Licensor for inclusion in the Work
47
+ by the copyright owner or by an individual or Legal Entity authorized to submit
48
+ on behalf of the copyright owner. For the purposes of this definition,
49
+ "submitted" means any form of electronic, verbal, or written communication sent
50
+ to the Licensor or its representatives, including but not limited to
51
+ communication on electronic mailing lists, source code control systems, and
52
+ issue tracking systems that are managed by, or on behalf of, the Licensor for
53
+ the purpose of discussing and improving the Work, but excluding communication
54
+ that is conspicuously marked or otherwise designated in writing by the copyright
55
+ owner as "Not a Contribution."
56
+
57
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
58
+ of whom a Contribution has been received by Licensor and subsequently
59
+ incorporated within the Work.
60
+
61
+ 2. Grant of Copyright License.
62
+
63
+ Subject to the terms and conditions of this License, each Contributor hereby
64
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
65
+ irrevocable copyright license to reproduce, prepare Derivative Works of,
66
+ publicly display, publicly perform, sublicense, and distribute the Work and such
67
+ Derivative Works in Source or Object form.
68
+
69
+ 3. Grant of Patent License.
70
+
71
+ Subject to the terms and conditions of this License, each Contributor hereby
72
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
73
+ irrevocable (except as stated in this section) patent license to make, have
74
+ made, use, offer to sell, sell, import, and otherwise transfer the Work, where
75
+ such license applies only to those patent claims licensable by such Contributor
76
+ that are necessarily infringed by their Contribution(s) alone or by combination
77
+ of their Contribution(s) with the Work to which such Contribution(s) was
78
+ submitted. If You institute patent litigation against any entity (including a
79
+ cross-claim or counterclaim in a lawsuit) alleging that the Work or a
80
+ Contribution incorporated within the Work constitutes direct or contributory
81
+ patent infringement, then any patent licenses granted to You under this License
82
+ for that Work shall terminate as of the date such litigation is filed.
83
+
84
+ 4. Redistribution.
85
+
86
+ You may reproduce and distribute copies of the Work or Derivative Works thereof
87
+ in any medium, with or without modifications, and in Source or Object form,
88
+ provided that You meet the following conditions:
89
+
90
+ You must give any other recipients of the Work or Derivative Works a copy of
91
+ this License; and
92
+ You must cause any modified files to carry prominent notices stating that You
93
+ changed the files; and
94
+ You must retain, in the Source form of any Derivative Works that You distribute,
95
+ all copyright, patent, trademark, and attribution notices from the Source form
96
+ of the Work, excluding those notices that do not pertain to any part of the
97
+ Derivative Works; and
98
+ If the Work includes a "NOTICE" text file as part of its distribution, then any
99
+ Derivative Works that You distribute must include a readable copy of the
100
+ attribution notices contained within such NOTICE file, excluding those notices
101
+ that do not pertain to any part of the Derivative Works, in at least one of the
102
+ following places: within a NOTICE text file distributed as part of the
103
+ Derivative Works; within the Source form or documentation, if provided along
104
+ with the Derivative Works; or, within a display generated by the Derivative
105
+ Works, if and wherever such third-party notices normally appear. The contents of
106
+ the NOTICE file are for informational purposes only and do not modify the
107
+ License. You may add Your own attribution notices within Derivative Works that
108
+ You distribute, alongside or as an addendum to the NOTICE text from the Work,
109
+ provided that such additional attribution notices cannot be construed as
110
+ modifying the License.
111
+ You may add Your own copyright statement to Your modifications and may provide
112
+ additional or different license terms and conditions for use, reproduction, or
113
+ distribution of Your modifications, or for any such Derivative Works as a whole,
114
+ provided Your use, reproduction, and distribution of the Work otherwise complies
115
+ with the conditions stated in this License.
116
+
117
+ 5. Submission of Contributions.
118
+
119
+ Unless You explicitly state otherwise, any Contribution intentionally submitted
120
+ for inclusion in the Work by You to the Licensor shall be under the terms and
121
+ conditions of this License, without any additional terms or conditions.
122
+ Notwithstanding the above, nothing herein shall supersede or modify the terms of
123
+ any separate license agreement you may have executed with Licensor regarding
124
+ such Contributions.
125
+
126
+ 6. Trademarks.
127
+
128
+ This License does not grant permission to use the trade names, trademarks,
129
+ service marks, or product names of the Licensor, except as required for
130
+ reasonable and customary use in describing the origin of the Work and
131
+ reproducing the content of the NOTICE file.
132
+
133
+ 7. Disclaimer of Warranty.
134
+
135
+ Unless required by applicable law or agreed to in writing, Licensor provides the
136
+ Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
137
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
138
+ including, without limitation, any warranties or conditions of TITLE,
139
+ NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
140
+ solely responsible for determining the appropriateness of using or
141
+ redistributing the Work and assume any risks associated with Your exercise of
142
+ permissions under this License.
143
+
144
+ 8. Limitation of Liability.
145
+
146
+ In no event and under no legal theory, whether in tort (including negligence),
147
+ contract, or otherwise, unless required by applicable law (such as deliberate
148
+ and grossly negligent acts) or agreed to in writing, shall any Contributor be
149
+ liable to You for damages, including any direct, indirect, special, incidental,
150
+ or consequential damages of any character arising as a result of this License or
151
+ out of the use or inability to use the Work (including but not limited to
152
+ damages for loss of goodwill, work stoppage, computer failure or malfunction, or
153
+ any and all other commercial damages or losses), even if such Contributor has
154
+ been advised of the possibility of such damages.
155
+
156
+ 9. Accepting Warranty or Additional Liability.
157
+
158
+ While redistributing the Work or Derivative Works thereof, You may choose to
159
+ offer, and charge a fee for, acceptance of support, warranty, indemnity, or
160
+ other liability obligations and/or rights consistent with this License. However,
161
+ in accepting such obligations, You may act only on Your own behalf and on Your
162
+ sole responsibility, not on behalf of any other Contributor, and only if You
163
+ agree to indemnify, defend, and hold each Contributor harmless for any liability
164
+ incurred by, or claims asserted against, such Contributor by reason of your
165
+ accepting any such warranty or additional liability.
166
+
167
+ END OF TERMS AND CONDITIONS
168
+
169
+ APPENDIX: How to apply the Apache License to your work
170
+
171
+ To apply the Apache License to your work, attach the following boilerplate
172
+ notice, with the fields enclosed by brackets "[]" replaced with your own
173
+ identifying information. (Don't include the brackets!) The text should be
174
+ enclosed in the appropriate comment syntax for the file format. We also
175
+ recommend that a file or class name and description of purpose be included on
176
+ the same "printed page" as the copyright notice for easier identification within
177
+ third-party archives.
178
+
179
+ Copyright [yyyy] [name of copyright owner]
180
+
181
+ Licensed under the Apache License, Version 2.0 (the "License");
182
+ you may not use this file except in compliance with the License.
183
+ You may obtain a copy of the License at
184
+
185
+ http://www.apache.org/licenses/LICENSE-2.0
186
+
187
+ Unless required by applicable law or agreed to in writing, software
188
+ distributed under the License is distributed on an "AS IS" BASIS,
189
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190
+ See the License for the specific language governing permissions and
191
+ limitations under the License.