@toa.io/extensions.origins 0.22.1 → 1.0.0-alpha.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/extensions.origins",
3
- "version": "0.22.1",
3
+ "version": "1.0.0-alpha.0",
4
4
  "description": "Toa Origins",
5
5
  "author": "temich <tema.gurtovoy@gmail.com>",
6
6
  "homepage": "https://github.com/toa-io/toa#readme",
@@ -17,16 +17,12 @@
17
17
  "main": "transpiled/index.js",
18
18
  "types": "transpiled/index.d.ts",
19
19
  "dependencies": {
20
- "@toa.io/core": "0.22.1",
21
- "@toa.io/generic": "0.22.0",
22
- "@toa.io/pointer": "0.22.0",
23
- "@toa.io/schemas": "0.22.0",
20
+ "@toa.io/core": "1.0.0-alpha.0",
21
+ "@toa.io/generic": "1.0.0-alpha.0",
22
+ "@toa.io/pointer": "1.0.0-alpha.0",
23
+ "@toa.io/schemas": "1.0.0-alpha.0",
24
24
  "comq": "0.10.1",
25
- "msgpackr": "1.9.5",
26
- "node-fetch": "2.6.7"
27
- },
28
- "devDependencies": {
29
- "@types/node-fetch": "2.6.2"
25
+ "msgpackr": "1.9.5"
30
26
  },
31
27
  "scripts": {
32
28
  "transpile": "tsc"
@@ -35,5 +31,5 @@
35
31
  "preset": "ts-jest",
36
32
  "testEnvironment": "node"
37
33
  },
38
- "gitHead": "d1116e1a3c3d881d2204989851596f0715abcb0f"
34
+ "gitHead": "06c64546f6292cc07c52f74b31415101037f7616"
39
35
  }
package/readme.md CHANGED
@@ -34,14 +34,12 @@ origins:
34
34
 
35
35
  ## HTTP Aspect
36
36
 
37
- Uses [node-fetch](https://github.com/node-fetch/node-fetch) and returns its result.
38
-
39
37
  Aspect invocation function
40
- signature: `async (origin: string, rel: string, reuest: fetch.Request): fetch.Response`
38
+ signature: `async (origin: string, rel: string, reuest: fetch.Request): Response`
41
39
 
42
40
  - `origin`: name of the origin in the manifest
43
41
  - `rel`: reference to a resource relative to the origin's value
44
- - `request`: `Request` form `node-fetch`
42
+ - `request`: `Request` object
45
43
 
46
44
  ### Absolute URLs
47
45
 
@@ -63,6 +63,7 @@ it('should deploy default origin', async () => {
63
63
  it('should deploy properties', async () => {
64
64
  const manifest: Manifest = {}
65
65
  const instance = { locator, manifest } as unknown as Instance
66
+
66
67
  const properties: Properties = {
67
68
  '.http': {
68
69
  '/^http:\\/\\/\\w+api.example.com/': true
@@ -94,6 +95,7 @@ it('should deploy properties', async () => {
94
95
  it('should deploy properties with null manifest', async () => {
95
96
  const manifest: Manifest = null
96
97
  const instance = { locator, manifest } as unknown as Instance
98
+
97
99
  const properties: Properties = {
98
100
  '.http': {
99
101
  '/^http:\\/\\/\\w+api.example.com/': true
@@ -1,7 +1,5 @@
1
1
  'use strict'
2
2
 
3
- const fetch = require('node-fetch')
4
-
5
3
  const { Connector } = require('@toa.io/core')
6
4
  const { retry } = require('@toa.io/generic')
7
5