@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,56 @@
1
+ <!---
2
+ BEFORE YOU SUBMIT please read the following:
3
+
4
+ Please search open/closed issues before submitting since someone might have asked the same thing before!
5
+
6
+ If you have a support request or question please submit them to one of this resources:
7
+
8
+ * Stack Overflow: http://stackoverflow.com/questions/tagged/request+node.js using the tags `node.js` & `request`
9
+ * Gitter community: https://gitter.im/request/request?utm_source=newissue
10
+ * Also have a look at the Readme for more information on how to get support:
11
+ https://github.com/request/request/blob/master/README.md
12
+
13
+ Issues on GitHub are only related to problems of request itself and we cannot answer
14
+ support questions here.
15
+ -->
16
+
17
+ ### Summary
18
+ <!--- Provide a general summary of the issue in the title above -->
19
+
20
+ ### Simplest Example to Reproduce
21
+ <!--- If describing a bug, tell us what request options we can use to reproduce the same bug/behavior -->
22
+
23
+ ```js
24
+ request({
25
+ method: 'GET',
26
+ url: 'http://example.com', // a public URL that we can hit to reproduce, if possible
27
+ more: { 'options': 'here' }
28
+ },
29
+ ```
30
+
31
+ ### Expected Behavior
32
+ <!--- If you're describing a bug, tell us what should happen -->
33
+ <!--- If you're suggesting a change/improvement, tell us how it should work -->
34
+ <!--- If request is handling requests/responses incorrectly, please include a link to the spec or documentation that supports that your expected behavior is correct. -->
35
+
36
+ ### Current Behavior
37
+ <!--- If describing a bug, tell us what happens instead of the expected behavior -->
38
+ <!--- If suggesting a change/improvement, explain the difference from current behavior -->
39
+
40
+ ### Possible Solution
41
+ <!--- Not obligatory, but suggest a fix/reason for the bug, -->
42
+ <!--- or ideas how to implement the addition or change -->
43
+
44
+ ### Context
45
+ <!--- How has this issue affected you? What are you trying to accomplish? -->
46
+ <!--- Providing context helps us come up with a solution that is most useful in the real world -->
47
+
48
+ ### Your Environment
49
+ <!--- Include as many relevant details about the environment you experienced the bug in -->
50
+
51
+ | software | version
52
+ | ---------------- | -------
53
+ | request |
54
+ | node |
55
+ | npm |
56
+ | Operating System |
@@ -0,0 +1,13 @@
1
+ ## PR Checklist:
2
+ - [ ] I have run `npm test` locally and all tests are passing.
3
+ - [ ] I have added/updated tests for any new behavior.
4
+ <!-- Request is a complex project, there are VERY FEW exceptions
5
+ where a new test is not required for new behavior. -->
6
+ - [ ] If this is a significant change, an issue has already been created where the problem / solution was discussed: [N/A, or add link to issue here]
7
+ <!-- If you'd like to suggest a significant change to request,
8
+ please create an issue to discuss those changes and gather
9
+ feedback BEFORE submitting your PR. -->
10
+
11
+
12
+ ## PR Description
13
+ <!-- Describe Your PR Here! -->
@@ -0,0 +1,19 @@
1
+ # Number of days of inactivity before an issue becomes stale
2
+ daysUntilStale: 365
3
+ # Number of days of inactivity before a stale issue is closed
4
+ daysUntilClose: 7
5
+ # Issues with these labels will never be considered stale
6
+ exemptLabels:
7
+ - "Up for consideration"
8
+ - greenkeeper
9
+ - neverstale
10
+ - bug
11
+ # Label to use when marking an issue as stale
12
+ staleLabel: stale
13
+ # Comment to post when marking an issue as stale. Set to `false` to disable
14
+ markComment: >
15
+ This issue has been automatically marked as stale because it has not had
16
+ recent activity. It will be closed if no further activity occurs. Thank you
17
+ for your contributions.
18
+ # Comment to post when closing a stale issue. Set to `false` to disable
19
+ closeComment: false
package/.swcrc ADDED
@@ -0,0 +1,57 @@
1
+ [{
2
+ "$schema": "https://json.schemastore.org/swcrc",
3
+ "test": "\\.(js|jsx|mjs|cjs)$",
4
+ "exclude": [".*\\.map$"],
5
+ "jsc": {
6
+ "parser": {
7
+ "syntax": "ecmascript", // "typescript"
8
+ "jsx": false,
9
+ "dynamicImport": false,
10
+ "privateMethod": true,
11
+ "functionBind": false,
12
+ "exportDefaultFrom": false,
13
+ "exportNamespaceFrom": false,
14
+ "decorators": true,
15
+ "decoratorsBeforeExport": false,
16
+ "topLevelAwait": false,
17
+ "importMeta": false
18
+ },
19
+ "transform": {
20
+ "decoratorVersion": "2022-03" // "2021-12" (default)
21
+ },
22
+ "target": "es2022", // es5,es6,es2020,es2021,es2022
23
+ "loose": true,
24
+ "externalHelpers": false,
25
+ "keepClassNames": true // 保留原始类名
26
+ },
27
+ "module": {
28
+ "type": "es6" // 输出模块类型 es6 commonjs
29
+ },
30
+ "minify": false, // 压缩代码
31
+ "sourceMaps": false
32
+ },
33
+ {
34
+ "$schema": "https://json.schemastore.org/swcrc",
35
+ "test": "\\.(ts|tsx)$",
36
+ "exclude": [".*\\.map$"],
37
+ "jsc": {
38
+ "parser": {
39
+ "syntax": "typescript",
40
+ "tsx": false,
41
+ "decorators": true,
42
+ "dynamicImport": false
43
+ },
44
+ "transform": {
45
+ "decoratorVersion": "2022-03"
46
+ },
47
+ "target": "es2022", // es5,es6,es2020,es2021,es2022
48
+ "loose": true,
49
+ "externalHelpers": false,
50
+ "keepClassNames": true // 保留原始类名
51
+ },
52
+ "module": {
53
+ "type": "es6" // 输出模块类型 es6 commonjs
54
+ },
55
+ "minify": false, // 压缩代码
56
+ "sourceMaps": false
57
+ }]
package/.travis.yml ADDED
@@ -0,0 +1,21 @@
1
+
2
+ language: node_js
3
+
4
+ node_js:
5
+ - node
6
+ - 10
7
+ - 8
8
+ - 6
9
+
10
+ after_script:
11
+ - npm run test-cov
12
+ - codecov
13
+ - cat ./coverage/lcov.info | coveralls
14
+
15
+ webhooks:
16
+ urls: https://webhooks.gitter.im/e/237280ed4796c19cc626
17
+ on_success: change # options: [always|never|change] default: always
18
+ on_failure: always # options: [always|never|change] default: always
19
+ on_start: false # default: false
20
+
21
+ sudo: false