{"_id":"@d0whc3r/protoc-gen-es","_rev":"4-33558ef056ba6c76e52864c3f7aec37c","name":"@d0whc3r/protoc-gen-es","dist-tags":{"latest":"1.0.7"},"versions":{"2.10.0":{"name":"@d0whc3r/protoc-gen-es","version":"2.10.0","keywords":["protobuf","schema","typescript","ecmascript","protoc-plugin"],"license":"Apache-2.0","_id":"@d0whc3r/protoc-gen-es@2.10.0","maintainers":[{"name":"d0whc3r","email":"d0whc3r@gmail.com"}],"homepage":"https://github.com/bufbuild/protobuf-es#readme","bugs":{"url":"https://github.com/bufbuild/protobuf-es/issues"},"bin":{"protoc-gen-es":"bin/protoc-gen-es"},"dist":{"shasum":"bc0e3c5cb4d4868e93a22c16d6d7a282e4246757","tarball":"https://registry.npmjs.org/@d0whc3r/protoc-gen-es/-/protoc-gen-es-2.10.0.tgz","fileCount":14,"integrity":"sha512-pNPhOt7EpQzhQ8JjWGXizKNokRHWq76ajhGFm1iMZgKnTbfQrR2CuNUj9igYIXVC00CE6N5tbW5+U9DMbkn1/A==","signatures":[{"sig":"MEUCIG/N48y6IsPt/uB3ewKACShbEfa4w3BqEjogt9RV9kOIAiEAz7dB92PWgwsIrW3uAVlxTJS+AwTkoew9sh9E/irvQ2Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":81696},"engines":{"node":">=20"},"gitHead":"b9770758bab3a357da4bde93d0a93787b33edd4e","scripts":{"lint":"biome lint --error-on-warnings","build":"../../node_modules/typescript/bin/tsc --project tsconfig.json --outDir ./dist/cjs","format":"biome format --write","prebuild":"rm -rf ./dist/cjs/*","bootstrap":"protoc --es_out=src/gen --es_opt=target=ts,import_extension=js --proto_path proto proto/minimal-validate.proto","postbootstrap":"license-header src/gen","license-header":"license-header"},"_npmUser":{"name":"d0whc3r","email":"d0whc3r@gmail.com"},"repository":{"url":"git+https://github.com/bufbuild/protobuf-es.git","type":"git","directory":"packages/protoc-gen-es"},"_npmVersion":"10.9.2","description":"Protocol Buffers code generator for ECMAScript","directories":{},"_nodeVersion":"22.16.0","dependencies":{"@bufbuild/cel":"^0.3.0","@bufbuild/cel-spec":"^0.3.0","@bufbuild/protobuf":"2.10.0","@bufbuild/protoplugin":"2.10.0"},"_hasShrinkwrap":false,"devDependencies":{"upstream-protobuf":"*"},"preferUnplugged":true,"peerDependencies":{"@bufbuild/protobuf":"2.10.0"},"peerDependenciesMeta":{"@bufbuild/protobuf":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/protoc-gen-es_2.10.0_1761256257834_0.694123487649891","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@d0whc3r/protoc-gen-es","version":"1.0.5","keywords":["protobuf","schema","typescript","ecmascript","protoc-plugin"],"license":"Apache-2.0","_id":"@d0whc3r/protoc-gen-es@1.0.5","maintainers":[{"name":"d0whc3r","email":"d0whc3r@gmail.com"}],"homepage":"https://github.com/d0whc3r/protobuf-es#readme","bugs":{"url":"https://github.com/d0whc3r/protobuf-es/issues"},"bin":{"protoc-gen-es":"bin/protoc-gen-es"},"dist":{"shasum":"566be9b1c0f6357a41949ada7e962face3ccc878","tarball":"https://registry.npmjs.org/@d0whc3r/protoc-gen-es/-/protoc-gen-es-1.0.5.tgz","fileCount":14,"integrity":"sha512-YdT9MSK2UGdHwsZ9+9zE1nI858mvhOD32AZJEOTyg1hQkVK6tm0SMra0D7ecfLLmrPcCiFM73xAyG7ROd0jPbA==","signatures":[{"sig":"MEQCIC5/REkWqnmNQLkRO3fjTuB5UKZm0Eo5jbQ1pVn5/9LNAiBw66hF3j5iWR9Iv0ZYaZ8izEkizcoE3uuBN+QMPrIYSQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":81702},"engines":{"node":">=20"},"gitHead":"331312ed3f9c1b2bb25aff68b169a3c90ff264b3","scripts":{"lint":"biome lint --error-on-warnings","build":"../../node_modules/typescript/bin/tsc --project tsconfig.json --outDir ./dist/cjs","format":"biome format --write","prebuild":"rm -rf ./dist/cjs/*","bootstrap":"protoc --es_out=src/gen --es_opt=target=ts,import_extension=js --proto_path proto proto/minimal-validate.proto","postbootstrap":"license-header src/gen","license-header":"license-header"},"_npmUser":{"name":"d0whc3r","email":"d0whc3r@gmail.com"},"repository":{"url":"git+https://github.com/d0whc3r/protobuf-es.git","type":"git","directory":"packages/protoc-gen-es"},"_npmVersion":"11.6.2","description":"Protocol Buffers code generator for ECMAScript","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@bufbuild/cel":"^0.3.0","@bufbuild/cel-spec":"^0.3.0","@bufbuild/protobuf":"2.10.0","@bufbuild/protoplugin":"2.10.0"},"_hasShrinkwrap":false,"devDependencies":{"upstream-protobuf":"*"},"preferUnplugged":true,"peerDependencies":{"@bufbuild/protobuf":"2.10.0"},"peerDependenciesMeta":{"@bufbuild/protobuf":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/protoc-gen-es_1.0.5_1761342932461_0.4643298799459292","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@d0whc3r/protoc-gen-es","version":"1.0.6","keywords":["protobuf","schema","typescript","ecmascript","protoc-plugin"],"license":"Apache-2.0","_id":"@d0whc3r/protoc-gen-es@1.0.6","maintainers":[{"name":"d0whc3r","email":"d0whc3r@gmail.com"}],"homepage":"https://github.com/d0whc3r/protobuf-es#readme","bugs":{"url":"https://github.com/d0whc3r/protobuf-es/issues"},"bin":{"protoc-gen-es":"bin/protoc-gen-es"},"dist":{"shasum":"81993cfe4db51a0e8476c194cf71cd97223b2699","tarball":"https://registry.npmjs.org/@d0whc3r/protoc-gen-es/-/protoc-gen-es-1.0.6.tgz","fileCount":14,"integrity":"sha512-OgKVZ7WYP5VUGs1CwXWnpoYR8BZpKifBQq3+ru1EeXPGpYGxz+D/sB2lEozNKbtDK9aTXH5MlWc/nod7grA0Sg==","signatures":[{"sig":"MEQCIEJNAPO1gNluJOHBVttGyqn6f/fJ4b5I/7+8480+VSJbAiBsx/6CQ2YXx9gQmEyhJdM+8Wh8hLkJXwwJYQ7IYe4n4g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":81701},"engines":{"node":">=20"},"gitHead":"65d098282290f406308f20b6ff2c39a5f9b13083","scripts":{"lint":"biome lint --error-on-warnings","build":"../../node_modules/typescript/bin/tsc --project tsconfig.json --outDir ./dist/cjs","format":"biome format --write","prebuild":"rm -rf ./dist/cjs/*","bootstrap":"protoc --es_out=src/gen --es_opt=target=ts,import_extension=js --proto_path proto proto/minimal-validate.proto","postbootstrap":"license-header src/gen","license-header":"license-header"},"_npmUser":{"name":"d0whc3r","email":"d0whc3r@gmail.com"},"repository":{"url":"git+https://github.com/d0whc3r/protobuf-es.git","type":"git","directory":"packages/protoc-gen-es"},"_npmVersion":"11.6.2","description":"Protocol Buffers code generator for ECMAScript","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@bufbuild/cel":"^0.3.0","@bufbuild/cel-spec":"^0.3.0","@bufbuild/protobuf":"2.10.0","@bufbuild/protoplugin":"2.10.0"},"_hasShrinkwrap":false,"devDependencies":{"upstream-protobuf":"*"},"preferUnplugged":true,"peerDependencies":{"@bufbuild/protobuf":"2.10.0"},"peerDependenciesMeta":{"@bufbuild/protobuf":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/protoc-gen-es_1.0.6_1761343949956_0.25073982921153326","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@d0whc3r/protoc-gen-es","version":"1.0.7","license":"Apache-2.0","description":"Protocol Buffers code generator for ECMAScript","keywords":["protobuf","schema","typescript","ecmascript","protoc-plugin"],"repository":{"type":"git","url":"git+https://github.com/d0whc3r/protobuf-es.git","directory":"packages/protoc-gen-es"},"bin":{"protoc-gen-es":"bin/protoc-gen-es"},"engines":{"node":">=20"},"scripts":{"prebuild":"rm -rf ./dist/cjs/*","build":"../../node_modules/typescript/bin/tsc --project tsconfig.json --outDir ./dist/cjs","bootstrap":"protoc --es_out=src/gen --es_opt=target=ts,import_extension=js --proto_path proto proto/minimal-validate.proto","postbootstrap":"license-header src/gen","format":"biome format --write","license-header":"license-header","lint":"biome lint --error-on-warnings"},"preferUnplugged":true,"dependencies":{"@bufbuild/cel":"^0.3.0","@bufbuild/cel-spec":"^0.3.0","@bufbuild/protobuf":"2.10.0","@bufbuild/protoplugin":"2.10.0"},"devDependencies":{"upstream-protobuf":"*"},"peerDependencies":{"@bufbuild/protobuf":"2.10.0"},"peerDependenciesMeta":{"@bufbuild/protobuf":{"optional":true}},"gitHead":"f7a13e6bfb3735a8d2726abf2db65069624cd7b1","_id":"@d0whc3r/protoc-gen-es@1.0.7","bugs":{"url":"https://github.com/d0whc3r/protobuf-es/issues"},"homepage":"https://github.com/d0whc3r/protobuf-es#readme","_nodeVersion":"22.20.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-voNJSnUoR+NH0eDqtOvsPJffIoO3O2MzIxICSgnfax5uRpj4txrjJCnG1/o4zITy1Hslqyr0y1k2G+BR95sXrw==","shasum":"ce2f55b45ff03db2679c16a6fb392de403e43c17","tarball":"https://registry.npmjs.org/@d0whc3r/protoc-gen-es/-/protoc-gen-es-1.0.7.tgz","fileCount":14,"unpackedSize":81701,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDFtwOt4VkDTWrrMjHNgqMRDqCBMcnL2UbCeRuANXMQFwIhAMfqkHnGlhiODnupYdsKxR7UO4e3gnYHSLLGMwkagj1E"}]},"_npmUser":{"name":"d0whc3r","email":"d0whc3r@gmail.com"},"directories":{},"maintainers":[{"name":"d0whc3r","email":"d0whc3r@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/protoc-gen-es_1.0.7_1761345126127_0.8597591359456447"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-23T21:50:57.713Z","modified":"2025-10-24T22:32:06.570Z","2.10.0":"2025-10-23T21:50:58.041Z","1.0.5":"2025-10-24T21:55:32.653Z","1.0.6":"2025-10-24T22:12:30.214Z","1.0.7":"2025-10-24T22:32:06.393Z"},"bugs":{"url":"https://github.com/d0whc3r/protobuf-es/issues"},"license":"Apache-2.0","homepage":"https://github.com/d0whc3r/protobuf-es#readme","keywords":["protobuf","schema","typescript","ecmascript","protoc-plugin"],"repository":{"type":"git","url":"git+https://github.com/d0whc3r/protobuf-es.git","directory":"packages/protoc-gen-es"},"description":"Protocol Buffers code generator for ECMAScript","maintainers":[{"name":"d0whc3r","email":"d0whc3r@gmail.com"}],"readme":"# @d0whc3r/protoc-gen-es\n\nThe code generator plugin for Protocol Buffers for ECMAScript. Learn more about the project at\n[github.com/bufbuild/protobuf-es](https://github.com/bufbuild/protobuf-es).\n\n## Installation\n\n`protoc-gen-es` generates base types—messages and enumerations—from your Protocol Buffer\nschema. The generated code requires the runtime library [@bufbuild/protobuf](https://www.npmjs.com/package/@bufbuild/protobuf).\nIt's compatible with Protocol Buffer compilers like [buf](https://github.com/bufbuild/buf) and [protoc](https://github.com/protocolbuffers/protobuf/releases).\n\nTo install the runtime library and the plugin, run:\n\n```shell\nnpm install @bufbuild/protobuf\nnpm install --save-dev @d0whc3r/protoc-gen-es\n```\n\n## Generating code\n\n### With buf\n\n```bash\nnpm install --save-dev @bufbuild/buf\n```\n\nAdd a new `buf.gen.yaml` configuration file:\n\n```yaml\n# Learn more: https://buf.build/docs/configuration/v2/buf-gen-yaml\nversion: v2\nplugins:\n  # This will invoke protoc-gen-es and write output to src/gen\n  - local: protoc-gen-es\n    out: src/gen\n    opt:\n      # Add more plugin options here\n      - target=ts\n```\n\nTo generate code for all Protobuf files within your project, run:\n\n```bash\nnpx buf generate\n```\n\nNote that `buf` can generate from various [inputs](https://buf.build/docs/reference/inputs),\nnot just local Protobuf files.\n\n### With `protoc`\n\n```bash\nPATH=$PATH:$(pwd)/node_modules/.bin \\\n  protoc -I . \\\n  --es_out src/gen \\\n  --es_opt target=ts \\\n  a.proto b.proto c.proto\n```\n\nNote that `node_modules/.bin` needs to be added to the `$PATH` so that the Protobuf compiler can find the plugin. This\nhappens automatically with npm scripts.\n\nIf you use Yarn, versions v2 and above don't use a `node_modules` directory, so you need to change the variable a\nbit:\n\n```shellsession\nPATH=$(dirname $(yarn bin protoc-gen-es)):$PATH\n```\n\n## Plugin options\n\n### `target`\n\nThis option controls whether the plugin generates JavaScript, TypeScript, or TypeScript declaration files. Possible\nvalues:\n\n- `target=js`: Generates a `_pb.js` file for every `.proto` input file.\n- `target=ts`: Generates a `_pb.ts` file for every `.proto` input file.\n- `target=dts`: Generates a `_pb.d.ts` file for every `.proto` input file.\n\nYou can pass multiple values by separating them with `+`—for example, `target=js+dts`.\n\nBy default, it generates JavaScript and TypeScript declaration files, which produces the smallest code size and is the\nmost compatible with various bundler configurations. If you prefer to generate TypeScript, use `target=ts`.\n\n### `import_extension`\n\nBy default, `protoc-gen-es` doesn't add file extensions to import paths. However, some\nenvironments require an import extension. For example, using ECMAScript modules in Node.js\nrequires the `.js` extension, and Deno requires `.ts`. With this plugin option, you can add `.js`/`.ts` extensions in\nimport paths with the given value. Possible values:\n\n- `import_extension=none`: Doesn't add an extension. (Default)\n- `import_extension=js`: Adds the `.js` extension.\n- `import_extension=ts`. Adds the `.ts` extension.\n\n### `js_import_style`\n\nBy default, `protoc-gen-es` generates ECMAScript `import` and `export` statements. For use cases where CommonJS is\ndifficult to avoid, this option can be used to generate CommonJS `require()` calls. Possible values:\n\n- `js_import_style=module`: Generates ECMAScript `import`/`export` statements. (Default)\n- `js_import_style=legacy_commonjs`: Generates CommonJS `require()` calls.\n\n### `keep_empty_files=true`\n\nBy default, `protoc-gen-es` omits empty files from the plugin output. This option disables pruning of empty files to\nallow for smooth interoperation with Bazel and similar tooling that requires all output files to be declared ahead of\ntime. Unless you use Bazel, you probably don't need this option.\n\n### `ts_nocheck=true`\n\n`protoc-gen-es` generates valid TypeScript for current versions of the TypeScript compiler with standard settings.\nIf you use compiler settings that yield an error for generated code, setting this option generates an annotation at\nthe top of each file to skip type checks: `// @ts-nocheck`.\n\n### `json_types=true`\n\nGenerates JSON types for every Protobuf message and enumeration. Calling `toJson()` automatically returns the JSON type\nif available. Learn more about [JSON types](https://github.com/bufbuild/protobuf-es/blob/main/MANUAL.md#json-types).\n\n### `valid_types` (experimental)\n\nGenerates a Valid type for every Protobuf message. Possible values:\n\n- `valid_types=legacy_required`: Message fields with the `required` label, or the Edition feature\n  `features.field_presence=LEGACY_REQUIRED`, are generated as non-optional properties.\n- `valid_types=protovalidate_required`: Message fields with protovalidate's [`required` rule](https://buf.build/docs/reference/protovalidate/rules/field_rules/#required)\n  rule are generated as non-optional properties.\n\nYou can combine both options with `+`—for example, `valid_types=legacy_required+protovalidate_required`.\n\nLearn more about [Valid types](https://github.com/bufbuild/protobuf-es/blob/main/MANUAL.md#valid-types).\n\n### `buf_validate` (experimental)\n\nAnalyzes CEL (Common Expression Language) constraints from buf.validate message-level rules and modifies the generated\nTypeScript types to reflect read-only patterns. When enabled, `protoc-gen-es` detects specific CEL patterns that\nindicate fields should not be set by client code, and applies `Omit<>` type transformations to exclude those fields\nfrom the generated message types.\n\nTo enable this feature, set the option to `true`:\n\n```yaml\n# buf.gen.yaml\nversion: v2\nplugins:\n  - local: protoc-gen-es\n    out: src/gen\n    opt:\n      - target=ts\n      - buf_validate=true\n```\n\nOr with `protoc`:\n\n```bash\nprotoc --es_out=. --es_opt=buf_validate=true *.proto\n```\n\n#### Supported CEL patterns\n\nThe `buf_validate` option recognizes and processes the following CEL constraint patterns:\n\n**1. Field equality checks (`==`)**\n\nWhen a CEL constraint requires a field to equal a specific value (empty string, zero, false), that field is omitted:\n\n```protobuf\nmessage Example {\n  option (buf.validate.message).cel = {\n    id: \"readonly_name\",\n    message: \"name must be empty\",\n    expression: \"this.name == ''\"\n  };\n\n  string name = 1;      // Omitted from generated type\n  string other = 2;     // Available\n}\n```\n\n**2. Field presence checks (`!has()`)**\n\nFields that must not be set according to `!has()` constraints are omitted:\n\n```protobuf\nmessage Example {\n  option (buf.validate.message).cel = {\n    id: \"not_has_field\",\n    message: \"optional_field must not be set\",\n    expression: \"!has(this.optional_field)\"\n  };\n\n  string optional_field = 1;  // Omitted from generated type\n  string other = 2;           // Available\n}\n```\n\n**3. Nested field constraints (2 levels)**\n\nConstraints on nested fields apply `Omit<>` to the nested message type:\n\n```protobuf\nmessage Parent {\n  option (buf.validate.message).cel = {\n    id: \"nested_constraint\",\n    message: \"child.name must be empty\",\n    expression: \"this.child.name == ''\"\n  };\n\n  Child child = 1;  // Type: Omit<Child, \"name\"> | undefined\n  string other = 2;\n}\n\nmessage Child {\n  string name = 1;   // Omitted in Parent's child field\n  int32 age = 2;     // Available in Parent's child field\n}\n```\n\n**4. Logical AND constraints (`&&`)**\n\nFields combined with `&&` are all omitted:\n\n```protobuf\nmessage Example {\n  option (buf.validate.message).cel = {\n    id: \"and_constraint\",\n    message: \"field1 and field2 must be empty\",\n    expression: \"this.field1 == '' && this.field2 == ''\"\n  };\n\n  string field1 = 1;  // Omitted\n  string field2 = 2;  // Omitted\n  string field3 = 3;  // Available\n}\n```\n\n**5. Multiple CEL rules**\n\nYou can apply multiple independent constraints:\n\n```protobuf\nmessage Example {\n  option (buf.validate.message).cel = {\n    id: \"rule1\",\n    message: \"field1 must be empty\",\n    expression: \"this.field1 == ''\"\n  };\n  option (buf.validate.message).cel = {\n    id: \"rule2\",\n    message: \"field2 must not be set\",\n    expression: \"!has(this.field2)\"\n  };\n\n  string field1 = 1;  // Omitted by rule1\n  string field2 = 2;  // Omitted by rule2\n  string field3 = 3;  // Available\n}\n```\n\n#### Patterns that DO NOT cause omissions\n\nThe following CEL patterns are validated at runtime but do NOT modify the TypeScript types:\n\n- **Inequality checks** (`!=`): `this.name != 'admin'` - name is still available\n- **Comparison operators** (`<`, `>`, `<=`, `>=`): `this.age > 18` - age is still available\n- **Logical OR** (`||`): `this.field1 == '' || this.field2 == ''` - both fields still available\n- **Size constraints**: `size(this.items) == 0` - items is still available\n- **Complex conditions**: Any condition that doesn't strictly require a field to be unset/empty\n\n#### Benefits\n\nUsing `buf_validate=true` provides several advantages:\n\n1. **Type safety**: The TypeScript compiler prevents setting fields that should remain read-only according to your\n   validation rules.\n\n2. **Self-documenting code**: The generated types clearly indicate which fields are constrained.\n\n3. **Catch errors early**: Invalid field access is caught at compile-time rather than runtime.\n\n4. **Consistency**: Ensures that CEL validation rules and TypeScript types are in sync.\n\n#### Example\n\nGiven this proto file:\n\n```protobuf\nsyntax = \"proto3\";\n\nimport \"buf/validate/validate.proto\";\n\nmessage UserProfile {\n  option (buf.validate.message).cel = {\n    id: \"system_fields\",\n    message: \"system fields must be empty\",\n    expression: \"this.id == '' && this.created_at == ''\"\n  };\n  option (buf.validate.message).cel = {\n    id: \"internal_flag\",\n    message: \"internal flag must not be set\",\n    expression: \"!has(this.internal_flag)\"\n  };\n\n  string id = 1;\n  string created_at = 2;\n  string internal_flag = 3;\n  string name = 4;\n  string email = 5;\n}\n```\n\nThe generated TypeScript type with `buf_validate=true` will be:\n\n```typescript\nexport type UserProfile = Message<\"UserProfile\"> &\n  Omit<\n    {\n      id: string;\n      createdAt: string;\n      internalFlag: string;\n      name: string;\n      email: string;\n    },\n    \"id\" | \"createdAt\" | \"internalFlag\"\n  >;\n\n// Effectively:\nexport type UserProfile = Message<\"UserProfile\"> & {\n  // id: omitted\n  // createdAt: omitted\n  // internalFlag: omitted\n  name: string;\n  email: string;\n};\n```\n\nWhen creating instances:\n\n```typescript\nconst profile = create(UserProfileSchema, {\n  name: \"John Doe\",\n  email: \"john@example.com\",\n  // TypeScript error: id, createdAt, and internalFlag cannot be set\n});\n```\n\n#### Combining with other options\n\n`buf_validate` works alongside other plugin options:\n\n```yaml\n# buf.gen.yaml\nversion: v2\nplugins:\n  - local: protoc-gen-es\n    out: src/gen\n    opt:\n      - target=ts\n      - import_extension=js\n      - buf_validate=true\n      - json_types=true\n```\n\n#### Limitations\n\n- This is an **experimental feature** and may change in future versions\n- Only message-level CEL constraints (`buf.validate.message`) are analyzed\n- Field-level constraints (`buf.validate.field`) are not processed (except for `required` when used with `valid_types`)\n- Complex CEL expressions beyond the supported patterns are ignored\n- The feature does not validate CEL syntax—invalid expressions are skipped silently\n- **Multi-level nested constraints**: For constraints on deeply nested fields (e.g., `this.parent.child.grandchild`),\n  the generated type omits the immediate child field (`child`) from the parent. This is a pragmatic simplification\n  due to TypeScript type system limitations. For example:\n\n  ```protobuf\n  message Example {\n    option (buf.validate.message).cel = {\n      expression: \"this.parent.child.grandchild == ''\"\n    };\n    Parent parent = 1;  // Generated as: parent?: Omit<Parent, 'child'>\n  }\n  ```\n\n  For precise control over deeply nested fields, consider using multiple constraints at different levels or\n  restructuring your message definitions.\n\nLearn more about [buf.validate and protovalidate](https://github.com/bufbuild/protovalidate).\n","readmeFilename":"README.md"}