Skip to content

Commit 34164f0

Browse files
chore: add agents.md and correct HAPI code used through tag (#15)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Karl Cardenas <[email protected]>
1 parent effc589 commit 34164f0

File tree

2,817 files changed

+8513
-9968
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,817 files changed

+8513
-9968
lines changed

.copywrite.hcl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ schema_version = 1
55
project {
66
license = "Apache-2.0"
77
copyright_holder = "Spectro Cloud"
8-
9-
# (OPTIONAL) Represents the year that the project initially began
10-
# Default: <the year the repo was first created>
11-
copyright_year = 2025
8+
copyright_year = "2026"
129

1310
# (OPTIONAL) A list of globs that should not have copyright or license headers .
1411
# Supports doublestar glob patterns for more flexibility in defining which
@@ -17,5 +14,6 @@ project {
1714
header_ignore = [
1815
"vendor/**",
1916
"**autogen**",
17+
"node_modules/**"
2018
]
2119
}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.vscode
44

55
# Directories
6-
api/hapi
6+
api/hapi/**
77
node_modules
88
dist/
99

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
api/
22
palette/
3+
openapi/openapi.yaml

AGENTS.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Overview
2+
3+
This is a repository that contains the TypeScript SDK for the Palette API. You can use this SDK to interact with the Palette API in your TypeScript projects.
4+
5+
## Repository Structure
6+
7+
- `palette/`: Contains the generated TypeScript SDK code organized by API tags.
8+
- `client/`: Contains the custom HTTP client implementation.
9+
- `api/`: Contains scripts for OpenAPI spec processing and code generation.
10+
- `openapi/`: Contains the generated OpenAPI YAML specification.
11+
- `test/`: Contains integration tests for the SDK.
12+
13+
## Development
14+
15+
- Use `make help` to see available Makefile targets.
16+
- Run `make generate` to regenerate the SDK from the OpenAPI spec.
17+
- Run `npm test` to execute integration tests.
18+
- Run `npm run build` to compile TypeScript to JavaScript.
19+
20+
## General Guidelines
21+
22+
- Comments should be complete sentences and end with a period.
23+
- Review `package.json` to understand dependencies and their versions.
24+
- Use the bulwark_scan_project tool to scan for compromised packages before installing dependencies.
25+
- DO NOT UPDATE THE `package-lock.json` file manually. It is automatically updated by npm.
26+
- DO NOT UPDATE DEPENDENCIES UNLESS EXPLICITLY REQUESTED.
27+
- DO NOT CREATE MANUAL GIT TAGS. They are automatically created by CI/CD release workflow.
28+
29+
## Commit Messages and Pull Requests
30+
31+
- Follow the [Chris Beams](https://chris.beams.io/posts/git-commit/) style for commit messages.
32+
- Use the angular commit message format. Such as: `fix: <description>`, `feat: <description>`, `refactor: <description>`, `test: <description>`, `docs: <description>`, `chore: <description>`.
33+
34+
- Every pull request should answer:
35+
- What changed?
36+
- Why?
37+
- Breaking changes?

api/generate.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,21 @@
66
set -e
77

88
# Fetch the latest hapi spec
9-
if [ -d "hapi" ]; then
10-
(cd hapi && git pull origin master --ff)
11-
else
9+
if [ ! -d "hapi" ]; then
1210
git clone [email protected]:spectrocloud/hapi.git || git clone https://github.com/spectrocloud/hapi
1311
fi
1412
(
1513
cd hapi
14+
# Fetch all tags from origin, forcing update of any moved tags
15+
git fetch origin --tags --force
16+
# Get the latest tag starting with 'v' sorted by version
17+
LATEST_TAG=$(git tag -l 'v*' --sort=-v:refname | head -n 1)
18+
if [ -z "$LATEST_TAG" ]; then
19+
echo "Error: No tags starting with 'v' found"
20+
exit 1
21+
fi
22+
echo "Checking out tag: $LATEST_TAG"
23+
git checkout --force "$LATEST_TAG"
1624
bash generate_hubble_spec.sh
1725
go run api/main.go
1826
cp gen/docs-spec/palette-apis-spec.json ..

0 commit comments

Comments
 (0)