@osaas/client-core
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -5,2 +5,3 @@ import { Context } from './context'; | ||
export declare function getInstance(context: Context, serviceId: string, name: string, token: string): Promise<any>; | ||
export declare function listInstances(context: Context, serviceId: string, token: string): Promise<any>; | ||
//# sourceMappingURL=core.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getInstance = exports.removeInstance = exports.createInstance = void 0; | ||
exports.listInstances = exports.getInstance = exports.removeInstance = exports.createInstance = void 0; | ||
const fetch_1 = require("./fetch"); | ||
@@ -58,2 +58,14 @@ async function getService(context, serviceId) { | ||
exports.getInstance = getInstance; | ||
async function listInstances(context, serviceId, token) { | ||
const service = await getService(context, serviceId); | ||
const instanceUrl = new URL(service.apiUrl); | ||
return await (0, fetch_1.createFetch)(instanceUrl, { | ||
method: 'GET', | ||
headers: { | ||
'x-jwt': `Bearer ${token}`, | ||
'Content-Type': 'application/json' | ||
} | ||
}); | ||
} | ||
exports.listInstances = listInstances; | ||
//# sourceMappingURL=core.js.map |
export { Log } from './log'; | ||
export { createFetch } from './fetch'; | ||
export { Context } from './context'; | ||
export { createInstance, removeInstance, getInstance } from './core'; | ||
export { createInstance, removeInstance, getInstance, listInstances } from './core'; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getInstance = exports.removeInstance = exports.createInstance = exports.Context = exports.createFetch = exports.Log = void 0; | ||
exports.listInstances = exports.getInstance = exports.removeInstance = exports.createInstance = exports.Context = exports.createFetch = exports.Log = void 0; | ||
var log_1 = require("./log"); | ||
@@ -14,2 +14,3 @@ Object.defineProperty(exports, "Log", { enumerable: true, get: function () { return log_1.Log; } }); | ||
Object.defineProperty(exports, "getInstance", { enumerable: true, get: function () { return core_1.getInstance; } }); | ||
Object.defineProperty(exports, "listInstances", { enumerable: true, get: function () { return core_1.listInstances; } }); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@osaas/client-core", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Open Source Cloud Client SDK core library", | ||
@@ -33,3 +33,3 @@ "author": "Eyevinn Technology <work@eyevinn.se>", | ||
}, | ||
"gitHead": "e30e62d860ef0917bbc0c4bd5acc4d92fb008386" | ||
"gitHead": "71d6b915ca0ff5bfdcc1a0886ed7c9f816343fa1" | ||
} |
# @osaas/client-core | ||
## Usage | ||
### Launch a Chaos Stream Proxy | ||
@@ -52,2 +52,2 @@ | ||
} | ||
``` | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
26683
348
53