{"_id":"@bertelli.luca/helm-schema","_rev":"6-329e3c50500698431fd5023480bfa402","time":{"created":"2024-03-26T09:42:30.232Z","1.1.0":"2024-03-26T08:24:34.171Z","modified":"2024-04-18T08:27:08.988Z","1.2.0":"2024-03-26T08:35:18.000Z","1.2.1":"2024-03-26T09:09:16.152Z","1.0.0":"2024-03-26T09:42:30.576Z","1.0.1":"2024-03-26T09:48:37.423Z","1.3.0":"2024-04-18T08:27:08.791Z"},"name":"@bertelli.luca/helm-schema","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"@bertelli.luca/helm-schema","version":"1.0.0","main":"dist/index.js","license":"Apache-2.0","publishConfig":{"access":"public"},"bin":{"helm-schema":"bin/index.js"},"engines":{"node":">=16.17.0"},"scripts":{"dev":"tsc --watch --outDir build","build":"ncc build ./src/index.ts","test":"jest","snapshots":"yarn build && yarn test -u && ./bin/index.js -f .github/e2e/values3.yaml > .github/e2e/values3.schema.json","lint":"eslint src/**/*.ts"},"dependencies":{"comment-parser":"^1.4.0","yaml":"^2.3.2"},"devDependencies":{"@types/js-yaml":"^4.0.5","@types/json-schema":"^7.0.12","@types/node":"^20.5.7","@typescript-eslint/eslint-plugin":"^6.5.0","@typescript-eslint/parser":"^6.5.0","@vercel/ncc":"^0.38.0","eslint":"^8.48.0","eslint-plugin-jest":"^27.2.3","jest":"^29.6.4","ts-jest":"^29.1.1","tsc":"^2.0.4","typescript":"^5.2.2"},"gitHead":"9014a928bf1f4b1ff35507481d82f685cfe33462","description":"[JSON Schema](https://json-schema.org) generator for your [HELM charts](https://helm.sh).","_id":"@bertelli.luca/helm-schema@1.0.0","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-UbcFX+2SFYp7uaBzIOQwLHTnxO/NNw7xavrJGapCro3KbzKzpZfKXOwAnYog+hlVIpaUfbQdJc/EObmt+3WE0A==","shasum":"42f40c420fd9982415c9ab1c1d201c7b69746353","tarball":"https://registry.npmjs.org/@bertelli.luca/helm-schema/-/helm-schema-1.0.0.tgz","fileCount":5,"unpackedSize":462810,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEuuggWODAQXP3aRQXrwaPlPD/MxNhlZMPGp4tkHRXtRAiAc/AKWNwwtTqQlpuPfOdFwi5tU4XgoEhbha2qwgoKxPw=="}]},"_npmUser":{"name":"bertelli.luca","email":"bertelli.luca@proton.me"},"directories":{},"maintainers":[{"name":"bertelli.luca","email":"bertelli.luca@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/helm-schema_1.0.0_1711446150346_0.9684438756369844"},"_hasShrinkwrap":false},"1.0.1":{"name":"@bertelli.luca/helm-schema","version":"1.0.1","main":"dist/index.js","license":"Apache-2.0","publishConfig":{"access":"public"},"bin":{"helm-schema":"bin/index.js"},"engines":{"node":">=16.17.0"},"scripts":{"dev":"tsc --watch --outDir build","build":"ncc build ./src/index.ts","test":"jest","snapshots":"yarn build && yarn test -u && ./bin/index.js -f .github/e2e/values3.yaml > .github/e2e/values3.schema.json","lint":"eslint src/**/*.ts"},"dependencies":{"comment-parser":"^1.4.0","yaml":"^2.3.2"},"devDependencies":{"@types/js-yaml":"^4.0.5","@types/json-schema":"^7.0.12","@types/node":"^20.5.7","@typescript-eslint/eslint-plugin":"^6.5.0","@typescript-eslint/parser":"^6.5.0","@vercel/ncc":"^0.38.0","eslint":"^8.48.0","eslint-plugin-jest":"^27.2.3","jest":"^29.6.4","ts-jest":"^29.1.1","tsc":"^2.0.4","typescript":"^5.2.2"},"gitHead":"9410b245400931b344648968c688b9a51c3939bb","description":"[JSON Schema](https://json-schema.org) generator for your [HELM charts](https://helm.sh).","_id":"@bertelli.luca/helm-schema@1.0.1","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-zoYzKNxEQK+O0P8/HlA398ReXhl+3/ZMTBwwnY9BS6nDFrpkz/OGd1dydU7nvcqtmWX/2r+0lPUHV86OfRYJCw==","shasum":"6935621c6c2ec58aa1159e5af079e7ca145cc531","tarball":"https://registry.npmjs.org/@bertelli.luca/helm-schema/-/helm-schema-1.0.1.tgz","fileCount":5,"unpackedSize":465314,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFMe1mXhY4YA04TjVLLr/Vf32OxngGEEYLuq6h8pJ9zUAiEA7pgoMU4llEiE9ZgxOF1wuSlOrmceUhFkbEOroLhKlcw="}]},"_npmUser":{"name":"bertelli.luca","email":"bertelli.luca@proton.me"},"directories":{},"maintainers":[{"name":"bertelli.luca","email":"bertelli.luca@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/helm-schema_1.0.1_1711446517272_0.6276527832528658"},"_hasShrinkwrap":false},"1.3.0":{"name":"@bertelli.luca/helm-schema","version":"1.3.0","main":"dist/index.js","license":"Apache-2.0","publishConfig":{"access":"public"},"bin":{"helm-schema":"bin/index.js"},"engines":{"node":">=16.17.0"},"scripts":{"dev":"tsc --watch --outDir build","build":"ncc build ./src/index.ts","test":"jest","snapshots":"yarn build && yarn test -u && ./bin/index.js -f .github/e2e/values1.yaml > .github/e2e/values1.schema.json && ./bin/index.js -f .github/e2e/values2.yaml > .github/e2e/values2.schema.json && ./bin/index.js -f .github/e2e/values3.yaml > .github/e2e/values3.schema.json","lint":"eslint src/**/*.ts"},"dependencies":{"comment-parser":"^1.4.0","yaml":"^2.3.2"},"devDependencies":{"@types/js-yaml":"^4.0.5","@types/json-schema":"^7.0.12","@types/node":"^20.5.7","@typescript-eslint/eslint-plugin":"^6.5.0","@typescript-eslint/parser":"^6.5.0","@vercel/ncc":"^0.38.0","eslint":"^8.48.0","eslint-plugin-jest":"^27.2.3","jest":"^29.6.4","ts-jest":"^29.1.1","tsc":"^2.0.4","typescript":"^5.2.2"},"gitHead":"bd880677165ad6293546e733b0265266b308bb75","description":"[JSON Schema](https://json-schema.org) generator for your [HELM charts](https://helm.sh).","_id":"@bertelli.luca/helm-schema@1.3.0","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-26uzP4sYDT64QTlmhIMyinzryMYfAfUQCzcbPehYgsNRz3G7108en8APavqbEcqTQaZQI2VP5d7PvSVJX5GhhA==","shasum":"3f526ed9cfe5d7c3d4f7aba52c99d97339bd2887","tarball":"https://registry.npmjs.org/@bertelli.luca/helm-schema/-/helm-schema-1.3.0.tgz","fileCount":5,"unpackedSize":466747,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAw17kN1HB1nwfW3fIZfE8DYwtoLGYG/+uiOE3Tgge24AiAGc76ZuMHoJ0mBth3uuWrRCYtL5ioFkynI1QCyuWg4eA=="}]},"_npmUser":{"name":"bertelli.luca","email":"bertelli.luca@proton.me"},"directories":{},"maintainers":[{"name":"bertelli.luca","email":"bertelli.luca@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/helm-schema_1.3.0_1713428828601_0.8639244171895042"},"_hasShrinkwrap":false}},"maintainers":[{"name":"bertelli.luca","email":"bertelli.luca@proton.me"}],"description":"[JSON Schema](https://json-schema.org) generator for your [HELM charts](https://helm.sh).","license":"Apache-2.0","readme":"# @bertelli.luca/helm-schema ![npm (scoped)](https://img.shields.io/npm/v/%40bertelli.luca/helm-schema) [![Publish demo](https://github.com/banshee86vr/helm-schema/actions/workflows/demo.yaml/badge.svg)](https://github.com/banshee86vr/helm-schema/actions/workflows/demo.yaml) [![Tests n publish](https://github.com/banshee86vr/helm-schema/actions/workflows/tests.yaml/badge.svg)](https://github.com/banshee86vr/helm-schema/actions/workflows/tests.yaml)\n\n[JSON Schema](https://json-schema.org) generator for your [HELM charts](https://helm.sh).\n\nProject forked from: https://github.com/SocialGouv/helm-schema\n\nDemo: https://banshee86vr.github.io/helm-schema\n\n## Usage\n\nExample `values.yaml`, following [JSDoc standards](https://devhints.io/jsdoc)\n\n```yaml\n# @param {object} smtp Your SMTP setup\nsmtp:\n  # @param {string} host SMTP hostname\n  host:\n  # @param {number} [port] SMTP port\n  port: 587\n\n# @param {enum{IfNotPresent,Always,Never}} pullPolicy Specifies whether a container image should be created\npullPolicy: IfNotPresent\n# @param {pattern{^.*$}} name Application name validated by a pattern\nname: JSONSchemaGenerator\n# @param {integer{min=0,max=5}} replicaCount Number of possible replica with a fixed range\nreplicaCount: 3\n# @param {string{minLength=10,maxLength=15}} username Username with limited length range\nusername: banshee86vr\n# @param {string[CreateNamespace=true,Prune=false,SkipDryRunOnMissingResource=true]} syncOptions Options allow you to specify whole app sync-options\nsyncOptions: []\n\n# Setup your securityContext to reduce security risks, see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/\n# @param {https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.24.0/_definitions.json#/definitions/io.k8s.api.core.v1.PodSecurityContext} [securityContext]\nsecurityContext:\n```\n\nTo generate a JSON schema from your `values.yaml` :\n\n```sh\nnpx @bertelli.luca/helm-schema -f values.yaml\n```\n\nOr via TS :\n\n```js\nimport { toJsonSchema } from \"@bertelli.luca/helm-schema\";\n\nimport yaml from \"./values.yaml\";\n\nconst schema = toJsonSchema(yaml);\n```\n\nYou get such JSON schema in result :\n\n```json\n{\n  \"type\": \"object\",\n  \"$schema\": \"http://json-schema.org/draft-07/schema\",\n  \"required\": [\"pullPolicy\", \"name\", \"replicaCount\", \"username\"],\n  \"properties\": {\n    \"pullPolicy\": {\n      \"type\": [\"string\", \"boolean\", \"number\", \"object\", \"array\"],\n      \"enum\": [\"IfNotPresent\", \"Always\", \"Never\"],\n      \"title\": \"Specifies whether a container image should be created\",\n      \"default\": \"IfNotPresent\"\n    },\n    \"name\": {\n      \"type\": \"string\",\n      \"pattern\": \"^.*$\",\n      \"title\": \"Application name validated by a pattern\",\n      \"default\": \"JSONSchemaGenerator\"\n    },\n    \"replicaCount\": {\n      \"type\": \"integer\",\n      \"minimum\": 0,\n      \"maximum\": 5,\n      \"title\": \"Number of possible replica with a fixed range\",\n      \"default\": \"3\"\n    },\n    \"username\": {\n      \"type\": \"string\",\n      \"minLength\": 10,\n      \"maxLength\": 15,\n      \"title\": \"Username with limited length range\",\n      \"default\": \"banshee86vr\"\n    },\n    \"syncOptions\": {\n      \"type\": \"array\",\n      \"default\": [\n        \"CreateNamespace=true\",\n        \"Prune=false\",\n        \"SkipDryRunOnMissingResource=true\"\n      ],\n      \"title\": \"Options allow you to specify whole app sync-options\",\n      \"items\": {\n        \"type\": [\"string\"]\n      }\n    }\n  }\n}\n```\n\nThis schema can then be used with your favorite editor for HELM values validation.\n\n⚠️ Be sure to add an `$id` to the schema if its meant to be referenced from other schemas\n\n## Dev\n\nupdate snapshots : `yarn snapshots`\n","readmeFilename":"README.md"}