@comunica/actor-http-fetch 2.0.1-alpha.5.0 → 2.0.1-alpha.6.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.
@@ -121,31 +121,13 @@
121
121
  "comment": "Actor that must be registered in the bus before this actor."
122
122
  }
123
123
  ],
124
- "memberFields": [
125
- {
126
- "@id": "cahf:components/ActorHttpFetch.jsonld#ActorHttpFetch__member_userAgent",
127
- "memberFieldName": "userAgent"
128
- },
129
- {
130
- "@id": "cahf:components/ActorHttpFetch.jsonld#ActorHttpFetch__member_fetchInitPreprocessor",
131
- "memberFieldName": "fetchInitPreprocessor"
132
- },
133
- {
134
- "@id": "cahf:components/ActorHttpFetch.jsonld#ActorHttpFetch__member_constructor",
135
- "memberFieldName": "constructor"
136
- },
137
- {
138
- "@id": "cahf:components/ActorHttpFetch.jsonld#ActorHttpFetch__member_createUserAgent",
139
- "memberFieldName": "createUserAgent"
140
- },
141
- {
142
- "@id": "cahf:components/ActorHttpFetch.jsonld#ActorHttpFetch__member_test",
143
- "memberFieldName": "test"
144
- },
145
- {
146
- "@id": "cahf:components/ActorHttpFetch.jsonld#ActorHttpFetch__member_run",
147
- "memberFieldName": "run"
148
- }
124
+ "memberKeys": [
125
+ "userAgent",
126
+ "fetchInitPreprocessor",
127
+ "constructor",
128
+ "createUserAgent",
129
+ "test",
130
+ "run"
149
131
  ],
150
132
  "constructorArguments": [
151
133
  {
@@ -184,11 +166,8 @@
184
166
  "@type": "AbstractClass",
185
167
  "requireElement": "IActorHttpFetchArgs",
186
168
  "parameters": [],
187
- "memberFields": [
188
- {
189
- "@id": "cahf:components/ActorHttpFetch.jsonld#IActorHttpFetchArgs__member_agentOptions",
190
- "memberFieldName": "agentOptions"
191
- }
169
+ "memberKeys": [
170
+ "agentOptions"
192
171
  ],
193
172
  "constructorArguments": []
194
173
  }
@@ -44,7 +44,7 @@ class ActorHttpFetch extends bus_http_1.ActorHttp {
44
44
  method: action.init.method || 'GET',
45
45
  }));
46
46
  // TODO: remove this workaround once this has a fix: https://github.com/inrupt/solid-client-authn-js/issues/1708
47
- if (action.init && action.init.headers && 'append' in action.init.headers && action.context.has(context_entries_1.KeysHttp.fetch)) {
47
+ if (action.init?.headers && 'append' in action.init.headers && action.context.has(context_entries_1.KeysHttp.fetch)) {
48
48
  action.init.headers = bus_http_1.ActorHttp.headersToHash(action.init.headers);
49
49
  }
50
50
  // Perform request
@@ -52,7 +52,7 @@ class ActorHttpFetch extends bus_http_1.ActorHttp {
52
52
  .context?.get(context_entries_1.KeysHttp.fetch);
53
53
  return (customFetch || fetch)(action.input, this.fetchInitPreprocessor.handle({
54
54
  ...action.init,
55
- ...action.context && action.context.get(context_entries_1.KeysHttp.includeCredentials) ? { credentials: 'include' } : {},
55
+ ...action.context.get(context_entries_1.KeysHttp.includeCredentials) ? { credentials: 'include' } : {},
56
56
  })).then(response => {
57
57
  // Node-fetch does not support body.cancel, while it is mandatory according to the fetch and readablestream api.
58
58
  // If it doesn't exist, we monkey-patch it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comunica/actor-http-fetch",
3
- "version": "2.0.1-alpha.5.0",
3
+ "version": "2.0.1-alpha.6.0",
4
4
  "description": "A node-fetch http actor",
5
5
  "lsd:module": true,
6
6
  "main": "lib/index.js",
@@ -13,6 +13,7 @@
13
13
  "publishConfig": {
14
14
  "access": "public"
15
15
  },
16
+ "sideEffects": false,
16
17
  "keywords": [
17
18
  "comunica",
18
19
  "runner"
@@ -28,10 +29,10 @@
28
29
  "lib/**/*.js"
29
30
  ],
30
31
  "dependencies": {
31
- "@comunica/bus-http": "2.0.1-alpha.5.0",
32
- "@comunica/context-entries": "2.0.1-alpha.5.0",
33
- "@comunica/core": "2.0.1-alpha.5.0",
34
- "@comunica/mediatortype-time": "2.0.1-alpha.5.0",
32
+ "@comunica/bus-http": "2.0.1-alpha.6.0",
33
+ "@comunica/context-entries": "2.0.1-alpha.6.0",
34
+ "@comunica/core": "2.0.1-alpha.6.0",
35
+ "@comunica/mediatortype-time": "2.0.1-alpha.6.0",
35
36
  "cross-fetch": "^3.0.5"
36
37
  },
37
38
  "scripts": {
@@ -42,5 +43,5 @@
42
43
  "browser": {
43
44
  "./lib/FetchInitPreprocessor.js": "./lib/FetchInitPreprocessor-browser.js"
44
45
  },
45
- "gitHead": "e2ae2e9e924bf0656df60cc99774f7e560d47695"
46
+ "gitHead": "bbf46a068e635256495a40e784a4691b22e88bd3"
46
47
  }