@comunica/actor-http-proxy 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright © 2017–2018 Ruben Taelman, Joachim Van Herwegen
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
@@ -23,24 +23,22 @@ After installing, this package can be added to your engine's configuration as fo
23
23
  {
24
24
  "@context": [
25
25
  ...
26
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-proxy/^1.0.0/components/context.jsonld"
26
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-proxy/^2.0.0/components/context.jsonld"
27
27
  ],
28
28
  "actors": [
29
29
  ...
30
30
  {
31
- "@id": "config-sets:http.json#myHttpProxy",
31
+ "@id": "urn:comunica:default:http/actors#proxy",
32
32
  "@type": "ActorHttpProxy",
33
- "cahp:Actor/Http/Proxy/mediatorHttp": {
34
- "@id": "config-sets:http.json#mediatorHttp"
35
- },
36
- "beforeActor": "config-sets:http.json#myHttpFetcher"
33
+ "mediatorHttp": { "@id": "urn:comunica:default:http/mediators#main" },
34
+ "beforeActors": { "@id": "urn:comunica:default:http/actors#fetch" }
37
35
  }
38
36
  ]
39
37
  }
40
38
  ```
41
39
 
42
- Use `beforeActor` to indicate that this actor MUST always run _before_ your default HTTP actor.
40
+ Use `beforeActors` to indicate that this actor MUST always run _before_ your default HTTP actor.
43
41
 
44
42
  ### Config Parameters
45
43
 
46
- * `cahp:Actor/Http/Proxy/mediatorHttp`: A mediator over the [HTTP bus](https://github.com/comunica/comunica/tree/master/packages/bus-http).
44
+ * `mediatorHttp`: A mediator over the [HTTP bus](https://github.com/comunica/comunica/tree/master/packages/bus-http).
@@ -0,0 +1,158 @@
1
+ {
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-proxy/^2.0.0/components/context.jsonld",
4
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^2.0.0/components/context.jsonld",
5
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^2.0.0/components/context.jsonld"
6
+ ],
7
+ "@id": "npmd:@comunica/actor-http-proxy",
8
+ "components": [
9
+ {
10
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy",
11
+ "@type": "Class",
12
+ "requireElement": "ActorHttpProxy",
13
+ "extends": [
14
+ "cbh:components/ActorHttp.jsonld#ActorHttp"
15
+ ],
16
+ "comment": "A comunica Proxy Http Actor.",
17
+ "parameters": [
18
+ {
19
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy_args_mediatorHttp",
20
+ "range": "cc:components/Mediator.jsonld#Mediator",
21
+ "comment": "The HTTP mediator"
22
+ },
23
+ {
24
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy_args_name",
25
+ "range": "xsd:string",
26
+ "default": {
27
+ "@id": "rdf:subject"
28
+ },
29
+ "comment": "The name for this actor."
30
+ },
31
+ {
32
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy_args_bus",
33
+ "range": {
34
+ "@type": "ParameterRangeGenericComponent",
35
+ "component": "cc:components/Bus.jsonld#Bus",
36
+ "genericTypeInstances": [
37
+ {
38
+ "@type": "ParameterRangeGenericComponent",
39
+ "component": "cc:components/Actor.jsonld#Actor",
40
+ "genericTypeInstances": [
41
+ {
42
+ "@type": "ParameterRangeGenericTypeReference",
43
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
44
+ },
45
+ {
46
+ "@type": "ParameterRangeGenericTypeReference",
47
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
48
+ },
49
+ {
50
+ "@type": "ParameterRangeGenericTypeReference",
51
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
52
+ }
53
+ ]
54
+ },
55
+ {
56
+ "@type": "ParameterRangeGenericTypeReference",
57
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
58
+ },
59
+ {
60
+ "@type": "ParameterRangeGenericTypeReference",
61
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
62
+ },
63
+ {
64
+ "@type": "ParameterRangeGenericTypeReference",
65
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
66
+ }
67
+ ]
68
+ },
69
+ "default": {
70
+ "@id": "cbh:components/ActorHttp.jsonld#ActorHttp_default_bus",
71
+ "@type": "cc:components/Bus.jsonld#Bus"
72
+ },
73
+ "comment": "The bus this actor subscribes to."
74
+ },
75
+ {
76
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy_args_beforeActors",
77
+ "range": {
78
+ "@type": "ParameterRangeUnion",
79
+ "parameterRangeElements": [
80
+ {
81
+ "@type": "ParameterRangeArray",
82
+ "parameterRangeValue": {
83
+ "@type": "ParameterRangeGenericComponent",
84
+ "component": "cc:components/Actor.jsonld#Actor",
85
+ "genericTypeInstances": [
86
+ {
87
+ "@type": "ParameterRangeGenericTypeReference",
88
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
89
+ },
90
+ {
91
+ "@type": "ParameterRangeGenericTypeReference",
92
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
93
+ },
94
+ {
95
+ "@type": "ParameterRangeGenericTypeReference",
96
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
97
+ }
98
+ ]
99
+ }
100
+ },
101
+ {
102
+ "@type": "ParameterRangeUndefined"
103
+ }
104
+ ]
105
+ },
106
+ "comment": "Actor that must be registered in the bus before this actor."
107
+ }
108
+ ],
109
+ "memberKeys": [
110
+ "mediatorHttp",
111
+ "constructor",
112
+ "test",
113
+ "run"
114
+ ],
115
+ "constructorArguments": [
116
+ {
117
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy_args__constructorArgument",
118
+ "fields": [
119
+ {
120
+ "keyRaw": "mediatorHttp",
121
+ "value": {
122
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy_args_mediatorHttp"
123
+ }
124
+ },
125
+ {
126
+ "keyRaw": "name",
127
+ "value": {
128
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy_args_name"
129
+ }
130
+ },
131
+ {
132
+ "keyRaw": "bus",
133
+ "value": {
134
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy_args_bus"
135
+ }
136
+ },
137
+ {
138
+ "keyRaw": "beforeActors",
139
+ "value": {
140
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy_args_beforeActors"
141
+ }
142
+ }
143
+ ]
144
+ }
145
+ ]
146
+ },
147
+ {
148
+ "@id": "cahp:components/ActorHttpProxy.jsonld#IActorHttpProxyArgs",
149
+ "@type": "AbstractClass",
150
+ "requireElement": "IActorHttpProxyArgs",
151
+ "parameters": [],
152
+ "memberKeys": [
153
+ "mediatorHttp"
154
+ ],
155
+ "constructorArguments": []
156
+ }
157
+ ]
158
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-proxy/^2.0.0/components/context.jsonld"
4
+ ],
5
+ "@id": "npmd:@comunica/actor-http-proxy",
6
+ "components": [
7
+ {
8
+ "@id": "cahp:components/IProxyHandler.jsonld#IProxyHandler",
9
+ "@type": "AbstractClass",
10
+ "requireElement": "IProxyHandler",
11
+ "comment": "A proxy handler can override a request.",
12
+ "parameters": [],
13
+ "memberKeys": [
14
+ "getProxy"
15
+ ],
16
+ "constructorArguments": []
17
+ },
18
+ {
19
+ "@id": "cahp:components/IProxyHandler.jsonld#IRequest",
20
+ "@type": "AbstractClass",
21
+ "requireElement": "IRequest",
22
+ "comment": "A request that conforms to the fetch interface.",
23
+ "parameters": [],
24
+ "memberKeys": [
25
+ "input",
26
+ "init"
27
+ ],
28
+ "constructorArguments": []
29
+ }
30
+ ]
31
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-proxy/^2.0.0/components/context.jsonld",
4
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/types/^2.0.0/components/context.jsonld"
5
+ ],
6
+ "@id": "npmd:@comunica/actor-http-proxy",
7
+ "components": [
8
+ {
9
+ "@id": "cahp:components/ProxyHandlerStatic.jsonld#ProxyHandlerStatic",
10
+ "@type": "Class",
11
+ "requireElement": "ProxyHandlerStatic",
12
+ "extends": [
13
+ "ct:components/IProxyHandler.jsonld#IProxyHandler"
14
+ ],
15
+ "comment": "A proxy handler that prefixes all URLs with a given string.",
16
+ "parameters": [
17
+ {
18
+ "@id": "cahp:components/ProxyHandlerStatic.jsonld#ProxyHandlerStatic_prefixUrl",
19
+ "range": "xsd:string"
20
+ }
21
+ ],
22
+ "memberKeys": [
23
+ "prefixUrl",
24
+ "constructor",
25
+ "getProxy",
26
+ "modifyInput"
27
+ ],
28
+ "constructorArguments": [
29
+ {
30
+ "@id": "cahp:components/ProxyHandlerStatic.jsonld#ProxyHandlerStatic_prefixUrl"
31
+ }
32
+ ]
33
+ }
34
+ ]
35
+ }
@@ -1,9 +1,12 @@
1
1
  {
2
- "@context": "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-proxy/^1.0.0/components/context.jsonld",
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-proxy/^2.0.0/components/context.jsonld"
4
+ ],
3
5
  "@id": "npmd:@comunica/actor-http-proxy",
4
6
  "@type": "Module",
5
7
  "requireName": "@comunica/actor-http-proxy",
6
8
  "import": [
7
- "files-cahp:components/Actor/Http/Proxy.jsonld"
9
+ "cahp:components/ActorHttpProxy.jsonld",
10
+ "cahp:components/ProxyHandlerStatic.jsonld"
8
11
  ]
9
- }
12
+ }
@@ -1,12 +1,58 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^1.0.0/components/context.jsonld",
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^4.0.0/components/context.jsonld",
4
4
  {
5
5
  "npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
6
- "cahp": "npmd:@comunica/actor-http-proxy/",
7
- "files-cahp": "cahp:^1.0.0/",
8
-
9
- "ActorHttpProxy": "cahp:Actor/Http/Proxy"
6
+ "cahp": "npmd:@comunica/actor-http-proxy/^2.0.0/",
7
+ "ActorHttpProxy": {
8
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy",
9
+ "@prefix": true,
10
+ "@context": {
11
+ "args_mediatorHttp": {
12
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy_args_mediatorHttp"
13
+ },
14
+ "args_name": {
15
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy_args_name"
16
+ },
17
+ "args_bus": {
18
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy_args_bus"
19
+ },
20
+ "args_beforeActors": {
21
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy_args_beforeActors",
22
+ "@container": "@list"
23
+ },
24
+ "mediatorHttp": {
25
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy_args_mediatorHttp"
26
+ },
27
+ "name": {
28
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy_args_name"
29
+ },
30
+ "bus": {
31
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy_args_bus"
32
+ },
33
+ "beforeActors": {
34
+ "@id": "cahp:components/ActorHttpProxy.jsonld#ActorHttpProxy_args_beforeActors",
35
+ "@container": "@list"
36
+ }
37
+ }
38
+ },
39
+ "IActorHttpProxyArgs": {
40
+ "@id": "cahp:components/ActorHttpProxy.jsonld#IActorHttpProxyArgs",
41
+ "@prefix": true,
42
+ "@context": {}
43
+ },
44
+ "ProxyHandlerStatic": {
45
+ "@id": "cahp:components/ProxyHandlerStatic.jsonld#ProxyHandlerStatic",
46
+ "@prefix": true,
47
+ "@context": {
48
+ "prefixUrl": {
49
+ "@id": "cahp:components/ProxyHandlerStatic.jsonld#ProxyHandlerStatic_prefixUrl"
50
+ },
51
+ "": {
52
+ "@id": "cahp:components/ProxyHandlerStatic.jsonld#ProxyHandlerStatic_prefixUrl"
53
+ }
54
+ }
55
+ }
10
56
  }
11
57
  ]
12
- }
58
+ }
@@ -1,21 +1,18 @@
1
- import type { IActionHttp, IActorHttpOutput } from '@comunica/bus-http';
1
+ import type { IActionHttp, IActorHttpOutput, MediatorHttp, IActorHttpArgs } from '@comunica/bus-http';
2
2
  import { ActorHttp } from '@comunica/bus-http';
3
- import { KeysHttpProxy } from '@comunica/context-entries';
4
- import type { IActorArgs, IActorTest, Mediator } from '@comunica/core';
5
3
  import type { IMediatorTypeTime } from '@comunica/mediatortype-time';
6
4
  /**
7
5
  * A comunica Proxy Http Actor.
8
6
  */
9
7
  export declare class ActorHttpProxy extends ActorHttp {
10
- readonly mediatorHttp: Mediator<ActorHttp, IActionHttp, IActorTest, IActorHttpOutput>;
8
+ readonly mediatorHttp: MediatorHttp;
11
9
  constructor(args: IActorHttpProxyArgs);
12
10
  test(action: IActionHttp): Promise<IMediatorTypeTime>;
13
11
  run(action: IActionHttp): Promise<IActorHttpOutput>;
14
12
  }
15
- export interface IActorHttpProxyArgs extends IActorArgs<IActionHttp, IActorTest, IActorHttpOutput> {
16
- mediatorHttp: Mediator<ActorHttp, IActionHttp, IActorTest, IActorHttpOutput>;
13
+ export interface IActorHttpProxyArgs extends IActorHttpArgs {
14
+ /**
15
+ * The HTTP mediator
16
+ */
17
+ mediatorHttp: MediatorHttp;
17
18
  }
18
- /**
19
- * @deprecated Import this constant from @comunica/context-entries.
20
- */
21
- export declare const KEY_CONTEXT_HTTPPROXYHANDLER = KeysHttpProxy.httpProxyHandler;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.KEY_CONTEXT_HTTPPROXYHANDLER = exports.ActorHttpProxy = void 0;
3
+ exports.ActorHttpProxy = void 0;
4
4
  const bus_http_1 = require("@comunica/bus-http");
5
5
  const context_entries_1 = require("@comunica/context-entries");
6
6
  /**
@@ -11,9 +11,6 @@ class ActorHttpProxy extends bus_http_1.ActorHttp {
11
11
  super(args);
12
12
  }
13
13
  async test(action) {
14
- if (!action.context) {
15
- throw new Error(`Actor ${this.name} could not find a context.`);
16
- }
17
14
  const proxyHandler = action.context.get(context_entries_1.KeysHttpProxy.httpProxyHandler);
18
15
  if (!proxyHandler) {
19
16
  throw new Error(`Actor ${this.name} could not find a proxy handler in the context.`);
@@ -25,25 +22,21 @@ class ActorHttpProxy extends bus_http_1.ActorHttp {
25
22
  }
26
23
  async run(action) {
27
24
  const requestedUrl = typeof action.input === 'string' ? action.input : action.input.url;
28
- if (!action.context) {
29
- throw new Error('Illegal state: missing context');
30
- }
31
25
  const proxyHandler = action.context.get(context_entries_1.KeysHttpProxy.httpProxyHandler);
32
26
  // Send a request for the modified request
33
- const output = await this.mediatorHttp.mediate(Object.assign(Object.assign({}, await proxyHandler.getProxy(action)), { context: action.context.delete(context_entries_1.KeysHttpProxy.httpProxyHandler) }));
27
+ const output = await this.mediatorHttp.mediate({
28
+ ...await proxyHandler.getProxy(action),
29
+ context: action.context.delete(context_entries_1.KeysHttpProxy.httpProxyHandler),
30
+ });
34
31
  // Modify the response URL
35
32
  // use defineProperty to allow modification of unmodifiable objects
36
33
  Object.defineProperty(output, 'url', {
37
34
  configurable: true,
38
35
  enumerable: true,
39
- get: () => { var _a; return (_a = output.headers.get('x-final-url')) !== null && _a !== void 0 ? _a : requestedUrl; },
36
+ get: () => output.headers.get('x-final-url') ?? requestedUrl,
40
37
  });
41
38
  return output;
42
39
  }
43
40
  }
44
41
  exports.ActorHttpProxy = ActorHttpProxy;
45
- /**
46
- * @deprecated Import this constant from @comunica/context-entries.
47
- */
48
- exports.KEY_CONTEXT_HTTPPROXYHANDLER = context_entries_1.KeysHttpProxy.httpProxyHandler;
49
42
  //# sourceMappingURL=ActorHttpProxy.js.map
@@ -1,4 +1,4 @@
1
- import type { IProxyHandler, IRequest } from './IProxyHandler';
1
+ import type { IProxyHandler, IRequest } from '@comunica/types';
2
2
  /**
3
3
  * A proxy handler that prefixes all URLs with a given string.
4
4
  */
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './ActorHttpProxy';
2
+ export * from './ProxyHandlerStatic';
@@ -10,7 +10,6 @@ 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("./lib/ActorHttpProxy"), exports);
14
- __exportStar(require("./lib/IProxyHandler"), exports);
15
- __exportStar(require("./lib/ProxyHandlerStatic"), exports);
13
+ __exportStar(require("./ActorHttpProxy"), exports);
14
+ __exportStar(require("./ProxyHandlerStatic"), exports);
16
15
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@comunica/actor-http-proxy",
3
- "version": "1.22.0",
3
+ "version": "2.0.1-alpha.7.0",
4
4
  "description": "A proxy 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,41 +28,19 @@
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.8.0",
36
- "@comunica/context-entries": "^1.0.0",
37
- "@comunica/core": "^1.8.0"
38
- },
39
- "devDependencies": {
40
- "@comunica/bus-http": "^1.22.0",
41
- "@comunica/core": "^1.22.0",
42
- "@comunica/mediatortype-time": "^1.22.0"
43
- },
44
- "jest": {
45
- "globals": {
46
- "ts-jest": {
47
- "tsConfig": "../../tsconfig.json"
48
- }
49
- },
50
- "transform": {
51
- "^.+\\.ts$": "ts-jest"
52
- },
53
- "testRegex": "(/test/.*|(\\.|/)(test|spec))\\.ts$",
54
- "moduleFileExtensions": [
55
- "ts",
56
- "js"
57
- ],
58
- "collectCoverage": true
33
+ "dependencies": {
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",
38
+ "@comunica/types": "2.0.1-alpha.7.0"
59
39
  },
60
40
  "scripts": {
61
- "test": "node \"../../node_modules/jest/bin/jest.js\" ${1}",
62
- "test-watch": "node \"../../node_modules/jest/bin/jest.js\" ${1} --watch",
63
- "build": "node \"../../node_modules/typescript/bin/tsc\"",
64
- "validate": "npm ls"
41
+ "build": "npm run build:ts && npm run build:components",
42
+ "build:ts": "node \"../../node_modules/typescript/bin/tsc\"",
43
+ "build:components": "componentsjs-generator"
65
44
  },
66
- "gitHead": "0a249ba341022eb2f1b9922fcf549a9564671d9f"
45
+ "gitHead": "4cdf341cc4d4775a21c6a65c98a72ba47e0093fc"
67
46
  }
@@ -1,36 +0,0 @@
1
- {
2
- "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-proxy/^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-proxy",
7
- "components": [
8
- {
9
- "@id": "cahp:Actor/Http/Proxy",
10
- "@type": "Class",
11
- "extends": "cbh:Actor/Http",
12
- "requireElement": "ActorHttpProxy",
13
- "comment": "A comunica Proxy Http Actor.",
14
- "parameters": [
15
- {
16
- "@id": "cahp:Actor/Http/Proxy/mediatorHttp",
17
- "comment": "The HTTP mediator",
18
- "required": true,
19
- "unique": true
20
- }
21
- ],
22
- "constructorArguments": [
23
- {
24
- "@id": "cahp:Actor/Http/Proxy/constructorArgumentsObject",
25
- "extends": "cbh:Actor/Http/constructorArgumentsObject",
26
- "fields": [
27
- {
28
- "keyRaw": "mediatorHttp",
29
- "value": "cahp:Actor/Http/Proxy/mediatorHttp"
30
- }
31
- ]
32
- }
33
- ]
34
- }
35
- ]
36
- }
package/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './lib/ActorHttpProxy';
2
- export * from './lib/IProxyHandler';
3
- export * from './lib/ProxyHandlerStatic';
@@ -1,19 +0,0 @@
1
- /**
2
- * A proxy handler can override a request.
3
- */
4
- export interface IProxyHandler {
5
- /**
6
- * Get a new proxied request for a given request.
7
- * If the given request is not applicable, null can be returned.
8
- * @param {IRequest} request A request.
9
- * @return {Promise<IRequest>} A new request, or null.
10
- */
11
- getProxy: (request: IRequest) => Promise<IRequest>;
12
- }
13
- /**
14
- * A request that conforms to the fetch interface.
15
- */
16
- export interface IRequest {
17
- input: RequestInfo;
18
- init?: RequestInit;
19
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IProxyHandler.js.map