@toa.io/pointer 0.20.0-dev.17 → 0.20.0-dev.19

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/pointer",
3
- "version": "0.20.0-dev.17",
3
+ "version": "0.20.0-dev.19",
4
4
  "description": "Toa Pointer",
5
5
  "homepage": "https://toa.io",
6
6
  "author": {
@@ -22,11 +22,12 @@
22
22
  "access": "public"
23
23
  },
24
24
  "main": "source/index.js",
25
+ "types": "types/index.d.ts",
25
26
  "dependencies": {
26
- "@toa.io/console": "0.20.0-dev.17",
27
- "@toa.io/generic": "0.20.0-dev.17",
28
- "@toa.io/schemas": "0.20.0-dev.17",
29
- "@toa.io/yaml": "0.20.0-dev.17"
27
+ "@toa.io/console": "0.20.0-dev.19",
28
+ "@toa.io/generic": "0.20.0-dev.19",
29
+ "@toa.io/schemas": "0.20.0-dev.19",
30
+ "@toa.io/yaml": "0.20.0-dev.19"
30
31
  },
31
- "gitHead": "cafb719d8e80d3e78a00904dc6ab6d6b0d5b568b"
32
+ "gitHead": "e10214f746cf4fc699af42dba90e099487177a43"
32
33
  }
@@ -0,0 +1,27 @@
1
+ import { Locator } from '@toa.io/core/types'
2
+
3
+ declare namespace toa.pointer {
4
+
5
+ namespace uris {
6
+
7
+ type Node = string | {
8
+ [key: string]: Node
9
+ }
10
+
11
+ type Resolution = {
12
+ url: URL
13
+ entry: string
14
+ }
15
+
16
+ type Resolver = (locator: Locator, uris: URIs) => Resolution
17
+
18
+ }
19
+
20
+ type URIs = string | {
21
+ default?: string
22
+ [key: string]: uris.Node
23
+ }
24
+
25
+ }
26
+
27
+ export type URIs = toa.pointer.URIs
@@ -0,0 +1 @@
1
+ export * as uris from './uris'
package/types/uris.d.ts CHANGED
@@ -1,27 +1,19 @@
1
- import { Locator } from '@toa.io/core/types'
1
+ import type { Locator } from '@toa.io/core'
2
2
 
3
- declare namespace toa.pointer {
3
+ export function construct (declaration: URIs | string): URIs
4
4
 
5
- namespace uris {
5
+ export function resolve (locator: Locator, uris: URIs): Resolution
6
6
 
7
- type Node = string | {
8
- [key: string]: Node
9
- }
10
-
11
- type Resolution = {
12
- url: URL
13
- entry: string
14
- }
15
-
16
- type Resolver = (locator: Locator, uris: URIs) => Resolution
17
-
18
- }
19
-
20
- type URIs = string | {
21
- default?: string
22
- [key: string]: uris.Node
23
- }
7
+ type Node = string | {
8
+ [key: string]: Node
9
+ }
24
10
 
11
+ type URIs = string | {
12
+ default?: string
13
+ [key: string]: Node
25
14
  }
26
15
 
27
- export type URIs = toa.pointer.URIs
16
+ type Resolution = {
17
+ url: URL
18
+ entry: string
19
+ }