cloud-cost-cli 0.1.1 → 0.2.0
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/README.md +116 -122
- package/dist/bin/cloud-cost-cli.js +5 -2
- package/dist/src/analyzers/cost-estimator.d.ts +14 -0
- package/dist/src/analyzers/cost-estimator.js +74 -16
- package/dist/src/analyzers/pricing-service.d.ts +38 -0
- package/dist/src/analyzers/pricing-service.js +263 -0
- package/dist/src/commands/scan.d.ts +3 -0
- package/dist/src/commands/scan.js +173 -86
- package/dist/src/providers/azure/client.d.ts +20 -0
- package/dist/src/providers/azure/client.js +41 -0
- package/dist/src/providers/azure/disks.d.ts +4 -0
- package/dist/src/providers/azure/disks.js +87 -0
- package/dist/src/providers/azure/index.d.ts +6 -0
- package/dist/src/providers/azure/index.js +15 -0
- package/dist/src/providers/azure/public-ips.d.ts +3 -0
- package/dist/src/providers/azure/public-ips.js +47 -0
- package/dist/src/providers/azure/sql.d.ts +4 -0
- package/dist/src/providers/azure/sql.js +134 -0
- package/dist/src/providers/azure/storage.d.ts +8 -0
- package/dist/src/providers/azure/storage.js +100 -0
- package/dist/src/providers/azure/vms.d.ts +4 -0
- package/dist/src/providers/azure/vms.js +164 -0
- package/dist/src/reporters/table.js +3 -1
- package/dist/src/utils/formatter.d.ts +2 -0
- package/dist/src/utils/formatter.js +29 -1
- package/docs/RELEASE.md +14 -25
- package/package.json +12 -2
package/docs/RELEASE.md
CHANGED
|
@@ -4,31 +4,20 @@ This document describes how to publish a new version of cloud-cost-cli.
|
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
7
|
-
###
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- The token itself is still secure (stored in GitHub Secrets)
|
|
22
|
-
4. Click **"Generate Token"**
|
|
23
|
-
5. Copy the token (starts with `npm_...`)
|
|
24
|
-
|
|
25
|
-
### 2. Add Token to GitHub Secrets
|
|
26
|
-
|
|
27
|
-
1. Go to https://github.com/vuhp/cloud-cost-cli/settings/secrets/actions
|
|
28
|
-
2. Click **"New repository secret"** (or edit existing `NPM_TOKEN`)
|
|
29
|
-
3. Name: `NPM_TOKEN`
|
|
30
|
-
4. Value: (paste the `npm_...` token with 2FA disabled)
|
|
31
|
-
5. Click **"Add secret"** or **"Update secret"**
|
|
7
|
+
### npm Trusted Publishing (OIDC)
|
|
8
|
+
|
|
9
|
+
This project uses **npm trusted publishing** via GitHub Actions. No npm token is required!
|
|
10
|
+
|
|
11
|
+
**Configuration:**
|
|
12
|
+
- Already configured on npm for this package
|
|
13
|
+
- GitHub Actions is set as a trusted publisher
|
|
14
|
+
- Publishing happens automatically via OIDC (OpenID Connect)
|
|
15
|
+
|
|
16
|
+
**Benefits:**
|
|
17
|
+
- ✅ No tokens to rotate or secure
|
|
18
|
+
- ✅ No 2FA required for automation
|
|
19
|
+
- ✅ More secure (GitHub's identity proves authenticity)
|
|
20
|
+
- ✅ Automatic provenance statements
|
|
32
21
|
|
|
33
22
|
## Steps to Release
|
|
34
23
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloud-cost-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Optimize your cloud spend in seconds",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
"dev": "tsx bin/cloud-cost-cli.ts",
|
|
11
11
|
"build": "tsc",
|
|
12
12
|
"test": "vitest",
|
|
13
|
+
"test:ui": "vitest --ui",
|
|
14
|
+
"test:coverage": "vitest --coverage",
|
|
13
15
|
"lint": "eslint src/**/*.ts",
|
|
14
16
|
"format": "prettier --write src/**/*.ts"
|
|
15
17
|
},
|
|
@@ -46,9 +48,16 @@
|
|
|
46
48
|
"@aws-sdk/client-cost-explorer": "^3.712.0",
|
|
47
49
|
"@aws-sdk/client-ec2": "^3.712.0",
|
|
48
50
|
"@aws-sdk/client-elastic-load-balancing-v2": "^3.712.0",
|
|
51
|
+
"@aws-sdk/client-pricing": "^3.980.0",
|
|
49
52
|
"@aws-sdk/client-rds": "^3.712.0",
|
|
50
53
|
"@aws-sdk/client-s3": "^3.712.0",
|
|
51
54
|
"@aws-sdk/credential-providers": "^3.712.0",
|
|
55
|
+
"@azure/arm-compute": "^23.3.0",
|
|
56
|
+
"@azure/arm-monitor": "^7.0.0",
|
|
57
|
+
"@azure/arm-network": "^35.0.0",
|
|
58
|
+
"@azure/arm-sql": "^10.0.0",
|
|
59
|
+
"@azure/arm-storage": "^19.1.0",
|
|
60
|
+
"@azure/identity": "^4.13.0",
|
|
52
61
|
"chalk": "^5.3.0",
|
|
53
62
|
"cli-table3": "^0.6.5",
|
|
54
63
|
"commander": "^12.1.0",
|
|
@@ -60,10 +69,11 @@
|
|
|
60
69
|
"@types/node": "^22.10.5",
|
|
61
70
|
"@typescript-eslint/eslint-plugin": "^8.19.1",
|
|
62
71
|
"@typescript-eslint/parser": "^8.19.1",
|
|
72
|
+
"@vitest/ui": "^1.6.1",
|
|
63
73
|
"eslint": "^8.57.1",
|
|
64
74
|
"prettier": "^3.4.2",
|
|
65
75
|
"tsx": "^4.19.2",
|
|
66
76
|
"typescript": "^5.7.3",
|
|
67
|
-
"vitest": "^1.6.
|
|
77
|
+
"vitest": "^1.6.1"
|
|
68
78
|
}
|
|
69
79
|
}
|