{"_id":"@apachedubbo/dubbo","name":"@apachedubbo/dubbo","dist-tags":{"alpha":"3.0.0-alpha","latest":"3.0.0-alpha"},"versions":{"3.0.0-alpha":{"name":"@apachedubbo/dubbo","version":"3.0.0-alpha","description":"Type-safe APIs with Protobuf and TypeScript.","license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/apache/dubbo-js.git","directory":"packages/dubbo"},"sideEffects":false,"scripts":{"clean":"rm -rf ./dist/cjs/* ./dist/esm/* ./dist/types/*","generate":"buf generate src/protocol-grpc/proto","build":"npm run build:cjs && npm run build:esm+types","build:cjs":"tsc --project tsconfig.json --module commonjs --outDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'","build:esm+types":"tsc --project tsconfig.json --module ES2015 --verbatimModuleSyntax --outDir ./dist/esm --declaration --declarationDir ./dist/types && echo >./dist/esm/package.json '{\"type\":\"module\", \"sideEffects\":false}'","jasmine":"jasmine --config=jasmine.json"},"main":"./dist/cjs/index.js","types":"./dist/types/index.d.ts","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./protocol":{"types":"./dist/types/protocol/index.d.ts","import":"./dist/esm/protocol/index.js","require":"./dist/cjs/protocol/index.js"},"./protocol-triple":{"types":"./dist/types/protocol-triple/index.d.ts","import":"./dist/esm/protocol-triple/index.js","require":"./dist/cjs/protocol-triple/index.js"},"./protocol-grpc":{"types":"./dist/types/protocol-grpc/index.d.ts","import":"./dist/esm/protocol-grpc/index.js","require":"./dist/cjs/protocol-grpc/index.js"},"./protocol-grpc-web":{"types":"./dist/types/protocol-grpc-web/index.d.ts","import":"./dist/esm/protocol-grpc-web/index.js","require":"./dist/cjs/protocol-grpc-web/index.js"}},"typesVersions":{"*":{"protocol":["./dist/types/protocol/index.d.ts"],"protocol-triple":["./dist/types/protocol-triple/index.d.ts"],"protocol-grpc":["./dist/types/protocol-grpc/index.d.ts"],"protocol-grpc-web":["./dist/types/protocol-grpc-web/index.d.ts"]}},"peerDependencies":{"@bufbuild/protobuf":"^1.2.1"},"devDependencies":{"@bufbuild/protoc-gen-es":"^1.2.1","@types/jasmine":"^4.3.0","jasmine":"^5.0.0","undici":"^5.22.0"},"gitHead":"dd9eba1b7b4c5d306fc8275537694cca02ad7975","bugs":{"url":"https://github.com/apache/dubbo-js/issues"},"homepage":"https://github.com/apache/dubbo-js#readme","_id":"@apachedubbo/dubbo@3.0.0-alpha","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-ZdLHlfrXy4PUkTNSUctaKAaA7fcv8B0DjH5waFVTAgRmup1WT0ABK9HAmCLb4FIBYLsQ3QiPKZ7sW0l6SUe5tQ==","shasum":"98dc355357c6d766b0b3547436b6ec723da59a7b","tarball":"https://registry.npmjs.org/@apachedubbo/dubbo/-/dubbo-3.0.0-alpha.tgz","fileCount":346,"unpackedSize":1328558,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFYL9J1S5BUD2DRDEw0ZrAa0f9qV+QgaVRhx5cIq/SVzAiEAhS6GEC905Bqo5H9dY+bp9WPas77vORgx5vuP5/ruQ4s="}]},"_npmUser":{"name":"jianyi-gronk","email":"jianyi_gronk@163.com"},"directories":{},"maintainers":[{"name":"jianyi-gronk","email":"jianyi_gronk@163.com"},{"name":"apache-dubbo","email":"dubbo.alibaba@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dubbo_3.0.0-alpha_1694061469673_0.044889769381006195"},"_hasShrinkwrap":false}},"time":{"created":"2023-09-07T04:37:49.567Z","3.0.0-alpha":"2023-09-07T04:37:49.967Z","modified":"2023-09-07T04:37:50.286Z"},"maintainers":[{"name":"jianyi-gronk","email":"jianyi_gronk@163.com"},{"name":"apache-dubbo","email":"dubbo.alibaba@gmail.com"}],"description":"Type-safe APIs with Protobuf and TypeScript.","homepage":"https://github.com/apache/dubbo-js#readme","repository":{"type":"git","url":"git+https://github.com/apache/dubbo-js.git","directory":"packages/dubbo"},"bugs":{"url":"https://github.com/apache/dubbo-js/issues"},"license":"Apache-2.0","readme":"# @apachedubbo/dubbo\n\nDubbo is a family of libraries for building type-safe APIs with different languages and platforms.  \n[@apachedubbo/dubbo](https://www.npmjs.com/package/@apachedubbo/dubbo) brings them to TypeScript,\nthe web browser, and to Node.js.\n\n\nWith Dubbo, you define your schema first:\n\n```\nservice ElizaService {\n  rpc Say(SayRequest) returns (SayResponse) {}\n}\n```\n\nAnd with the magic of code generation, this schema produces servers and clients:\n\n```ts\nconst answer = await eliza.say({sentence: \"I feel happy.\"});\nconsole.log(answer);\n// {sentence: 'When you feel happy, what do you do?'}\n```\n\nUnlike REST, the RPCs you use with Dubbo are typesafe end to end, but they are\nregular HTTP under the hood. You can see all requests in the network inspector,\nand you can `curl` them if you want:\n\n```shell\ncurl \\\n    --header 'Content-Type: application/json' \\\n    --data '{\"sentence\": \"I feel happy.\"}' \\\n    https://demo.connect.build/buf.connect.demo.eliza.v1.ElizaService/Say\n```\n\nWith Dubbo for ECMAScript, you can spin up a service in Node.js and call it\nfrom the web, the terminal, or native mobile clients. Under the hood, it uses\n[Protocol Buffers](https://github.com/bufbuild/protobuf-es) for the schema, and\nimplements RPC (remote procedure calls) with three protocols: The widely available\ngRPC and gRPC-web, and Dubbo's [own protocol](https://cn.dubbo.apache.org/zh-cn/overview/reference/protocols/triple-spec/),\noptimized for the web. This gives you unparalleled interoperability with\nfull-stack type-safety.\n\n\n## Get started on the web\n\nFollow our [10 minute tutorial](https://cn.dubbo.apache.org/zh-cn/overview/quickstart/) where\nwe use [Vite](https://vitejs.dev/) and [React](https://reactjs.org/) to create a\nweb interface for ELIZA.\n\n**React**, **Svelte**, **Vue**, **Next.js** and **Angular** are supported (see [examples](https://github.com/apache/dubbo-js/tree/dubbo3/example)).\nWe support all modern web browsers that implement the widely available\n[fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)\nand the [Encoding API](https://developer.mozilla.org/en-US/docs/Web/API/Encoding_API).\n\n\n## Get started on Node.js\n\nFollow our [10 minute tutorial](https://cn.dubbo.apache.org/zh-cn/overview/quickstart/)\nto spin up a service in Node.js, and call it from the web, and from a gRPC client\nin your terminal.\n\nYou can use vanilla Node.js, or our server plugins for [Fastify](https://www.fastify.io/)\nor [Express](https://expressjs.com/). We support the builtin `http`, and `http2`\nmodules on Node.js v16 and later.\n","readmeFilename":"README.md"}