@btc-vision/bitcoin 6.4.10 → 6.5.1
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.
- package/.babelrc +13 -4
- package/.mocharc.json +13 -13
- package/.prettierrc.json +12 -12
- package/CHANGELOG.md +403 -403
- package/CONTRIBUTING.md +83 -83
- package/LICENSE +21 -21
- package/README.md +201 -201
- package/browser/chunks/crypto-C6FlKKmp.js +2006 -0
- package/browser/chunks/payments-BE4vwHhV.js +1045 -0
- package/browser/chunks/psbt-Dlosf9CT.js +3853 -0
- package/browser/chunks/script-COWGdiOo.js +318 -0
- package/browser/chunks/transaction-BiXwH2v4.js +421 -0
- package/browser/chunks/utils-BKmkTzNZ.js +759 -0
- package/browser/crypto/crypto.d.ts +1 -1
- package/browser/index.d.ts +7 -27
- package/browser/index.js +92 -2
- package/build/index.d.ts +7 -27
- package/build/index.js +2 -2
- package/cjs/package.json +3 -3
- package/gulpfile.js +42 -42
- package/package.json +153 -150
- package/src/bip66.ts +107 -107
- package/src/block.ts +233 -233
- package/src/bufferutils.ts +188 -188
- package/src/crypto.ts +108 -108
- package/src/ecc_lib.ts +94 -94
- package/src/hooks/AdvancedSignatureManager.ts +104 -104
- package/src/hooks/SignatureManager.ts +84 -84
- package/src/index.ts +83 -105
- package/src/merkle.ts +31 -31
- package/src/opcodes.ts +280 -280
- package/src/payments/bip341.ts +140 -140
- package/src/payments/embed.ts +61 -61
- package/src/payments/index.ts +172 -172
- package/src/payments/lazy.ts +28 -28
- package/src/payments/p2ms.ts +156 -156
- package/src/payments/p2op.ts +195 -195
- package/src/payments/p2pk.ts +93 -93
- package/src/payments/p2pkh.ts +214 -214
- package/src/payments/p2tr.ts +309 -309
- package/src/psbt/bip371.ts +441 -441
- package/src/push_data.ts +97 -97
- package/src/script.ts +247 -247
- package/src/script_number.ts +72 -72
- package/src/script_signature.ts +91 -91
- package/src/transaction.ts +656 -656
- package/test/address.spec.ts +155 -155
- package/test/bitcoin.core.spec.ts +212 -212
- package/test/block.spec.ts +171 -171
- package/test/bufferutils.spec.ts +450 -450
- package/test/crypto.spec.ts +49 -49
- package/test/fixtures/address.json +329 -329
- package/test/fixtures/block.json +148 -148
- package/test/fixtures/bufferutils.json +102 -102
- package/test/fixtures/core/README.md +26 -26
- package/test/fixtures/core/base58_encode_decode.json +50 -50
- package/test/fixtures/core/base58_keys_invalid.json +152 -152
- package/test/fixtures/core/base58_keys_valid.json +452 -452
- package/test/fixtures/core/blocks.json +27 -27
- package/test/fixtures/core/sig_canonical.json +7 -7
- package/test/fixtures/core/sig_noncanonical.json +33 -33
- package/test/fixtures/core/sighash.json +3505 -3505
- package/test/fixtures/core/tx_valid.json +2023 -2023
- package/test/fixtures/crypto.json +43 -43
- package/test/fixtures/ecdsa.json +217 -217
- package/test/fixtures/ecpair.json +141 -141
- package/test/fixtures/embed.json +108 -108
- package/test/fixtures/p2ms.json +434 -434
- package/test/fixtures/p2pk.json +179 -179
- package/test/fixtures/p2pkh.json +276 -276
- package/test/fixtures/p2sh.json +508 -508
- package/test/fixtures/p2tr.json +1198 -1198
- package/test/fixtures/p2wpkh.json +290 -290
- package/test/fixtures/p2wsh.json +489 -489
- package/test/fixtures/psbt.json +924 -924
- package/test/fixtures/script.json +465 -465
- package/test/fixtures/script_number.json +225 -225
- package/test/fixtures/signature.json +140 -140
- package/test/fixtures/transaction.json +916 -916
- package/test/integration/_regtest.ts +6 -6
- package/test/integration/addresses.spec.ts +142 -142
- package/test/integration/bip32.spec.ts +130 -130
- package/test/integration/blocks.spec.ts +28 -28
- package/test/integration/cltv.spec.ts +241 -241
- package/test/integration/csv.spec.ts +452 -452
- package/test/integration/payments.spec.ts +110 -110
- package/test/integration/taproot.spec.ts +663 -663
- package/test/integration/transactions.spec.ts +668 -668
- package/test/payments.spec.ts +114 -114
- package/test/payments.utils.ts +165 -165
- package/test/psbt.spec.ts +1285 -1285
- package/test/script.spec.ts +186 -186
- package/test/script_number.spec.ts +26 -26
- package/test/script_signature.spec.ts +66 -66
- package/test/transaction.spec.ts +337 -337
- package/test/ts-node-register.js +7 -7
- package/test/tsconfig.json +48 -48
- package/test/types.spec.ts +53 -53
- package/tsconfig.base.json +27 -27
- package/tsconfig.json +19 -19
- package/tsconfig.webpack.json +18 -18
- package/vite.config.browser.ts +93 -0
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/.ready +0 -0
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/.release-please-manifest.json +0 -3
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/CHANGELOG.md +0 -962
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/CONTRIBUTING.md +0 -34
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/LICENSE +0 -24
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/README.md +0 -273
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/SECURITY.md +0 -2
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/addon.gypi +0 -204
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/bin/node-gyp.js +0 -138
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/.release-please-manifest.json +0 -3
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/LICENSE +0 -28
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/data/ninja/build.ninja +0 -4
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc +0 -12
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/docs/GypVsCMake.md +0 -116
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/docs/Hacking.md +0 -46
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/docs/InputFormatReference.md +0 -1080
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/docs/LanguageSpecification.md +0 -430
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/docs/README.md +0 -27
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/docs/Testing.md +0 -450
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/docs/UserDocumentation.md +0 -965
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/gyp +0 -8
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/gyp.bat +0 -5
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/gyp_main.py +0 -45
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +0 -365
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +0 -206
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +0 -1272
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +0 -1547
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +0 -59
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +0 -153
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +0 -271
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +0 -574
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +0 -692
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/common.py +0 -711
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +0 -171
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +0 -169
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +0 -113
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +0 -55
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py +0 -0
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +0 -804
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +0 -1173
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +0 -1318
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py +0 -127
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +0 -103
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +0 -461
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +0 -89
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +0 -57
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +0 -2745
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +0 -3976
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +0 -44
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +0 -2964
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +0 -67
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +0 -1391
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +0 -25
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/input.py +0 -3115
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +0 -98
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +0 -771
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +0 -1260
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +0 -174
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py +0 -61
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +0 -373
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +0 -1938
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation_test.py +0 -53
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py +0 -302
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +0 -3198
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +0 -65
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/LICENSE +0 -3
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.APACHE +0 -177
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.BSD +0 -23
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/__init__.py +0 -15
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py +0 -108
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py +0 -252
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py +0 -83
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/_parser.py +0 -359
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/_structures.py +0 -61
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py +0 -192
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/markers.py +0 -252
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/metadata.py +0 -825
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/py.typed +0 -0
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/requirements.py +0 -90
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py +0 -1030
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/tags.py +0 -553
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/utils.py +0 -172
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/version.py +0 -563
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pyproject.toml +0 -120
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/release-please-config.json +0 -11
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/test_gyp.py +0 -261
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/Find-VisualStudio.cs +0 -250
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/build.js +0 -227
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/clean.js +0 -15
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/configure.js +0 -328
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/create-config-gypi.js +0 -150
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/download.js +0 -39
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/find-node-directory.js +0 -63
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/find-python.js +0 -310
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/find-visualstudio.js +0 -590
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/install.js +0 -415
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/list.js +0 -26
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/log.js +0 -168
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/node-gyp.js +0 -188
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/process-release.js +0 -146
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/rebuild.js +0 -12
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/remove.js +0 -43
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/util.js +0 -81
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/macOS_Catalina_acid_test.sh +0 -21
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/package.json +0 -51
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/release-please-config.json +0 -40
- package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/src/win_delay_load_hook.cc +0 -39
- package/browser/index.js.LICENSE.txt +0 -14
- package/browser/ops.d.ts +0 -126
- package/build/ops.d.ts +0 -126
- package/build/ops.js +0 -127
- package/coverage/tmp/coverage-31752-1735543485354-0.json +0 -1
- package/coverage/tmp/coverage-59920-1735543484555-0.json +0 -1
- package/coverage/tmp/coverage-66252-1735543483919-0.json +0 -1
- package/coverage/tmp/coverage-68440-1735543485236-0.json +0 -1
- package/coverage/tmp/coverage-70588-1735543484426-0.json +0 -1
- package/coverage/tmp/coverage-79292-1735543485296-0.json +0 -1
- package/coverage/tmp/coverage-80212-1735543483980-0.json +0 -1
package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/CONTRIBUTING.md
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Contributing to node-gyp
|
|
2
|
-
|
|
3
|
-
## Code of Conduct
|
|
4
|
-
|
|
5
|
-
Please read the
|
|
6
|
-
[Code of Conduct](https://github.com/nodejs/admin/blob/main/CODE_OF_CONDUCT.md)
|
|
7
|
-
which explains the minimum behavior expectations for node-gyp contributors.
|
|
8
|
-
|
|
9
|
-
<a id="developers-certificate-of-origin"></a>
|
|
10
|
-
## Developer's Certificate of Origin 1.1
|
|
11
|
-
|
|
12
|
-
By making a contribution to this project, I certify that:
|
|
13
|
-
|
|
14
|
-
* (a) The contribution was created in whole or in part by me and I
|
|
15
|
-
have the right to submit it under the open source license
|
|
16
|
-
indicated in the file; or
|
|
17
|
-
|
|
18
|
-
* (b) The contribution is based upon previous work that, to the best
|
|
19
|
-
of my knowledge, is covered under an appropriate open source
|
|
20
|
-
license and I have the right under that license to submit that
|
|
21
|
-
work with modifications, whether created in whole or in part
|
|
22
|
-
by me, under the same open source license (unless I am
|
|
23
|
-
permitted to submit under a different license), as indicated
|
|
24
|
-
in the file; or
|
|
25
|
-
|
|
26
|
-
* (c) The contribution was provided directly to me by some other
|
|
27
|
-
person who certified (a), (b) or (c) and I have not modified
|
|
28
|
-
it.
|
|
29
|
-
|
|
30
|
-
* (d) I understand and agree that this project and the contribution
|
|
31
|
-
are public and that a record of the contribution (including all
|
|
32
|
-
personal information I submit with it, including my sign-off) is
|
|
33
|
-
maintained indefinitely and may be redistributed consistent with
|
|
34
|
-
this project or the open source license(s) involved.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
(The MIT License)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person
|
|
6
|
-
obtaining a copy of this software and associated documentation
|
|
7
|
-
files (the "Software"), to deal in the Software without
|
|
8
|
-
restriction, including without limitation the rights to use,
|
|
9
|
-
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
copies of the Software, and to permit persons to whom the
|
|
11
|
-
Software is furnished to do so, subject to the following
|
|
12
|
-
conditions:
|
|
13
|
-
|
|
14
|
-
The above copyright notice and this permission notice shall be
|
|
15
|
-
included in all copies or substantial portions of the Software.
|
|
16
|
-
|
|
17
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
18
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
19
|
-
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
20
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
21
|
-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
22
|
-
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
23
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
24
|
-
OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
# `node-gyp` - Node.js native addon build tool
|
|
2
|
-
|
|
3
|
-
[](https://github.com/nodejs/node-gyp/actions?query=workflow%3ATests+branch%3Amain)
|
|
4
|
-

|
|
5
|
-
|
|
6
|
-
`node-gyp` is a cross-platform command-line tool written in Node.js for
|
|
7
|
-
compiling native addon modules for Node.js. It contains a vendored copy of the
|
|
8
|
-
[gyp-next](https://github.com/nodejs/gyp-next) project that was previously used
|
|
9
|
-
by the Chromium team and extended to support the development of Node.js native
|
|
10
|
-
addons.
|
|
11
|
-
|
|
12
|
-
Note that `node-gyp` is _not_ used to build Node.js itself.
|
|
13
|
-
|
|
14
|
-
All current and LTS target versions of Node.js are supported. Depending on what version of Node.js is actually installed on your system
|
|
15
|
-
`node-gyp` downloads the necessary development files or headers for the target version. List of stable Node.js versions can be found on [Node.js website](https://nodejs.org/en/about/previous-releases).
|
|
16
|
-
|
|
17
|
-
## Features
|
|
18
|
-
|
|
19
|
-
* The same build commands work on any of the supported platforms
|
|
20
|
-
* Supports the targeting of different versions of Node.js
|
|
21
|
-
|
|
22
|
-
## Installation
|
|
23
|
-
|
|
24
|
-
> [!Important]
|
|
25
|
-
> Python >= v3.12 requires `node-gyp` >= v10
|
|
26
|
-
|
|
27
|
-
You can install `node-gyp` using `npm`:
|
|
28
|
-
|
|
29
|
-
``` bash
|
|
30
|
-
npm install -g node-gyp
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Depending on your operating system, you will need to install:
|
|
34
|
-
|
|
35
|
-
### On Unix
|
|
36
|
-
|
|
37
|
-
* [A supported version of Python](https://devguide.python.org/versions/)
|
|
38
|
-
* `make`
|
|
39
|
-
* A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org)
|
|
40
|
-
|
|
41
|
-
### On macOS
|
|
42
|
-
|
|
43
|
-
* [A supported version of Python](https://devguide.python.org/versions/)
|
|
44
|
-
* `Xcode Command Line Tools` which will install `clang`, `clang++`, and `make`.
|
|
45
|
-
* Install the `Xcode Command Line Tools` standalone by running `xcode-select --install`. -- OR --
|
|
46
|
-
* Alternatively, if you already have the [full Xcode installed](https://developer.apple.com/xcode/download/), you can install the Command Line Tools under the menu `Xcode -> Open Developer Tool -> More Developer Tools...`.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
### On Windows
|
|
50
|
-
|
|
51
|
-
Install tools with [Chocolatey](https://chocolatey.org):
|
|
52
|
-
``` bash
|
|
53
|
-
choco install python visualstudio2022-workload-vctools -y
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Or install and configure Python and Visual Studio tools manually:
|
|
57
|
-
|
|
58
|
-
* Install the current [version of Python](https://devguide.python.org/versions/) from the
|
|
59
|
-
[Microsoft Store](https://apps.microsoft.com/store/search?publisher=Python+Software+Foundation).
|
|
60
|
-
|
|
61
|
-
* Install Visual C++ Build Environment: For Visual Studio 2019 or later, use the `Desktop development with C++` workload from [Visual Studio Community](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community). For a version older than Visual Studio 2019, install [Visual Studio Build Tools](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools) with the `Visual C++ build tools` option.
|
|
62
|
-
|
|
63
|
-
If the above steps didn't work for you, please visit [Microsoft's Node.js Guidelines for Windows](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules) for additional tips.
|
|
64
|
-
|
|
65
|
-
To target native ARM64 Node.js on Windows on ARM, add the components "Visual C++ compilers and libraries for ARM64" and "Visual C++ ATL for ARM64".
|
|
66
|
-
|
|
67
|
-
To use the native ARM64 C++ compiler on Windows on ARM, ensure that you have Visual Studio 2022 [17.4 or later](https://devblogs.microsoft.com/visualstudio/arm64-visual-studio-is-officially-here/) installed.
|
|
68
|
-
|
|
69
|
-
It's advised to install following Powershell module: [VSSetup](https://github.com/microsoft/vssetup.powershell) using `Install-Module VSSetup -Scope CurrentUser`.
|
|
70
|
-
This will make Visual Studio detection logic to use more flexible and accessible method, avoiding Powershell's `ConstrainedLanguage` mode.
|
|
71
|
-
|
|
72
|
-
### Configuring Python Dependency
|
|
73
|
-
|
|
74
|
-
`node-gyp` requires that you have installed a [supported version of Python](https://devguide.python.org/versions/).
|
|
75
|
-
If you have multiple versions of Python installed, you can identify which version
|
|
76
|
-
`node-gyp` should use in one of the following ways:
|
|
77
|
-
|
|
78
|
-
1. by setting the `--python` command-line option, e.g.:
|
|
79
|
-
|
|
80
|
-
``` bash
|
|
81
|
-
node-gyp <command> --python /path/to/executable/python
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
2. If `node-gyp` is called by way of `npm`, *and* you have multiple versions of
|
|
85
|
-
Python installed, then you can set the `npm_config_python` environment variable
|
|
86
|
-
to the appropriate path:
|
|
87
|
-
``` bash
|
|
88
|
-
export npm_config_python=/path/to/executable/python
|
|
89
|
-
```
|
|
90
|
-
Or on Windows:
|
|
91
|
-
```console
|
|
92
|
-
py --list-paths # To see the installed Python versions
|
|
93
|
-
set npm_config_python=C:\path\to\python.exe # CMD
|
|
94
|
-
$Env:npm_config_python="C:\path\to\python.exe" # PowerShell
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
3. If the `PYTHON` environment variable is set to the path of a Python executable,
|
|
98
|
-
then that version will be used if it is a supported version.
|
|
99
|
-
|
|
100
|
-
4. If the `NODE_GYP_FORCE_PYTHON` environment variable is set to the path of a
|
|
101
|
-
Python executable, it will be used instead of any of the other configured or
|
|
102
|
-
built-in Python search paths. If it's not a compatible version, no further
|
|
103
|
-
searching will be done.
|
|
104
|
-
|
|
105
|
-
### Build for Third Party Node.js Runtimes
|
|
106
|
-
|
|
107
|
-
When building modules for third-party Node.js runtimes like Electron, which have
|
|
108
|
-
different build configurations from the official Node.js distribution, you
|
|
109
|
-
should use `--dist-url` or `--nodedir` flags to specify the headers of the
|
|
110
|
-
runtime to build for.
|
|
111
|
-
|
|
112
|
-
Also when `--dist-url` or `--nodedir` flags are passed, node-gyp will use the
|
|
113
|
-
`config.gypi` shipped in the headers distribution to generate build
|
|
114
|
-
configurations, which is different from the default mode that would use the
|
|
115
|
-
`process.config` object of the running Node.js instance.
|
|
116
|
-
|
|
117
|
-
Some old versions of Electron shipped malformed `config.gypi` in their headers
|
|
118
|
-
distributions, and you might need to pass `--force-process-config` to node-gyp
|
|
119
|
-
to work around configuration errors.
|
|
120
|
-
|
|
121
|
-
## How to Use
|
|
122
|
-
|
|
123
|
-
To compile your native addon first go to its root directory:
|
|
124
|
-
|
|
125
|
-
``` bash
|
|
126
|
-
cd my_node_addon
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
The next step is to generate the appropriate project build files for the current
|
|
130
|
-
platform. Use `configure` for that:
|
|
131
|
-
|
|
132
|
-
``` bash
|
|
133
|
-
node-gyp configure
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Auto-detection fails for Visual C++ Build Tools 2015, so `--msvs_version=2015`
|
|
137
|
-
needs to be added (not needed when run by npm as configured above):
|
|
138
|
-
``` bash
|
|
139
|
-
node-gyp configure --msvs_version=2015
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
__Note__: The `configure` step looks for a `binding.gyp` file in the current
|
|
143
|
-
directory to process. See below for instructions on creating a `binding.gyp` file.
|
|
144
|
-
|
|
145
|
-
Now you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file
|
|
146
|
-
(on Windows) in the `build/` directory. Next, invoke the `build` command:
|
|
147
|
-
|
|
148
|
-
``` bash
|
|
149
|
-
node-gyp build
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
Now you have your compiled `.node` bindings file! The compiled bindings end up
|
|
153
|
-
in `build/Debug/` or `build/Release/`, depending on the build mode. At this point,
|
|
154
|
-
you can require the `.node` file with Node.js and run your tests!
|
|
155
|
-
|
|
156
|
-
__Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or
|
|
157
|
-
`-d`) switch when running either the `configure`, `build` or `rebuild` commands.
|
|
158
|
-
|
|
159
|
-
## The `binding.gyp` file
|
|
160
|
-
|
|
161
|
-
A `binding.gyp` file describes the configuration to build your module, in a
|
|
162
|
-
JSON-like format. This file gets placed in the root of your package, alongside
|
|
163
|
-
`package.json`.
|
|
164
|
-
|
|
165
|
-
A barebones `gyp` file appropriate for building a Node.js addon could look like:
|
|
166
|
-
|
|
167
|
-
```python
|
|
168
|
-
{
|
|
169
|
-
"targets": [
|
|
170
|
-
{
|
|
171
|
-
"target_name": "binding",
|
|
172
|
-
"sources": [ "src/binding.cc" ]
|
|
173
|
-
}
|
|
174
|
-
]
|
|
175
|
-
}
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
## Further reading
|
|
179
|
-
|
|
180
|
-
The **[docs](./docs/)** directory contains additional documentation on specific node-gyp topics that may be useful if you are experiencing problems installing or building addons using node-gyp.
|
|
181
|
-
|
|
182
|
-
Some additional resources for Node.js native addons and writing `gyp` configuration files:
|
|
183
|
-
|
|
184
|
-
* ["Going Native" a nodeschool.io tutorial](http://nodeschool.io/#goingnative)
|
|
185
|
-
* ["Hello World" node addon example](https://github.com/nodejs/node/tree/main/test/addons/hello-world)
|
|
186
|
-
* [gyp user documentation](https://gyp.gsrc.io/docs/UserDocumentation.md)
|
|
187
|
-
* [gyp input format reference](https://gyp.gsrc.io/docs/InputFormatReference.md)
|
|
188
|
-
* [*"binding.gyp" files out in the wild* wiki page](./docs/binding.gyp-files-in-the-wild.md)
|
|
189
|
-
|
|
190
|
-
## Commands
|
|
191
|
-
|
|
192
|
-
`node-gyp` responds to the following commands:
|
|
193
|
-
|
|
194
|
-
| **Command** | **Description**
|
|
195
|
-
|:--------------|:---------------------------------------------------------------
|
|
196
|
-
| `help` | Shows the help dialog
|
|
197
|
-
| `build` | Invokes `make`/`msbuild.exe` and builds the native addon
|
|
198
|
-
| `clean` | Removes the `build` directory if it exists
|
|
199
|
-
| `configure` | Generates project build files for the current platform
|
|
200
|
-
| `rebuild` | Runs `clean`, `configure` and `build` all in a row
|
|
201
|
-
| `install` | Installs Node.js header files for the given version
|
|
202
|
-
| `list` | Lists the currently installed Node.js header versions
|
|
203
|
-
| `remove` | Removes the Node.js header files for the given version
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
## Command Options
|
|
207
|
-
|
|
208
|
-
`node-gyp` accepts the following command options:
|
|
209
|
-
|
|
210
|
-
| **Command** | **Description**
|
|
211
|
-
|:----------------------------------|:------------------------------------------
|
|
212
|
-
| `-j n`, `--jobs n` | Run `make` in parallel. The value `max` will use all available CPU cores
|
|
213
|
-
| `--target=v6.2.1` | Node.js version to build for (default is `process.version`)
|
|
214
|
-
| `--silly`, `--loglevel=silly` | Log all progress to console
|
|
215
|
-
| `--verbose`, `--loglevel=verbose` | Log most progress to console
|
|
216
|
-
| `--silent`, `--loglevel=silent` | Don't log anything to console
|
|
217
|
-
| `debug`, `--debug` | Make Debug build (default is `Release`)
|
|
218
|
-
| `--release`, `--no-debug` | Make Release build
|
|
219
|
-
| `-C $dir`, `--directory=$dir` | Run command in different directory
|
|
220
|
-
| `--make=$make` | Override `make` command (e.g. `gmake`)
|
|
221
|
-
| `--thin=yes` | Enable thin static libraries
|
|
222
|
-
| `--arch=$arch` | Set target architecture (e.g. ia32)
|
|
223
|
-
| `--tarball=$path` | Get headers from a local tarball
|
|
224
|
-
| `--devdir=$path` | SDK download directory (default is OS cache directory)
|
|
225
|
-
| `--ensure` | Don't reinstall headers if already present
|
|
226
|
-
| `--dist-url=$url` | Download header tarball from custom URL
|
|
227
|
-
| `--proxy=$url` | Set HTTP(S) proxy for downloading header tarball
|
|
228
|
-
| `--noproxy=$urls` | Set urls to ignore proxies when downloading header tarball
|
|
229
|
-
| `--cafile=$cafile` | Override default CA chain (to download tarball)
|
|
230
|
-
| `--nodedir=$path` | Set the path to the node source code
|
|
231
|
-
| `--python=$path` | Set path to the Python binary
|
|
232
|
-
| `--msvs_version=$version` | Set Visual Studio version (Windows only)
|
|
233
|
-
| `--solution=$solution` | Set Visual Studio Solution version (Windows only)
|
|
234
|
-
| `--force-process-config` | Force using runtime's `process.config` object to generate `config.gypi` file
|
|
235
|
-
|
|
236
|
-
## Configuration
|
|
237
|
-
|
|
238
|
-
### Environment variables
|
|
239
|
-
|
|
240
|
-
Use the form `npm_config_OPTION_NAME` for any of the command options listed
|
|
241
|
-
above (dashes in option names should be replaced by underscores).
|
|
242
|
-
|
|
243
|
-
For example, to set `devdir` equal to `/tmp/.gyp`, you would:
|
|
244
|
-
|
|
245
|
-
Run this on Unix:
|
|
246
|
-
|
|
247
|
-
```bash
|
|
248
|
-
export npm_config_devdir=/tmp/.gyp
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
Or this on Windows:
|
|
252
|
-
|
|
253
|
-
```console
|
|
254
|
-
set npm_config_devdir=c:\temp\.gyp
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
### `npm` configuration for npm versions before v9
|
|
258
|
-
|
|
259
|
-
Use the form `OPTION_NAME` for any of the command options listed above.
|
|
260
|
-
|
|
261
|
-
For example, to set `devdir` equal to `/tmp/.gyp`, you would run:
|
|
262
|
-
|
|
263
|
-
```bash
|
|
264
|
-
npm config set [--global] devdir /tmp/.gyp
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
**Note:** Configuration set via `npm` will only be used when `node-gyp`
|
|
268
|
-
is run via `npm`, not when `node-gyp` is run directly.
|
|
269
|
-
|
|
270
|
-
## License
|
|
271
|
-
|
|
272
|
-
`node-gyp` is available under the MIT license. See the [LICENSE
|
|
273
|
-
file](LICENSE) for details.
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
'variables' : {
|
|
3
|
-
'node_engine_include_dir%': 'deps/v8/include',
|
|
4
|
-
'node_host_binary%': 'node',
|
|
5
|
-
'node_with_ltcg%': 'true',
|
|
6
|
-
},
|
|
7
|
-
'target_defaults': {
|
|
8
|
-
'type': 'loadable_module',
|
|
9
|
-
'win_delay_load_hook': 'true',
|
|
10
|
-
'product_prefix': '',
|
|
11
|
-
|
|
12
|
-
'conditions': [
|
|
13
|
-
[ 'node_engine=="chakracore"', {
|
|
14
|
-
'variables': {
|
|
15
|
-
'node_engine_include_dir%': 'deps/chakrashim/include'
|
|
16
|
-
},
|
|
17
|
-
}]
|
|
18
|
-
],
|
|
19
|
-
|
|
20
|
-
'include_dirs': [
|
|
21
|
-
'<(node_root_dir)/include/node',
|
|
22
|
-
'<(node_root_dir)/src',
|
|
23
|
-
'<(node_root_dir)/deps/openssl/config',
|
|
24
|
-
'<(node_root_dir)/deps/openssl/openssl/include',
|
|
25
|
-
'<(node_root_dir)/deps/uv/include',
|
|
26
|
-
'<(node_root_dir)/deps/zlib',
|
|
27
|
-
'<(node_root_dir)/<(node_engine_include_dir)'
|
|
28
|
-
],
|
|
29
|
-
'defines!': [
|
|
30
|
-
'BUILDING_UV_SHARED=1', # Inherited from common.gypi.
|
|
31
|
-
'BUILDING_V8_SHARED=1', # Inherited from common.gypi.
|
|
32
|
-
],
|
|
33
|
-
'defines': [
|
|
34
|
-
'NODE_GYP_MODULE_NAME=>(_target_name)',
|
|
35
|
-
'USING_UV_SHARED=1',
|
|
36
|
-
'USING_V8_SHARED=1',
|
|
37
|
-
# Warn when using deprecated V8 APIs.
|
|
38
|
-
'V8_DEPRECATION_WARNINGS=1'
|
|
39
|
-
],
|
|
40
|
-
|
|
41
|
-
'target_conditions': [
|
|
42
|
-
['_type=="loadable_module"', {
|
|
43
|
-
'product_extension': 'node',
|
|
44
|
-
'defines': [
|
|
45
|
-
'BUILDING_NODE_EXTENSION'
|
|
46
|
-
],
|
|
47
|
-
'xcode_settings': {
|
|
48
|
-
'OTHER_LDFLAGS': [
|
|
49
|
-
'-undefined dynamic_lookup'
|
|
50
|
-
],
|
|
51
|
-
},
|
|
52
|
-
}],
|
|
53
|
-
|
|
54
|
-
['_type=="static_library"', {
|
|
55
|
-
# set to `1` to *disable* the -T thin archive 'ld' flag.
|
|
56
|
-
# older linkers don't support this flag.
|
|
57
|
-
'standalone_static_library': '<(standalone_static_library)'
|
|
58
|
-
}],
|
|
59
|
-
|
|
60
|
-
['_type!="executable"', {
|
|
61
|
-
'conditions': [
|
|
62
|
-
[ 'OS=="android"', {
|
|
63
|
-
'cflags!': [ '-fPIE' ],
|
|
64
|
-
}]
|
|
65
|
-
]
|
|
66
|
-
}],
|
|
67
|
-
|
|
68
|
-
['_win_delay_load_hook=="true"', {
|
|
69
|
-
# If the addon specifies `'win_delay_load_hook': 'true'` in its
|
|
70
|
-
# binding.gyp, link a delay-load hook into the DLL. This hook ensures
|
|
71
|
-
# that the addon will work regardless of whether the node/iojs binary
|
|
72
|
-
# is named node.exe, iojs.exe, or something else.
|
|
73
|
-
'conditions': [
|
|
74
|
-
[ 'OS=="win"', {
|
|
75
|
-
'defines': [ 'HOST_BINARY=\"<(node_host_binary)<(EXECUTABLE_SUFFIX)\"', ],
|
|
76
|
-
'sources': [
|
|
77
|
-
'<(node_gyp_dir)/src/win_delay_load_hook.cc',
|
|
78
|
-
],
|
|
79
|
-
'msvs_settings': {
|
|
80
|
-
'VCLinkerTool': {
|
|
81
|
-
'DelayLoadDLLs': [ '<(node_host_binary)<(EXECUTABLE_SUFFIX)' ],
|
|
82
|
-
# Don't print a linker warning when no imports from either .exe
|
|
83
|
-
# are used.
|
|
84
|
-
'AdditionalOptions': [ '/ignore:4199' ],
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
}],
|
|
88
|
-
],
|
|
89
|
-
}],
|
|
90
|
-
],
|
|
91
|
-
|
|
92
|
-
'conditions': [
|
|
93
|
-
[ 'OS=="mac"', {
|
|
94
|
-
'defines': [
|
|
95
|
-
'_DARWIN_USE_64_BIT_INODE=1'
|
|
96
|
-
],
|
|
97
|
-
'xcode_settings': {
|
|
98
|
-
'DYLIB_INSTALL_NAME_BASE': '@rpath'
|
|
99
|
-
},
|
|
100
|
-
}],
|
|
101
|
-
[ 'OS=="aix"', {
|
|
102
|
-
'ldflags': [
|
|
103
|
-
'-Wl,-bimport:<(node_exp_file)'
|
|
104
|
-
],
|
|
105
|
-
}],
|
|
106
|
-
[ 'OS=="os400"', {
|
|
107
|
-
'ldflags': [
|
|
108
|
-
'-Wl,-bimport:<(node_exp_file)'
|
|
109
|
-
],
|
|
110
|
-
}],
|
|
111
|
-
[ 'OS=="zos"', {
|
|
112
|
-
'conditions': [
|
|
113
|
-
[ '"<!(echo $CC)" != "clang" and \
|
|
114
|
-
"<!(echo $CC)" != "ibm-clang64" and \
|
|
115
|
-
"<!(echo $CC)" != "ibm-clang"', {
|
|
116
|
-
'cflags': [
|
|
117
|
-
'-q64',
|
|
118
|
-
'-Wc,DLL',
|
|
119
|
-
'-qlonglong',
|
|
120
|
-
'-qenum=int',
|
|
121
|
-
'-qxclang=-fexec-charset=ISO8859-1'
|
|
122
|
-
],
|
|
123
|
-
'ldflags': [
|
|
124
|
-
'-q64',
|
|
125
|
-
'<(node_exp_file)',
|
|
126
|
-
],
|
|
127
|
-
}, {
|
|
128
|
-
'cflags': [
|
|
129
|
-
'-m64',
|
|
130
|
-
],
|
|
131
|
-
'ldflags': [
|
|
132
|
-
'-m64',
|
|
133
|
-
'<(node_exp_file)',
|
|
134
|
-
],
|
|
135
|
-
}],
|
|
136
|
-
],
|
|
137
|
-
'defines': [
|
|
138
|
-
'_ALL_SOURCE',
|
|
139
|
-
'MAP_FAILED=-1',
|
|
140
|
-
'_UNIX03_SOURCE',
|
|
141
|
-
],
|
|
142
|
-
}],
|
|
143
|
-
[ 'OS=="win"', {
|
|
144
|
-
'conditions': [
|
|
145
|
-
['node_engine=="chakracore"', {
|
|
146
|
-
'library_dirs': [ '<(node_root_dir)/$(ConfigurationName)' ],
|
|
147
|
-
'libraries': [ '<@(node_engine_libs)' ],
|
|
148
|
-
}],
|
|
149
|
-
['node_with_ltcg=="true"', {
|
|
150
|
-
'msvs_settings': {
|
|
151
|
-
'VCCLCompilerTool': {
|
|
152
|
-
'WholeProgramOptimization': 'true' # /GL, whole program optimization, needed for LTCG
|
|
153
|
-
},
|
|
154
|
-
'VCLibrarianTool': {
|
|
155
|
-
'AdditionalOptions': [
|
|
156
|
-
'/LTCG:INCREMENTAL', # incremental link-time code generation
|
|
157
|
-
]
|
|
158
|
-
},
|
|
159
|
-
'VCLinkerTool': {
|
|
160
|
-
'OptimizeReferences': 2, # /OPT:REF
|
|
161
|
-
'EnableCOMDATFolding': 2, # /OPT:ICF
|
|
162
|
-
'LinkIncremental': 1, # disable incremental linking
|
|
163
|
-
'AdditionalOptions': [
|
|
164
|
-
'/LTCG:INCREMENTAL', # incremental link-time code generation
|
|
165
|
-
]
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}]
|
|
169
|
-
],
|
|
170
|
-
'libraries': [
|
|
171
|
-
'-lkernel32.lib',
|
|
172
|
-
'-luser32.lib',
|
|
173
|
-
'-lgdi32.lib',
|
|
174
|
-
'-lwinspool.lib',
|
|
175
|
-
'-lcomdlg32.lib',
|
|
176
|
-
'-ladvapi32.lib',
|
|
177
|
-
'-lshell32.lib',
|
|
178
|
-
'-lole32.lib',
|
|
179
|
-
'-loleaut32.lib',
|
|
180
|
-
'-luuid.lib',
|
|
181
|
-
'-lodbc32.lib',
|
|
182
|
-
'-lDelayImp.lib',
|
|
183
|
-
'-l"<(node_lib_file)"'
|
|
184
|
-
],
|
|
185
|
-
'msvs_disabled_warnings': [
|
|
186
|
-
# warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent<T>'
|
|
187
|
-
# needs to have dll-interface to be used by
|
|
188
|
-
# clients of class 'node::ObjectWrap'
|
|
189
|
-
4251
|
|
190
|
-
],
|
|
191
|
-
}, {
|
|
192
|
-
# OS!="win"
|
|
193
|
-
'defines': [
|
|
194
|
-
'_LARGEFILE_SOURCE',
|
|
195
|
-
'_FILE_OFFSET_BITS=64'
|
|
196
|
-
],
|
|
197
|
-
}],
|
|
198
|
-
[ 'OS in "freebsd openbsd netbsd solaris android" or \
|
|
199
|
-
(OS=="linux" and target_arch!="ia32")', {
|
|
200
|
-
'cflags': [ '-fPIC' ],
|
|
201
|
-
}],
|
|
202
|
-
]
|
|
203
|
-
}
|
|
204
|
-
}
|
package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/bin/node-gyp.js
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
'use strict'
|
|
4
|
-
|
|
5
|
-
process.title = 'node-gyp'
|
|
6
|
-
|
|
7
|
-
const envPaths = require('env-paths')
|
|
8
|
-
const gyp = require('../')
|
|
9
|
-
const log = require('../lib/log')
|
|
10
|
-
const os = require('os')
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Process and execute the selected commands.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
const prog = gyp()
|
|
17
|
-
let completed = false
|
|
18
|
-
prog.parseArgv(process.argv)
|
|
19
|
-
prog.devDir = prog.opts.devdir
|
|
20
|
-
|
|
21
|
-
const homeDir = os.homedir()
|
|
22
|
-
if (prog.devDir) {
|
|
23
|
-
prog.devDir = prog.devDir.replace(/^~/, homeDir)
|
|
24
|
-
} else if (homeDir) {
|
|
25
|
-
prog.devDir = envPaths('node-gyp', { suffix: '' }).cache
|
|
26
|
-
} else {
|
|
27
|
-
throw new Error(
|
|
28
|
-
"node-gyp requires that the user's home directory is specified " +
|
|
29
|
-
'in either of the environmental variables HOME or USERPROFILE. ' +
|
|
30
|
-
'Overide with: --devdir /path/to/.node-gyp')
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (prog.todo.length === 0) {
|
|
34
|
-
if (~process.argv.indexOf('-v') || ~process.argv.indexOf('--version')) {
|
|
35
|
-
log.stdout('v%s', prog.version)
|
|
36
|
-
} else {
|
|
37
|
-
log.stdout('%s', prog.usage())
|
|
38
|
-
}
|
|
39
|
-
process.exit(0)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
log.info('it worked if it ends with', 'ok')
|
|
43
|
-
log.verbose('cli', process.argv)
|
|
44
|
-
log.info('using', 'node-gyp@%s', prog.version)
|
|
45
|
-
log.info('using', 'node@%s | %s | %s', process.versions.node, process.platform, process.arch)
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Change dir if -C/--directory was passed.
|
|
49
|
-
*/
|
|
50
|
-
|
|
51
|
-
const dir = prog.opts.directory
|
|
52
|
-
if (dir) {
|
|
53
|
-
const fs = require('fs')
|
|
54
|
-
try {
|
|
55
|
-
const stat = fs.statSync(dir)
|
|
56
|
-
if (stat.isDirectory()) {
|
|
57
|
-
log.info('chdir', dir)
|
|
58
|
-
process.chdir(dir)
|
|
59
|
-
} else {
|
|
60
|
-
log.warn('chdir', dir + ' is not a directory')
|
|
61
|
-
}
|
|
62
|
-
} catch (e) {
|
|
63
|
-
if (e.code === 'ENOENT') {
|
|
64
|
-
log.warn('chdir', dir + ' is not a directory')
|
|
65
|
-
} else {
|
|
66
|
-
log.warn('chdir', 'error during chdir() "%s"', e.message)
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
async function run () {
|
|
72
|
-
const command = prog.todo.shift()
|
|
73
|
-
if (!command) {
|
|
74
|
-
// done!
|
|
75
|
-
completed = true
|
|
76
|
-
log.info('ok')
|
|
77
|
-
return
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
try {
|
|
81
|
-
const args = await prog.commands[command.name](command.args) ?? []
|
|
82
|
-
|
|
83
|
-
if (command.name === 'list') {
|
|
84
|
-
if (args.length) {
|
|
85
|
-
args.forEach((version) => log.stdout(version))
|
|
86
|
-
} else {
|
|
87
|
-
log.stdout('No node development files installed. Use `node-gyp install` to install a version.')
|
|
88
|
-
}
|
|
89
|
-
} else if (args.length >= 1) {
|
|
90
|
-
log.stdout(...args.slice(1))
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// now run the next command in the queue
|
|
94
|
-
return run()
|
|
95
|
-
} catch (err) {
|
|
96
|
-
log.error(command.name + ' error')
|
|
97
|
-
log.error('stack', err.stack)
|
|
98
|
-
errorMessage()
|
|
99
|
-
log.error('not ok')
|
|
100
|
-
return process.exit(1)
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
process.on('exit', function (code) {
|
|
105
|
-
if (!completed && !code) {
|
|
106
|
-
log.error('Completion callback never invoked!')
|
|
107
|
-
issueMessage()
|
|
108
|
-
process.exit(6)
|
|
109
|
-
}
|
|
110
|
-
})
|
|
111
|
-
|
|
112
|
-
process.on('uncaughtException', function (err) {
|
|
113
|
-
log.error('UNCAUGHT EXCEPTION')
|
|
114
|
-
log.error('stack', err.stack)
|
|
115
|
-
issueMessage()
|
|
116
|
-
process.exit(7)
|
|
117
|
-
})
|
|
118
|
-
|
|
119
|
-
function errorMessage () {
|
|
120
|
-
// copied from npm's lib/utils/error-handler.js
|
|
121
|
-
const os = require('os')
|
|
122
|
-
log.error('System', os.type() + ' ' + os.release())
|
|
123
|
-
log.error('command', process.argv
|
|
124
|
-
.map(JSON.stringify).join(' '))
|
|
125
|
-
log.error('cwd', process.cwd())
|
|
126
|
-
log.error('node -v', process.version)
|
|
127
|
-
log.error('node-gyp -v', 'v' + prog.package.version)
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function issueMessage () {
|
|
131
|
-
errorMessage()
|
|
132
|
-
log.error('', ['Node-gyp failed to build your package.',
|
|
133
|
-
'Try to update npm and/or node-gyp and if it does not help file an issue with the package author.'
|
|
134
|
-
].join('\n'))
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// start running the given commands!
|
|
138
|
-
run()
|