@comunica/actor-http-native 1.22.0 → 2.0.1-alpha.7.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.
- package/LICENSE.txt +2 -2
- package/README.md +7 -3
- package/components/ActorHttpNative.jsonld +175 -0
- package/components/components.jsonld +5 -3
- package/components/context.jsonld +39 -5
- package/lib/ActorHttpNative.d.ts +8 -4
- package/lib/ActorHttpNative.js +4 -5
- package/lib/Requester-browser.js +4 -4
- package/lib/Requester.js +3 -3
- package/lib/index.d.ts +1 -0
- package/{index.js → lib/index.js} +1 -1
- package/package.json +13 -37
- package/components/Actor/Http/Native.jsonld +0 -38
- package/index.d.ts +0 -1
package/LICENSE.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright © 2017–
|
|
4
|
-
Ghent University – imec, Belgium
|
|
3
|
+
Copyright © 2017–now Ruben Taelman, Joachim Van Herwegen
|
|
4
|
+
Comunica Association and Ghent University – imec, Belgium
|
|
5
5
|
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
7
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@comunica/actor-http-native)
|
|
4
4
|
|
|
5
|
-
**DEPRECATED: use the more flexible @comunica/actor-http-
|
|
5
|
+
**DEPRECATED: use the more flexible @comunica/actor-http-fetch instead without loss of performance.**
|
|
6
6
|
|
|
7
7
|
An [HTTP](https://github.com/comunica/comunica/tree/master/packages/bus-http) actor that
|
|
8
8
|
uses Node's request API (`XMLHttpRequest` in the browser) to perform HTTP requests.
|
|
@@ -25,14 +25,18 @@ After installing, this package can be added to your engine's configuration as fo
|
|
|
25
25
|
{
|
|
26
26
|
"@context": [
|
|
27
27
|
...
|
|
28
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-native/^
|
|
28
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-native/^2.0.0/components/context.jsonld"
|
|
29
29
|
],
|
|
30
30
|
"actors": [
|
|
31
31
|
...
|
|
32
32
|
{
|
|
33
|
-
"@id": "
|
|
33
|
+
"@id": "urn:comunica:default:http/actors#native",
|
|
34
34
|
"@type": "ActorHttpNative"
|
|
35
35
|
}
|
|
36
36
|
]
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
|
+
|
|
40
|
+
### Config Parameters
|
|
41
|
+
|
|
42
|
+
* `agentOptions`: The agent JSON options for the HTTP agent. _(optional)_
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": [
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-native/^2.0.0/components/context.jsonld",
|
|
4
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^2.0.0/components/context.jsonld",
|
|
5
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^2.0.0/components/context.jsonld"
|
|
6
|
+
],
|
|
7
|
+
"@id": "npmd:@comunica/actor-http-native",
|
|
8
|
+
"components": [
|
|
9
|
+
{
|
|
10
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative",
|
|
11
|
+
"@type": "Class",
|
|
12
|
+
"requireElement": "ActorHttpNative",
|
|
13
|
+
"extends": [
|
|
14
|
+
"cbh:components/ActorHttp.jsonld#ActorHttp"
|
|
15
|
+
],
|
|
16
|
+
"comment": "A comunica Follow Redirects Http Actor.",
|
|
17
|
+
"parameters": [
|
|
18
|
+
{
|
|
19
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative_args_agentOptions",
|
|
20
|
+
"range": {
|
|
21
|
+
"@type": "ParameterRangeUnion",
|
|
22
|
+
"parameterRangeElements": [
|
|
23
|
+
"rdf:JSON",
|
|
24
|
+
{
|
|
25
|
+
"@type": "ParameterRangeUndefined"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"default": {
|
|
30
|
+
"@type": "@json",
|
|
31
|
+
"@value": {
|
|
32
|
+
"keepAlive": true,
|
|
33
|
+
"maxSockets": 5
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"comment": "The agent options for the HTTP agent"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative_args_name",
|
|
40
|
+
"range": "xsd:string",
|
|
41
|
+
"default": {
|
|
42
|
+
"@id": "rdf:subject"
|
|
43
|
+
},
|
|
44
|
+
"comment": "The name for this actor."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative_args_bus",
|
|
48
|
+
"range": {
|
|
49
|
+
"@type": "ParameterRangeGenericComponent",
|
|
50
|
+
"component": "cc:components/Bus.jsonld#Bus",
|
|
51
|
+
"genericTypeInstances": [
|
|
52
|
+
{
|
|
53
|
+
"@type": "ParameterRangeGenericComponent",
|
|
54
|
+
"component": "cc:components/Actor.jsonld#Actor",
|
|
55
|
+
"genericTypeInstances": [
|
|
56
|
+
{
|
|
57
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
58
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
62
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
66
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
72
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
76
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
80
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"default": {
|
|
85
|
+
"@id": "cbh:components/ActorHttp.jsonld#ActorHttp_default_bus",
|
|
86
|
+
"@type": "cc:components/Bus.jsonld#Bus"
|
|
87
|
+
},
|
|
88
|
+
"comment": "The bus this actor subscribes to."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative_args_beforeActors",
|
|
92
|
+
"range": {
|
|
93
|
+
"@type": "ParameterRangeUnion",
|
|
94
|
+
"parameterRangeElements": [
|
|
95
|
+
{
|
|
96
|
+
"@type": "ParameterRangeArray",
|
|
97
|
+
"parameterRangeValue": {
|
|
98
|
+
"@type": "ParameterRangeGenericComponent",
|
|
99
|
+
"component": "cc:components/Actor.jsonld#Actor",
|
|
100
|
+
"genericTypeInstances": [
|
|
101
|
+
{
|
|
102
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
103
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
107
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
111
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"@type": "ParameterRangeUndefined"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"comment": "Actor that must be registered in the bus before this actor."
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
"memberKeys": [
|
|
125
|
+
"userAgent",
|
|
126
|
+
"requester",
|
|
127
|
+
"constructor",
|
|
128
|
+
"createUserAgent",
|
|
129
|
+
"test",
|
|
130
|
+
"run"
|
|
131
|
+
],
|
|
132
|
+
"constructorArguments": [
|
|
133
|
+
{
|
|
134
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative_args__constructorArgument",
|
|
135
|
+
"fields": [
|
|
136
|
+
{
|
|
137
|
+
"keyRaw": "agentOptions",
|
|
138
|
+
"value": {
|
|
139
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative_args_agentOptions"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"keyRaw": "name",
|
|
144
|
+
"value": {
|
|
145
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative_args_name"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"keyRaw": "bus",
|
|
150
|
+
"value": {
|
|
151
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative_args_bus"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"keyRaw": "beforeActors",
|
|
156
|
+
"value": {
|
|
157
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative_args_beforeActors"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#IActorHttpNativeArgs",
|
|
166
|
+
"@type": "AbstractClass",
|
|
167
|
+
"requireElement": "IActorHttpNativeArgs",
|
|
168
|
+
"parameters": [],
|
|
169
|
+
"memberKeys": [
|
|
170
|
+
"agentOptions"
|
|
171
|
+
],
|
|
172
|
+
"constructorArguments": []
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"@context":
|
|
2
|
+
"@context": [
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-native/^2.0.0/components/context.jsonld"
|
|
4
|
+
],
|
|
3
5
|
"@id": "npmd:@comunica/actor-http-native",
|
|
4
6
|
"@type": "Module",
|
|
5
7
|
"requireName": "@comunica/actor-http-native",
|
|
6
8
|
"import": [
|
|
7
|
-
"
|
|
9
|
+
"cahn:components/ActorHttpNative.jsonld"
|
|
8
10
|
]
|
|
9
|
-
}
|
|
11
|
+
}
|
|
@@ -3,10 +3,44 @@
|
|
|
3
3
|
"https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^4.0.0/components/context.jsonld",
|
|
4
4
|
{
|
|
5
5
|
"npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
|
|
6
|
-
"cahn": "npmd:@comunica/actor-http-native/",
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
"cahn": "npmd:@comunica/actor-http-native/^2.0.0/",
|
|
7
|
+
"ActorHttpNative": {
|
|
8
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative",
|
|
9
|
+
"@prefix": true,
|
|
10
|
+
"@context": {
|
|
11
|
+
"args_agentOptions": {
|
|
12
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative_args_agentOptions"
|
|
13
|
+
},
|
|
14
|
+
"args_name": {
|
|
15
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative_args_name"
|
|
16
|
+
},
|
|
17
|
+
"args_bus": {
|
|
18
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative_args_bus"
|
|
19
|
+
},
|
|
20
|
+
"args_beforeActors": {
|
|
21
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative_args_beforeActors",
|
|
22
|
+
"@container": "@list"
|
|
23
|
+
},
|
|
24
|
+
"agentOptions": {
|
|
25
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative_args_agentOptions"
|
|
26
|
+
},
|
|
27
|
+
"name": {
|
|
28
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative_args_name"
|
|
29
|
+
},
|
|
30
|
+
"bus": {
|
|
31
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative_args_bus"
|
|
32
|
+
},
|
|
33
|
+
"beforeActors": {
|
|
34
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#ActorHttpNative_args_beforeActors",
|
|
35
|
+
"@container": "@list"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"IActorHttpNativeArgs": {
|
|
40
|
+
"@id": "cahn:components/ActorHttpNative.jsonld#IActorHttpNativeArgs",
|
|
41
|
+
"@prefix": true,
|
|
42
|
+
"@context": {}
|
|
43
|
+
}
|
|
10
44
|
}
|
|
11
45
|
]
|
|
12
|
-
}
|
|
46
|
+
}
|
package/lib/ActorHttpNative.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { IActionHttp, IActorHttpOutput } from '@comunica/bus-http';
|
|
1
|
+
import type { IActionHttp, IActorHttpOutput, IActorHttpArgs } from '@comunica/bus-http';
|
|
2
2
|
import { ActorHttp } from '@comunica/bus-http';
|
|
3
|
-
import type { IActorArgs } from '@comunica/core';
|
|
4
3
|
import type { IMediatorTypeTime } from '@comunica/mediatortype-time';
|
|
5
4
|
import 'cross-fetch/polyfill';
|
|
6
5
|
/**
|
|
@@ -14,6 +13,11 @@ export declare class ActorHttpNative extends ActorHttp {
|
|
|
14
13
|
test(action: IActionHttp): Promise<IMediatorTypeTime>;
|
|
15
14
|
run(action: IActionHttp): Promise<IActorHttpOutput>;
|
|
16
15
|
}
|
|
17
|
-
export interface IActorHttpNativeArgs extends
|
|
18
|
-
|
|
16
|
+
export interface IActorHttpNativeArgs extends IActorHttpArgs {
|
|
17
|
+
/**
|
|
18
|
+
* The agent options for the HTTP agent
|
|
19
|
+
* @range {json}
|
|
20
|
+
* @default {{ "keepAlive": true, "maxSockets": 5 }}
|
|
21
|
+
*/
|
|
22
|
+
agentOptions?: Record<string, any>;
|
|
19
23
|
}
|
package/lib/ActorHttpNative.js
CHANGED
|
@@ -12,7 +12,7 @@ class ActorHttpNative extends bus_http_1.ActorHttp {
|
|
|
12
12
|
constructor(args) {
|
|
13
13
|
super(args);
|
|
14
14
|
this.userAgent = ActorHttpNative.createUserAgent();
|
|
15
|
-
this.requester = new Requester_1.default(args.agentOptions
|
|
15
|
+
this.requester = new Requester_1.default(args.agentOptions);
|
|
16
16
|
}
|
|
17
17
|
static createUserAgent() {
|
|
18
18
|
return `Comunica/actor-http-native (${typeof global.navigator === 'undefined' ?
|
|
@@ -20,7 +20,6 @@ class ActorHttpNative extends bus_http_1.ActorHttp {
|
|
|
20
20
|
`Browser-${global.navigator.userAgent}`})`;
|
|
21
21
|
}
|
|
22
22
|
async test(action) {
|
|
23
|
-
// TODO: check for unsupported fetch features
|
|
24
23
|
return { time: Number.POSITIVE_INFINITY };
|
|
25
24
|
}
|
|
26
25
|
async run(action) {
|
|
@@ -52,10 +51,10 @@ class ActorHttpNative extends bus_http_1.ActorHttp {
|
|
|
52
51
|
options.headers.append('user-agent', this.userAgent);
|
|
53
52
|
}
|
|
54
53
|
options.method = options.method || 'GET';
|
|
55
|
-
if (action.context
|
|
54
|
+
if (action.context.get(context_entries_1.KeysHttp.includeCredentials)) {
|
|
56
55
|
options.withCredentials = true;
|
|
57
56
|
}
|
|
58
|
-
if (action.context
|
|
57
|
+
if (action.context.get(context_entries_1.KeysHttp.auth)) {
|
|
59
58
|
options.auth = action.context.get(context_entries_1.KeysHttp.auth);
|
|
60
59
|
}
|
|
61
60
|
this.logInfo(action.context, `Requesting ${options.url}`, () => ({
|
|
@@ -84,7 +83,7 @@ class ActorHttpNative extends bus_http_1.ActorHttp {
|
|
|
84
83
|
return Promise.resolve();
|
|
85
84
|
};
|
|
86
85
|
// Support abort controller
|
|
87
|
-
if (action.init
|
|
86
|
+
if (action.init?.signal) {
|
|
88
87
|
if (action.init.signal.aborted) {
|
|
89
88
|
httpResponse.destroy();
|
|
90
89
|
}
|
package/lib/Requester-browser.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* eslint-disable unicorn/filename-case */
|
|
3
|
+
/* eslint-enable unicorn/filename-case */
|
|
3
4
|
/* ! @license MIT ©2013-2016 Ruben Verborgh, Ghent University - imec */
|
|
4
5
|
/* Single-function HTTP(S) request module for browsers */
|
|
5
6
|
/* Translated from https://github.com/LinkedDataFragments/Client.js/blob/master/lib/browser/Request.js */
|
|
@@ -39,7 +40,6 @@ class Requester {
|
|
|
39
40
|
};
|
|
40
41
|
// Handle the arrival of a response
|
|
41
42
|
request.onload = () => {
|
|
42
|
-
var _a, _b;
|
|
43
43
|
// Convert the response into an iterator
|
|
44
44
|
const response = new stream_1.Readable();
|
|
45
45
|
response.push(request.responseText || '');
|
|
@@ -61,11 +61,11 @@ class Requester {
|
|
|
61
61
|
// If the resource was time-negotiated, store its queryless URI
|
|
62
62
|
// to enable the PERFORMANCE HACK explained above
|
|
63
63
|
if (reqHeaders.has('accept-datetime') && resHeaders.has('memento-datetime')) {
|
|
64
|
-
const resource = this.removeQuery(
|
|
64
|
+
const resource = this.removeQuery(resHeaders.get('content-location') ?? settings.url);
|
|
65
65
|
if (!this.negotiatedResources[resource]) {
|
|
66
66
|
// Ensure the resource is not a timegate
|
|
67
|
-
const links = (
|
|
68
|
-
const timegate = this.removeQuery(links && links.timegate
|
|
67
|
+
const links = (resHeaders.get('link') && parseLink(resHeaders.get('link'))) ?? undefined;
|
|
68
|
+
const timegate = this.removeQuery(links && links.timegate?.url);
|
|
69
69
|
if (resource !== timegate) {
|
|
70
70
|
this.negotiatedResources[resource] = true;
|
|
71
71
|
}
|
package/lib/Requester.js
CHANGED
|
@@ -15,15 +15,15 @@ const DECODERS = { gzip: zlib.createGunzip, deflate: zlib.createInflate };
|
|
|
15
15
|
class Requester {
|
|
16
16
|
constructor(agentOptions) {
|
|
17
17
|
this.agents = {
|
|
18
|
-
http: new http.Agent(agentOptions
|
|
19
|
-
https: new https.Agent(agentOptions
|
|
18
|
+
http: new http.Agent(agentOptions ?? {}),
|
|
19
|
+
https: new https.Agent(agentOptions ?? {}),
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
// Creates an HTTP request with the given settings
|
|
23
23
|
createRequest(settings) {
|
|
24
24
|
// Parse the request URL
|
|
25
25
|
if (settings.url) {
|
|
26
|
-
settings =
|
|
26
|
+
settings = { ...url.parse(settings.url), ...settings };
|
|
27
27
|
}
|
|
28
28
|
// Emit the response through a proxy
|
|
29
29
|
const requestProxy = new events_1.EventEmitter();
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ActorHttpNative';
|
|
@@ -10,5 +10,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./
|
|
13
|
+
__exportStar(require("./ActorHttpNative"), exports);
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-http-native",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.0.1-alpha.7.0",
|
|
4
4
|
"description": "A native http actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
|
-
"main": "index.js",
|
|
7
|
-
"typings": "index",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"typings": "lib/index",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/comunica/comunica.git",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
|
+
"sideEffects": false,
|
|
16
17
|
"keywords": [
|
|
17
18
|
"comunica",
|
|
18
19
|
"actor",
|
|
@@ -27,50 +28,25 @@
|
|
|
27
28
|
"files": [
|
|
28
29
|
"components",
|
|
29
30
|
"lib/**/*.d.ts",
|
|
30
|
-
"lib/**/*.js"
|
|
31
|
-
"index.d.ts",
|
|
32
|
-
"index.js"
|
|
31
|
+
"lib/**/*.js"
|
|
33
32
|
],
|
|
34
|
-
"peerDependencies": {
|
|
35
|
-
"@comunica/bus-http": "^1.0.0",
|
|
36
|
-
"@comunica/core": "^1.0.0"
|
|
37
|
-
},
|
|
38
33
|
"dependencies": {
|
|
39
|
-
"@comunica/
|
|
34
|
+
"@comunica/bus-http": "2.0.1-alpha.7.0",
|
|
35
|
+
"@comunica/context-entries": "2.0.1-alpha.7.0",
|
|
36
|
+
"@comunica/core": "2.0.1-alpha.7.0",
|
|
37
|
+
"@comunica/mediatortype-time": "2.0.1-alpha.7.0",
|
|
40
38
|
"@types/parse-link-header": "^1.0.0",
|
|
41
39
|
"cross-fetch": "^3.0.5",
|
|
42
40
|
"follow-redirects": "^1.5.1",
|
|
43
41
|
"parse-link-header": "^1.0.1"
|
|
44
42
|
},
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"@comunica/bus-http": "^1.22.0",
|
|
47
|
-
"@comunica/core": "^1.22.0",
|
|
48
|
-
"@comunica/mediatortype-time": "^1.22.0"
|
|
49
|
-
},
|
|
50
|
-
"jest": {
|
|
51
|
-
"globals": {
|
|
52
|
-
"ts-jest": {
|
|
53
|
-
"tsConfig": "../../tsconfig.json"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"transform": {
|
|
57
|
-
"^.+\\.ts$": "ts-jest"
|
|
58
|
-
},
|
|
59
|
-
"testRegex": "(/test/.*|(\\.|/)(test|spec))\\.ts$",
|
|
60
|
-
"moduleFileExtensions": [
|
|
61
|
-
"ts",
|
|
62
|
-
"js"
|
|
63
|
-
],
|
|
64
|
-
"collectCoverage": true
|
|
65
|
-
},
|
|
66
43
|
"scripts": {
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"build": "
|
|
70
|
-
"validate": "npm ls"
|
|
44
|
+
"build": "npm run build:ts && npm run build:components",
|
|
45
|
+
"build:ts": "node \"../../node_modules/typescript/bin/tsc\"",
|
|
46
|
+
"build:components": "componentsjs-generator"
|
|
71
47
|
},
|
|
72
48
|
"browser": {
|
|
73
49
|
"./lib/Requester.js": "./lib/Requester-browser.js"
|
|
74
50
|
},
|
|
75
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "4cdf341cc4d4775a21c6a65c98a72ba47e0093fc"
|
|
76
52
|
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-native/^1.0.0/components/context.jsonld",
|
|
4
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^1.0.0/components/context.jsonld"
|
|
5
|
-
],
|
|
6
|
-
"@id": "npmd:@comunica/actor-http-native",
|
|
7
|
-
"components": [
|
|
8
|
-
{
|
|
9
|
-
"@id": "cahn:Actor/Http/Native",
|
|
10
|
-
"@type": "Class",
|
|
11
|
-
"extends": "cbh:Actor/Http",
|
|
12
|
-
"requireElement": "ActorHttpNative",
|
|
13
|
-
"comment": "A comunica Follow Redirects Http Actor.",
|
|
14
|
-
"parameters": [
|
|
15
|
-
{
|
|
16
|
-
"@id": "cahn:Actor/Http/Native/agentOptions",
|
|
17
|
-
"comment": "The AgentOptions for the HTTP agent as a JSON string",
|
|
18
|
-
"required": false,
|
|
19
|
-
"unique": true,
|
|
20
|
-
"default": "{ \"keepAlive\": true, \"maxSockets\": 5 }",
|
|
21
|
-
"range": "xsd:string"
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
"constructorArguments": [
|
|
25
|
-
{
|
|
26
|
-
"@id": "cahn:Actor/Http/Native/constructorArgumentsObject",
|
|
27
|
-
"extends": "cbh:Actor/Http/constructorArgumentsObject",
|
|
28
|
-
"fields": [
|
|
29
|
-
{
|
|
30
|
-
"keyRaw": "agentOptions",
|
|
31
|
-
"value": "cahn:Actor/Http/Native/agentOptions"
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
package/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/ActorHttpNative';
|