@opra/client 0.17.3 → 0.18.1
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/cjs/http/http-client.js
CHANGED
|
@@ -46,8 +46,11 @@ class OpraHttpClient {
|
|
|
46
46
|
headers: new common_1.HttpHeaders({ 'accept': 'application/json' })
|
|
47
47
|
})));
|
|
48
48
|
return await promise
|
|
49
|
-
.then(body =>
|
|
50
|
-
|
|
49
|
+
.then(async (body) => {
|
|
50
|
+
const api = await common_1.DocumentFactory.createDocument(body);
|
|
51
|
+
this[kAssets].api = api;
|
|
52
|
+
return api;
|
|
53
|
+
})
|
|
51
54
|
.catch((e) => {
|
|
52
55
|
e.message = 'Unable to fetch metadata from ' + this.serviceUrl + '. ' + e.message;
|
|
53
56
|
throw e;
|
package/esm/http/http-client.js
CHANGED
|
@@ -43,8 +43,11 @@ export class OpraHttpClient {
|
|
|
43
43
|
headers: new HttpHeaders({ 'accept': 'application/json' })
|
|
44
44
|
})));
|
|
45
45
|
return await promise
|
|
46
|
-
.then(body =>
|
|
47
|
-
|
|
46
|
+
.then(async (body) => {
|
|
47
|
+
const api = await DocumentFactory.createDocument(body);
|
|
48
|
+
this[kAssets].api = api;
|
|
49
|
+
return api;
|
|
50
|
+
})
|
|
48
51
|
.catch((e) => {
|
|
49
52
|
e.message = 'Unable to fetch metadata from ' + this.serviceUrl + '. ' + e.message;
|
|
50
53
|
throw e;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opra/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"description": "Opra Client package",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"compile": "tsc",
|
|
14
14
|
"prebuild": "npm run check && npm run lint && npm run clean",
|
|
15
|
-
"build": "npm run build:cjs && npm run build:esm",
|
|
15
|
+
"build": "npm run build:cjs && npm run build:esm && npm run build:browser",
|
|
16
16
|
"build:cjs": "tsc -b tsconfig-build-cjs.json",
|
|
17
17
|
"build:esm": "tsc -b tsconfig-build-esm.json",
|
|
18
18
|
"build:browser": "node esbuild.mjs",
|
|
@@ -33,13 +33,10 @@
|
|
|
33
33
|
"types": "./types/index.d.ts",
|
|
34
34
|
"typings": "./types/index.d.ts",
|
|
35
35
|
"exports": {
|
|
36
|
-
"./package.json": {
|
|
37
|
-
"default": "./package.json"
|
|
38
|
-
},
|
|
39
36
|
".": {
|
|
40
37
|
"require": "./cjs/index.js",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
38
|
+
"browser": "./browser.js",
|
|
39
|
+
"default": "./esm/index.js"
|
|
43
40
|
}
|
|
44
41
|
},
|
|
45
42
|
"dependencies": {
|
|
@@ -50,7 +47,7 @@
|
|
|
50
47
|
"@browsery/i18next": "^0.5.0",
|
|
51
48
|
"@browsery/stream": "^0.4.0",
|
|
52
49
|
"@browsery/util": "^0.4.0",
|
|
53
|
-
"@opra/common": "^0.
|
|
50
|
+
"@opra/common": "^0.18.1",
|
|
54
51
|
"accepts": "^1.3.8",
|
|
55
52
|
"buffer": "^6.0.3",
|
|
56
53
|
"cookie": "^0.5.0",
|