@nats-io/services 3.0.0-21 → 3.0.0-22
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/README.md +11 -0
- package/lib/internal_mod.d.ts +1 -1
- package/lib/internal_mod.js +3 -3
- package/lib/internal_mod.js.map +1 -1
- package/lib/mod.d.ts +1 -1
- package/lib/mod.js +2 -2
- package/lib/mod.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
[](./LICENSE)
|
|
2
|
+

|
|
3
|
+
[](https://nats-io.github.io/nats.js/services/index.html)
|
|
4
|
+
|
|
5
|
+
[](https://jsr.io/@nats-io/services)
|
|
6
|
+
[](https://jsr.io/@nats-io/services)
|
|
7
|
+
|
|
8
|
+
[](https://www.npmjs.com/package/@nats-io/services)
|
|
9
|
+

|
|
10
|
+

|
|
11
|
+
|
|
1
12
|
# Services
|
|
2
13
|
|
|
3
14
|
The Services module introduces a higher-level API for implementing services with
|
package/lib/internal_mod.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { NatsConnection, RequestManyOptions } from "@nats-io/nats-core";
|
|
|
2
2
|
import type { Service, ServiceClient, ServiceConfig } from "./types";
|
|
3
3
|
export type { Endpoint, EndpointInfo, EndpointOptions, EndpointStats, NamedEndpointStats, Service, ServiceClient, ServiceConfig, ServiceGroup, ServiceHandler, ServiceIdentity, ServiceInfo, ServiceMetadata, ServiceMsg, ServiceResponse, ServiceStats, } from "./types";
|
|
4
4
|
export { ServiceError, ServiceErrorCodeHeader, ServiceErrorHeader, ServiceResponseType, ServiceVerb, } from "./types";
|
|
5
|
-
export declare class
|
|
5
|
+
export declare class Svcm {
|
|
6
6
|
nc: NatsConnection;
|
|
7
7
|
constructor(nc: NatsConnection);
|
|
8
8
|
add(config: ServiceConfig): Promise<Service>;
|
package/lib/internal_mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Svcm = exports.ServiceVerb = exports.ServiceResponseType = exports.ServiceErrorHeader = exports.ServiceErrorCodeHeader = exports.ServiceError = void 0;
|
|
4
4
|
const service_1 = require("./service");
|
|
5
5
|
const serviceclient_1 = require("./serviceclient");
|
|
6
6
|
var types_1 = require("./types");
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "ServiceErrorCodeHeader", { enumerable: true, get
|
|
|
9
9
|
Object.defineProperty(exports, "ServiceErrorHeader", { enumerable: true, get: function () { return types_1.ServiceErrorHeader; } });
|
|
10
10
|
Object.defineProperty(exports, "ServiceResponseType", { enumerable: true, get: function () { return types_1.ServiceResponseType; } });
|
|
11
11
|
Object.defineProperty(exports, "ServiceVerb", { enumerable: true, get: function () { return types_1.ServiceVerb; } });
|
|
12
|
-
class
|
|
12
|
+
class Svcm {
|
|
13
13
|
nc;
|
|
14
14
|
constructor(nc) {
|
|
15
15
|
this.nc = nc;
|
|
@@ -27,5 +27,5 @@ class Svc {
|
|
|
27
27
|
return new serviceclient_1.ServiceClientImpl(this.nc, opts, prefix);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
exports.
|
|
30
|
+
exports.Svcm = Svcm;
|
|
31
31
|
//# sourceMappingURL=internal_mod.js.map
|
package/lib/internal_mod.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal_mod.js","sourceRoot":"","sources":["../build/src/internal_mod.ts"],"names":[],"mappings":";;;AACA,uCAAwC;AACxC,mDAAoD;AAsBpD,iCAMiB;AALf,qGAAA,YAAY,OAAA;AACZ,+GAAA,sBAAsB,OAAA;AACtB,2GAAA,kBAAkB,OAAA;AAClB,4GAAA,mBAAmB,OAAA;AACnB,oGAAA,WAAW,OAAA;AAGb,MAAa,
|
|
1
|
+
{"version":3,"file":"internal_mod.js","sourceRoot":"","sources":["../build/src/internal_mod.ts"],"names":[],"mappings":";;;AACA,uCAAwC;AACxC,mDAAoD;AAsBpD,iCAMiB;AALf,qGAAA,YAAY,OAAA;AACZ,+GAAA,sBAAsB,OAAA;AACtB,2GAAA,kBAAkB,OAAA;AAClB,4GAAA,mBAAmB,OAAA;AACnB,oGAAA,WAAW,OAAA;AAGb,MAAa,IAAI;IACf,EAAE,CAAiB;IAEnB,YAAY,EAAkB;QAC5B,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAED,GAAG,CAAC,MAAqB;QACvB,IAAI,CAAC;YACH,MAAM,CAAC,GAAG,IAAI,qBAAW,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;YAC3C,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC;QACnB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,MAAM,CAAC,IAAyB,EAAE,MAAe;QAC/C,OAAO,IAAI,iCAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;CACF;AAnBD,oBAmBC"}
|
package/lib/mod.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type { Endpoint, EndpointInfo, EndpointOptions, EndpointStats, NamedEndpointStats, Service, ServiceClient, ServiceConfig, ServiceGroup, ServiceHandler, ServiceIdentity, ServiceInfo, ServiceMetadata, ServiceMsg, ServiceResponse, ServiceStats, } from "./internal_mod";
|
|
2
|
-
export { ServiceError, ServiceErrorCodeHeader, ServiceErrorHeader, ServiceResponseType, ServiceVerb,
|
|
2
|
+
export { ServiceError, ServiceErrorCodeHeader, ServiceErrorHeader, ServiceResponseType, ServiceVerb, Svcm, } from "./internal_mod";
|
package/lib/mod.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Svcm = exports.ServiceVerb = exports.ServiceResponseType = exports.ServiceErrorHeader = exports.ServiceErrorCodeHeader = exports.ServiceError = void 0;
|
|
4
4
|
var internal_mod_1 = require("./internal_mod");
|
|
5
5
|
Object.defineProperty(exports, "ServiceError", { enumerable: true, get: function () { return internal_mod_1.ServiceError; } });
|
|
6
6
|
Object.defineProperty(exports, "ServiceErrorCodeHeader", { enumerable: true, get: function () { return internal_mod_1.ServiceErrorCodeHeader; } });
|
|
7
7
|
Object.defineProperty(exports, "ServiceErrorHeader", { enumerable: true, get: function () { return internal_mod_1.ServiceErrorHeader; } });
|
|
8
8
|
Object.defineProperty(exports, "ServiceResponseType", { enumerable: true, get: function () { return internal_mod_1.ServiceResponseType; } });
|
|
9
9
|
Object.defineProperty(exports, "ServiceVerb", { enumerable: true, get: function () { return internal_mod_1.ServiceVerb; } });
|
|
10
|
-
Object.defineProperty(exports, "
|
|
10
|
+
Object.defineProperty(exports, "Svcm", { enumerable: true, get: function () { return internal_mod_1.Svcm; } });
|
|
11
11
|
//# sourceMappingURL=mod.js.map
|
package/lib/mod.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.js","sourceRoot":"","sources":["../build/src/mod.ts"],"names":[],"mappings":";;;AAmBA,+CAOwB;AANtB,4GAAA,YAAY,OAAA;AACZ,sHAAA,sBAAsB,OAAA;AACtB,kHAAA,kBAAkB,OAAA;AAClB,mHAAA,mBAAmB,OAAA;AACnB,2GAAA,WAAW,OAAA;AACX,
|
|
1
|
+
{"version":3,"file":"mod.js","sourceRoot":"","sources":["../build/src/mod.ts"],"names":[],"mappings":";;;AAmBA,+CAOwB;AANtB,4GAAA,YAAY,OAAA;AACZ,sHAAA,sBAAsB,OAAA;AACtB,kHAAA,kBAAkB,OAAA;AAClB,mHAAA,mBAAmB,OAAA;AACnB,2GAAA,WAAW,OAAA;AACX,oGAAA,IAAI,OAAA"}
|