{"_id":"@teknologi-umum/pesto","_rev":"45-3574288551de59fc63d307aaef90b05b","name":"@teknologi-umum/pesto","dist-tags":{"nightly":"1.0.0-20f3c61","latest":"1.0.0"},"versions":{"1.0.0":{"name":"@teknologi-umum/pesto","version":"1.0.0","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@teknologi-umum/eslint-config-typescript":"^0.0.7","@types/node":"^18.11.19","@vitest/coverage-c8":"^0.28.4","c8":"^7.12.0","esbuild":"^0.17.5","eslint":"^8.33.0","msw":"^1.0.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.5.0","typescript":"^4.9.5","vitest":"^0.28.4"},"dependencies":{"node-fetch":"^3.3.0"},"gitHead":"5b90e6d9ab67844a6db71fe8cb45a3e452dfc6f2","_id":"@teknologi-umum/pesto@1.0.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-jE/pZGsDidrO6MrlDjuTXkg7caq4m385Y6Vmy2EBpWV4Up3lK3vKzAqX1kvhGqJ5Pt1lCtScl+sq3AArWcgRwA==","shasum":"49dfea6e4eb913630ddd3da4693b4b8dd28e02ba","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0.tgz","fileCount":7,"unpackedSize":27978,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOFIbCA/aehTNRWcAsO1BfNZP1IPc44QWR+/iS0EhREwIhAOpE/KUh0uU3jCFg8edNS9Vau7JqSzvHccf43e+B6OIj"}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0_1683592581196_0.5470364445575817"},"_hasShrinkwrap":false},"1.0.0-7b9835e":{"name":"@teknologi-umum/pesto","version":"1.0.0-7b9835e","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@teknologi-umum/eslint-config-typescript":"^0.0.7","@types/node":"^18.11.19","@vitest/coverage-c8":"^0.28.4","c8":"^7.12.0","esbuild":"^0.17.5","eslint":"^8.33.0","msw":"^1.0.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.5.0","typescript":"^4.9.5","vitest":"^0.28.4"},"dependencies":{"node-fetch":"^3.3.0"},"gitHead":"7b9835e1bc00ad1a3960c7a7dc5e8fd065cf1058","readme":"ERROR: No README data found!","_id":"@teknologi-umum/pesto@1.0.0-7b9835e","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-KScVUTUhXihvFfg+Q0q7XnF7iPbv/QFxPBUDS/+XPDfFGmTEZOrTn+50aQAE+xxYH3QiJnI7Tgwm2JLvl+Drkw==","shasum":"5ff65b5c11325122688425b01fefbdacc406856c","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-7b9835e.tgz","fileCount":7,"unpackedSize":29867,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCplV/t8a2NQrA4PPuNXDmebw2JqBOxsNG5+I9swarxmwIgEMgk+pOOJet95We6UjFW+8UV283TTqX02bHQACjF5jI="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-7b9835e_1684111082785_0.7993387988753897"},"_hasShrinkwrap":false},"1.0.0-5e8eefa":{"name":"@teknologi-umum/pesto","version":"1.0.0-5e8eefa","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@teknologi-umum/eslint-config-typescript":"^0.0.7","@types/node":"^18.11.19","@vitest/coverage-c8":"^0.28.4","c8":"^7.12.0","esbuild":"^0.17.5","eslint":"^8.33.0","msw":"^1.0.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.5.0","typescript":"^4.9.5","vitest":"^0.28.4"},"dependencies":{"node-fetch":"^3.3.0"},"gitHead":"5e8eefaa7da9db7388fe4507adb539bc217fa667","readme":"ERROR: No README data found!","_id":"@teknologi-umum/pesto@1.0.0-5e8eefa","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-fddSVXqxPXB2IaX9lXaaFm+GUCne4y3FY9a/Sjnci+XC5NzZYfAdY9ena303Y4mpwbdbbmxysOehNq4/OLzHZw==","shasum":"3fc4c3957594c784a8a2fef8b53ca2fb0b853584","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-5e8eefa.tgz","fileCount":7,"unpackedSize":29867,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDByf3Li3GOYjcMKzh8YF3BzY74b4jWl9QT1enegOg/kgIhAJ8OWXxKHz9IqPEaAg9VMtsUycQEJg4eAGtPu2Ju9CR9"}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-5e8eefa_1684111094892_0.7283566412103837"},"_hasShrinkwrap":false},"1.0.0-6616c73":{"name":"@teknologi-umum/pesto","version":"1.0.0-6616c73","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@teknologi-umum/eslint-config-typescript":"^0.0.7","@types/node":"^18.11.19","@vitest/coverage-c8":"^0.28.4","c8":"^7.12.0","esbuild":"^0.17.5","eslint":"^8.33.0","msw":"^1.0.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.5.0","typescript":"^4.9.5","vitest":"^0.28.4"},"dependencies":{"node-fetch":"^3.3.0"},"gitHead":"6616c738f3058423be25aba196ccf7bcd24d5eaa","readme":"ERROR: No README data found!","_id":"@teknologi-umum/pesto@1.0.0-6616c73","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-ALnw5mnB2rx0jLkFbm+GkQ3ftJQ9ZgTgiW+sukpkQoezWZb/gQl1tdRCYtawiP39nSQ6gRLOx0puRFK0G7Z17w==","shasum":"4ea8a74a662d20c4c8191e3040b5ffa82ea6d8ee","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-6616c73.tgz","fileCount":7,"unpackedSize":29867,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDC4lq5m6V5kEtUryYfKtRudwPdsRD3PUULoTNknPtGkAiAK7AnRDw9Spr/VkP9WLhz1DxgLf8+gc2VqIA46/5NRfQ=="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-6616c73_1684111210482_0.9618834664013871"},"_hasShrinkwrap":false},"1.0.0-274ffc9":{"name":"@teknologi-umum/pesto","version":"1.0.0-274ffc9","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@teknologi-umum/eslint-config-typescript":"^0.0.7","@types/node":"^18.11.19","@vitest/coverage-c8":"^0.28.4","c8":"^7.12.0","esbuild":"^0.17.5","eslint":"^8.33.0","msw":"^1.0.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.5.0","typescript":"^4.9.5","vitest":"^0.28.4"},"dependencies":{"node-fetch":"^3.3.0"},"gitHead":"274ffc997e8d5f48f8749e64229d9572d922c419","readme":"ERROR: No README data found!","_id":"@teknologi-umum/pesto@1.0.0-274ffc9","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-UtDfFdx/wMQCQdGrah5hjZHGeoj96DmBH6+p27PzipwKStfOBXPmE8nIJlpAbL/i2qkkJwJAxbZ1QyuTq1N7FQ==","shasum":"c59ec5683fa544d57e7c30427378fcc73162161b","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-274ffc9.tgz","fileCount":7,"unpackedSize":29867,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDkeahxhGeM1YNUiNLbnqBiINg1cLxiV5THlUxFgI64JAiAXF6hcIYg8Ci68VzWumfo+dMgNPj7S2XnGD+fnCVAjxA=="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-274ffc9_1684466700885_0.1861319311212375"},"_hasShrinkwrap":false},"1.0.0-1762d27":{"name":"@teknologi-umum/pesto","version":"1.0.0-1762d27","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@teknologi-umum/eslint-config-typescript":"^0.0.7","@types/node":"^18.11.19","@vitest/coverage-c8":"^0.28.4","c8":"^7.12.0","esbuild":"^0.17.5","eslint":"^8.33.0","msw":"^1.0.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.5.0","typescript":"^4.9.5","vitest":"^0.28.4"},"dependencies":{"node-fetch":"^3.3.0"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"1762d274b204030f1185e9a18bb25d61728e03dc","_id":"@teknologi-umum/pesto@1.0.0-1762d27","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-GV3mOJCgLxXia5ClzQLNsVg8R6dLPRnGrpT7wP0mylKsAmlLd7WqEUghUT0VVzvYG76p4pV7dHb2+dzlU2TGpg==","shasum":"3dccb2040735158f589af25474d28233ed4169e0","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-1762d27.tgz","fileCount":8,"unpackedSize":34217,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIERImqxZ4XGrLEKasD06KazAX5YYBk4mBPNSP4qPgkSCAiEAhJf2xHGe4xR1eru+Q8MYor2fxTbzSS0W72hoDxdbmlE="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-1762d27_1684653038001_0.8011207173139565"},"_hasShrinkwrap":false},"1.0.0-2e9838a":{"name":"@teknologi-umum/pesto","version":"1.0.0-2e9838a","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@teknologi-umum/eslint-config-typescript":"^0.0.7","@types/node":"^18.11.19","@vitest/coverage-c8":"^0.28.4","c8":"^7.12.0","esbuild":"^0.17.5","eslint":"^8.33.0","msw":"^1.0.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.5.0","typescript":"^4.9.5","vitest":"^0.28.4"},"dependencies":{"node-fetch":"^3.3.0"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"2e9838a1f213c0f4d93225978e0305177bff4ed2","_id":"@teknologi-umum/pesto@1.0.0-2e9838a","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-RSeuRcVXnL/+OaIub4FZoz7v7VLNzHqb9tRzLeV7RG8chcYXgmGgvyMAo2X6M016gSXYJ93asK1ISIpEJAIbMw==","shasum":"81d0c5d5150f3412000f5588fced94f1d9546fca","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-2e9838a.tgz","fileCount":8,"unpackedSize":34217,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZ7RMq2i8wiEm8WZSn/jtGtJF08wNULA1e0XgJBtUVTgIgMk3nUYCso4CyeK5BX0N3AqwuCQinwKPOcPOPgAxA/LY="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-2e9838a_1684653065993_0.8184873513971578"},"_hasShrinkwrap":false},"1.0.0-b75bbaa":{"name":"@teknologi-umum/pesto","version":"1.0.0-b75bbaa","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@teknologi-umum/eslint-config-typescript":"^0.0.7","@types/node":"^18.11.19","@vitest/coverage-c8":"^0.28.4","c8":"^7.12.0","esbuild":"^0.17.5","eslint":"^8.33.0","msw":"^1.0.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.5.0","typescript":"^4.9.5","vitest":"^0.28.4"},"dependencies":{"node-fetch":"^3.3.0"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"b75bbaa421a60ac4cf591a8b641e822bc992e12b","_id":"@teknologi-umum/pesto@1.0.0-b75bbaa","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-QqE8KdqusE9xqDZ0QZ4cbSa+kOtJDZwH+9edhzayMGIz6PRPoPrA4MCPy7LeA+xBRxG2fL6OdJFyf/Dr7hrfQQ==","shasum":"a7c7a9602b7f96974149f6aec709d59b1ae243aa","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-b75bbaa.tgz","fileCount":8,"unpackedSize":34217,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA+gB9DLKyUOD4sgWj0QJ1cJr1rnlihu3Sg9vtvLSkGMAiAaNZxz24GTqOlVON4KLQr4Dvv2ohQFxmmkhbdUs8MTBQ=="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-b75bbaa_1685594635459_0.40647402749760486"},"_hasShrinkwrap":false},"1.0.0-85d2791":{"name":"@teknologi-umum/pesto","version":"1.0.0-85d2791","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@teknologi-umum/eslint-config-typescript":"^0.0.7","@types/node":"^18.11.19","@vitest/coverage-c8":"^0.28.4","c8":"^7.12.0","esbuild":"^0.17.5","eslint":"^8.33.0","msw":"^1.0.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.5.0","typescript":"^4.9.5","vitest":"^0.28.4"},"dependencies":{"node-fetch":"^3.3.0"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"85d27913416ac5e20f2369f711097163347f44af","_id":"@teknologi-umum/pesto@1.0.0-85d2791","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-ytyWm9sodXhF2dgdxQ/i9TZ3pahYPvBs7Hvuea6Ja22GNvg1l7epxczlfHgSfkx0vRDOOqHMrjXAum62+/XGig==","shasum":"a0294930ec1b10be1739fabe88b43cb427f384c2","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-85d2791.tgz","fileCount":8,"unpackedSize":34217,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1AHI+nl4rlIVQmUhGL1P22zHoAA6nOibEvzo2P7/AjQIgdvML3twx2gk5O6ZOrEWDaVldVX2jl413JdXm1u9KVu8="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-85d2791_1685770370999_0.523511437328581"},"_hasShrinkwrap":false},"1.0.0-26aea08":{"name":"@teknologi-umum/pesto","version":"1.0.0-26aea08","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@teknologi-umum/eslint-config-typescript":"^0.0.7","@types/node":"^18.11.19","@vitest/coverage-c8":"^0.28.4","c8":"^7.12.0","esbuild":"^0.17.5","eslint":"^8.33.0","msw":"^1.0.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.5.0","typescript":"^4.9.5","vitest":"^0.28.4"},"dependencies":{"node-fetch":"^3.3.0"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"26aea082bec676b11fda513d698769be6345effe","_id":"@teknologi-umum/pesto@1.0.0-26aea08","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-tssV/2OOmxTalMJpMKFnPh7rLq8D9w/6sBggRuAjqcWpQjoEySO+9AHEV8gpFAklG+vO5mcskC8SRYec9+aW3A==","shasum":"8e23bcf4522d8805305ae3df39dc7f7d505a5314","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-26aea08.tgz","fileCount":8,"unpackedSize":34217,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHu2rkcc6ET1BSLA0Na80nV707o5liXfumkMmjLn7kqTAiACmBKqP32zIIFy59nssSOMILD/NHAHNB0eeQ3l5EYesQ=="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-26aea08_1685770499040_0.5627377984342656"},"_hasShrinkwrap":false},"1.0.0-2eb5f87":{"name":"@teknologi-umum/pesto","version":"1.0.0-2eb5f87","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@teknologi-umum/eslint-config-typescript":"^0.0.7","@types/node":"^18.11.19","@vitest/coverage-c8":"^0.28.4","c8":"^7.12.0","esbuild":"^0.17.5","eslint":"^8.33.0","msw":"^1.0.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.5.0","typescript":"^4.9.5","vitest":"^0.28.4"},"dependencies":{"node-fetch":"^3.3.0"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"2eb5f872bdb1a0ed0be43a9998da6c8a5958b06d","_id":"@teknologi-umum/pesto@1.0.0-2eb5f87","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-yyBOO3ofCDEqpPq/mIW5ix3axdO+q05YYZvs63slCoLD+/BGJ1n1LULbE7eDLRLr+/bevInF34YCc9AoG5pr+w==","shasum":"4ee167e20d0d72a787371be73074ce17243974e4","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-2eb5f87.tgz","fileCount":8,"unpackedSize":34217,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHpfU+ssOZpPgNnpH70bALIlPOKj3ovCye7fRLYPE6yOAiEAg45SoZ1xJZW7yS8J5RHhuvNIuGdjYYaO15xuMiBBwGU="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-2eb5f87_1686351286803_0.42361382694326033"},"_hasShrinkwrap":false},"1.0.0-61841f4":{"name":"@teknologi-umum/pesto","version":"1.0.0-61841f4","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@teknologi-umum/eslint-config-typescript":"^0.0.7","@types/node":"^18.11.19","@vitest/coverage-c8":"^0.28.4","c8":"^7.12.0","esbuild":"^0.17.5","eslint":"^8.33.0","msw":"^1.0.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.5.0","typescript":"^4.9.5","vitest":"^0.28.4"},"dependencies":{"node-fetch":"^3.3.0"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"61841f4fea00289f668d96f8629a7097caaf7ba1","_id":"@teknologi-umum/pesto@1.0.0-61841f4","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-/8OI6V/PP1QteRnirPNQ7qRWzNUb2InTPYQvdT8XWdR+/kdotNjp+h5d0/DlhH1iAnNceTAdjxSLOjailSKHBg==","shasum":"ac166ed9ad0484ded4d1225bbaef22c3bef38575","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-61841f4.tgz","fileCount":8,"unpackedSize":34217,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5yS3CboRLdmdM2pPWbQCb5RMAlSx0hr0RW0lB1vEHkQIgFAP2MdU+mB7gTJMvU3NlPKkTH88akZMBnnKN36fT0H0="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-61841f4_1686837644701_0.19342889231771854"},"_hasShrinkwrap":false},"1.0.0-c953c8f":{"name":"@teknologi-umum/pesto","version":"1.0.0-c953c8f","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@teknologi-umum/eslint-config-typescript":"^0.0.7","@types/node":"^18.11.19","@vitest/coverage-c8":"^0.28.4","c8":"^7.12.0","esbuild":"^0.17.5","eslint":"^8.33.0","msw":"^1.0.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.5.0","typescript":"^4.9.5","vitest":"^0.28.4"},"dependencies":{"node-fetch":"^3.3.0"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"c953c8f67398fea024e760ddcf3440e79c234d8d","_id":"@teknologi-umum/pesto@1.0.0-c953c8f","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-TwLbms+83oZXK+O0y2UFmThDIzTvAoGbrc6GC/8mFxR5xb3lc0Qb7+GY4pDRHQ5Nbw8PUYfKZxe8UaPbUm7TXQ==","shasum":"101591e4c446cc3b36296427510a1ab5881dc5d0","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-c953c8f.tgz","fileCount":8,"unpackedSize":34217,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfz8gp7cTb1GK4q9r63eCbFOIczlvrHAyhHmAIYZyI9QIgdbCMJISCJIZjaMAkpVhdYT47lGrWV4RZTIlA+2PHesY="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-c953c8f_1687132882423_0.009423500068189261"},"_hasShrinkwrap":false},"1.0.0-27e38e8":{"name":"@teknologi-umum/pesto","version":"1.0.0-27e38e8","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@teknologi-umum/eslint-config-typescript":"^0.0.7","@types/node":"^18.11.19","@vitest/coverage-c8":"^0.28.4","c8":"^7.12.0","esbuild":"^0.17.5","eslint":"^8.33.0","msw":"^1.0.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.5.0","typescript":"^4.9.5","vitest":"^0.28.4"},"dependencies":{"node-fetch":"^3.3.0"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"27e38e89e2e7af634f0cd43cf81f506767e2983d","_id":"@teknologi-umum/pesto@1.0.0-27e38e8","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-hrbFNiMXzgRoepL2/PHz1esMfSlRNERHcJiSHU77f23hD2r96q2ef8306xg5OsflBUHLut9et/S5H1net36bIQ==","shasum":"c4645d54e84f65ccfaccb7105b8360c69a90bf14","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-27e38e8.tgz","fileCount":8,"unpackedSize":34217,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDIh3A82zFW0LJl798p6lndUoTUnzmG5xzPj3faVDkZGAiAK2U4+WWtjEI8ppaUXgZcVBfgmw+XiygEflVA2MYKZzA=="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-27e38e8_1688272779374_0.1537554122301359"},"_hasShrinkwrap":false},"1.0.0-77ffa84":{"name":"@teknologi-umum/pesto","version":"1.0.0-77ffa84","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"77ffa841ce943626ad6ad8831e6b42d2627dd04c","_id":"@teknologi-umum/pesto@1.0.0-77ffa84","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-hpk5sXplVaooWODA7hAjQmLZ6P5x553zlPFLdFHA8yBLpzFfpsmFfBvglzEEbACX3BTzQoD//A68uIz6q5haHA==","shasum":"b60b9a9ebed07633ddd802e3f101c7fa4542cf92","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-77ffa84.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjgKFp+clNuI13Iucrpmx7nNAnRnqt1xJDj/bQps8XNQIgJfsmIxvEI15/kyUYZcJ+4UlWmP6/jR7t5hhfYwgHrn8="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-77ffa84_1690125428681_0.09139707068402236"},"_hasShrinkwrap":false},"1.0.0-c089075":{"name":"@teknologi-umum/pesto","version":"1.0.0-c089075","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"c089075e48b2ab322d22eec4617ee3e6f8036f2f","_id":"@teknologi-umum/pesto@1.0.0-c089075","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-0rJ865gGgcCqUqCAfeFY5NFI50jGXaEiyxSYO55jtPBXs1yu9I5ikanjrcxIFxrRijG2ZLCyHPv/Cqg3qprmRA==","shasum":"4953b7fbba5f79887209a8f51cde1a9c36eeaf35","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-c089075.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4jeVNRH12Rnxid9gdY7Lieyc/59d89d6AL/1mbzN48gIhAI5EY3WqqjPR37bP4I+AkpWkv00yZGMIDyfmLi3Irp0w"}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-c089075_1690338239780_0.27100740569181303"},"_hasShrinkwrap":false},"1.0.0-bf495e3":{"name":"@teknologi-umum/pesto","version":"1.0.0-bf495e3","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"bf495e32341eed76b5df78ff3ed520e339447eb9","_id":"@teknologi-umum/pesto@1.0.0-bf495e3","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-iiHbNAusbjxEBrQ6Kg1v0CeojTwWUy7CRtvJAbwJ2qZ6KBR+NVlofs1R8ckUZROCadV1WB/pdQT/qi2KyQE72Q==","shasum":"c610dd3845bc83ba0cf1b5f9a26f290b5b22a2fc","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-bf495e3.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3IRJtR/7SZ4WuP0ozkirMusJxGMZTPhwhvrAhTMBwlgIgF9wGoTV5pXsngUc+uwv41MrB2UOxf7jalgd8zi0tYik="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-bf495e3_1690338311090_0.09382389808585478"},"_hasShrinkwrap":false},"1.0.0-1845e49":{"name":"@teknologi-umum/pesto","version":"1.0.0-1845e49","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"1845e490b69012d735f425c6bbc2713b39c11bf4","_id":"@teknologi-umum/pesto@1.0.0-1845e49","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-eZvB3YT1C3uyloOMH395x0xnnInjpZI72uaxBWGNHKtPwjNL/2/Izb0arDgySF1Ja3sGz+G7olq7heEBU2eSZQ==","shasum":"463b2443af342fab25939ca3542915238f7c706e","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-1845e49.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMth5+n6IBBNRfTu0fZckPorz7EXoFBgXPUxCMLBZ+jAIhAPQc2/I1jqng3yWzLx3hwfdpz5e9x7VAbpJoVlec1wZ7"}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-1845e49_1690338329135_0.02360209403435576"},"_hasShrinkwrap":false},"1.0.0-08876d5":{"name":"@teknologi-umum/pesto","version":"1.0.0-08876d5","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"08876d562c14b72e684b2fcf77b8b6717bf19261","_id":"@teknologi-umum/pesto@1.0.0-08876d5","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-oSfZSYF06BfcExz4SU/0kkAzmbNJ2UID/t+n3SYFMncQY+0N591Eg+DlQclQtVA5TViT3yL6B2nUfk06b446ug==","shasum":"76577b134729b7de7299f0173a01a714943227e7","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-08876d5.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB+PUQ3DLB97ii1hLfylQVBlezMnSG7gacZ78WPNFNPNAiBgz/6mkYtgS+Eg6JHn6r1RanfbzP2fa6U2mmUBh+MMIw=="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-08876d5_1691332399818_0.9555733332799001"},"_hasShrinkwrap":false},"1.0.0-6404f10":{"name":"@teknologi-umum/pesto","version":"1.0.0-6404f10","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"6404f10740e259b071bfbefe4cda044eb6133b1d","_id":"@teknologi-umum/pesto@1.0.0-6404f10","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-mLOcUTrPq7dsUBYqPt4dwQly4KyzqZogBauYMuAGrM58viNETv0FBCBv7sn0l/QmJ1P0a6u6BvcAXmThKUJ1ag==","shasum":"ee27c54b8c7deda8f0f13dc44fa376930ca85e08","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-6404f10.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG2g0XmXjd2+A6/bLtjg91SU0JnlVd7Mn4HpXymaJzd/AiBENnblqN49LYJPBx7KJ7x2xHKes56hNoXWMN47tZWcLA=="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-6404f10_1691502640426_0.9632905368997433"},"_hasShrinkwrap":false},"1.0.0-ab746ad":{"name":"@teknologi-umum/pesto","version":"1.0.0-ab746ad","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"ab746adc844a81757914c223baf314e8b77919f5","_id":"@teknologi-umum/pesto@1.0.0-ab746ad","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-6MNLnPBOyBoZofYYfmNqNbppQ1R9KVzmmx7mM1LmRj4c82IGcodZKxPI/F6eYXzOaLg46ctTfV0m7BfCUdvJwQ==","shasum":"d530b26734fcf6908432d40922bbb73c69f0050c","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-ab746ad.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbM658NkArMKPR5IglPN06fM/WJtm2y5BRcmmrqG1VMwIgQI/URVu3c1eEC9xfu6B/PmyBFhMxaI08nyr9NOQyRsY="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-ab746ad_1692456168061_0.9949116744151358"},"_hasShrinkwrap":false},"1.0.0-b8b81aa":{"name":"@teknologi-umum/pesto","version":"1.0.0-b8b81aa","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"b8b81aa37789b981e1af6d9439f05d9ee3fff6f0","_id":"@teknologi-umum/pesto@1.0.0-b8b81aa","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-KjqRTACS+g/G/aPSGyHS1/1u5uvOD0wUrm2f2NKvBI1HSMQUSGTzbY9PiDP+kjgq0GA/k131uvBPsVkSCIVFyA==","shasum":"0c564b75d2a675a199746dfc66b3e4473f2a04bf","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-b8b81aa.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDPIKNUURoV1SE3xTEJljvmfOB1V2dKpnQWuqJPpZXVMAiEA8DYr3sw3Q14P+lXT1fc+MWG796IKMHj++q0LkMiRFtQ="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-b8b81aa_1692462046390_0.7466477598856653"},"_hasShrinkwrap":false},"1.0.0-f2d766c":{"name":"@teknologi-umum/pesto","version":"1.0.0-f2d766c","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"f2d766cd398ebdb33de8ed0ca2cfc86a989e978f","_id":"@teknologi-umum/pesto@1.0.0-f2d766c","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-IxLgnDEusoDEHksEGmsKHtdKXLE6Klp2bFua7yWkvatBbYUwVDy/8uwIXqf8tGsTPr9xqnIc+NKtNSpO5gssLw==","shasum":"d27381276fdd9a1bcf0bcba234f3c8e144a1fe71","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-f2d766c.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB4W33MM4hdZAUfvXZf7hcOLjGp7WJ5RuLbJTqJSO0PQAiEA6aRvZb4Z0MPntlGlx6STwSGQBV6bmv3US1ER/aBCUZU="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-f2d766c_1692839677355_0.8716241990175995"},"_hasShrinkwrap":false},"1.0.0-8c7e889":{"name":"@teknologi-umum/pesto","version":"1.0.0-8c7e889","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"8c7e889b46719bd966e2fc10eba4540c95c49510","_id":"@teknologi-umum/pesto@1.0.0-8c7e889","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-anqY2656ZlmfPpUP7Pc8EDLqpG2UjYFgdSiCEYuwWPSu2K8ZkLWOlX4/BFTpeg8untLWllK9eYGsOzvjqSKYjg==","shasum":"b6ef7ff8e7f7bc063a0dfb0de31f318e0d55b307","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-8c7e889.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqfEoU96XxqRdGSqfOByDqs7oTScMOi2GGbcQHay6BzQIhAN0NqEMjuFyWA/cXqt35rcHpnFHS8m9yHfqRxbMw/iS8"}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-8c7e889_1693269473787_0.41801654358559004"},"_hasShrinkwrap":false},"1.0.0-44dbdff":{"name":"@teknologi-umum/pesto","version":"1.0.0-44dbdff","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"44dbdffe90ffc135440d28e8cdb50cc38bbf1f34","_id":"@teknologi-umum/pesto@1.0.0-44dbdff","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-klD3gFCJQeoFA2GF7+MrJAKyJWY7raAOEA+R/9Ayl19l98jA7u7y0AvrErPF+rQyg20kfxh5yPvmN0Et51NfDw==","shasum":"a8a4a7f08ae24be6583bf4a1b348a56d4a4f1487","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-44dbdff.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCG1oLVkflstrdus1KR8dK2lzo5mu63KebbtFAIwEb7ygIgHDvOBLDOP3BiVOwNU0uhYrgRNT3CWMdgQe6Y5yyi23w="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-44dbdff_1693269515402_0.270527383203943"},"_hasShrinkwrap":false},"1.0.0-3c1bfea":{"name":"@teknologi-umum/pesto","version":"1.0.0-3c1bfea","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"3c1bfeaa53250392ecfd84de7457c12c9185b436","_id":"@teknologi-umum/pesto@1.0.0-3c1bfea","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-wR4kyA+Sr5Yz3OhGUfpilU5UlkRk6J90LWS+qgCnuuniRAafOPBk2OWak1gE2ZYBEZb7wqcYWy5xdo3IIFsHGA==","shasum":"8961cccfef8d294d2f054305c661b03bafc2e33b","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-3c1bfea.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKacgltlFg7DU4nzi2JtHAmJCDjF41/kUN4Bt4+kj26gIhAK8bXqUtle+xsJevexrpBm3WrES8rzIubue7PbzCpytg"}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-3c1bfea_1693702703450_0.4947616641001471"},"_hasShrinkwrap":false},"1.0.0-898c936":{"name":"@teknologi-umum/pesto","version":"1.0.0-898c936","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"898c93633f3eb58304e6a0b1ba9b58f07c862e9a","_id":"@teknologi-umum/pesto@1.0.0-898c936","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-0EJAUGCmXZ8CeCASTG9Gqv3kxqln1S5FE0QEXPHXoWYf4jDrN9y3THJqrr5vzN+ZQa3ZsVbbaaonxNBz22vsfQ==","shasum":"44a73d86648ac0c2dd3825dc99230740d88a1ecc","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-898c936.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFyLURG3f0RJGhgcvczULuR/Y3oReBD9L9X//w6scsJLAiEAq6Zn9wNr8wlR/zKlzCtufZ54Is8waUQGaNZiKpqLGoQ="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-898c936_1693736584700_0.27533399202731257"},"_hasShrinkwrap":false},"1.0.0-691e067":{"name":"@teknologi-umum/pesto","version":"1.0.0-691e067","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"691e067817db801e65a73d0bbdd0813baad55c96","_id":"@teknologi-umum/pesto@1.0.0-691e067","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-BuBY9k/bAQJOMFahxLkl7qzKWpIMnQDf8Jcne2Svd4XM8aDQxWv5YkiOOIO4xL+4TINIhD6vBb+iNh8nPIpUCg==","shasum":"378be6c3e87f5beec9282b5772d83da7e5852880","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-691e067.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDt4xSqYtVt+9Er1zaAvf94zy30jVi2VbMlBOjBgbEbogIhAKNvHW5u96vv7cLZ/8VqfnIeV8WAn13lza+4j9KJCWQt"}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-691e067_1694918628442_0.5222743697233616"},"_hasShrinkwrap":false},"1.0.0-ebefdfa":{"name":"@teknologi-umum/pesto","version":"1.0.0-ebefdfa","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"ebefdfa7ae0429171d06782966d11dd3d335fe69","_id":"@teknologi-umum/pesto@1.0.0-ebefdfa","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-v70fQmY41lWB++wlzpBOV8qF34lpgJuMjk7Ch646BpnSQS1hBWz/JsNdwrG1r9bRn46X8e1/3a52r4HIzuvJ+g==","shasum":"0772e753c032249f953c18e7051e88256c0a7c91","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-ebefdfa.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAEq5jd0UDqZSyzndPjrHI1IjcUECfu14PySxTfoVNIFAiAK10xycV1P09tWlIV3KKoMvNkWgzhIgSecTzeOriF3WA=="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-ebefdfa_1694999151559_0.7668835177512341"},"_hasShrinkwrap":false},"1.0.0-908c37f":{"name":"@teknologi-umum/pesto","version":"1.0.0-908c37f","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"908c37f943bf2f1a694a49438323b42035f64cb9","_id":"@teknologi-umum/pesto@1.0.0-908c37f","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-/RXudB4iHNvD9asQoebjSs1U+tN8CErmqQYQK/9cHPC4Q/dDTNpD4XY1M90T2QOacZvQI4AMuKgbr+8yrgtTWw==","shasum":"72090f932268c993dcadc52a10b4ef4139978454","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-908c37f.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE3wc841e7WRGH57lfPj9mD/ZNd0eIr5CIkZFtiyFdVPAiEAk2WPaw1Hx84aAcQ1NizXLCMTMoqr+ifT+lVp1KRAwp4="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-908c37f_1695801252999_0.6841125322394197"},"_hasShrinkwrap":false},"1.0.0-bb2fb7c":{"name":"@teknologi-umum/pesto","version":"1.0.0-bb2fb7c","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"_id":"@teknologi-umum/pesto@1.0.0-bb2fb7c","readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"bb2fb7c858df0fc9042435f946ee6583d6285eac","_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-1NcF+pAeJT07+yG4fh2ZuRXZlNF8ZNFomAIpp6FaDlPqlpMCGDjUvaBGqbu86YYrSCtASmcgbEMR3zVRxqpSTQ==","shasum":"cedcece5dbf30d9bf142323170178aa36893a455","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-bb2fb7c.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrfaCfRzRWM/GoT/P2eH84nUA3wIlnFsnZhjYTMc0ZAgIgYwkrCy/Ft1MgujlQtdt2d9kjhQ1NbTg7ALMfUlz51Pc="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-bb2fb7c_1697423030630_0.5959635453517818"},"_hasShrinkwrap":false},"1.0.0-d83cb43":{"name":"@teknologi-umum/pesto","version":"1.0.0-d83cb43","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"_id":"@teknologi-umum/pesto@1.0.0-d83cb43","readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"d83cb432af7b2f8d5ce91c7e401cc9cc8e293528","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-88NCKMA9JgEDYedI4tdfjyWiV7v8cKNweNVxgSabUY2cddU4nZYk4/Dyvo0R1GFfFBb6q86BhhUNQ2q/uKuNyQ==","shasum":"9513e4216845f11727363b7f3b9c5dd58f622bed","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-d83cb43.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAf65LH2djinUlAUP1avOh8/zL9wYukU4u4tOdoxqmwhAiAmg4b55ljKZBSHbc948E4z8OjDpVGLUhnrMMLEC9QZdg=="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-d83cb43_1697679743589_0.11105338932066733"},"_hasShrinkwrap":false},"1.0.0-395ff45":{"name":"@teknologi-umum/pesto","version":"1.0.0-395ff45","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"_id":"@teknologi-umum/pesto@1.0.0-395ff45","readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"395ff45ec7a100edb9ce7e3bceee56874db293c2","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-rxhPUwh0XPsUeJz7jh7gavK8A6exChQSZzpGd8Ht1a7yo9tBZO7HR+cTZFzb5odDQCT/VjNbA1jykYC49QhGKw==","shasum":"d788ef31ba4e366fdd7e98e3e50ff30c80dd6f5d","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-395ff45.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHoqO5eJ5LwfgZtM/ym6YRBhxtWobA771eIPz++BCMBVAiB4NQPLPslpCDWdzOrkgjF9Vs+s8rZRA+ZEvZCv1JNgug=="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-395ff45_1697679979652_0.6985682673733642"},"_hasShrinkwrap":false},"1.0.0-b0349d2":{"name":"@teknologi-umum/pesto","version":"1.0.0-b0349d2","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"_id":"@teknologi-umum/pesto@1.0.0-b0349d2","readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"b0349d2d63a1c804d984dee45351a1fe96a438bd","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-kIA1XReMrFvUx5STQ9EcZ2xNezgAkF+w4K6/zKINut8fjjToUGu2KG/rA3iKvbSCOqFlZlQiIs5JO6SIJsIquQ==","shasum":"d6832960c2c1b963883839bcc851a52b53966233","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-b0349d2.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCw8Go9GDH5+UZwYHNZaVTh7liq3pBkvnyJhgT6v3Er8gIgYjm8S3mCk3SNvA0HqEj68Po2gELu21gXJ1cmTZ0mTsg="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-b0349d2_1697680060759_0.4376750559097622"},"_hasShrinkwrap":false},"1.0.0-083f3ef":{"name":"@teknologi-umum/pesto","version":"1.0.0-083f3ef","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"_id":"@teknologi-umum/pesto@1.0.0-083f3ef","readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"083f3ef83b28b2732b410706df2a239566761a51","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-aA+4YIX47/1q+kk/8Q9a7Ev4dGLR193z7NlNXNjgTqHETKtreBwIBFicxgi0JMzOfWlN2G2T/wYy5rxl1heU3Q==","shasum":"d9ad519ac6f92d892f598c2c163da213ddd18b1d","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-083f3ef.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEGk+IvIJ0qsDIJvE5oinRgd/ThAvAojFhC7DrC2HNodAiAKrrT6fbdKMGZf1KuB5HjsCMAuiJjQ9jjD/xD5l7aGLw=="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-083f3ef_1700360166940_0.0982511959095349"},"_hasShrinkwrap":false},"1.0.0-f1934b9":{"name":"@teknologi-umum/pesto","version":"1.0.0-f1934b9","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"_id":"@teknologi-umum/pesto@1.0.0-f1934b9","readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"f1934b9b019f358832e837d5146a7f562868c1ca","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-ycisQtGZ6JQ3r2iQ80Wey5oO5w3Ekqd/1tR7BPiBYtEv/cxDHmsCLf7Y3cWjbDftHQmuxPqDA8zReJhz2LC1AA==","shasum":"1ed30c016229f2ffd018310ceca90654ba326278","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-f1934b9.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7iay9x9LOwaZtBtv+cKTaAHuNFsxnMdJRwqOf195oOAIgNSm/REQDGPrBX+BXVO6fXHKWIdIbCc+VyBn6R6astwU="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-f1934b9_1700365106606_0.11746077572090607"},"_hasShrinkwrap":false},"1.0.0-8a64000":{"name":"@teknologi-umum/pesto","version":"1.0.0-8a64000","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"_id":"@teknologi-umum/pesto@1.0.0-8a64000","readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"8a64000d8fac0dad0e8a72289cbf238a3366d76f","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-Z/IUEJJBRCOMWsZlrOMarN17gN3phRcvhnoAA1PzjdBVBHIpu/zaWGH0Fa0eWLz0E3oOsI2Mpuvq3EAd3nqVtg==","shasum":"08505f9aaf4a071b8487080c5350c83c9c242eb8","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-8a64000.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBFjHNDZYz+Bx83bMfqlhg5d03RXSepqJN5PD2mSRHyQIhAOrAEIvPvvsOpU0nwgr2wwarHgXpwbWDEUAuvffxh7w4"}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-8a64000_1700435336978_0.02880138874358984"},"_hasShrinkwrap":false},"1.0.0-4e96e9a":{"name":"@teknologi-umum/pesto","version":"1.0.0-4e96e9a","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"_id":"@teknologi-umum/pesto@1.0.0-4e96e9a","readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"4e96e9a42c97675bdb146a733585b6e950dc2053","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-k0ppRLgaL7n9Uus+jPIk6m6oYHKZfkPWWLv0ZLB1HvEzNQUlhwEpx613iNMuFHf+rH56f6XFQ6IZdAVxxx0MJw==","shasum":"02f4cd0c1c484187ad6afa001a687041fe9ba0c0","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-4e96e9a.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE8vuMjjVHcQnlKSUGnZGMxVbScINJQkq7NaGLU80bosAiAdWlihZu+GVjrojJT8aUl83Ry8OrmaZK2pw5eLO0ANbg=="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-4e96e9a_1700435339201_0.9669118158848504"},"_hasShrinkwrap":false},"1.0.0-597373c":{"name":"@teknologi-umum/pesto","version":"1.0.0-597373c","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"_id":"@teknologi-umum/pesto@1.0.0-597373c","readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"597373c777aa0f13322bbf9818368c111cddc02e","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-sArC8yeNin4KneoHN4zFHHtPMMomDR+sPlHKq0MY5xXpOI0IHoEO9E0T1dxeviAp6n5j4+5IezeZE7ME1t47LQ==","shasum":"41dd9471fe7212755e6813fd61cece790581affe","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-597373c.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC4qQvhfIvOo4su1so/nzNT6yTqwOj+jIMdRguiRiz9tAiBKoUcvm7Aac7ZSmbfrWdysX1KNviSch/IvJssMpoLq8Q=="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-597373c_1700494158380_0.06462627004040189"},"_hasShrinkwrap":false},"1.0.0-bac2522":{"name":"@teknologi-umum/pesto","version":"1.0.0-bac2522","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"_id":"@teknologi-umum/pesto@1.0.0-bac2522","readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"bac2522fc606e639149c1fd5bdd80ed8aaff3c03","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-rh8E9Kgx21I9DWNw+QcvlN7hQiizduqg0ebnS/kTDYRoefiZdOJOovO40uUlA23Otg/KBMeJSaWp4OsafUv7sA==","shasum":"2ed9db3dd894a7b430d4cb4ae9618d21908bee54","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-bac2522.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF9xfmwbC3rfof2G81rZJoXmSGRElrNzPEXrpFykAb3JAiBU2aApC4R/DYDULSnZfYZtkALAwIvW3BesPiy1Ctv5Qw=="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-bac2522_1701881010760_0.21990344202704382"},"_hasShrinkwrap":false},"1.0.0-fdd1c19":{"name":"@teknologi-umum/pesto","version":"1.0.0-fdd1c19","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"_id":"@teknologi-umum/pesto@1.0.0-fdd1c19","readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"fdd1c191c23506448c017ba8bbc957d8f18796ae","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-dH12kIQuVJb2Mfg2RAV4q486blM1MHrKAY5QFH7vKmCzgdm4XCWjyNLVRaNH6aI4SX1u3YKIpQ4rx/9rphYOWQ==","shasum":"09ec054d3c19fdb95ab128c052179164c7153cfd","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-fdd1c19.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnMyXYLE6XzvrgisDyrrYityItb1z13GEgn9yRsd/fvgIgEaqb9VewJclUD0L8XgmnEegCTNYb/BBlSdwfFxBW9zk="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-fdd1c19_1702117588472_0.3698497057936445"},"_hasShrinkwrap":false},"1.0.0-8bc693a":{"name":"@teknologi-umum/pesto","version":"1.0.0-8bc693a","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"_id":"@teknologi-umum/pesto@1.0.0-8bc693a","readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"8bc693a1fe723006b791c8fc443e70ea32879671","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-UdDHe4kAGuemevxCVUJLN/usafp55nS+qg03GZxCpSrQUkHc6T6D6RwKuuvLfUqBkvrdn+kMB767Ma8Nqr2DHg==","shasum":"77d3c296c191ead3b852938bb7d11525959e01ba","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-8bc693a.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCq2U+aJotExke0zLCL87JzAlK3m1pZYQY/czfpoLouAwIhAO7jryk87AJyk1AkMqlBSxj6Brkv+YyS6Q6RllqUsLv0"}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-8bc693a_1704624753958_0.3018280321246807"},"_hasShrinkwrap":false},"1.0.0-a19d1dd":{"name":"@teknologi-umum/pesto","version":"1.0.0-a19d1dd","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"_id":"@teknologi-umum/pesto@1.0.0-a19d1dd","readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"a19d1dd025b05bf043bb702f408216e6e217b232","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-F+df0vCvfCKUszv2f/zPvvBggenhpMq0uP0ozR9Fncp6a3GTY01EfNAMyuuVHCGdtQkjveN8GJZ2LBdTKEZq3w==","shasum":"7cf136667812ce88ca2350a40f29b1dfe62cf264","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-a19d1dd.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD//V+OAgQFkuIj8ARV2ujQNp/QPysJdeGWSyB30mRLQwIhAMEYkydEsNu+Dhn9p/euE0CFA4eX9UTBEPKY8awEdVni"}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-a19d1dd_1705458651943_0.48978687391365083"},"_hasShrinkwrap":false},"1.0.0-dd35aa0":{"name":"@teknologi-umum/pesto","version":"1.0.0-dd35aa0","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"_id":"@teknologi-umum/pesto@1.0.0-dd35aa0","readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"dd35aa045588e34a89b3271cfb22ea85c6fe42a8","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-BMdIK2/cpBhNnbDiwHJ+VX0c3JryvxgdhtJgbzM8g5GhYqgx9pKrJaATWJw5ji7UmFeh8fX4VCIG3dS52kxaeA==","shasum":"de8b167482d937c67760e969d7494b56dcd7a9f7","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-dd35aa0.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+vdpi2DZEVrHlcVg4cz78VRlBCZ1p5A3h4pY1adodYQIgEfsxYWd5VkeJrs64W2lhHNRtWKq4Qdr3lGwRVqkuvQ4="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-dd35aa0_1706933613246_0.7932183261568508"},"_hasShrinkwrap":false},"1.0.0-90a36ef":{"name":"@teknologi-umum/pesto","version":"1.0.0-90a36ef","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"_id":"@teknologi-umum/pesto@1.0.0-90a36ef","readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"90a36ef2774959bde66b8f5859d2c56e477703c2","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-vLM2mRCkARt0HMP2jytgCvj8y9ekPqk8mvK/LvwdciYIRxFiYSy+IR1Zn7merxIzqzE0/cmH1SmGickXPgz8uA==","shasum":"231bbe522e944f247622b442d15b1b67673e6df8","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-90a36ef.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID1i96SXMNQc2HDVR1J56gkpOrJhkaF3cD8oroidnxD9AiBJPR5+vN+N2/7S38cU+U1TQfTppK6zF+GdbjRXQLEJuA=="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-90a36ef_1707267806828_0.5148590765241163"},"_hasShrinkwrap":false},"1.0.0-20f3c61":{"name":"@teknologi-umum/pesto","version":"1.0.0-20f3c61","description":"JavaScript SDK for Pesto","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/index.iife.js","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"},"./package.json":"./package.json","./*":"./*"},"scripts":{"lint":"eslint --fix --ext .ts --ignore-path .gitignore .","test:unit":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest watch --coverage","test":"npm run test:coverage","build":"rollup -c"},"keywords":["pesto","rce","remote","code","execution","engine"],"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"funding":"https://github.com/sponsors/teknologi-umum","bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"homepage":"https://pesto.teknologiumum.com","devDependencies":{"@rollup/plugin-terser":"^0.4.3","@rollup/plugin-typescript":"^11.1.2","@teknologi-umum/eslint-config-typescript":"^0.0.10","@types/node":"^20.3.3","@vitest/coverage-v8":"^0.32.2","esbuild":"^0.18.11","eslint":"^8.44.0","msw":"^1.2.2","tslib":"^2.6.0","typescript":"^5.1.6","vitest":"^0.32.2"},"dependencies":{"node-fetch":"^3.3.1"},"_id":"@teknologi-umum/pesto@1.0.0-20f3c61","readme":"# Javascript SDK for Pesto\n\nClient SDK for [Javascript](https://developer.mozilla.org/en-US/docs/Web/javascript)\n\n## Installation\n\n```shell\nnpm install @teknologi-umum/pesto\n\n# If you want to use the version from the master branch\nnpm install @teknologi-umum/pesto@nightly\n```\n\n## Usage\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n// API check\nconst pingResponse = await pestoClient.ping();\nconsole.log(pingResponse.message); // Should returns \"OK\"\n\n// List available runtimes\nconst listRuntimesResponse = await pestoClient.listRuntimes();\nconsole.log(listRUntimesResponse.runtime);\n\n// Execute code snippet\nconst codeResult = await pestoClient.execute({\n    language: \"Python\",\n    version: \"latest\",\n    code: \"print('Hello world!')\"\n});\nconsole.log(codeResult.runtime.output);\n```\n\n### Handy default configuration\n\n```javascript\nimport { PestoClient } from \"@teknologi-umum/pesto\";\n\nconst pestoClient = new PestoClient.fromToken(\"YOUR_TOKEN_GOES_HERE\");\n```\n\n### Handling errors\n\nThe SDK provides handy specific error classes which each state a specific case.\nYou should pick the one that is more close to your need.\n\n```javascript\nimport {\n    PestoClient,\n    EmptyTokenError,\n    MissingTokenError,\n    MissingParameterError,\n    UnauthorizedError,\n    InternalServerError,\n    TokenNotRegisteredError,\n    TokenRevokedError,\n    MonthlyLimitExceededError,\n    ServerRateLimitedError,\n    RuntimeNotFoundError\n} from \"@teknologi-umum/pesto\";\n\ntry {\n    const pestoClient = new PestoClient({ token: \"YOUR_TOKEN_GOES_HERE\" });\n\n    const codeResult = await pestoClient.execute({\n        language: \"Python\",\n        version: \"latest\",\n        code: \"print('Hello world!')\"\n    });\n\n    console.log(codeResult.runtime.output);\n} catch (error) {\n    if (error instanceof EmptyTokenError) {\n        // You did not provide a token\n        return;\n    }\n\n    if (error instanceof MissingTokenError) {\n        // Token did not sent during the HTTP request.\n        // This is probably due to the SDK's fault.\n        return;\n    }\n\n    if (error instanceof MissingParameterError) {\n        // You are missing a few fields that is required to be filled\n        return;\n    }\n\n    if (error instanceof RuntimeNotFoundError) {\n        // Provided language-version combination does not exist on Pesto's API.\n        return;\n    }\n\n    if (error instanceof UnauthorizedError) {\n        // Unauthorized request with unknown reason\n        return;\n    }\n\n    if (error instanceof InternalServerError) {\n        // An error occurred on Pesto's server.\n        // Client should retry the request after a few seconds.\n        // If the error persist, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof TokenNotRegisteredError) {\n        // You set a token that is not registered by the Pesto's API\n        return;\n    }\n\n    if (error instanceof TokenRevokedError) {\n        // Your token has been revoked on the Pesto's API\n        return;\n    }\n\n    if (error instanceof MonthlyLimitExceededError) {\n        // The token exceeds the monthly quota limit defined by the Pesto's API.\n        // To increase your limit, please contact the Pesto team.\n        return;\n    }\n\n    if (error instanceof ServerRateLimitedError) {\n        // Client got rate limited by the API for sending burst or too many concurrent requests to Pesto's API.\n        //\n        // To get around this, you can implement your own semaphore to handle parallel requests.\n        // To learn more about semaphore, you can see this Wikipedia article:\n        // https://en.wikipedia.org/wiki/Semaphore_(programming)\n        return;\n    }\n}\n```\n\n## License\n\n```\nCopyright 2022 Teknologi Umum and contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nSee [LICENSE](../../LICENSE)\n","readmeFilename":"README.md","gitHead":"20f3c61500040e56839822d5415fe1d85f581866","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-Zszc9xDGk/Goy/Z4wWncGfh4iNDB2+G2OfBU4fFKvPHvoEsIMTwYQwyCX8byBblvymos3KZ/Un7xzCUmqTrJmw==","shasum":"fe89f75de883dbb2dc1d02dcdc1bef4ab09bbbb0","tarball":"https://registry.npmjs.org/@teknologi-umum/pesto/-/pesto-1.0.0-20f3c61.tgz","fileCount":8,"unpackedSize":34735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDkrTTUrg4dIaNFEpPz3lWvWMfvlz1QbG8eZ/lXttdAvAiEAlghTSI2YU+Q3slhw+1kCha6ptR4ySt3LlhukhC8Nt/0="}]},"_npmUser":{"name":"aldy505","email":"aldy505@tutanota.com"},"directories":{},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pesto_1.0.0-20f3c61_1709708610146_0.7208260311040635"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-09T00:36:21.124Z","1.0.0":"2023-05-09T00:36:21.346Z","modified":"2024-03-06T07:03:30.775Z","1.0.0-7b9835e":"2023-05-15T00:38:02.954Z","1.0.0-5e8eefa":"2023-05-15T00:38:15.071Z","1.0.0-6616c73":"2023-05-15T00:40:10.640Z","1.0.0-274ffc9":"2023-05-19T03:25:01.032Z","1.0.0-1762d27":"2023-05-21T07:10:38.172Z","1.0.0-2e9838a":"2023-05-21T07:11:06.163Z","1.0.0-b75bbaa":"2023-06-01T04:43:55.633Z","1.0.0-85d2791":"2023-06-03T05:32:51.255Z","1.0.0-26aea08":"2023-06-03T05:34:59.196Z","1.0.0-2eb5f87":"2023-06-09T22:54:47.023Z","1.0.0-61841f4":"2023-06-15T14:00:44.854Z","1.0.0-c953c8f":"2023-06-19T00:01:22.589Z","1.0.0-27e38e8":"2023-07-02T04:39:39.596Z","1.0.0-77ffa84":"2023-07-23T15:17:08.852Z","1.0.0-c089075":"2023-07-26T02:23:59.939Z","1.0.0-bf495e3":"2023-07-26T02:25:11.285Z","1.0.0-1845e49":"2023-07-26T02:25:29.374Z","1.0.0-08876d5":"2023-08-06T14:33:19.964Z","1.0.0-6404f10":"2023-08-08T13:50:40.547Z","1.0.0-ab746ad":"2023-08-19T14:42:48.282Z","1.0.0-b8b81aa":"2023-08-19T16:20:46.663Z","1.0.0-f2d766c":"2023-08-24T01:14:37.527Z","1.0.0-8c7e889":"2023-08-29T00:37:53.977Z","1.0.0-44dbdff":"2023-08-29T00:38:35.548Z","1.0.0-3c1bfea":"2023-09-03T00:58:23.675Z","1.0.0-898c936":"2023-09-03T10:23:04.896Z","1.0.0-691e067":"2023-09-17T02:43:48.611Z","1.0.0-ebefdfa":"2023-09-18T01:05:51.747Z","1.0.0-908c37f":"2023-09-27T07:54:13.230Z","1.0.0-bb2fb7c":"2023-10-16T02:23:50.841Z","1.0.0-d83cb43":"2023-10-19T01:42:23.856Z","1.0.0-395ff45":"2023-10-19T01:46:19.853Z","1.0.0-b0349d2":"2023-10-19T01:47:40.958Z","1.0.0-083f3ef":"2023-11-19T02:16:07.145Z","1.0.0-f1934b9":"2023-11-19T03:38:26.786Z","1.0.0-8a64000":"2023-11-19T23:08:57.154Z","1.0.0-4e96e9a":"2023-11-19T23:08:59.450Z","1.0.0-597373c":"2023-11-20T15:29:18.544Z","1.0.0-bac2522":"2023-12-06T16:43:30.994Z","1.0.0-fdd1c19":"2023-12-09T10:26:28.701Z","1.0.0-8bc693a":"2024-01-07T10:52:34.145Z","1.0.0-a19d1dd":"2024-01-17T02:30:52.154Z","1.0.0-dd35aa0":"2024-02-03T04:13:33.405Z","1.0.0-90a36ef":"2024-02-07T01:03:27.080Z","1.0.0-20f3c61":"2024-03-06T07:03:30.311Z"},"maintainers":[{"name":"elianiva","email":"dicha.arkana03@gmail.com"},{"name":"aldy505","email":"aldy505@tutanota.com"}],"description":"JavaScript SDK for Pesto","homepage":"https://pesto.teknologiumum.com","keywords":["pesto","rce","remote","code","execution","engine"],"repository":{"type":"git","url":"git+https://github.com/teknologi-umum/pesto.git"},"author":{"name":"Teknologi Umum","email":"opensource@teknologiumum.com"},"bugs":{"url":"https://github.com/teknologi-umum/pesto/issues"},"license":"Apache-2.0","readme":"","readmeFilename":""}