grpc-rich-error-model
Advanced tools
Comparing version 0.0.14 to 0.0.15
@@ -35,5 +35,5 @@ "use strict"; | ||
const assertions_1 = require("./assertions"); | ||
const bundle_json_1 = __importDefault(require("./protos/bundle.json")); | ||
const bundle_js_1 = __importDefault(require("./protos/bundle.js")); | ||
// Seems there is an error with the types but it works when casted. | ||
const root = protobufjs_1.default.Root.fromJSON(bundle_json_1.default); | ||
const root = protobufjs_1.default.Root.fromJSON(bundle_js_1.default); | ||
exports.StatusMessageType = root.lookupType('google.rpc.Status'); | ||
@@ -40,0 +40,0 @@ var ErrorDetailProtobufType; |
@@ -6,3 +6,3 @@ import { Metadata, status } from '@grpc/grpc-js'; | ||
import { assertNever } from './assertions'; | ||
import jsonDescriptor from './protos/bundle.json'; | ||
import jsonDescriptor from './protos/bundle.js'; | ||
// Seems there is an error with the types but it works when casted. | ||
@@ -9,0 +9,0 @@ const root = protobuf.Root.fromJSON(jsonDescriptor); |
@@ -6,3 +6,3 @@ { | ||
"type": "module", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"author": { | ||
@@ -9,0 +9,0 @@ "name": "Oleg Gaydarenko", |
@@ -1,2 +0,1 @@ | ||
import { readFile } from 'fs/promises'; | ||
import { Metadata, status, StatusObject } from '@grpc/grpc-js'; | ||
@@ -15,5 +14,3 @@ import { grpc } from '@ridedott/run'; | ||
const jsonDescriptor = JSON.parse( | ||
await readFile(new URL('./protos/bundle.json', import.meta.url), 'utf8') | ||
); | ||
import jsonDescriptor from './protos/bundle.js'; | ||
@@ -20,0 +17,0 @@ // Seems there is an error with the types but it works when casted. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
119080
86
2585