Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1e4dcc2
feat(adk): implement ADK architecture alignment with lazy loading [FS…
ThePlenkov Nov 9, 2025
4db45e1
chore: update abapify submodule pointer
ThePlenkov Nov 10, 2025
2926d83
chore: update abapify submodule with local modifications
ThePlenkov Nov 12, 2025
96ef0ea
feat: add XML/XSLT processing and JSON validation dependencies
ThePlenkov Nov 13, 2025
9a103d8
```
ThePlenkov Nov 13, 2025
2bdc69e
```
ThePlenkov Nov 13, 2025
40b5402
```
ThePlenkov Nov 16, 2025
2e5f873
```
ThePlenkov Nov 16, 2025
ef14806
chore: configure nx-sync plugin and update abapify submodule
ThePlenkov Nov 17, 2025
70aa7f8
```
ThePlenkov Nov 17, 2025
38e8c5a
commit
ThePlenkov Nov 20, 2025
5b2dedc
commit
ThePlenkov Nov 20, 2025
3fa5b1f
feat(adt-client-v2): add pluggable response system and fix XML attrib…
ThePlenkov Nov 20, 2025
c45b3fd
refactor(adt-client-v2): implement two-layer architecture with adt an…
ThePlenkov Nov 21, 2025
58e80db
feat(adt-client-v2): implement repository search contract and migrate…
ThePlenkov Nov 21, 2025
8f0b538
refactor(adt-cli): create shared ADT v2 client helper to eliminate du…
ThePlenkov Nov 21, 2025
3f02fb4
refactor(adt-cli): decouple v2 client from v1 AuthManager
ThePlenkov Nov 21, 2025
ef6b3bf
feat(adt-cli): add pluggable logger to client helper
ThePlenkov Nov 21, 2025
25d54e0
feat(adt-cli): propagate CLI logger to v2 client via plugin
ThePlenkov Nov 21, 2025
030b8f9
refactor(adt-cli): use v1 Logger interface and v2 LoggingPlugin
ThePlenkov Nov 21, 2025
b4df228
feat(adt-client-v2): add logger support to client architecture
ThePlenkov Nov 21, 2025
ebeae8a
refactor(adt-client-v2): replace console usage with pluggable logger
ThePlenkov Nov 21, 2025
5d3f566
chore: clean abapify history (sanitize internal Booking refs)
ThePlenkov Nov 25, 2025
b787f8c
```
ThePlenkov Nov 25, 2025
a5aa4e9
```
ThePlenkov Nov 26, 2025
5b726f4
```
ThePlenkov Nov 26, 2025
e3f7d21
```
ThePlenkov Nov 26, 2025
d8a5ce2
```
ThePlenkov Nov 26, 2025
8d60f7b
```
ThePlenkov Nov 26, 2025
97e86ba
```
ThePlenkov Nov 26, 2025
7430a69
feat: reorganize schemas to generated folder and enhance XSD codegen
ThePlenkov Nov 27, 2025
3514f61
```
ThePlenkov Nov 27, 2025
a58bd64
```
ThePlenkov Nov 27, 2025
066c008
```
ThePlenkov Nov 27, 2025
91b3f68
Based on the extensive changes shown in the diff, this is a large-sca…
ThePlenkov Nov 28, 2025
87c72f5
Based on the extensive refactoring shown in the diff, here's the conv…
ThePlenkov Nov 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,7 @@ vite.config.*.timestamp*
.github/instructions/nx.instructions.md

vitest.config.*.timestamp*
secrets
secrets

bun.lock
bun.lockb
3 changes: 2 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
nx format:write --uncommitted
npx nx format:write --uncommitted
git update-index --again

189 changes: 113 additions & 76 deletions .windsurf/rules/nx-monorepo-setup.md
Original file line number Diff line number Diff line change
@@ -1,128 +1,165 @@
# Nx Monorepo Setup Rules

## Core Nx Commands
> **See**: [`.agents/rules/development/tooling/nx-monorepo.md`](../../../.agents/rules/development/tooling/nx-monorepo.md) for complete Nx plugin inference system documentation.

**Always use `npx nx` - never global nx installation**
## Quick Reference

- `npx nx g` - Generate new packages/components
- `npx nx build` - Build packages
- `npx nx test` - Run tests
- `npx nx typecheck` - Type checking

## Package Creation Workflow

### 1. Generate Base Package
### Core Commands

```bash
npx nx g @nx/js:lib --name=[library-name] --directory=[path] --importPath=@abapify/[library-name] --bundler=none --unitTestRunner=none --linter=eslint
npx nx build [package] # Build (inferred from tsdown.config.ts)
npx nx test [package] # Test (inferred from vitest.config.ts)
npx nx test:coverage [package] # Test with coverage
npx nx typecheck [package] # Typecheck (inferred from tsconfig.json)
npx nx lint [package] # Lint (inferred from eslint config)
```

**Key Parameters:**
### Package Creation Workflow

- `--name`: Library name (e.g., `oat`, `abapgit`, `gcts`)
- `--directory`: Path relative to workspace root (e.g., `packages/plugins/oat`)
- `--importPath`: Full npm package name (e.g., `@abapify/oat`)
- `--bundler=none`: We use tsdown instead of default tsc
- `--unitTestRunner=none`: Avoid vitest generator loop, add manually later
- `--linter=eslint`: Enable ESLint
**Step 1: Generate Base Package**

### 2. Configure tsdown Build System

Copy configuration from `packages/sample-tsdown/`:
```bash
npx nx g @nx/js:lib \
--name=[library-name] \
--directory=packages/[name] \
--importPath=@abapify/[library-name] \
--bundler=none \
--unitTestRunner=none \
--linter=eslint
```

- `tsdown.config.ts`
- Update `package.json` build script to `"build": "tsdown"`
- Ensure `skipNodeModulesBundle: true` in tsdown config
**Step 2: Add Config Files (Plugins Will Infer Targets)**

### 3. Standard Package Structure
Create these files and Nx plugins will automatically create build/test targets:

```
packages/[name]/
├── src/
│ ├── lib/
│ └── index.ts
├── package.json
├── tsconfig.json
├── tsconfig.lib.json
└── tsdown.config.ts
├── tsdown.config.ts # ← nx-tsdown plugin detects → creates 'build' target
└── vitest.config.ts # ← nx-vitest plugin detects → creates 'test' targets
```

## Technology Stack
**Step 3: Minimal project.json**

- **Language**: TypeScript only (ES2015, strict mode)
- **Linting**: ESLint (configured via nx)
- **Testing**: Vitest (not Jest)
- **Build**: tsdown (not nx default tsc builder)
- **Package Manager**: npm workspaces (NOT pnpm)
```json
{
"name": "[package-name]",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/[name]/src",
"projectType": "library",
"tags": ["type:library"],
"targets": {
"nx-release-publish": {
"options": { "packageRoot": "dist/{projectRoot}" }
}
}
}
```

## Plugin Package Creation
**That's it\!** Don't declare `build`, `test`, or `typecheck` targets - they're inferred automatically.

For creating plugin packages in `packages/plugins/`:
## Config File Templates

```bash
# Create plugin directory structure
mkdir -p packages/plugins
### tsdown.config.ts

```typescript
import { defineConfig } from 'tsdown';

export default defineConfig({
entry: ['src/index.ts'],
format: ['esm'],
dts: true,
clean: true,
sourcemap: true,
});
```

### vitest.config.ts

```typescript
import { defineConfig } from 'vitest/config';

# Generate OAT plugin
npx nx g @nx/js:lib --name=oat --directory=packages/plugins/oat --importPath=@abapify/oat --bundler=none --unitTestRunner=none --linter=eslint
export default defineConfig({
test: {
globals: true,
environment: 'node',
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
all: true,
include: ['src/**/*.ts'],
exclude: ['src/**/*.test.ts', 'src/**/*.spec.ts'],
},
},
});
```

**Important**: The root `vitest.config.ts` must include your package in the `projects` array for test targets to be inferred.

# Generate abapGit plugin
npx nx g @nx/js:lib --name=abapgit --directory=packages/plugins/abapgit --importPath=@abapify/abapgit --bundler=none --unitTestRunner=none --linter=eslint
## Technology Stack

# Generate GCTS plugin
npx nx g @nx/js:lib --name=gcts --directory=packages/plugins/gcts --importPath=@abapify/gcts --bundler=none --unitTestRunner=none --linter=eslint
- **Language**: TypeScript (ES2015+, strict mode)
- **Build**: tsdown (via nx-tsdown plugin inference)
- **Testing**: Vitest (via nx-vitest plugin inference)
- **Linting**: ESLint (via @nx/eslint plugin)
- **Package Manager**: bun

## Plugin Package Creation

For packages in `packages/plugins/`:

```bash
npx nx g @nx/js:lib \
--name=oat \
--directory=packages/plugins/oat \
--importPath=@abapify/oat \
--bundler=none \
--unitTestRunner=none \
--linter=eslint
```

## Package Configuration Template
Then add `tsdown.config.ts` and `vitest.config.ts` - targets will be inferred automatically.

## Common Mistakes

### package.json
### ❌ DON'T: Declare build/test targets manually

```json
{
"name": "@abapify/[plugin-name]",
"version": "0.1.0",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsdown"
},
"dependencies": {
"@abapify/adk": "*"
"targets": {
"build": {
"executor": "@abapify/nx-tsdown:build" // ❌ NO SUCH EXECUTOR\!
}
}
}
```

### tsdown.config.ts
### ✅ DO: Let plugins infer targets

```typescript
import { defineConfig } from 'tsdown';
Just create `tsdown.config.ts` and the nx-tsdown plugin will automatically create the `build` target.

export default defineConfig({
entry: ['src/index.ts'],
format: ['esm'],
dts: true,
skipNodeModulesBundle: true,
});
```
### Verification

## Development Workflow
Check what targets were inferred:

```bash
npx nx show project [package-name] --json | jq '.targets | keys'
```

1. **Generate package**: `npx nx g @nx/js:lib --name=[name] --directory=[path] --importPath=@abapify/[name] --bundler=none --unitTestRunner=none --linter=eslint`
2. **Configure tsdown**: Copy from sample-tsdown
3. **Add Vitest manually**: Copy vitest config from existing package (avoids nx vitest generator loop)
4. **Build**: `npx nx build [library-name]`
5. **Test**: `npx nx test [library-name]`
6. **Typecheck**: `npx nx typecheck`
You should see: `["build", "lint", "nx-release-publish", "test", "test:coverage", "test:watch", "typecheck"]`

## Import Rules

- **Cross-package**: `@abapify/[package-name]`
- **Internal files**: `../relative/path`
- **No workspace:\* dependencies** (use `*` instead)
- **Internal files**: `../relative/path` (no extensions for TS files)
- **Workspace deps**: Use `*` (not `workspace:*`)

## File Organization

- **Source code**: `packages/[name]/src/`
- **Temporary files**: `tmp/` (never commit)
- **Build output**: `packages/[name]/dist/`
- **Tests**: Co-located with source (`*.test.ts`)
Loading
Loading