@e-mc/request 0.14.1 → 0.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/index.js +4 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## Interface
|
|
11
11
|
|
|
12
|
-
* [View Source](https://www.unpkg.com/@e-mc/types@0.14.
|
|
12
|
+
* [View Source](https://www.unpkg.com/@e-mc/types@0.14.2/lib/index.d.ts)
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
import type { IModule, ModuleConstructor } from "./index";
|
|
@@ -253,9 +253,9 @@ instance.get("http://hostname/path/config.yml", options).then(data => {
|
|
|
253
253
|
|
|
254
254
|
## References
|
|
255
255
|
|
|
256
|
-
- https://www.unpkg.com/@e-mc/types@0.14.
|
|
257
|
-
- https://www.unpkg.com/@e-mc/types@0.14.
|
|
258
|
-
- https://www.unpkg.com/@e-mc/types@0.14.
|
|
256
|
+
- https://www.unpkg.com/@e-mc/types@0.14.2/lib/http.d.ts
|
|
257
|
+
- https://www.unpkg.com/@e-mc/types@0.14.2/lib/request.d.ts
|
|
258
|
+
- https://www.unpkg.com/@e-mc/types@0.14.2/lib/settings.d.ts
|
|
259
259
|
|
|
260
260
|
* https://www.npmjs.com/package/@types/node
|
|
261
261
|
|
package/index.js
CHANGED
|
@@ -1783,9 +1783,12 @@ class Request extends Module {
|
|
|
1783
1783
|
}
|
|
1784
1784
|
if (headers) {
|
|
1785
1785
|
const cacheControl = headers['cache-control']?.toLowerCase();
|
|
1786
|
-
if (headers.authorization && !cacheControl?.includes('max-age')
|
|
1786
|
+
if (headers.authorization && !cacheControl?.includes('max-age')) {
|
|
1787
1787
|
options.noCache ??= true;
|
|
1788
1788
|
}
|
|
1789
|
+
else if (cacheControl?.includes('no-cache')) {
|
|
1790
|
+
options.noCache ??= 0;
|
|
1791
|
+
}
|
|
1789
1792
|
if (cacheControl?.includes('no-store')) {
|
|
1790
1793
|
options.noStore ??= true;
|
|
1791
1794
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/request",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "Request constructor for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"license": "BSD-3-Clause",
|
|
17
17
|
"homepage": "https://github.com/anpham6/e-mc#readme",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@e-mc/module": "0.14.
|
|
20
|
-
"@e-mc/types": "0.14.
|
|
19
|
+
"@e-mc/module": "0.14.2",
|
|
20
|
+
"@e-mc/types": "0.14.2",
|
|
21
21
|
"combined-stream": "^1.0.8",
|
|
22
22
|
"js-yaml": "^4.1.1",
|
|
23
23
|
"picomatch": "^4.0.4",
|