@wiajs/request 3.0.0 → 3.0.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.
Files changed (117) hide show
  1. package/.github/ISSUE_TEMPLATE.md +56 -0
  2. package/.github/PULL_REQUEST_TEMPLATE.md +13 -0
  3. package/.github/stale.yml +19 -0
  4. package/.swcrc +57 -0
  5. package/.travis.yml +21 -0
  6. package/CHANGELOG.md +717 -0
  7. package/CONTRIBUTING.md +81 -0
  8. package/biome.json +44 -0
  9. package/codecov.yml +2 -0
  10. package/disabled.appveyor.yml +36 -0
  11. package/dist/request.cjs +1476 -0
  12. package/dist/request.mjs +1474 -0
  13. package/examples/README.md +135 -0
  14. package/gulpfile.js +71 -0
  15. package/package.json +1 -2
  16. package/release.sh +45 -0
  17. package/tests/browser/karma.conf.js +57 -0
  18. package/tests/browser/ssl/ca.crt +14 -0
  19. package/tests/browser/ssl/server.crt +14 -0
  20. package/tests/browser/ssl/server.key +15 -0
  21. package/tests/browser/start.js +37 -0
  22. package/tests/browser/test.js +34 -0
  23. package/tests/fixtures/har.json +158 -0
  24. package/tests/googledoodle.jpg +0 -0
  25. package/tests/server.js +142 -0
  26. package/tests/squid.conf +76 -0
  27. package/tests/ssl/ca/README.md +8 -0
  28. package/tests/ssl/ca/ca.cnf +20 -0
  29. package/tests/ssl/ca/ca.crl +0 -0
  30. package/tests/ssl/ca/ca.crt +17 -0
  31. package/tests/ssl/ca/ca.csr +13 -0
  32. package/tests/ssl/ca/ca.key +18 -0
  33. package/tests/ssl/ca/ca.srl +1 -0
  34. package/tests/ssl/ca/client-enc.key +30 -0
  35. package/tests/ssl/ca/client.cnf +20 -0
  36. package/tests/ssl/ca/client.crt +20 -0
  37. package/tests/ssl/ca/client.csr +18 -0
  38. package/tests/ssl/ca/client.key +27 -0
  39. package/tests/ssl/ca/gen-all-certs.sh +6 -0
  40. package/tests/ssl/ca/gen-client.sh +25 -0
  41. package/tests/ssl/ca/gen-localhost.sh +22 -0
  42. package/tests/ssl/ca/gen-server.sh +18 -0
  43. package/tests/ssl/ca/localhost.cnf +20 -0
  44. package/tests/ssl/ca/localhost.crt +20 -0
  45. package/tests/ssl/ca/localhost.csr +18 -0
  46. package/tests/ssl/ca/localhost.js +33 -0
  47. package/tests/ssl/ca/localhost.key +27 -0
  48. package/tests/ssl/ca/server.cnf +19 -0
  49. package/tests/ssl/ca/server.crt +25 -0
  50. package/tests/ssl/ca/server.csr +29 -0
  51. package/tests/ssl/ca/server.js +34 -0
  52. package/tests/ssl/ca/server.key +51 -0
  53. package/tests/ssl/npm-ca.crt +16 -0
  54. package/tests/ssl/test.crt +15 -0
  55. package/tests/ssl/test.key +15 -0
  56. package/tests/test-agent.js +102 -0
  57. package/tests/test-agentOptions.js +51 -0
  58. package/tests/test-api.js +33 -0
  59. package/tests/test-aws.js +123 -0
  60. package/tests/test-baseUrl.js +133 -0
  61. package/tests/test-basic-auth.js +221 -0
  62. package/tests/test-bearer-auth.js +187 -0
  63. package/tests/test-body.js +154 -0
  64. package/tests/test-cookies.js +130 -0
  65. package/tests/test-defaults.js +340 -0
  66. package/tests/test-digest-auth.js +232 -0
  67. package/tests/test-emptyBody.js +56 -0
  68. package/tests/test-errors.js +108 -0
  69. package/tests/test-event-forwarding.js +39 -0
  70. package/tests/test-follow-all-303.js +45 -0
  71. package/tests/test-follow-all.js +57 -0
  72. package/tests/test-form-data-error.js +85 -0
  73. package/tests/test-form-data.js +133 -0
  74. package/tests/test-form-urlencoded.js +73 -0
  75. package/tests/test-form.js +101 -0
  76. package/tests/test-gzip.js +296 -0
  77. package/tests/test-har.js +175 -0
  78. package/tests/test-hawk.js +187 -0
  79. package/tests/test-headers.js +305 -0
  80. package/tests/test-http-signature.js +110 -0
  81. package/tests/test-httpModule.js +112 -0
  82. package/tests/test-https.js +116 -0
  83. package/tests/test-isUrl.js +120 -0
  84. package/tests/test-json-request.js +117 -0
  85. package/tests/test-localAddress.js +49 -0
  86. package/tests/test-multipart-encoding.js +147 -0
  87. package/tests/test-multipart.js +129 -0
  88. package/tests/test-node-debug.js +95 -0
  89. package/tests/test-oauth.js +721 -0
  90. package/tests/test-onelineproxy.js +61 -0
  91. package/tests/test-option-reuse.js +54 -0
  92. package/tests/test-options-convenience-method.js +52 -0
  93. package/tests/test-params.js +101 -0
  94. package/tests/test-piped-redirect.js +55 -0
  95. package/tests/test-pipes.js +383 -0
  96. package/tests/test-pool.js +148 -0
  97. package/tests/test-promise.js +53 -0
  98. package/tests/test-proxy-connect.js +80 -0
  99. package/tests/test-proxy.js +304 -0
  100. package/tests/test-qs.js +135 -0
  101. package/tests/test-redirect-auth.js +131 -0
  102. package/tests/test-redirect-complex.js +93 -0
  103. package/tests/test-redirect.js +449 -0
  104. package/tests/test-rfc3986.js +106 -0
  105. package/tests/test-stream.js +36 -0
  106. package/tests/test-timeout.js +260 -0
  107. package/tests/test-timing.js +147 -0
  108. package/tests/test-toJSON.js +45 -0
  109. package/tests/test-tunnel.js +466 -0
  110. package/tests/test-unix.js +74 -0
  111. package/tests/unicycle.jpg +0 -0
  112. package/request.js +0 -1553
  113. package/src/ZlibTransform.js +0 -27
  114. package/src/caseless.js +0 -118
  115. package/src/index.js +0 -122
  116. package/src/request.js +0 -967
  117. package/src/utils.js +0 -274
