@nats-io/services 3.0.0-25 → 3.0.0-27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/types.d.ts +12 -10
- package/lib/types.js +10 -12
- package/lib/types.js.map +1 -1
- package/package.json +3 -3
package/lib/types.d.ts
CHANGED
|
@@ -60,11 +60,12 @@ export interface ServiceGroup {
|
|
|
60
60
|
export type ServiceMetadata = {
|
|
61
61
|
metadata?: Record<string, string>;
|
|
62
62
|
};
|
|
63
|
-
export declare
|
|
64
|
-
STATS
|
|
65
|
-
INFO
|
|
66
|
-
PING
|
|
67
|
-
}
|
|
63
|
+
export declare const ServiceResponseType: {
|
|
64
|
+
readonly STATS: "io.nats.micro.v1.stats_response";
|
|
65
|
+
readonly INFO: "io.nats.micro.v1.info_response";
|
|
66
|
+
readonly PING: "io.nats.micro.v1.ping_response";
|
|
67
|
+
};
|
|
68
|
+
export type ServiceResponseType = typeof ServiceResponseType[keyof typeof ServiceResponseType];
|
|
68
69
|
export interface ServiceResponse {
|
|
69
70
|
/**
|
|
70
71
|
* Response type schema
|
|
@@ -224,11 +225,12 @@ export declare class ServiceError extends Error {
|
|
|
224
225
|
static isServiceError(msg: Msg): boolean;
|
|
225
226
|
static toServiceError(msg: Msg): ServiceError | null;
|
|
226
227
|
}
|
|
227
|
-
export declare
|
|
228
|
-
PING
|
|
229
|
-
STATS
|
|
230
|
-
INFO
|
|
231
|
-
}
|
|
228
|
+
export declare const ServiceVerb: {
|
|
229
|
+
readonly PING: "PING";
|
|
230
|
+
readonly STATS: "STATS";
|
|
231
|
+
readonly INFO: "INFO";
|
|
232
|
+
};
|
|
233
|
+
export type ServiceVerb = typeof ServiceVerb[keyof typeof ServiceVerb];
|
|
232
234
|
export interface ServiceClient {
|
|
233
235
|
/**
|
|
234
236
|
* Pings services
|
package/lib/types.js
CHANGED
|
@@ -15,12 +15,11 @@
|
|
|
15
15
|
*/
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.ServiceVerb = exports.ServiceError = exports.ServiceErrorCodeHeader = exports.ServiceErrorHeader = exports.ServiceResponseType = void 0;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})(ServiceResponseType || (exports.ServiceResponseType = ServiceResponseType = {}));
|
|
18
|
+
exports.ServiceResponseType = {
|
|
19
|
+
STATS: "io.nats.micro.v1.stats_response",
|
|
20
|
+
INFO: "io.nats.micro.v1.info_response",
|
|
21
|
+
PING: "io.nats.micro.v1.ping_response",
|
|
22
|
+
};
|
|
24
23
|
exports.ServiceErrorHeader = "Nats-Service-Error";
|
|
25
24
|
exports.ServiceErrorCodeHeader = "Nats-Service-Error-Code";
|
|
26
25
|
class ServiceError extends Error {
|
|
@@ -43,10 +42,9 @@ class ServiceError extends Error {
|
|
|
43
42
|
}
|
|
44
43
|
}
|
|
45
44
|
exports.ServiceError = ServiceError;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
})(ServiceVerb || (exports.ServiceVerb = ServiceVerb = {}));
|
|
45
|
+
exports.ServiceVerb = {
|
|
46
|
+
PING: "PING",
|
|
47
|
+
STATS: "STATS",
|
|
48
|
+
INFO: "INFO",
|
|
49
|
+
};
|
|
52
50
|
//# sourceMappingURL=types.js.map
|
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../build/src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../build/src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAoFU,QAAA,mBAAmB,GAAG;IACjC,KAAK,EAAE,iCAAiC;IACxC,IAAI,EAAE,gCAAgC;IACtC,IAAI,EAAE,gCAAgC;CAC9B,CAAC;AAwKE,QA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34
|
"description": "services library - this library implements all the base functionality for NATS services for javascript clients",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@nats-io/nats-core": "3.0.0-
|
|
36
|
+
"@nats-io/nats-core": "3.0.0-53"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^22.10.10",
|
|
40
40
|
"shx": "^0.3.4",
|
|
41
|
-
"typescript": "5.
|
|
41
|
+
"typescript": "^5.8.2"
|
|
42
42
|
}
|
|
43
43
|
}
|