New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@osaas/client-core

Package Overview
Dependencies
Maintainers
0
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@osaas/client-core - npm Package Compare versions

Comparing version 0.12.0 to 0.13.0

1

lib/core.d.ts

@@ -76,2 +76,3 @@ import { Context, Service } from './context';

export declare function getLogsForInstance(context: Context, serviceId: string, name: string, token: string): Promise<string[]>;
export declare function getInstanceHealth(context: Context, serviceId: string, name: string, token: string): Promise<string>;
export declare function instanceValue(instance: {

@@ -78,0 +79,0 @@ [key: string]: string;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.valueOrSecret = exports.instanceValue = exports.getLogsForInstance = exports.getPortsForInstance = exports.listInstances = exports.getInstance = exports.removeInstance = exports.createInstance = exports.getService = void 0;
exports.valueOrSecret = exports.instanceValue = exports.getInstanceHealth = exports.getLogsForInstance = exports.getPortsForInstance = exports.listInstances = exports.getInstance = exports.removeInstance = exports.createInstance = exports.getService = void 0;
const errors_1 = require("./errors");

@@ -173,2 +173,15 @@ const fetch_1 = require("./fetch");

exports.getLogsForInstance = getLogsForInstance;
async function getInstanceHealth(context, serviceId, name, token) {
const service = await getService(context, serviceId);
const instanceUrl = new URL(service.apiUrl);
const healthUrl = new URL('/health/' + name, instanceUrl);
const { status } = await (0, fetch_1.createFetch)(healthUrl, {
method: 'GET',
headers: {
'x-jwt': `Bearer ${token}`
}
});
return status;
}
exports.getInstanceHealth = getInstanceHealth;
function instanceValue(instance, key) {

@@ -175,0 +188,0 @@ return instance[key].match(/^{{secrets}}/) ? '***' : instance[key];

2

lib/index.d.ts

@@ -6,3 +6,3 @@ /** @module @osaas/client-core */

export { Platform } from './platform';
export { createInstance, removeInstance, getInstance, listInstances, getPortsForInstance, getLogsForInstance, instanceValue, valueOrSecret } from './core';
export { createInstance, removeInstance, getInstance, listInstances, getPortsForInstance, getLogsForInstance, getInstanceHealth, instanceValue, valueOrSecret } from './core';
export { listSubscriptions, removeSubscription, Subscription } from './admin';

@@ -9,0 +9,0 @@ export { createJob, removeJob, getJob, listJobs, waitForJobToComplete } from './job';

@@ -17,3 +17,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.waitForJobToComplete = exports.listJobs = exports.getJob = exports.removeJob = exports.createJob = exports.removeSubscription = exports.listSubscriptions = exports.valueOrSecret = exports.instanceValue = exports.getLogsForInstance = exports.getPortsForInstance = exports.listInstances = exports.getInstance = exports.removeInstance = exports.createInstance = exports.Platform = exports.Context = exports.FetchError = exports.createFetch = exports.Log = void 0;
exports.waitForJobToComplete = exports.listJobs = exports.getJob = exports.removeJob = exports.createJob = exports.removeSubscription = exports.listSubscriptions = exports.valueOrSecret = exports.instanceValue = exports.getInstanceHealth = exports.getLogsForInstance = exports.getPortsForInstance = exports.listInstances = exports.getInstance = exports.removeInstance = exports.createInstance = exports.Platform = exports.Context = exports.FetchError = exports.createFetch = exports.Log = void 0;
/** @module @osaas/client-core */

@@ -36,2 +36,3 @@ var log_1 = require("./log");

Object.defineProperty(exports, "getLogsForInstance", { enumerable: true, get: function () { return core_1.getLogsForInstance; } });
Object.defineProperty(exports, "getInstanceHealth", { enumerable: true, get: function () { return core_1.getInstanceHealth; } });
Object.defineProperty(exports, "instanceValue", { enumerable: true, get: function () { return core_1.instanceValue; } });

@@ -38,0 +39,0 @@ Object.defineProperty(exports, "valueOrSecret", { enumerable: true, get: function () { return core_1.valueOrSecret; } });

{
"name": "@osaas/client-core",
"version": "0.12.0",
"version": "0.13.0",
"description": "Open Source Cloud Client SDK core library",

@@ -34,3 +34,3 @@ "author": "Eyevinn Technology <work@eyevinn.se>",

},
"gitHead": "f5a8f8f3b1e0ce49eb00179630863cf4c98b5628"
"gitHead": "d0ef7ce52a72e22dd0e57fd69307d7003d19dc18"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc