Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
51b747c
v0.1.0-dev.8
tnramalho Sep 4, 2025
b9922a0
chore: version bump
tnramalho Sep 4, 2025
df82054
chore: renaming rockets-server to rockets-server-auth
tnramalho Sep 5, 2025
c15a2de
chore: create the server auth and empty rockers server
tnramalho Sep 9, 2025
35ccf55
chore: improve rockets server
tnramalho Sep 10, 2025
ebbd046
chore: add localGuard and remove concepta nestjs modules
tnramalho Sep 11, 2025
e0f2140
chore: create profile and user module
tnramalho Sep 16, 2025
e2200f8
chore: linting
tnramalho Sep 16, 2025
76232fb
chore: yarn lock
tnramalho Sep 16, 2025
468f6a0
chore: linting
tnramalho Sep 17, 2025
5ba5c60
chore: add example foldr and a sample server api
tnramalho Sep 17, 2025
c4e8969
chore: lint
tnramalho Sep 17, 2025
0262a05
chore: add samples
tnramalho Sep 22, 2025
a68df54
chore: rename packages and files, and add user metadata
tnramalho Sep 26, 2025
924b143
feat: add roles management
tnramalho Sep 30, 2025
62699d2
chore: linting
tnramalho Sep 30, 2025
1aff724
chore: linting
tnramalho Sep 30, 2025
eb837ca
chore update documentation
tnramalho Oct 2, 2025
aebebf8
chore: yarn
tnramalho Oct 2, 2025
f1702de
chore: linting
tnramalho Oct 2, 2025
9c65e9a
feat: add usermetadata to signup and admin users
tnramalho Oct 21, 2025
30bbbe8
chore: updat a sample project with roles and user metadata
tnramalho Oct 21, 2025
a366417
chore: create development guide for ai
tnramalho Oct 21, 2025
feb9536
chore: update MR Changes
tnramalho Oct 22, 2025
97a9ffc
chore: cleanup
tnramalho Oct 22, 2025
c849702
chore: lint
tnramalho Oct 22, 2025
5491162
chore: linting
tnramalho Oct 22, 2025
a955fc3
chore: linting
tnramalho Oct 22, 2025
7a8ea8a
chore: jest config
tnramalho Oct 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"permissions": {
"allow": [
"Bash(yarn test)",
"Bash(yarn test:e2e)",
"Bash(yarn test:e2e:*)",
"Bash(yarn build)",
"Bash(mkdir:*)",
"Bash(mv:*)",
"Bash(rm:*)",
"Bash(find:*)",
"Bash(npm test:*)",
"Bash(grep:*)",
"Bash(npx tsc:*)",
"Bash(npm run build:*)",
"Bash(npm run test:e2e:*)",
"Bash(npm run:*)",
"Bash(sed:*)",
"Bash(npx jest:*)",
"Bash(npx eslint:*)",
"WebFetch(domain:docs.nestjs.com)",
"Bash(yarn start:dev)",
"Bash(ls:*)",
"Bash(yarn install)",
"Bash(pkill -f \"nest start\")",
"Bash(cp:*)",
"Bash(yarn lint)",
"Bash(yarn lint:*)",
"Bash(yarn test:*)",
"Bash(yarn clean)",
"Bash(yarn workspaces:*)",
"Bash(curl:*)",
"Bash(true)",
"Bash(timeout 10s npm run start:dev)",
"Bash(npm install:*)",
"Bash(yarn add:*)",
"Bash(yarn test:*)"
],
"deny": []
}
}
149 changes: 149 additions & 0 deletions .codacy/cli.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
#!/usr/bin/env bash


set -e +o pipefail

# Set up paths first
bin_name="codacy-cli-v2"

# Determine OS-specific paths
os_name=$(uname)
arch=$(uname -m)

case "$arch" in
"x86_64")
arch="amd64"
;;
"x86")
arch="386"
;;
"aarch64"|"arm64")
arch="arm64"
;;
esac

if [ -z "$CODACY_CLI_V2_TMP_FOLDER" ]; then
if [ "$(uname)" = "Linux" ]; then
CODACY_CLI_V2_TMP_FOLDER="$HOME/.cache/codacy/codacy-cli-v2"
elif [ "$(uname)" = "Darwin" ]; then
CODACY_CLI_V2_TMP_FOLDER="$HOME/Library/Caches/Codacy/codacy-cli-v2"
else
CODACY_CLI_V2_TMP_FOLDER=".codacy-cli-v2"
fi
fi

version_file="$CODACY_CLI_V2_TMP_FOLDER/version.yaml"


get_version_from_yaml() {
if [ -f "$version_file" ]; then
local version=$(grep -o 'version: *"[^"]*"' "$version_file" | cut -d'"' -f2)
if [ -n "$version" ]; then
echo "$version"
return 0
fi
fi
return 1
}

get_latest_version() {
local response
if [ -n "$GH_TOKEN" ]; then
response=$(curl -Lq --header "Authorization: Bearer $GH_TOKEN" "https://api.github.com/repos/codacy/codacy-cli-v2/releases/latest" 2>/dev/null)
else
response=$(curl -Lq "https://api.github.com/repos/codacy/codacy-cli-v2/releases/latest" 2>/dev/null)
fi

handle_rate_limit "$response"
local version=$(echo "$response" | grep -m 1 tag_name | cut -d'"' -f4)
echo "$version"
}

