@commercetools-frontend/deployment-cli 0.0.0-FEC-212-react19-20250122084835

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) commercetools GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # @commercetools-frontend/deployment-cli
2
+
3
+ > This is a CLI used internally for Merchant Center applications. We do not provide any guarantees or support for the functionality.
4
+
5
+ This CLI provides useful commands to trigger deployments through CircleCI to different cloud environment.
6
+
7
+ ## Usage
8
+
9
+ > Please make sure you have Node.js v14 or higher installed.
10
+
11
+ The CLI relies on certain configuration which has to be specified in a `deployment` [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) file for example `deployment.config.cjs` to facilitate interaction with the CircleCI API.
12
+
13
+ Each of the fields in the example are required to run commands successfully:
14
+
15
+ ```js
16
+ module.exports = {
17
+ CircleCI: {
18
+ projectName: 'merchant-center-application',
19
+ },
20
+ };
21
+ ```
22
+
23
+ Other fields exist but they are defaulted to minimize what values have to be specified:
24
+
25
+ ```js
26
+ module.exports = {
27
+ CircleCI: {
28
+ apiBaseUrl: 'https://circleci.com/api/v2',
29
+ deploymentWorkflowName: 'test_build_and_deploy',
30
+ pagination: {
31
+ maxPages: 42,
32
+ pagesForPipelineSelection: 5,
33
+ },
34
+ deployments: {
35
+ 'my-deployment-name': {
36
+ jobs: {
37
+ approval: 'approval-job-name',
38
+ deployment: 'deploymnet-job-name',
39
+ },
40
+ },
41
+ },
42
+ },
43
+ };
44
+ ```
45
+
46
+ ### Command: `approve`
47
+
48
+ This command interacts with the CircleCI API and triggers a deployment by approving it.
49
+
50
+ ```bash
51
+ pnpm deployment-cli approve --approval-job=can_d_p_a-my-deployment-name
52
+ ```
53
+
54
+ If a `deployments` config property is specified you can reference by:
55
+
56
+ ```bash
57
+ pnpm deployment-cli approve --deployment=my-deployment-name
58
+ ```
59
+
60
+ where `products` is a name of a deployment you configured in your configuration with `approval` and `deployment` (optional) configured on the `jobs` property.
package/bin/cli.js ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { exit } = require('node:process');
4
+ const { run } = require('@commercetools-frontend/deployment-cli/cli');
5
+
6
+ run().catch((error) => {
7
+ console.error(error.message || error.stack || error);
8
+ exit(1);
9
+ });
@@ -0,0 +1,2 @@
1
+ export * from "../../dist/declarations/src/cli.js";
2
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWVyY2V0b29scy1mcm9udGVuZC1kZXBsb3ltZW50LWNsaS1jbGkuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9kaXN0L2RlY2xhcmF0aW9ucy9zcmMvY2xpLmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==