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

@clevercloud/client

Package Overview
Dependencies
Maintainers
11
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clevercloud/client - npm Package Compare versions

Comparing version 8.1.0 to 8.1.1

27

cjs/api/v4/instance.js

@@ -6,4 +6,4 @@ "use strict";

});
exports.getApplicationDeploymentInstances = getApplicationDeploymentInstances;
exports.getApplicationInstances = getApplicationInstances;
exports.getInstance = getInstance;

@@ -13,7 +13,6 @@ var _pickNonNull = require("../../pick-non-null.js");

/**
* GET /orchestration/organisations/{ownerId}/applications/{applicationId}/deployments/{deploymentId}/instances
* GET /orchestration/organisations/{ownerId}/applications/{applicationId}/instances
* @param {Object} params
* @param {String} params.undefined
* @param {String} params.undefined
* @param {String} params.undefined
* @param {String} params.since

@@ -27,7 +26,7 @@ * @param {String} params.until

*/
function getApplicationDeploymentInstances(params) {
function getApplicationInstances(params) {
// no multipath for /self or /organisations/{id}
return Promise.resolve({
method: 'get',
url: `/v4/orchestration/organisations/${params.ownerId}/applications/${params.applicationId}/deployments/${params.deploymentId}/instances`,
url: `/v4/orchestration/organisations/${params.ownerId}/applications/${params.applicationId}/instances`,
headers: {

@@ -41,27 +40,21 @@ Accept: 'application/json'

/**
* GET /orchestration/organisations/{ownerId}/applications/{applicationId}/instances
* GET /orchestration/organisations/{ownerId}/applications/{applicationId}/instances/{instanceId}
* @param {Object} params
* @param {String} params.undefined
* @param {String} params.undefined
* @param {String} params.since
* @param {String} params.until
* @param {String} params.excludeDeleted
* @param {String} params.includeState
* @param {String} params.excludeState
* @param {String} params.limit
* @param {String} params.order
* @param {String} params.undefined
*/
function getApplicationInstances(params) {
function getInstance(params) {
// no multipath for /self or /organisations/{id}
return Promise.resolve({
method: 'get',
url: `/v4/orchestration/organisations/${params.ownerId}/applications/${params.applicationId}/instances`,
url: `/v4/orchestration/organisations/${params.ownerId}/applications/${params.applicationId}/instances/${params.instanceId}`,
headers: {
Accept: 'application/json'
},
queryParams: (0, _pickNonNull.pickNonNull)(params, ['since', 'until', 'excludeDeleted', 'includeState', 'excludeState', 'limit', 'order']) // no body
} // no query params
// no body
});
}

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

* compute full URL with query params
* @returns {string}
* @returns {URL}
*/

@@ -69,3 +69,3 @@

getUrl() {
const url = this.buildUrl(`/v4/logs/organisations/${this._ownerId}/applications/${this._appId}/logs`, { ...this._options,
return this.buildUrl(`/v4/logs/organisations/${this._ownerId}/applications/${this._appId}/logs`, { ...this._options,
// in case of pause() then resume():

@@ -75,3 +75,2 @@ // we don' t want N another logs, we want the initial passed number less the events count already received

});
return url;
} // compute the number of events to retrieve, based on elements already received

@@ -78,0 +77,0 @@

@@ -81,7 +81,7 @@ "use strict";

});
return url.toString();
return url;
}
/**
* ABSTRACT compute full URL with query params
* @returns {string}
* @returns {URL}
*/

@@ -115,5 +115,7 @@

try {
const url = this.getUrl();
let requestParams = {
method: 'get',
url: this.getUrl()
url: url.origin + url.pathname,
queryParams: Object.entries(url.searchParams)
};

@@ -120,0 +122,0 @@

import { pickNonNull } from '../../pick-non-null.js';
/**
* GET /orchestration/organisations/{ownerId}/applications/{applicationId}/deployments/{deploymentId}/instances
* GET /orchestration/organisations/{ownerId}/applications/{applicationId}/instances
* @param {Object} params
* @param {String} params.undefined
* @param {String} params.undefined
* @param {String} params.undefined
* @param {String} params.since

@@ -17,7 +16,7 @@ * @param {String} params.until

*/
export function getApplicationDeploymentInstances(params) {
export function getApplicationInstances(params) {
// no multipath for /self or /organisations/{id}
return Promise.resolve({
method: 'get',
url: `/v4/orchestration/organisations/${params.ownerId}/applications/${params.applicationId}/deployments/${params.deploymentId}/instances`,
url: `/v4/orchestration/organisations/${params.ownerId}/applications/${params.applicationId}/instances`,
headers: { Accept: 'application/json' },

@@ -30,23 +29,17 @@ queryParams: pickNonNull(params, ['since', 'until', 'excludeDeleted', 'includeState', 'excludeState', 'limit', 'order']),

/**
* GET /orchestration/organisations/{ownerId}/applications/{applicationId}/instances
* GET /orchestration/organisations/{ownerId}/applications/{applicationId}/instances/{instanceId}
* @param {Object} params
* @param {String} params.undefined
* @param {String} params.undefined
* @param {String} params.since
* @param {String} params.until
* @param {String} params.excludeDeleted
* @param {String} params.includeState
* @param {String} params.excludeState
* @param {String} params.limit
* @param {String} params.order
* @param {String} params.undefined
*/
export function getApplicationInstances(params) {
export function getInstance(params) {
// no multipath for /self or /organisations/{id}
return Promise.resolve({
method: 'get',
url: `/v4/orchestration/organisations/${params.ownerId}/applications/${params.applicationId}/instances`,
url: `/v4/orchestration/organisations/${params.ownerId}/applications/${params.applicationId}/instances/${params.instanceId}`,
headers: { Accept: 'application/json' },
queryParams: pickNonNull(params, ['since', 'until', 'excludeDeleted', 'includeState', 'excludeState', 'limit', 'order']),
// no query params
// no body
});
}

@@ -48,6 +48,6 @@ import CleverCloudSse from './clever-cloud-sse.js';

* compute full URL with query params
* @returns {string}
* @returns {URL}
*/
getUrl () {
const url = this.buildUrl(
return this.buildUrl(
`/v4/logs/organisations/${this._ownerId}/applications/${this._appId}/logs`,

@@ -61,4 +61,2 @@ {

);
return url;
}

@@ -65,0 +63,0 @@

@@ -76,3 +76,3 @@ import { CustomEventTarget } from './custom-event-target.js';

return url.toString();
return url;
}

@@ -82,3 +82,3 @@

* ABSTRACT compute full URL with query params
* @returns {string}
* @returns {URL}
*/

@@ -109,3 +109,8 @@ getUrl () {

let requestParams = { method: 'get', url: this.getUrl() };
const url = this.getUrl();
let requestParams = {
method: 'get',
url: url.origin + url.pathname,
queryParams: Object.entries(url.searchParams),
};
if (this._tokens != null) {

@@ -112,0 +117,0 @@ requestParams = await addOauthHeader(this._tokens)(requestParams);

{
"name": "@clevercloud/client",
"version": "8.1.0",
"version": "8.1.1",
"description": "JavaScript REST client and utils for Clever Cloud's API",

@@ -29,3 +29,3 @@ "homepage": "https://github.com/CleverCloud/clever-client.js",

"lint:fix": "eslint --fix esm tasks/*.cjs test",
"prepack": "npm run lint && npm run test-wtr && npm run generate-client",
"prepack": "npm run lint && npm run generate-client",
"test-wtr": "web-test-runner",

@@ -32,0 +32,0 @@ "test-wtr:watch": "web-test-runner --watch",

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