@cascateer/sterio 1.0.1 → 1.0.2
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 +1 -1
- package/src/api/runtime.ts +4 -4
- package/src/api/servers.ts +1 -1
- package/src/api/tsconfig.json +0 -22
package/package.json
CHANGED
package/src/api/runtime.ts
CHANGED
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
* Do not edit the class manually.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import { of } from 'rxjs';
|
|
15
14
|
import type { Observable } from 'rxjs';
|
|
16
|
-
import {
|
|
15
|
+
import { of } from 'rxjs';
|
|
17
16
|
import type { AjaxConfig, AjaxResponse } from 'rxjs/ajax';
|
|
18
|
-
import {
|
|
17
|
+
import { ajax } from 'rxjs/ajax';
|
|
18
|
+
import { concatMap, map } from 'rxjs/operators';
|
|
19
19
|
import { servers } from './servers';
|
|
20
20
|
|
|
21
|
-
export const BASE_PATH = servers[0]
|
|
21
|
+
export const BASE_PATH = servers[0]?.getUrl() ?? "";
|
|
22
22
|
|
|
23
23
|
export interface ConfigurationParameters {
|
|
24
24
|
basePath?: string; // override base path
|
package/src/api/servers.ts
CHANGED
|
@@ -33,7 +33,7 @@ export class ServerConfiguration<T extends { [key: string]: string }> {
|
|
|
33
33
|
for (const key in this.variableConfiguration) {
|
|
34
34
|
if (this.variableConfiguration.hasOwnProperty(key)) {
|
|
35
35
|
const re = new RegExp("{" + key + "}","g");
|
|
36
|
-
replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]);
|
|
36
|
+
replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key] ?? "");
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
return replacedUrl;
|
package/src/api/tsconfig.json
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"declaration": true,
|
|
4
|
-
"target": "es5",
|
|
5
|
-
"module": "commonjs",
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"outDir": "dist",
|
|
8
|
-
"rootDir": ".",
|
|
9
|
-
"lib": [
|
|
10
|
-
"es6",
|
|
11
|
-
"dom",
|
|
12
|
-
"es2017"
|
|
13
|
-
],
|
|
14
|
-
"typeRoots": [
|
|
15
|
-
"node_modules/@types"
|
|
16
|
-
]
|
|
17
|
-
},
|
|
18
|
-
"exclude": [
|
|
19
|
-
"dist",
|
|
20
|
-
"node_modules"
|
|
21
|
-
]
|
|
22
|
-
}
|