Universal entry point for contributors and AI agents. Detailed conventions live in skills/*/SKILL.md.
| Field | Detail |
|---|---|
| Name: | contentstack/types-generator |
| Purpose: | Library that generates TypeScript types from Contentstack stack content types (Delivery SDK) and from GraphQL schema (introspection). |
| Out of scope (if any): | Management API (CMA) client behavior—this package targets CDA and GraphQL only. |
| Area | Details |
|---|---|
| Language | TypeScript 5.9 (strict in tsconfig.json) |
| Build | tsup → dist/ (tsup.config.ts); entries include src/index.ts, src/web.ts |
| Tests | Jest + ts-jest (jest.config.js); dotenv/config in setup |
| Lint / coverage | No ESLint script; rely on TypeScript strictness and project conventions |
| Other | @contentstack/delivery-sdk, axios, @gql2ts/from-schema, lodash, async, prettier |
| Command type | Command |
|---|---|
| Build | npm run build |
| Test | npm test |
| Lint | (not configured) |
CI: .github/workflows/node.js.yml; release: .github/workflows/release.yml.
Set a .env at the repo root or export variables (see tests/integration/). Typical names: TOKEN, APIKEY, ENVIRONMENT, REGION, TOKENTYPE, BRANCH. CI injects secrets including TOKEN_WITH_NO_CT and APIKEY_WITH_NO_CT where needed.
| Skill | Path | What it covers |
|---|---|---|
| Development workflow | skills/dev-workflow/SKILL.md | Branches, CI, build/test, PRs, releases |
| TypeScript types generator | skills/typescript-types-generator/SKILL.md | generateTS vs graphqlTS, SDK and GraphQL behavior |
| Testing | skills/testing/SKILL.md | Jest layout, .env, fixtures |
| Code review | skills/code-review/SKILL.md | PR checklist, terminology, semver |
An index with “when to use” hints is in skills/README.md.
If you use Cursor, .cursor/rules/README.md only points to AGENTS.md—same docs as everyone else.