Skip to content

Commit ee21eb3

Browse files
chore: release 4.8.12
1 parent c539cea commit ee21eb3

38 files changed

+1832
-131
lines changed

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017-2025 Carlos Alexandro Becker
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.

README.md

Lines changed: 102 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,135 +1,137 @@
1-
# Palette SDK TypeScript
1+
<p align="center">
2+
<img alt="svu Logo" src="https://becker.software/svu.png" height="300" />
3+
<p align="center">semantic version utility</p>
4+
</p>
25

3-
A TypeScript SDK for the Spectro Cloud Palette API. This package provides a comprehensive set of functions to manage Kubernetes clusters, applications, and cloud resources through the Palette API.
6+
<hr>
47

5-
> [!WARNING]
6-
> This is an experimental SDK and subject to change.
8+
<p align="center">
9+
<a href="https://github.com/caarlos0/svu/releases/latest"><img src="https://img.shields.io/github/release/caarlos0/svu.svg?style=for-the-badge" alt="Release"></a>
10+
<a href="/LICENSE.md"><img src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=for-the-badge" alt="Software License"></a>
11+
<a href="https://github.com/caarlos0/svu/actions?workflow=build"><img src="https://img.shields.io/github/actions/workflow/status/caarlos0/svu/build.yml?style=for-the-badge&branch=main" alt="Build status"></a>
12+
<a href="http://godoc.org/github.com/caarlos0/svu/v3"><img src="https://img.shields.io/badge/godoc-reference-blue.svg?style=for-the-badge" alt="Go Doc"></a>
13+
<a href="https://goreportcard.com/report/github.com/caarlos0/svu/v3"><img src="https://goreportcard.com/badge/github.com/caarlos0/svu/v3?style=for-the-badge" alt="GoReportCard"></a>
14+
<a href="https://conventionalcommits.org"><img src="https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=for-the-badge" alt="Conventional Commits"></a>
15+
</p>
716

8-
## Features
917

10-
- **Complete API Coverage**: All Palette API endpoints are supported
11-
- **Comprehensive TypeScript Support**: Full type definitions for all API requests and responses.
12-
- **No Type Casting Required**: Clean, typed API calls without `any` casting
13-
- **Fetch-based**: Built on the modern Fetch API
14-
- **Tree-shakable**: Import only the functions you need
18+
semantic version utility (svu) is a small helper for release scripts and workflows.
1519

16-
## Installation
20+
It provides utility commands and functions to increase specific portions of the version.
21+
It can also figure the next version out automatically by looking through the git history.
1722

18-
```bash
19-
npm install palette-sdk-typescript
20-
```
23+
> [!TIP]
24+
> Read [the spec][Semver] for more information.
2125
22-
> [!IMPORTANT]
23-
> This package is published as TypeScript source code. You'll need TypeScript in your project to use it. If you're using JavaScript, you may need to configure your build tools to handle TypeScript files.
26+
## usage
2427

25-
- Node.js 22 or higher
26-
- TypeScript 5.5 or higher
27-
- A Palette API key and project UID
28+
Check `svu --help` for the list of sub-commands and flags.
2829

29-
## Getting Started
30+
### `next`, `n`
3031

31-
### Authentication
32+
This is probably the command you'll use the most.
3233

