Skip to content

Commit b7d8a4b

Browse files
authored
Merge pull request #53 from geolonia/update-claude-md
docs: update CLAUDE.md to match current implementation
2 parents bafd538 + bf64d18 commit b7d8a4b

1 file changed

Lines changed: 44 additions & 36 deletions

File tree

CLAUDE.md

Lines changed: 44 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -44,42 +44,50 @@ npm run lint && npm run typecheck && npm test
4444
### Project Structure
4545
```
4646
src/
47-
├── index.ts # Entry point — parses CLI args
48-
├── cli.ts # Commander program setup, registers all commands
49-
├── client.ts # HTTP client for GeonicDB API
50-
├── config.ts # Configuration management (~/.config/geonic/config.json)
51-
├── helpers.ts # Shared utility functions
52-
├── input.ts # Input parsing (JSON5, stdin auto-detect, interactive mode)
53-
├── output.ts # Output formatting (json, table, geojson)
54-
├── types.ts # Shared TypeScript types
55-
└── commands/ # One file per command group
56-
├── entities.ts # Entity CRUD + attrs subcommand (list, get, create, update, delete, attrs)
57-
├── attrs.ts # Attribute operations (registered as entities attrs subcommand)
58-
├── batch.ts # entityOperations (alias: batch) — batch entity operations
59-
├── subscriptions.ts
60-
├── registrations.ts
61-
├── types.ts # Entity type queries
62-
├── temporal.ts # Temporal operations (temporal entities, temporal entityOperations)
63-
├── snapshots.ts # Snapshot operations
64-
├── rules.ts # XACML policy rules
65-
├── models.ts # custom-data-models (alias: models) — data model management
66-
├── catalog.ts # Data catalog (CKAN/DCAT)
67-
├── health.ts # Health check & version
68-
├── help.ts # wp-cli style help system
69-
├── config.ts # Config management (set, get, list)
70-
├── profile.ts # Profile management
71-
├── auth.ts # Authentication (auth login, auth logout, me)
72-
└── admin/ # Admin commands (tenants, users, policies, oauth-clients, cadde)
47+
├── index.ts # Entry point — parses CLI args
48+
├── cli.ts # Commander program setup, registers all commands
49+
├── client.ts # HTTP client for GeonicDB API
50+
├── config.ts # Configuration management (~/.config/geonic/config.json)
51+
├── helpers.ts # Shared utility functions
52+
├── input.ts # Input parsing (JSON5, stdin auto-detect, interactive mode)
53+
├── output.ts # Output formatting (json, table, geojson)
54+
├── types.ts # Shared TypeScript types
55+
├── oauth.ts # OAuth token requests
56+
├── token.ts # Token management & refresh
57+
├── prompt.ts # Interactive prompts
58+
├── update-notifier.ts # CLI update notification
59+
└── commands/ # One file per command group
60+
├── entities.ts # Entity CRUD + attrs subcommand
61+
├── attrs.ts # Attribute operations (entities attrs subcommand)
62+
├── batch.ts # entityOperations (alias: batch) — batch entity operations
63+
├── subscriptions.ts # Subscription management
64+
├── registrations.ts # Registration management
65+
├── types.ts # Entity type queries
66+
├── temporal.ts # Temporal operations (temporal entities, temporal entityOperations)
67+
├── snapshots.ts # Snapshot operations
68+
├── rules.ts # Rule engine (ReactiveCore rules)
69+
├── models.ts # custom-data-models (alias: models) — data model management
70+
├── catalog.ts # Data catalog (CKAN/DCAT)
71+
├── health.ts # Health check & version
72+
├── help.ts # wp-cli style help system
73+
├── config.ts # Config management (set, get, list)
74+
├── profile.ts # Profile management
75+
├── auth.ts # Authentication (auth login, auth logout, me)
76+
├── me-oauth-clients.ts # User's own OAuth client management (me oauth-clients)
77+
├── cli.ts # Shell completions (cli completions)
78+
└── admin/ # Admin commands
79+
├── index.ts # Registers admin subcommands
80+
├── tenants.ts # Tenant management
81+
├── users.ts # User management
82+
├── policies.ts # XACML policy management
83+
└── oauth-clients.ts # OAuth client management & CADDE config
7384
tests/
74-
├── client.test.ts
75-
├── config.test.ts
76-
├── help.test.ts
77-
├── helpers.test.ts
78-
├── input.test.ts
79-
├── oauth.test.ts
80-
├── output.test.ts
81-
├── prompt.test.ts
82-
└── token.test.ts
85+
├── *.test.ts # Unit tests (mirror src/ file names)
86+
├── setup-command-mocks.ts # Shared command test mocking
87+
├── test-helpers.ts # Shared test utilities
88+
└── e2e/ # E2E tests (Cucumber/step definitions)
89+
├── step_definitions/
90+
└── support/
8391
```
8492

8593
### Key Design Patterns
@@ -89,7 +97,7 @@ tests/
8997
- **Config**: Persistent config stored in `~/.config/geonic/config.json` (URL, service, token, etc.)
9098
- **Output Formatting**: Supports `json`, `table`, `geojson` via `--format` flag
9199
- **Help System**: wp-cli style help via `geonic help [command] [subcommand]` and `--help`
92-
- **Global Options**: `--url`, `--service`, `--token`, `--profile`, `--api-key`, `--format`, `--verbose`
100+
- **Global Options**: `--url`, `--service`, `--token`, `--profile`, `--api-key`, `--format`, `--verbose`, `--no-color`, `--dry-run`
93101

94102
### Build
95103
- **tsup**: Bundles to single ESM file (`dist/index.js`) with `#!/usr/bin/env node` banner

0 commit comments

Comments
 (0)