|
| 1 | +# Contentstack Webhook Listener – Agent guide |
| 2 | + |
| 3 | +**Universal entry point** for contributors and AI agents. Detailed conventions live in **`skills/*/SKILL.md`**. |
| 4 | + |
| 5 | +## What this repo is |
| 6 | + |
| 7 | +| Field | Detail | |
| 8 | +| --- | --- | |
| 9 | +| **Name:** | [contentstack/webhook-listener](https://github.com/contentstack/webhook-listener) — npm `@contentstack/webhook-listener` | |
| 10 | +| **Purpose:** | TypeScript/Node HTTP server library that receives Contentstack webhooks and invokes a registered callback; part of Contentstack DataSync. | |
| 11 | +| **Out of scope (if any):** | Does not implement DataSync Manager, content/asset stores, or CMS configuration—only the webhook HTTP listener surface. | |
| 12 | + |
| 13 | +## Tech stack (at a glance) |
| 14 | + |
| 15 | +| Area | Details | |
| 16 | +| --- | --- | |
| 17 | +| Language | TypeScript (see `tsconfig.json`); Node.js **20+** (see README). | |
| 18 | +| Build | `tsc` → output in `dist/`; `package.json` `main` is `./dist`. | |
| 19 | +| Tests | Jest, `test/unit/*.test.js`; `npm test` runs with coverage (`jest.config.js`). | |
| 20 | +| Lint / coverage | No ESLint/Prettier in repo; coverage via Jest (`coverage/`). | |
| 21 | +| Other | Types under `typings/`; runnable example under `example/`. | |
| 22 | + |
| 23 | +## Commands (quick reference) |
| 24 | + |
| 25 | +| Command type | Command | |
| 26 | +| --- | --- | |
| 27 | +| Build | `npm run build-ts` (clean + `tsc`) or `npm run compile` (`tsc` only) | |
| 28 | +| Test | `npm test` (runs `pretest` → compile, then Jest with coverage) | |
| 29 | +| Lint | Not configured | |
| 30 | + |
| 31 | +CI / automation: [.github/workflows/check-version-bump.yml](.github/workflows/check-version-bump.yml), [sca-scan.yml](.github/workflows/sca-scan.yml), [policy-scan.yml](.github/workflows/policy-scan.yml), [codeql-analysis.yml](.github/workflows/codeql-analysis.yml), [github-release.yml](.github/workflows/github-release.yml), [issues-jira.yml](.github/workflows/issues-jira.yml). |
| 32 | + |
| 33 | +## Where the documentation lives: skills |
| 34 | + |
| 35 | +| Skill | Path | What it covers | |
| 36 | +| --- | --- | --- | |
| 37 | +| Dev workflow & CI | `skills/dev-workflow/SKILL.md` | Branches, npm scripts, Husky, GitHub Actions, version bumps | |
| 38 | +| TypeScript style | `skills/typescript-style/SKILL.md` | `tsconfig`, `src/` vs `example/`, typings, module conventions | |
| 39 | +| Package API | `skills/webhook-listener/SKILL.md` | Public exports, config, integration with DataSync | |
| 40 | +| Testing | `skills/testing/SKILL.md` | Jest layout, compiled output, coverage | |
| 41 | +| Code review | `skills/code-review/SKILL.md` | PR expectations and checklist | |
| 42 | + |
| 43 | +An index with “when to use” hints is in `skills/README.md`. |
| 44 | + |
| 45 | +## Using Cursor (optional) |
| 46 | + |
| 47 | +If you use **Cursor**, `.cursor/rules/README.md` only points to **`AGENTS.md`**—same docs as everyone else. |
0 commit comments