@@ -0,0 +1,81 @@
1
+
2
+ # Contributing to Request
3
+
4
+ :+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
5
+
6
+ The following is a set of guidelines for contributing to Request and its packages, which are hosted in the [Request Organization](https://github.com/request) on GitHub.
7
+ These are just guidelines, not rules, use your best judgment and feel free to propose changes to this document in a pull request.
8
+
9
+
10
+ ## Submitting an Issue
11
+
12
+ 1. Provide a small self **sufficient** code example to **reproduce** the issue.
13
+ 2. Run your test code using [request-debug](https://github.com/request/request-debug) and copy/paste the results inside the issue.
14
+ 3. You should **always** use fenced code blocks when submitting code examples or any other formatted output:
15
+ <pre>
16
+ ```js
17
+ put your javascript code here
18
+ ```
19
+
20
+ ```
21
+ put any other formatted output here,
22
+ like for example the one returned from using request-debug
23
+ ```
24
+ </pre>
25
+
26
+ If the problem cannot be reliably reproduced, the issue will be marked as `Not enough info (see CONTRIBUTING.md)`.
27
+
28
+ If the problem is not related to request the issue will be marked as `Help (please use Stackoverflow)`.
29
+
30
+
31
+ ## Submitting a Pull Request
32
+
33
+ 1. In almost all of the cases your PR **needs tests**. Make sure you have any.
34
+ 2. Run `npm test` locally. Fix any errors before pushing to GitHub.
35
+ 3. After submitting the PR a build will be triggered on TravisCI. Wait for it to ends and make sure all jobs are passing.
36
+
37
+
38
+ -----------------------------------------
39
+
40
+
41
+ ## Becoming a Contributor
42
+
43
+ Individuals making significant and valuable contributions are given
44
+ commit-access to the project to contribute as they see fit. This project is
45
+ more like an open wiki than a standard guarded open source project.
46
+
47
+
48
+ ## Rules
49
+
50
+ There are a few basic ground-rules for contributors:
51
+
52
+ 1. **No `--force` pushes** or modifying the Git history in any way.
53
+ 1. **Non-master branches** ought to be used for ongoing work.
54
+ 1. **Any** change should be added through Pull Request.
55
+ 1. **External API changes and significant modifications** ought to be subject
56
+ to an **internal pull-request** to solicit feedback from other contributors.
57
+ 1. Internal pull-requests to solicit feedback are *encouraged* for any other
58
+ non-trivial contribution but left to the discretion of the contributor.
59
+ 1. For significant changes wait a full 24 hours before merging so that active
60
+ contributors who are distributed throughout the world have a chance to weigh
61
+ in.
62
+ 1. Contributors should attempt to adhere to the prevailing code-style.
63
+ 1. Run `npm test` locally before submitting your PR, to catch any easy to miss
64
+ style & testing issues. To diagnose test failures, there are two ways to
65
+ run a single test file:
66
+ - `node_modules/.bin/taper tests/test-file.js` - run using the default
67
+ [`taper`](https://github.com/nylen/taper) test reporter.
68
+ - `node tests/test-file.js` - view the raw
69
+ [tap](https://testanything.org/) output.
70
+
71
+
72
+ ## Releases
73
+
74
+ Declaring formal releases remains the prerogative of the project maintainer.
75
+
76
+
77
+ ## Changes to this arrangement
78
+
79
+ This is an experiment and feedback is welcome! This document may also be
80
+ subject to pull-requests or changes by contributors where you believe you have
81
+ something valuable to add or change.
package/biome.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
3
+ "organizeImports": {
4
+ "enabled": true
5
+ },
6
+ "vcs": {
7
+ "enabled": true,
8
+ "clientKind": "git",
9
+ "useIgnoreFile": true
10
+ },
11
+ "formatter": {
12
+ "enabled": true,
13
+ "indentStyle": "space",
14
+ "lineEnding": "lf",
15
+ "lineWidth": 120
16
+ },
17
+ "javascript": {
18
+ "formatter": {
19
+ "quoteStyle": "single",
20
+ "quoteProperties": "asNeeded",
21
+ "trailingCommas": "es5",
22
+ "semicolons": "asNeeded",
23
+ "arrowParentheses": "asNeeded",
24
+ "bracketSpacing": false,
25
+ "bracketSameLine": true
26
+ }
27
+ },
28
+ "linter": {
29
+ "enabled": true,
30
+ "rules": {
31
+ "recommended": true,
32
+ "style": {
33
+ "noParameterAssign": "warn"
34
+ },
35
+ "complexity": {
36
+ "noForEach": "warn",
37
+ "noStaticOnlyClass": "warn",
38
+ "noUselessSwitchCase": "error",
39
+ "useFlatMap": "error",
40
+ "noUselessThisAlias": "off"
41
+ }
42
+ }
43
+ }
44
+ }
package/codecov.yml ADDED
@@ -0,0 +1,2 @@
1
+
2
+ comment: false
@@ -0,0 +1,36 @@
1
+ # http://www.appveyor.com/docs/appveyor-yml
2
+
3
+ # Fix line endings in Windows. (runs before repo cloning)
4
+ init:
5
+ - git config --global core.autocrlf input
6
+
7
+ # Test against these versions of Node.js.
8
+ environment:
9
+ matrix:
10
+ - nodejs_version: "0.10"
11
+ - nodejs_version: "0.8"
12
+ - nodejs_version: "0.11"
13
+
14
+ # Allow failing jobs for bleeding-edge Node.js versions.
15
+ matrix:
16
+ allow_failures:
17
+ - nodejs_version: "0.11"
18
+
19
+ # Install scripts. (runs after repo cloning)
20
+ install:
21
+ # Get the latest stable version of Node 0.STABLE.latest
22
+ - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
23
+ # Typical npm stuff.
24
+ - npm install
25
+
26
+ # Post-install test scripts.
27
+ test_script:
28
+ # Output useful info for debugging.
29
+ - ps: "npm test # PowerShell" # Pass comment to PS for easier debugging
30
+ - cmd: npm test
31
+
32
+ # Don't actually build.
33
+ build: off
34
+
35
+ # Set build version format here instead of in the admin panel.
36
+ version: "{build}"