Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
130 changes: 0 additions & 130 deletions .github/workflows/codegen.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/heap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Heap memory

on:
pull_request:
push:
branches:
- main

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
heap:
name: Heap regression check
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
with:
persist-credentials: false

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 24.x

- name: Install
run: npm ci

- name: Build
run: npm run build

- name: Run heap check
run: scripts/heap-check
6 changes: 4 additions & 2 deletions .jscpd.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"threshold": 5,
"reporters": ["console"],
"reporters": [
"console"
],
"ignore": [
"NOTICE.txt",
"node_modules/**",
"dist/**",
"build/**",
"src/es/apis/schemas/**",
"src/es/apis/**",
"src/cloud/apis/**",
"packages/es-schemas/src/**",
"test/**",
"codegen/**",
"specs/**",
Expand Down
2 changes: 1 addition & 1 deletion .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TYPESCRIPT_ES_CONFIG_FILE: eslint.config.js
FILTER_REGEX_EXCLUDE: "(node_modules/|dist/|build/|\\.git/)"

# Skip generated code for ESLint (39k lines of schemas + 2k lines of cloud APIs)
TYPESCRIPT_ES_FILTER_REGEX_EXCLUDE: "(src/es/apis/schemas/|src/cloud/apis/|packages/es-schemas/src/)"
TYPESCRIPT_ES_FILTER_REGEX_EXCLUDE: "(src/es/apis/schemas/|src/cloud/apis/)"

# yamllint: skip test fixtures (custom multi-doc YAML DSL)
YAML_YAMLLINT_CONFIG_FILE: .yamllint.yml
Expand Down
2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Architecture Decisions

Read this before proposing structural changes. Each section documents a deliberate choice made for startup performance or memory efficiency, validated by `scripts/perf-check`. Do not refactor these unless benchmarks prove the change is neutral.
Read this before proposing structural changes. Each section documents a deliberate choice made for startup performance or memory efficiency, validated by `scripts/perf-check` (startup latency) and `scripts/heap-check` (heap allocation). Do not refactor these unless benchmarks prove the change is neutral.

## Factory Core Split (`factory-core.ts` / `factory.ts`)

Expand Down
12 changes: 0 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,6 @@ Thanks for your interest in contributing! We love receiving contributions from o
| `npm run test:lint -- --fix` | Fix linter errors automatically |
| `npm run test:megalinter` | Run MegaLinter locally (requires Docker) |

## Regenerating API bindings

The files under `src/es/apis/`, `src/es/apis/schemas/`, `src/cloud/apis/` and `src/kb/apis/` are auto-generated from [`elastic/elastic-client-generator-js`](https://github.com/elastic/elastic-client-generator-js) by CI (see `.github/workflows/codegen.yml`, which opens a PR every Monday). The companion manifests at `src/es/api-manifest.ts` and `src/kb/api-manifest.ts` are derived from those generated files. To reproduce locally:

```bash
npm run codegen:es # regenerates ES namespaces + Zod schemas + api-manifest
npm run codegen:cloud # regenerates Cloud namespaces
npm run codegen:kibana # regenerates Kibana namespaces + api-manifest
```

The scripts clone the generator into a temp directory and run its `npm run zod` / `npm run cli-es` / `npm run cli-cloud` / `npx tsx cli/kibana/index.ts` targets, then invoke `scripts/build-api-manifest.mjs` (ES) and `scripts/build-kb-manifest.mts` (Kibana) to refresh the per-endpoint manifests consumed by the lazy loaders. Set `CODEGEN_GENERATOR_DIR` to point at an existing checkout if you want to iterate on generator changes without cloning each time.

## Linting

This project uses [MegaLinter](https://megalinter.io/) for comprehensive linting across TypeScript, YAML, GitHub Actions, Dockerfiles, and more. It also scans for secrets, copy-paste, and vulnerabilities.
Expand Down
Loading
Loading