handle_rate_limit() {
local response="$1"
if echo "$response" | grep -q "API rate limit exceeded"; then
fatal "Error: GitHub API rate limit exceeded. Please try again later"
fi
}

download_file() {
local url="$1"

echo "Downloading from URL: ${url}"
if command -v curl > /dev/null 2>&1; then
curl -# -LS "$url" -O
elif command -v wget > /dev/null 2>&1; then
wget "$url"
else
fatal "Error: Could not find curl or wget, please install one."
fi
}

download() {
local url="$1"
local output_folder="$2"

( cd "$output_folder" && download_file "$url" )
}

download_cli() {
# OS name lower case
suffix=$(echo "$os_name" | tr '[:upper:]' '[:lower:]')

local bin_folder="$1"
local bin_path="$2"
local version="$3"

if [ ! -f "$bin_path" ]; then
echo "📥 Downloading CLI version $version..."

remote_file="codacy-cli-v2_${version}_${suffix}_${arch}.tar.gz"
url="https://github.com/codacy/codacy-cli-v2/releases/download/${version}/${remote_file}"

download "$url" "$bin_folder"
tar xzfv "${bin_folder}/${remote_file}" -C "${bin_folder}"
fi
}

# Warn if CODACY_CLI_V2_VERSION is set and update is requested
if [ -n "$CODACY_CLI_V2_VERSION" ] && [ "$1" = "update" ]; then
echo "⚠️ Warning: Performing update with forced version $CODACY_CLI_V2_VERSION"
echo " Unset CODACY_CLI_V2_VERSION to use the latest version"
fi

# Ensure version.yaml exists and is up to date
if [ ! -f "$version_file" ] || [ "$1" = "update" ]; then
echo "ℹ️ Fetching latest version..."
version=$(get_latest_version)
mkdir -p "$CODACY_CLI_V2_TMP_FOLDER"
echo "version: \"$version\"" > "$version_file"
fi

# Set the version to use
if [ -n "$CODACY_CLI_V2_VERSION" ]; then
version="$CODACY_CLI_V2_VERSION"
else
version=$(get_version_from_yaml)
fi


# Set up version-specific paths
bin_folder="${CODACY_CLI_V2_TMP_FOLDER}/${version}"

mkdir -p "$bin_folder"
bin_path="$bin_folder"/"$bin_name"

# Download the tool if not already installed
download_cli "$bin_folder" "$bin_path" "$version"
chmod +x "$bin_path"

run_command="$bin_path"
if [ -z "$run_command" ]; then
fatal "Codacy cli v2 binary could not be found."
fi

if [ "$#" -eq 1 ] && [ "$1" = "download" ]; then
echo "Codacy cli v2 download succeeded"
else
eval "$run_command $*"
fi
15 changes: 15 additions & 0 deletions .codacy/codacy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
runtimes:
- dart@3.7.2
- go@1.22.3
- java@17.0.10
- node@22.2.0
- python@3.11.11
tools:
- dartanalyzer@3.7.2
- eslint@8.57.0
- lizard@1.17.31
- pmd@7.11.0
- pylint@3.3.6
- revive@1.7.0
- semgrep@1.78.0
- trivy@0.66.0
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,7 @@ dist
# .yarn meta
.yarn



#Ignore cursor AI rules
.cursor/rules/codacy.mdc
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
{ "pattern": "packages/*" }
],
"files.exclude": {
"**/node_modules": true,
"**/*dist*": true,
// "**/node_modules": true,
// "**/*dist*": true,
"**/*coverage*": true,
}
}
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ out of the box.
### Installation

```bash
npm install @concepta/rockets-server @concepta/nestjs-typeorm-ext typeorm
npm install @concepta/rockets-server-auth @concepta/nestjs-typeorm-ext typeorm
```

### Basic Setup
Expand All @@ -40,7 +40,7 @@ You'll need to create your entities and configure the module as follows:
```typescript
// app.module.ts
import { Module } from '@nestjs/common';
import { RocketsServerModule } from '@concepta/rockets-server';
import { RocketsServerAuthModule } from '@concepta/rockets-server-auth';
import { TypeOrmExtModule } from '@concepta/nestjs-typeorm-ext';
import { UserEntity } from './entities/user.entity';
import { UserOtpEntity } from './entities/user-otp.entity';
Expand All @@ -54,7 +54,7 @@ import { FederatedEntity } from './entities/federated.entity';
synchronize: true,
autoLoadEntities: true,
}),
RocketsServerModule.forRoot({
RocketsServerAuthModule.forRoot({
user: {
imports: [
TypeOrmExtModule.forFeature({
Expand Down Expand Up @@ -93,7 +93,7 @@ That's it! You now have:

For detailed setup, configuration, and API reference, see:

**[📚 Complete Documentation](./packages/rockets-server/README.md)**
**[📚 Complete Documentation](./packages/rockets-server-auth/README.md)**

## 🔧 Dependencies

Expand All @@ -114,3 +114,7 @@ finalized our Contributor License Agreement.

This project is licensed under the MIT License - see the
[LICENSE.txt](LICENSE.txt) file for details.

Notes:
Rockest server has a global server guard that uses auth provider
rockets server auth can choose to use the gloal jwt one
Loading