33-
To use the Palette API, you need an API key. Check the [Create API Key](https://docs.spectrocloud.com/user-management/authentication/api-key/create-api-key/) guide for more information.
34+
It checks your `git log`, and automatically increases and returns the new
35+
version based on this table:
3436

35-
Set the API key as an environment variable:
37+
| Commit message | Tag increase |
38+
| -------------------------------------------------------------------------------------- | ------------ |
39+
| `chore: foo` | Nothing |
40+
| `fix: fixed something` | Patch |
41+
| `feat: added new button to do X` | Minor |
42+
| `fix: fixed thing xyz`<br><br>`BREAKING CHANGE: this will break users because of blah` | Major |
43+
| `fix!: fixed something` | Major |
44+
| `feat!: added blah` | Major |
3645

37-
```bash
38-
export PALETTE_API_KEY="your-api-key-here"
39-
export PROJECT_UID="your-project-uid-here"
46+
> [!TIP]
47+
> You can create an alias to create tags automatically:
48+
>
49+
> ```bash
50+
> alias gtn='git tag $(svu next)'
51+
> ```
52+
53+
## configuration
54+
55+
Every flag option can also be set in a `.svu.yml` in the current
56+
directory/repository root folder, for example:
57+
58+
```yaml
59+
tag.prefix: ""
60+
always: true
61+
v0: true
4062
```
4163
42-
### Usage
43-
44-
Import the specific API functions and types you need.
45-
46-
```typescript
47-
import {
48-
spectroClustersMetadataGet,
49-
setPaletteBaseUrl,
50-
getPaletteBaseUrl,
51-
type SpectroClustersMetadata,
52-
} from "palette-sdk-typescript";
53-
54-
// Configure authentication
55-
const config = {
56-
headers: {
57-
ApiKey: process.env.PALETTE_API_KEY,
58-
"Content-Type": "application/json",
59-
ProjectUID: process.env.PROJECT_UID, // Optional, for project-scoped requests
60-
},
61-
// Configure custom base URL (optional)
62-
// By default, the SDK uses https://api.spectrocloud.com
63-
baseUrl: "https://your-palette-host.com",
64-
};
65-
66-
// Get all clusters
67-
const response: SpectroClustersMetadata = await spectroClustersMetadataGet(
68-
{}, // no filter params provided in this example
69-
config
70-
);
71-
72-
if (response.items && response.items.length > 0) {
73-
console.log("First cluster metadata:", response.items[0]);
74-
}
64+
Names are the same as the flags themselves.
65+
66+
## install
67+
68+
[![Packaging status](https://repology.org/badge/vertical-allrepos/svu.svg)](https://repology.org/project/svu/versions)
69+
70+
<details>
71+
<summary>macOS</summary>
72+
73+
```bash
74+
brew install caarlos0/tap/svu
7575
```
7676

77-
If a project UID is not specified, then the Palette API will use the tenant scope. Keep this in mind when using the SDK. There may be some cases where you want to use the tenant scope.
77+
</details>
7878

79-
### Base URL Configuration
79+
<details>
80+
<summary>linux/apt</summary>
8081

81-
By default, the PaletteSDK targets `https://api.spectrocloud.com`. If you have a different Palette instance, such as a self-hosted Palette instance, you can configure the base URL.
82+
```bash
83+
echo 'deb [trusted=yes] https://apt.fury.io/caarlos0/ /' | sudo tee /etc/apt/sources.list.d/caarlos0.list
84+
sudo apt update
85+
sudo apt install svu
86+
```
87+
88+
</details>
8289

83-
```typescript
84-
const config = {
85-
headers: {
86-
ApiKey: process.env.PALETTE_API_KEY,
87-
"Content-Type": "application/json",
88-
ProjectUID: process.env.PROJECT_UID,
89-
},
90-
// Set custom base URL
91-
baseUrl: "https://your-palette-host.com",
92-
};
90+
<details>
91+
<summary>linux/yum</summary>
9392

94-
const response: SpectroClustersMetadata = await spectroClustersMetadataGet(
95-
{},
96-
config
97-
);
93+
```bash
94+
echo '[caarlos0]
95+
name=caarlos0
96+
baseurl=https://yum.fury.io/caarlos0/
97+
enabled=1
98+
gpgcheck=0' | sudo tee /etc/yum.repos.d/caarlos0.repo
99+
sudo yum install svu
98100
```
99101

100-
The SDK will now use your custom URL(`https://your-palette-host.com`) for all API calls.
102+
</details>
103+
104+
<details>
105+
<summary>docker</summary>
101106

102-
## Contributing
107+
```bash
108+
docker run --rm -v $PWD:/tmp --workdir /tmp ghcr.io/caarlos0/svu --help
109+
```
110+
111+
</details>
103112

104-
This SDK is generated from the Palette OpenAPI specification. To contribute:
113+
<details>
114+
<summary><code>go install</code></summary>
105115

106-
1. Fork the repository
107-
2. Make your changes
108-
3. Run tests: `npm test`
109-
4. Submit a pull request
116+
```bash
117+
go install github.com/caarlos0/svu/v3@latest
118+
```
110119

111-
### Requirements
120+
</details>
112121

113-
- Node.js 22 or higher
114-
- Python 3.10 or higher
115-
- Make
116-
- [Copywrite](https://github.com/hashicorp/copywrite)
117-
- Docker
122+
<details>
123+
<summary>manually</summary>
118124

119-
## License
125+
Or download one from the [releases tab](https://github.com/caarlos0/svu/releases) and install manually.
120126

121-
This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details.
127+
</details>
122128

123-
## Support
129+
## stargazers over time
124130

125-
For issues and questions:
131+
[![Stargazers over time](https://starchart.cc/caarlos0/svu.svg?variant=adaptive)](https://starchart.cc/caarlos0/svu)
126132

127-
- **SDK Issues**: Open an issue on GitHub.
128-
- **API Documentation**: Visit the [Palette API Documentation](https://docs.spectrocloud.com/api/)
129-
- **Palette Support**: Contact Spectro Cloud support
133+
[Semver]: https://semver.org
130134

131-
## Related Projects
135+
---
132136

133-
- [Palette Terraform Provider](https://github.com/spectrocloud/terraform-provider-spectrocloud)
134-
- [Palette CLI](https://github.com/spectrocloud/palette-cli)
135-
- [Palette Go SDK](https://github.com/spectrocloud/palette-sdk-go)
137+
Logo art and concept by [@carinebecker](https://github.com/carinebecker).

api/palette-apis-spec-fixed.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2979,10 +2979,21 @@
29792979
],
29802980
"type": "string"
29812981
},
2982+
"hostResourceGroupArn": {
2983+
"description": "ARN of AWS Host Resource Group for node placement on dedicated hosts",
2984+
"type": "string"
2985+
},
29822986
"instanceType": {
29832987
"description": "instance type",
29842988
"type": "string"
29852989
},
2990+
"licenseConfigurationArns": {
2991+
"description": "List of AWS License Configuration ARNs (required when hostResourceGroupArn is specified)",
2992+
"items": {
2993+
"type": "string"
2994+
},
2995+
"type": "array"
2996+
},
29862997
"rootDeviceSize": {
29872998
"description": "rootDeviceSize in GBs",
29882999
"format": "int64",
@@ -3045,6 +3056,10 @@
30453056
],
30463057
"type": "string"
30473058
},
3059+
"hostResourceGroupArn": {
3060+
"description": "ARN of AWS Host Resource Group for node placement on dedicated hosts",
3061+
"type": "string"
3062+
},
30483063
"instanceConfig": {
30493064
"$ref": "#/definitions/v1InstanceConfig"
30503065
},
@@ -3064,6 +3079,13 @@
30643079
},
30653080
"type": "array"
30663081
},
3082+
"licenseConfigurationArns": {
3083+
"description": "List of AWS License Configuration ARNs (required when hostResourceGroupArn is specified)",
3084+
"items": {
3085+
"type": "string"
3086+
},
3087+
"type": "array"
3088+
},
30673089
"machinePoolProperties": {
30683090
"$ref": "#/definitions/v1MachinePoolProperties"
30693091
},

api/palette-apis-spec-tagged.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2979,10 +2979,21 @@
29792979
],
29802980
"type": "string"
29812981
},
2982+
"hostResourceGroupArn": {
2983+
"description": "ARN of AWS Host Resource Group for node placement on dedicated hosts",
2984+
"type": "string"
2985+
},
29822986
"instanceType": {
29832987
"description": "instance type",
29842988
"type": "string"
29852989
},
2990+
"licenseConfigurationArns": {
2991+
"description": "List of AWS License Configuration ARNs (required when hostResourceGroupArn is specified)",
2992+
"items": {
2993+
"type": "string"
2994+
},
2995+
"type": "array"
2996+
},
29862997
"rootDeviceSize": {
29872998
"description": "rootDeviceSize in GBs",
29882999
"format": "int64",
@@ -3045,6 +3056,10 @@
30453056
],
30463057
"type": "string"
30473058
},
3059+
"hostResourceGroupArn": {
3060+
"description": "ARN of AWS Host Resource Group for node placement on dedicated hosts",
3061+
"type": "string"
3062+
},
30483063
"instanceConfig": {
30493064
"$ref": "#/definitions/v1InstanceConfig"
30503065
},
@@ -3064,6 +3079,13 @@
30643079
},
30653080
"type": "array"
30663081
},
3082+
"licenseConfigurationArns": {
3083+
"description": "List of AWS License Configuration ARNs (required when hostResourceGroupArn is specified)",
3084+
"items": {
3085+
"type": "string"
3086+
},
3087+
"type": "array"
3088+
},
30673089
"machinePoolProperties": {
30683090
"$ref": "#/definitions/v1MachinePoolProperties"
30693091
},

api/palette-apis-spec.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)