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

@adobe/aio-lib-cloudmanager

Package Overview
Dependencies
Maintainers
18
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adobe/aio-lib-cloudmanager - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

test/commerce.test.js

7

CHANGELOG.md
# Changelog
# [1.2.0](https://github.com/adobe/aio-lib-cloudmanager/compare/1.1.1...1.2.0) (2021-07-27)
### Features
* **commerce:** added postCommerceCLICommand. fixes [#177](https://github.com/adobe/aio-lib-cloudmanager/issues/177) ([#184](https://github.com/adobe/aio-lib-cloudmanager/issues/184)) ([26e8c91](https://github.com/adobe/aio-lib-cloudmanager/commit/26e8c9196572cacd578980a1def02a6926f7bb3e))
## [1.1.1](https://github.com/adobe/aio-lib-cloudmanager/compare/1.1.0...1.1.1) (2021-06-30)

@@ -4,0 +11,0 @@

16

package.json
{
"name": "@adobe/aio-lib-cloudmanager",
"version": "1.1.1",
"version": "1.2.0",
"description": "Adobe I/O Cloud Manager Library",

@@ -39,15 +39,15 @@ "repository": {

"@adobe/eslint-config-aio-lib-config": "1.2.1",
"@commitlint/cli": "12.1.4",
"@commitlint/config-conventional": "12.1.4",
"@commitlint/cli": "13.1.0",
"@commitlint/config-conventional": "13.1.0",
"@semantic-release/changelog": "5.0.1",
"@semantic-release/git": "9.0.0",
"codecov": "3.8.2",
"codecov": "3.8.3",
"del": "6.0.0",
"dotenv": "10.0.0",
"eol": "0.9.1",
"eslint": "7.29.0",
"eslint": "7.31.0",
"eslint-config-standard": "16.0.3",
"eslint-plugin-import": "2.23.4",
"eslint-plugin-jest": "24.3.6",
"eslint-plugin-jsdoc": "35.4.1",
"eslint-plugin-jest": "24.4.0",
"eslint-plugin-jsdoc": "36.0.4",
"eslint-plugin-node": "11.1.0",

@@ -66,3 +66,3 @@ "eslint-plugin-promise": "5.1.0",

"semantic-release": "17.4.4",
"sinon": "11.1.1",
"sinon": "11.1.2",
"stdout-stderr": "0.1.13",

@@ -69,0 +69,0 @@ "tsd-jsdoc": "2.5.0"

@@ -177,2 +177,3 @@ <!--

* [.removeIpAllowlistBinding(programId, ipAllowlistId, environmentId, service)](#CloudManagerAPI+removeIpAllowlistBinding) ⇒ <code>Promise.&lt;object&gt;</code>
* [.postCommerceCommandExecution(programId, environmentId, options)](#CloudManagerAPI+postCommerceCommandExecution) ⇒ <code>Promise.&lt;object&gt;</code>

@@ -625,2 +626,16 @@ <a name="CloudManagerAPI+orgId"></a>

<a name="CloudManagerAPI+postCommerceCommandExecution"></a>
### cloudManagerAPI.postCommerceCommandExecution(programId, environmentId, options) ⇒ <code>Promise.&lt;object&gt;</code>
Make a Post to Commerce API
**Kind**: instance method of [<code>CloudManagerAPI</code>](#CloudManagerAPI)
**Returns**: <code>Promise.&lt;object&gt;</code> - a truthy value
| Param | Type | Description |
| --- | --- | --- |
| programId | <code>string</code> | the program id |
| environmentId | <code>string</code> | the environment id |
| options | <code>object</code> | options |
<a name="getCurrentStep"></a>

@@ -627,0 +642,0 @@

@@ -32,2 +32,3 @@ /*

ipAllowlistBindings: 'http://ns.adobe.com/adobecloud/rel/ipAllowlistBindings',
commerceCommandExecution: 'http://ns.adobe.com/adobecloud/rel/commerceCommandExecution',
},

@@ -34,0 +35,0 @@ config: {

@@ -1228,2 +1228,23 @@ /*

}
/**
* Make a Post to Commerce API
*
* @param {string} programId - the program id
* @param {string} environmentId - the environment id
* @param {object} options - options
* @returns {Promise<object>} a truthy value
*/
async postCommerceCommandExecution (programId, environmentId, options) {
const environment = await this._findEnvironment(programId, environmentId)
const link = environment.link(rels.commerceCommandExecution)
if (!link) {
throw new codes.ERROR_COMMERCE_CLI({ messageValues: environmentId })
}
return this._post(link.href, options, codes.ERROR_POST_COMMERCE_CLI).then(async (res) => {
return halfred.parse(await res.json())
}, e => {
throw e
})
}
}

@@ -1230,0 +1251,0 @@

@@ -107,1 +107,3 @@ /*

E('ERROR_STEP_STATE_NOT_RUNNING', 'The %s step in execution %s is not currently running.')
E('ERROR_POST_COMMERCE_CLI', 'Could not post to Commerce CLI endpoint: %s')
E('ERROR_COMMERCE_CLI', 'Environment %s does not appear to support Commerce CLI')

@@ -249,2 +249,5 @@ /*

},
'http://ns.adobe.com/adobecloud/rel/commerceCommandExecution': {
href: '/api/program/4/environment/3/runtime/commerce/cli/',
},
},

@@ -266,2 +269,5 @@ id: '3',

},
'http://ns.adobe.com/adobecloud/rel/commerceCommandExecution': {
href: '/api/program/4/environment/10/runtime/commerce/cli/',
},
},

@@ -1643,2 +1649,10 @@ id: '10',

fetchMock.mock('https://cloudmanager.adobe.io/api/program/9/ipAllowlists', 400)
mockResponseWithMethod('https://cloudmanager.adobe.io/api/program/4/environment/10/runtime/commerce/cli/', 'POST', {
status: 201,
data: {
test: 'test success data',
},
})
fetchMock.mock('https://cloudmanager.adobe.io/api/program/4/environment/3/runtime/commerce/cli/', 403)
})

@@ -285,2 +285,10 @@ /**

removeIpAllowlistBinding(programId: string, ipAllowlistId: string, environmentId: string, service: string): Promise<object>;
/**
* Make a Post to Commerce API
* @param programId - the program id
* @param environmentId - the environment id
* @param options - options
* @returns a truthy value
*/
postCommerceCommandExecution(programId: string, environmentId: string, options: any): Promise<object>;
}

@@ -287,0 +295,0 @@

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