From d49212e8c534ebe3c5aa1a8a0e429aaf9314dc28 Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Wed, 4 Feb 2026 23:18:25 +0530 Subject: [PATCH 01/18] feat: added package and build info --- .craft.yml | 7 +++ .gitignore | 47 ++++++++++++++++ LICENSE.md | 105 ++++++++++++++++++++++++++++++++++++ bun.lock | 126 +++++++++++++++++++++++++++++++++++++++++++ openapi-ts.config.ts | 6 +++ package.json | 30 +++++++++++ tsconfig.json | 28 ++++++++++ 7 files changed, 349 insertions(+) create mode 100644 .craft.yml create mode 100644 .gitignore create mode 100644 LICENSE.md create mode 100644 bun.lock create mode 100644 openapi-ts.config.ts create mode 100644 package.json create mode 100644 tsconfig.json diff --git a/.craft.yml b/.craft.yml new file mode 100644 index 0000000..15ec2e7 --- /dev/null +++ b/.craft.yml @@ -0,0 +1,7 @@ +minVersion: '2.19.0' +changelog: + policy: auto +versioning: + policy: auto +targets: + - name: npm diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e9259aa --- /dev/null +++ b/.gitignore @@ -0,0 +1,47 @@ +# dependencies (bun install) +node_modules + +# output +out +dist +dist-bin +*.tgz + +# fossilize build cache +.node-cache + +# code coverage +coverage +*.lcov + +# test artifacts +.test-tmp + +# logs +logs +_.log +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# caches +.eslintcache +.cache +*.tsbuildinfo +.turbo + +# docs +docs/dist +docs/node_modules +docs/.astro + +# IntelliJ based IDEs +.idea + +# Finder (MacOS) folder config +.DS_Store diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..6e9bafc --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,105 @@ +# Functional Source License, Version 1.1, Apache 2.0 Future License + +## Abbreviation + +FSL-1.1-Apache-2.0 + +## Notice + +Copyright 2025 Functional Software, Inc. dba Sentry + +## Terms and Conditions + +### Licensor ("We") + +The party offering the Software under these Terms and Conditions. + +### The Software + +The "Software" is each version of the software that we make available under +these Terms and Conditions, as indicated by our inclusion of these Terms and +Conditions with the Software. + +### License Grant + +Subject to your compliance with this License Grant and the Patents, +Redistribution and Trademark clauses below, we hereby grant you the right to +use, copy, modify, create derivative works, publicly perform, publicly display +and redistribute the Software for any Permitted Purpose identified below. + +### Permitted Purpose + +A Permitted Purpose is any purpose other than a Competing Use. A Competing Use +means making the Software available to others in a commercial product or +service that: + +1. substitutes for the Software; + +2. substitutes for any other product or service we offer using the Software + that exists as of the date we make the Software available; or + +3. offers the same or substantially similar functionality as the Software. + +Permitted Purposes specifically include using the Software: + +1. for your internal use and access; + +2. for non-commercial education; + +3. for non-commercial research; and + +4. in connection with professional services that you provide to a licensee + using the Software in accordance with these Terms and Conditions. + +### Patents + +To the extent your use for a Permitted Purpose would necessarily infringe our +patents, the license grant above includes a license under our patents. If you +make a claim against any party that the Software infringes or contributes to +the infringement of any patent, then your patent license to the Software ends +immediately. + +### Redistribution + +The Terms and Conditions apply to all copies, modifications and derivatives of +the Software. + +If you redistribute any copies, modifications or derivatives of the Software, +you must include a copy of or a link to these Terms and Conditions and not +remove any copyright notices provided in or with the Software. + +### Disclaimer + +THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR +PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT. + +IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE +SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, +EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE. + +### Trademarks + +Except for displaying the License Details and identifying us as the origin of +the Software, you have no right under these Terms and Conditions to use our +trademarks, trade names, service marks or product names. + +## Grant of Future License + +We hereby irrevocably grant you an additional license to use the Software under +the Apache License, Version 2.0 that is effective on the second anniversary of +the date we make the Software available. On or after that date, you may use the +Software under the Apache License, Version 2.0, in which case the following +will apply: + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. diff --git a/bun.lock b/bun.lock new file mode 100644 index 0000000..97c116c --- /dev/null +++ b/bun.lock @@ -0,0 +1,126 @@ +{ + "lockfileVersion": 1, + "configVersion": 1, + "workspaces": { + "": { + "name": "@sentry/api", + "devDependencies": { + "@hey-api/openapi-ts": "0.91.1", + "@types/node": "^22", + }, + }, + }, + "packages": { + "@hey-api/codegen-core": ["@hey-api/codegen-core@0.6.1", "", { "dependencies": { "@hey-api/types": "0.1.3", "ansi-colors": "4.1.3", "c12": "3.3.3", "color-support": "1.1.3" }, "peerDependencies": { "typescript": ">=5.5.3" } }, "sha512-khTIpxhKEAqmRmeLUnAFJQs4Sbg9RPokovJk9rRcC8B5MWH1j3/BRSqfpAIiJUBDU1+nbVg2RVCV+eQ174cdvw=="], + + "@hey-api/json-schema-ref-parser": ["@hey-api/json-schema-ref-parser@1.2.3", "", { "dependencies": { "@jsdevtools/ono": "^7.1.3", "@types/json-schema": "^7.0.15", "js-yaml": "^4.1.1", "lodash": "^4.17.21" } }, "sha512-gRbyyTjzpFVNmbD+Upn3w4dWV+bCXGJbff3A7leDO/tfNxSz1xIb6Ad/5UKtvEW9kDt/2Uyc3XkFZ6rpafvbfQ=="], + + "@hey-api/openapi-ts": ["@hey-api/openapi-ts@0.91.1", "", { "dependencies": { "@hey-api/codegen-core": "0.6.1", "@hey-api/json-schema-ref-parser": "1.2.3", "@hey-api/shared": "0.1.1", "@hey-api/types": "0.1.3", "ansi-colors": "4.1.3", "color-support": "1.1.3", "commander": "14.0.2" }, "peerDependencies": { "typescript": ">=5.5.3" }, "bin": { "openapi-ts": "bin/run.js" } }, "sha512-d16WR35UtthK/ihAIwJaKxrj/zvb5LbYwtVJCyZFFMin2qzDU8Y3Lpk78ensAykrLoaDLzpd0iIyt9JCP5Qmww=="], + + "@hey-api/shared": ["@hey-api/shared@0.1.1", "", { "dependencies": { "@hey-api/codegen-core": "0.6.1", "@hey-api/json-schema-ref-parser": "1.2.3", "@hey-api/types": "0.1.3", "ansi-colors": "4.1.3", "cross-spawn": "7.0.6", "open": "11.0.0", "semver": "7.7.3" }, "peerDependencies": { "typescript": ">=5.5.3" } }, "sha512-/irgNGXw9TL5aKB3S7jCLgh07vgDFkYjSjz7vEWO9xEe6MUhx76zSFzkPspk2UrLghYayvmaKPf1ky4XjNI9ZQ=="], + + "@hey-api/types": ["@hey-api/types@0.1.3", "", { "peerDependencies": { "typescript": ">=5.5.3" } }, "sha512-mZaiPOWH761yD4GjDQvtjS2ZYLu5o5pI1TVSvV/u7cmbybv51/FVtinFBeaE1kFQCKZ8OQpn2ezjLBJrKsGATw=="], + + "@jsdevtools/ono": ["@jsdevtools/ono@7.1.3", "", {}, "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg=="], + + "@types/json-schema": ["@types/json-schema@7.0.15", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="], + + "@types/node": ["@types/node@22.19.8", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-ebO/Yl+EAvVe8DnMfi+iaAyIqYdK0q/q0y0rw82INWEKJOBe6b/P3YWE8NW7oOlF/nXFNrHwhARrN/hdgDkraA=="], + + "ansi-colors": ["ansi-colors@4.1.3", "", {}, "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw=="], + + "argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="], + + "bundle-name": ["bundle-name@4.1.0", "", { "dependencies": { "run-applescript": "^7.0.0" } }, "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q=="], + + "c12": ["c12@3.3.3", "", { "dependencies": { "chokidar": "^5.0.0", "confbox": "^0.2.2", "defu": "^6.1.4", "dotenv": "^17.2.3", "exsolve": "^1.0.8", "giget": "^2.0.0", "jiti": "^2.6.1", "ohash": "^2.0.11", "pathe": "^2.0.3", "perfect-debounce": "^2.0.0", "pkg-types": "^2.3.0", "rc9": "^2.1.2" }, "peerDependencies": { "magicast": "*" }, "optionalPeers": ["magicast"] }, "sha512-750hTRvgBy5kcMNPdh95Qo+XUBeGo8C7nsKSmedDmaQI+E0r82DwHeM6vBewDe4rGFbnxoa4V9pw+sPh5+Iz8Q=="], + + "chokidar": ["chokidar@5.0.0", "", { "dependencies": { "readdirp": "^5.0.0" } }, "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw=="], + + "citty": ["citty@0.1.6", "", { "dependencies": { "consola": "^3.2.3" } }, "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ=="], + + "color-support": ["color-support@1.1.3", "", { "bin": { "color-support": "bin.js" } }, "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg=="], + + "commander": ["commander@14.0.2", "", {}, "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ=="], + + "confbox": ["confbox@0.2.2", "", {}, "sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ=="], + + "consola": ["consola@3.4.2", "", {}, "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA=="], + + "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], + + "default-browser": ["default-browser@5.5.0", "", { "dependencies": { "bundle-name": "^4.1.0", "default-browser-id": "^5.0.0" } }, "sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw=="], + + "default-browser-id": ["default-browser-id@5.0.1", "", {}, "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q=="], + + "define-lazy-prop": ["define-lazy-prop@3.0.0", "", {}, "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg=="], + + "defu": ["defu@6.1.4", "", {}, "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg=="], + + "destr": ["destr@2.0.5", "", {}, "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA=="], + + "dotenv": ["dotenv@17.2.3", "", {}, "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w=="], + + "exsolve": ["exsolve@1.0.8", "", {}, "sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA=="], + + "giget": ["giget@2.0.0", "", { "dependencies": { "citty": "^0.1.6", "consola": "^3.4.0", "defu": "^6.1.4", "node-fetch-native": "^1.6.6", "nypm": "^0.6.0", "pathe": "^2.0.3" }, "bin": { "giget": "dist/cli.mjs" } }, "sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA=="], + + "is-docker": ["is-docker@3.0.0", "", { "bin": { "is-docker": "cli.js" } }, "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ=="], + + "is-in-ssh": ["is-in-ssh@1.0.0", "", {}, "sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw=="], + + "is-inside-container": ["is-inside-container@1.0.0", "", { "dependencies": { "is-docker": "^3.0.0" }, "bin": { "is-inside-container": "cli.js" } }, "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA=="], + + "is-wsl": ["is-wsl@3.1.0", "", { "dependencies": { "is-inside-container": "^1.0.0" } }, "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw=="], + + "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], + + "jiti": ["jiti@2.6.1", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ=="], + + "js-yaml": ["js-yaml@4.1.1", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA=="], + + "lodash": ["lodash@4.17.23", "", {}, "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w=="], + + "node-fetch-native": ["node-fetch-native@1.6.7", "", {}, "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q=="], + + "nypm": ["nypm@0.6.4", "", { "dependencies": { "citty": "^0.2.0", "pathe": "^2.0.3", "tinyexec": "^1.0.2" }, "bin": { "nypm": "dist/cli.mjs" } }, "sha512-1TvCKjZyyklN+JJj2TS3P4uSQEInrM/HkkuSXsEzm1ApPgBffOn8gFguNnZf07r/1X6vlryfIqMUkJKQMzlZiw=="], + + "ohash": ["ohash@2.0.11", "", {}, "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ=="], + + "open": ["open@11.0.0", "", { "dependencies": { "default-browser": "^5.4.0", "define-lazy-prop": "^3.0.0", "is-in-ssh": "^1.0.0", "is-inside-container": "^1.0.0", "powershell-utils": "^0.1.0", "wsl-utils": "^0.3.0" } }, "sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw=="], + + "path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="], + + "pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="], + + "perfect-debounce": ["perfect-debounce@2.1.0", "", {}, "sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g=="], + + "pkg-types": ["pkg-types@2.3.0", "", { "dependencies": { "confbox": "^0.2.2", "exsolve": "^1.0.7", "pathe": "^2.0.3" } }, "sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig=="], + + "powershell-utils": ["powershell-utils@0.1.0", "", {}, "sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A=="], + + "rc9": ["rc9@2.1.2", "", { "dependencies": { "defu": "^6.1.4", "destr": "^2.0.3" } }, "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg=="], + + "readdirp": ["readdirp@5.0.0", "", {}, "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ=="], + + "run-applescript": ["run-applescript@7.1.0", "", {}, "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q=="], + + "semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], + + "shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="], + + "tinyexec": ["tinyexec@1.0.2", "", {}, "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg=="], + + "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + + "undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="], + + "which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], + + "wsl-utils": ["wsl-utils@0.3.1", "", { "dependencies": { "is-wsl": "^3.1.0", "powershell-utils": "^0.1.0" } }, "sha512-g/eziiSUNBSsdDJtCLB8bdYEUMj4jR7AGeUo96p/3dTafgjHhpF4RiCFPiRILwjQoDXx5MqkBr4fwWtR3Ky4Wg=="], + + "nypm/citty": ["citty@0.2.0", "", {}, "sha512-8csy5IBFI2ex2hTVpaHN2j+LNE199AgiI7y4dMintrr8i0lQiFn+0AWMZrWdHKIgMOer65f8IThysYhoReqjWA=="], + } +} diff --git a/openapi-ts.config.ts b/openapi-ts.config.ts new file mode 100644 index 0000000..45bc9bc --- /dev/null +++ b/openapi-ts.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from '@hey-api/openapi-ts'; + +export default defineConfig({ + input: './openapi-derefed.json', + output: 'src', +}); \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..2b9a498 --- /dev/null +++ b/package.json @@ -0,0 +1,30 @@ +{ + "name": "@sentry/api", + "version": "0.1.0", + "description": "Sentry API Client", + "license": "FSL-1.1-Apache-2.0", + "type": "module", + "files": [ + "dist" + ], + "repository": { + "type": "git", + "url": "https://github.com/getsentry/sentry-api-schema.git" + }, + "scripts": { + "generate": "openapi-ts", + "build": "bun build src/index.ts --outdir dist && tsc --emitDeclarationOnly" + }, + "exports": { + "import": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "devDependencies": { + "@hey-api/openapi-ts": "0.91.1", + "@types/node": "^22" + }, + "engines": { + "node": ">=22" + }, + "packageManager": "bun@1.3.3" +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..b975ddb --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "lib": ["ESNext", "DOM"], + "target": "ESNext", + "module": "ESNext", + "moduleDetection": "force", + "allowJs": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "declaration": true, + "emitDeclarationOnly": true, + "outDir": "dist", + "resolveJsonModule": true, + "strict": true, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noPropertyAccessFromIndexSignature": false, + }, + "include": ["src/**/*.ts"], + "exclude": ["node_modules", "dist"] +} From 9ce0fba6a6cd5497734a01fe3fed1bd2d2f9f52a Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Thu, 5 Feb 2026 00:44:54 +0530 Subject: [PATCH 02/18] fix: minor changes --- .craft.yml | 3 +- .github/workflows/release.yml | 56 +++++++++++++++++++++++++++++++++++ openapi-ts.config.ts | 6 ---- package.json | 4 --- scripts/pre-release.ts | 33 +++++++++++++++++++++ tsconfig.json | 2 +- 6 files changed, 92 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/release.yml delete mode 100644 openapi-ts.config.ts create mode 100644 scripts/pre-release.ts diff --git a/.craft.yml b/.craft.yml index 15ec2e7..fc62453 100644 --- a/.craft.yml +++ b/.craft.yml @@ -1,7 +1,8 @@ -minVersion: '2.19.0' +minVersion: "2.19.0" changelog: policy: auto versioning: policy: auto +preReleaseCommand: bun run scripts/pre-release.ts targets: - name: npm diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c1576ca --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,56 @@ +name: Release + +on: + push: + branches: + - main + paths: + - "openapi-derefed.json" + workflow_dispatch: + inputs: + version: + description: Version to release + required: true + force: + description: Force release + default: false + type: boolean + merge_target: + description: Merge target branch + required: false + +permissions: + contents: write + pull-requests: write + +jobs: + release: + runs-on: ubuntu-latest + name: Release a new version + steps: + - name: Get auth token + id: token + uses: actions/create-github-app-token@v2.2.1 + with: + app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} + private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} + + - uses: actions/checkout@v6 + with: + token: ${{ steps.token.outputs.token }} + fetch-depth: 0 + + - name: Setup bun + uses: oven-sh/setup-bun@v2 + + - name: Install dependencies + run: bun install + + - name: Prepare release + uses: getsentry/craft@v2 + env: + GITHUB_TOKEN: ${{ steps.token.outputs.token }} + with: + version: ${{ inputs.version }} + force: ${{ inputs.force }} + merge_target: ${{ inputs.merge_target }} diff --git a/openapi-ts.config.ts b/openapi-ts.config.ts deleted file mode 100644 index 45bc9bc..0000000 --- a/openapi-ts.config.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { defineConfig } from '@hey-api/openapi-ts'; - -export default defineConfig({ - input: './openapi-derefed.json', - output: 'src', -}); \ No newline at end of file diff --git a/package.json b/package.json index 2b9a498..7cb6727 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,6 @@ "type": "git", "url": "https://github.com/getsentry/sentry-api-schema.git" }, - "scripts": { - "generate": "openapi-ts", - "build": "bun build src/index.ts --outdir dist && tsc --emitDeclarationOnly" - }, "exports": { "import": "./dist/index.js", "types": "./dist/index.d.ts" diff --git a/scripts/pre-release.ts b/scripts/pre-release.ts new file mode 100644 index 0000000..01c8672 --- /dev/null +++ b/scripts/pre-release.ts @@ -0,0 +1,33 @@ +import { execSync } from "node:child_process"; +import { createClient } from "@hey-api/openapi-ts"; + +/** + * Execute a shell command with output inherited to stdout/stderr + */ +function exec(command: string): void { + execSync(command, { stdio: "inherit" }); +} + +async function main() { + const version = process.env.CRAFT_NEW_VERSION; + if (!version) { + console.error("Error: CRAFT_NEW_VERSION environment variable is required"); + process.exit(1); + } + + console.log(`Setting version to ${version}`); + + // Update package.json via npm (handles formatting consistently) + exec(`npm --no-git-tag-version version ${version}`); + + // Generate the API client + await createClient({ + input: "./openapi-derefed.json", + output: "src", + }); + + // Building the package + exec("bun build src/index.ts --outdir dist && tsc --emitDeclarationOnly"); +} + +main(); diff --git a/tsconfig.json b/tsconfig.json index b975ddb..fadcb88 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,7 +21,7 @@ "forceConsistentCasingInFileNames": true, "noUnusedLocals": false, "noUnusedParameters": false, - "noPropertyAccessFromIndexSignature": false, + "noPropertyAccessFromIndexSignature": false }, "include": ["src/**/*.ts"], "exclude": ["node_modules", "dist"] From 2f4ca2a4ead382cfdc717609e9f339c4018d1a01 Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Thu, 5 Feb 2026 11:03:35 +0530 Subject: [PATCH 03/18] chore: minor changes --- bun.lock | 1 + package.json | 6 +++++- scripts/pre-release.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bun.lock b/bun.lock index 97c116c..41225b8 100644 --- a/bun.lock +++ b/bun.lock @@ -7,6 +7,7 @@ "devDependencies": { "@hey-api/openapi-ts": "0.91.1", "@types/node": "^22", + "typescript": "^5.9.3", }, }, }, diff --git a/package.json b/package.json index 7cb6727..15995b4 100644 --- a/package.json +++ b/package.json @@ -11,13 +11,17 @@ "type": "git", "url": "https://github.com/getsentry/sentry-api-schema.git" }, + "scripts": { + "build": "bun build src/index.ts --outdir dist && tsc --emitDeclarationOnly" + }, "exports": { "import": "./dist/index.js", "types": "./dist/index.d.ts" }, "devDependencies": { "@hey-api/openapi-ts": "0.91.1", - "@types/node": "^22" + "@types/node": "^22", + "typescript": "^5.9.3" }, "engines": { "node": ">=22" diff --git a/scripts/pre-release.ts b/scripts/pre-release.ts index 01c8672..f9292a0 100644 --- a/scripts/pre-release.ts +++ b/scripts/pre-release.ts @@ -27,7 +27,7 @@ async function main() { }); // Building the package - exec("bun build src/index.ts --outdir dist && tsc --emitDeclarationOnly"); + exec("bun run build"); } main(); From 14221eaeaa595351b472d1250afba0857ac5199c Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Thu, 5 Feb 2026 11:05:01 +0530 Subject: [PATCH 04/18] fix: updated the gitignore file --- .gitignore | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.gitignore b/.gitignore index e9259aa..5abb203 100644 --- a/.gitignore +++ b/.gitignore @@ -2,21 +2,12 @@ node_modules # output -out dist -dist-bin -*.tgz - -# fossilize build cache -.node-cache # code coverage coverage *.lcov -# test artifacts -.test-tmp - # logs logs _.log @@ -32,13 +23,6 @@ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json # caches .eslintcache .cache -*.tsbuildinfo -.turbo - -# docs -docs/dist -docs/node_modules -docs/.astro # IntelliJ based IDEs .idea From 30dbb1a4c2896171a5c4371f02e13486a5b8b366 Mon Sep 17 00:00:00 2001 From: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com> Date: Sat, 7 Feb 2026 00:13:15 +0530 Subject: [PATCH 05/18] Update .craft.yml Co-authored-by: Burak Yigit Kaya --- .craft.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.craft.yml b/.craft.yml index fc62453..171e83f 100644 --- a/.craft.yml +++ b/.craft.yml @@ -1,8 +1,6 @@ minVersion: "2.19.0" changelog: policy: auto -versioning: - policy: auto preReleaseCommand: bun run scripts/pre-release.ts targets: - name: npm From 6bdc40d25520d59fe39bd589ce74ad6a596b680b Mon Sep 17 00:00:00 2001 From: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com> Date: Sat, 7 Feb 2026 00:13:29 +0530 Subject: [PATCH 06/18] Update .craft.yml Co-authored-by: Burak Yigit Kaya --- .craft.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.craft.yml b/.craft.yml index 171e83f..9990a75 100644 --- a/.craft.yml +++ b/.craft.yml @@ -4,3 +4,4 @@ changelog: preReleaseCommand: bun run scripts/pre-release.ts targets: - name: npm + - name: github From f45e38bf6be094a4982f01597a97cc3d47cedf9c Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Sat, 7 Feb 2026 00:25:51 +0530 Subject: [PATCH 07/18] fix: using node inplace of bun in pre release script --- .craft.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.craft.yml b/.craft.yml index 9990a75..a78546b 100644 --- a/.craft.yml +++ b/.craft.yml @@ -1,7 +1,8 @@ minVersion: "2.19.0" changelog: policy: auto -preReleaseCommand: bun run scripts/pre-release.ts +versioning: + policy: auto +preReleaseCommand: node --experimental-strip-types scripts/pre-release.ts targets: - name: npm - - name: github From aa1f419de27dc8374089a34ede6e6495af12928a Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Sat, 7 Feb 2026 00:30:37 +0530 Subject: [PATCH 08/18] chore: minor fix --- .craft.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.craft.yml b/.craft.yml index a78546b..3cf99d0 100644 --- a/.craft.yml +++ b/.craft.yml @@ -1,8 +1,7 @@ minVersion: "2.19.0" changelog: policy: auto -versioning: - policy: auto preReleaseCommand: node --experimental-strip-types scripts/pre-release.ts targets: - name: npm + - name: github From 98c5b79e44c3c4f0f832a22833173b31e397c59a Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Sat, 7 Feb 2026 23:42:55 +0530 Subject: [PATCH 09/18] fix: removed bun install step --- .github/workflows/release.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c1576ca..d3e5ba8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,12 +40,6 @@ jobs: token: ${{ steps.token.outputs.token }} fetch-depth: 0 - - name: Setup bun - uses: oven-sh/setup-bun@v2 - - - name: Install dependencies - run: bun install - - name: Prepare release uses: getsentry/craft@v2 env: From 5f67dde04407bcc7d757b8db25c14b887db470b9 Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Tue, 10 Feb 2026 16:24:24 +0530 Subject: [PATCH 10/18] feat: added build workflow --- .craft.yml | 8 +++++++- .github/workflows/build.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/release.yml | 12 ++++++------ scripts/pre-release.ts | 7 +++---- 4 files changed, 46 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.craft.yml b/.craft.yml index 3cf99d0..a2cf235 100644 --- a/.craft.yml +++ b/.craft.yml @@ -1,6 +1,12 @@ -minVersion: "2.19.0" +minVersion: "2.21.1" changelog: policy: auto +artifactProvider: + name: github + config: + artifacts: + build.yml: + - build-artifacts preReleaseCommand: node --experimental-strip-types scripts/pre-release.ts targets: - name: npm diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..7825266 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,30 @@ +name: Build + +on: + push: + branches: + - main + - release/** + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + name: Build + steps: + - uses: actions/checkout@v4 + + - uses: oven-sh/setup-bun@v2 + + - run: bun install --frozen-lockfile + + - run: bun run build + + - run: npm pack + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: build-artifacts + path: | + ${{ github.workspace }}/*.tgz diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d3e5ba8..4a0bbf5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,6 @@ name: Release on: - push: - branches: - - main - paths: - - "openapi-derefed.json" workflow_dispatch: inputs: version: @@ -35,11 +30,16 @@ jobs: app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} - - uses: actions/checkout@v6 + - uses: actions/checkout@v4 with: token: ${{ steps.token.outputs.token }} fetch-depth: 0 + # Required for preReleaseCommand (generates API client from openapi spec) + - uses: oven-sh/setup-bun@v2 + + - run: bun install --frozen-lockfile + - name: Prepare release uses: getsentry/craft@v2 env: diff --git a/scripts/pre-release.ts b/scripts/pre-release.ts index f9292a0..dc73aba 100644 --- a/scripts/pre-release.ts +++ b/scripts/pre-release.ts @@ -20,14 +20,13 @@ async function main() { // Update package.json via npm (handles formatting consistently) exec(`npm --no-git-tag-version version ${version}`); - // Generate the API client + // Generate the API client source from the OpenAPI spec. + // The actual build (src -> dist) happens in the Build workflow, + // not here, since dist/ is gitignored and won't be committed. await createClient({ input: "./openapi-derefed.json", output: "src", }); - - // Building the package - exec("bun run build"); } main(); From 68c3f83c00484ddb478dc953adaf712be15adfe6 Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Tue, 10 Feb 2026 16:32:30 +0530 Subject: [PATCH 11/18] chore: minor changes --- .github/workflows/build.yml | 1 - .github/workflows/release.yml | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7825266..596cf25 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,6 @@ name: Build on: push: branches: - - main - release/** pull_request: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a0bbf5..4dda042 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,15 +30,15 @@ jobs: app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: token: ${{ steps.token.outputs.token }} fetch-depth: 0 - # Required for preReleaseCommand (generates API client from openapi spec) - - uses: oven-sh/setup-bun@v2 - - - run: bun install --frozen-lockfile + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 - name: Prepare release uses: getsentry/craft@v2 From 8b92906e21452d0723d48ff1a11dc196df5fd057 Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Tue, 10 Feb 2026 16:39:19 +0530 Subject: [PATCH 12/18] chore: minor changes --- .github/workflows/build.yml | 1 + openapi-ts.config.ts | 6 ++++++ package.json | 2 +- scripts/pre-release.ts | 9 --------- 4 files changed, 8 insertions(+), 10 deletions(-) create mode 100644 openapi-ts.config.ts diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 596cf25..7825266 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,7 @@ name: Build on: push: branches: + - main - release/** pull_request: diff --git a/openapi-ts.config.ts b/openapi-ts.config.ts new file mode 100644 index 0000000..207bbe8 --- /dev/null +++ b/openapi-ts.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from '@hey-api/openapi-ts'; + +export default defineConfig({ + input: "./openapi-derefed.json", + output: "src", +}); \ No newline at end of file diff --git a/package.json b/package.json index 15995b4..b6e7efd 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/getsentry/sentry-api-schema.git" }, "scripts": { - "build": "bun build src/index.ts --outdir dist && tsc --emitDeclarationOnly" + "build": "openapi-ts && bun build src/index.ts --outdir dist && tsc --emitDeclarationOnly" }, "exports": { "import": "./dist/index.js", diff --git a/scripts/pre-release.ts b/scripts/pre-release.ts index dc73aba..56d6ec2 100644 --- a/scripts/pre-release.ts +++ b/scripts/pre-release.ts @@ -1,5 +1,4 @@ import { execSync } from "node:child_process"; -import { createClient } from "@hey-api/openapi-ts"; /** * Execute a shell command with output inherited to stdout/stderr @@ -19,14 +18,6 @@ async function main() { // Update package.json via npm (handles formatting consistently) exec(`npm --no-git-tag-version version ${version}`); - - // Generate the API client source from the OpenAPI spec. - // The actual build (src -> dist) happens in the Build workflow, - // not here, since dist/ is gitignored and won't be committed. - await createClient({ - input: "./openapi-derefed.json", - output: "src", - }); } main(); From d58a1c7c3e3932bc8b03b0a9a00394adc53cfb7e Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Tue, 10 Feb 2026 16:44:53 +0530 Subject: [PATCH 13/18] chore: changed the versioning policy --- .craft.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.craft.yml b/.craft.yml index a2cf235..9501460 100644 --- a/.craft.yml +++ b/.craft.yml @@ -1,6 +1,8 @@ minVersion: "2.21.1" changelog: policy: auto +versioning: + policy: minor artifactProvider: name: github config: From b6f3cc8a2aa5f7d47ec8528a737c222e44e6f7c3 Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Tue, 10 Feb 2026 16:51:09 +0530 Subject: [PATCH 14/18] chore: minor change --- .craft.yml | 2 -- .github/workflows/release.yml | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.craft.yml b/.craft.yml index 9501460..a2cf235 100644 --- a/.craft.yml +++ b/.craft.yml @@ -1,8 +1,6 @@ minVersion: "2.21.1" changelog: policy: auto -versioning: - policy: minor artifactProvider: name: github config: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4dda042..e76fe95 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,8 +4,9 @@ on: workflow_dispatch: inputs: version: - description: Version to release - required: true + description: Version to release (semver, "auto", "major", "minor", "patch") + default: minor + required: false force: description: Force release default: false From 4cade5a3373542f8c09408c854d752a2fc15b3f8 Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Tue, 10 Feb 2026 17:04:42 +0530 Subject: [PATCH 15/18] chore: minor changes --- .gitignore | 19 ------------------- package.json | 2 ++ scripts/pre-release.ts | 2 +- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 5abb203..f20758f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,28 +4,9 @@ node_modules # output dist -# code coverage -coverage -*.lcov - -# logs -logs -_.log -report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json - -# dotenv environment variable files -.env -.env.development.local -.env.test.local -.env.production.local -.env.local - # caches .eslintcache .cache -# IntelliJ based IDEs -.idea - # Finder (MacOS) folder config .DS_Store diff --git a/package.json b/package.json index b6e7efd..4824427 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,8 @@ "description": "Sentry API Client", "license": "FSL-1.1-Apache-2.0", "type": "module", + "module": "dist/index.js", + "types": "dist/index.d.ts", "files": [ "dist" ], diff --git a/scripts/pre-release.ts b/scripts/pre-release.ts index 56d6ec2..3758855 100644 --- a/scripts/pre-release.ts +++ b/scripts/pre-release.ts @@ -7,7 +7,7 @@ function exec(command: string): void { execSync(command, { stdio: "inherit" }); } -async function main() { +function main() { const version = process.env.CRAFT_NEW_VERSION; if (!version) { console.error("Error: CRAFT_NEW_VERSION environment variable is required"); From c7ee553914d5b92b7aad58ade06f6f111391445b Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Tue, 10 Feb 2026 17:15:54 +0530 Subject: [PATCH 16/18] chore: updated package.json and readme --- README.md | 36 +++++++++++++++++++++++++++++++++--- package.json | 2 +- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b32964b..a37da32 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,35 @@ -# Sentry's API Schema +# Sentry API Schema -Sentry's public API schema uses [OpenAPI](https://swagger.io/specification/) v3.0.1. +Sentry's public API schema and auto-generated TypeScript types, published as [`@sentry/api`](https://www.npmjs.com/package/@sentry/api). -This repository is an artifact used while deploying the API schema. The source of truth can be found in [Sentry](https://github.com/getsentry/sentry/tree/master/api-docs), along with the [tests](https://github.com/getsentry/sentry/tree/master/tests/apidocs). Do not create PRs against this repository! +## About + +This repository contains Sentry's [OpenAPI](https://swagger.io/specification/) v3.0.1 schema and tooling to generate TypeScript types from it. The schema source of truth lives in [getsentry/sentry](https://github.com/getsentry/sentry/tree/master/api-docs) and is synced here automatically. + +## Installation + +```bash +npm install @sentry/api +``` + +## Usage + +```typescript +import type { ... } from "@sentry/api"; +``` + +## Development + +This project uses [Bun](https://bun.sh) as its package manager and build tool. + +```bash +# Install dependencies +bun install + +# Build the package (generates types from OpenAPI schema, bundles, and emits declarations) +bun run build +``` + +## License + +FSL-1.1-Apache-2.0. See [LICENSE.md](LICENSE.md) for details. diff --git a/package.json b/package.json index 4824427..f609650 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@sentry/api", "version": "0.1.0", - "description": "Sentry API Client", + "description": "Auto-generated TypeScript client for the Sentry API", "license": "FSL-1.1-Apache-2.0", "type": "module", "module": "dist/index.js", From 8ce22122b6a0f53884a130c1b6b502715b493ccc Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Tue, 10 Feb 2026 17:18:55 +0530 Subject: [PATCH 17/18] fix: will create release with every push on the main branch --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e76fe95..dc0ff17 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,10 @@ name: Release on: + push: + branches: + - main + workflow_dispatch: inputs: version: From ce402fbdf5b52314eaafc19e555eb0fc90ab6604 Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Tue, 10 Feb 2026 20:02:14 +0530 Subject: [PATCH 18/18] fix: minor improvements --- .craft.yml | 3 +-- .github/workflows/build.yml | 4 ++-- .github/workflows/release.yml | 2 +- README.md | 4 ++-- package.json | 2 +- scripts/pre-release.ts | 23 ----------------------- 6 files changed, 7 insertions(+), 31 deletions(-) delete mode 100644 scripts/pre-release.ts diff --git a/.craft.yml b/.craft.yml index a2cf235..495b592 100644 --- a/.craft.yml +++ b/.craft.yml @@ -6,8 +6,7 @@ artifactProvider: config: artifacts: build.yml: - - build-artifacts -preReleaseCommand: node --experimental-strip-types scripts/pre-release.ts + - npm-package targets: - name: npm - name: github diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7825266..ace6225 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest name: Build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: oven-sh/setup-bun@v2 @@ -25,6 +25,6 @@ jobs: - name: Upload build artifacts uses: actions/upload-artifact@v4 with: - name: build-artifacts + name: npm-package path: | ${{ github.workspace }}/*.tgz diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dc0ff17..c5f5e8a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 24 - name: Prepare release uses: getsentry/craft@v2 diff --git a/README.md b/README.md index a37da32..25fccbb 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Sentry API Schema -Sentry's public API schema and auto-generated TypeScript types, published as [`@sentry/api`](https://www.npmjs.com/package/@sentry/api). +Sentry's public API schema and auto-generated TypeScript client, published as [`@sentry/api`](https://www.npmjs.com/package/@sentry/api). ## About -This repository contains Sentry's [OpenAPI](https://swagger.io/specification/) v3.0.1 schema and tooling to generate TypeScript types from it. The schema source of truth lives in [getsentry/sentry](https://github.com/getsentry/sentry/tree/master/api-docs) and is synced here automatically. +This repository contains Sentry's [OpenAPI](https://swagger.io/specification/) v3.0.1 schema and tooling to generate TypeScript client from it. The schema source of truth lives in [getsentry/sentry](https://github.com/getsentry/sentry/tree/master/api-docs) and is synced here automatically. ## Installation diff --git a/package.json b/package.json index f609650..c625d34 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/api", - "version": "0.1.0", + "version": "0.0.0", "description": "Auto-generated TypeScript client for the Sentry API", "license": "FSL-1.1-Apache-2.0", "type": "module", diff --git a/scripts/pre-release.ts b/scripts/pre-release.ts deleted file mode 100644 index 3758855..0000000 --- a/scripts/pre-release.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { execSync } from "node:child_process"; - -/** - * Execute a shell command with output inherited to stdout/stderr - */ -function exec(command: string): void { - execSync(command, { stdio: "inherit" }); -} - -function main() { - const version = process.env.CRAFT_NEW_VERSION; - if (!version) { - console.error("Error: CRAFT_NEW_VERSION environment variable is required"); - process.exit(1); - } - - console.log(`Setting version to ${version}`); - - // Update package.json via npm (handles formatting consistently) - exec(`npm --no-git-tag-version version ${version}`); -} - -main();