feat: consume generated Node SDK

This commit is contained in:
2026-08-17 11:46:52 +08:00
parent 2ebf42bb9b
commit f93aa80510
5 changed files with 30 additions and 3 deletions
+26
View File
@@ -10,6 +10,7 @@
"dependencies": {
"@grpc/grpc-js": "^1.12.0",
"@grpc/proto-loader": "^0.7.13",
"@yoresee-doc/sdk-node": "git+ssh://git@git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_node.git#v0.1.0",
"amqplib": "^0.10.9",
"google-protobuf": "^4.0.2",
"redis": "^4.6.0",
@@ -22,6 +23,21 @@
"protoc": "^34.0.0"
}
},
"node_modules/@bufbuild/protobuf": {
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.10.1.tgz",
"integrity": "sha512-wJ8ReQbHxsAfXhrf9ixl0aYbZorRuOWpBNzm8pL8ftmSxQx/wnJD5Eg861NwJU/czy2VXFIebCeZnZrI9rktIQ==",
"license": "(Apache-2.0 AND BSD-3-Clause)"
},
"node_modules/@connectrpc/connect": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/@connectrpc/connect/-/connect-1.7.0.tgz",
"integrity": "sha512-iNKdJRi69YP3mq6AePRT8F/HrxWCewrhxnLMNm0vpqXAR8biwzRtO6Hjx80C6UvtKJ5sFmffQT7I4Baecz389w==",
"license": "Apache-2.0",
"peerDependencies": {
"@bufbuild/protobuf": "^1.10.0"
}
},
"node_modules/@grpc/grpc-js": {
"version": "1.14.3",
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.3.tgz",
@@ -219,6 +235,16 @@
"undici-types": "~7.18.0"
}
},
"node_modules/@yoresee-doc/sdk-node": {
"version": "0.1.0",
"resolved": "git+ssh://git@git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_node.git#d4ffd77e1c1a71ec2008b3daa07ff4e4e22f70c0",
"dependencies": {
"@bufbuild/protobuf": "^1.10.0",
"@connectrpc/connect": "^1.7.0",
"@grpc/grpc-js": "^1.12.0",
"google-protobuf": "^4.0.2"
}
},
"node_modules/abstract-leveldown": {
"version": "6.2.3",
"resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz",
+1
View File
@@ -10,6 +10,7 @@
"dependencies": {
"@grpc/grpc-js": "^1.12.0",
"@grpc/proto-loader": "^0.7.13",
"@yoresee-doc/sdk-node": "git+ssh://git@git.yoresee.cc/YoreseeDoc/yoresee_doc_sdk_node.git#v0.1.0",
"amqplib": "^0.10.9",
"google-protobuf": "^4.0.2",
"redis": "^4.6.0",
+1 -1
View File
@@ -1,5 +1,5 @@
const grpc = require('@grpc/grpc-js');
const { DocumentServiceClient, SystemServiceClient } = require('../gen/yoresee_doc/v1/yoresee_doc_grpc_pb');
const { DocumentServiceClient, SystemServiceClient } = require('@yoresee-doc/sdk-node/cjs/yoresee_doc/v1/yoresee_doc_grpc_pb.js');
const config = require('../config');
let documentServiceClient = null;
+1 -1
View File
@@ -1,4 +1,4 @@
const pb = require('../gen/yoresee_doc/v1/yoresee_doc_pb');
const pb = require('@yoresee-doc/sdk-node/cjs/yoresee_doc/v1/yoresee_doc_pb.js');
const { getDocumentServiceClient, buildMetadata } = require('./client');
async function getDocumentContent(documentExternalId) {
+1 -1
View File
@@ -1,4 +1,4 @@
const pb = require('../gen/yoresee_doc/v1/yoresee_doc_pb');
const pb = require('@yoresee-doc/sdk-node/cjs/yoresee_doc/v1/yoresee_doc_pb.js');
const { getSystemServiceClient, buildMetadata } = require('./client');
async function healthCheck() {