@lakutata/nats 3.0.0-beta.4 → 3.0.0-beta.5

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 CHANGED
@@ -157,7 +157,9 @@ Application
157
157
  `Entrypoint.notify()` does not reach the NATS clients (NATS has no client ids).
158
158
  - When the entrypoint stops, its subscription is drained: no new request is received (the callers retry, see below)
159
159
  and the requests in progress are answered.
160
- - `setupNatsServiceEntrypoint` is its 2.x name, kept as an alias.
160
+ - It is `SetupNatsServiceEntrypoint` of 2.x, renamed as the functions of 3.0 (no alias): the applications of 2.x rename
161
+ their calls, as the ones of `BuildServiceProxy` (`buildServiceProxy`), `JSONCodec` (`jsonCodec`) and `MessagePackCodec`
162
+ (`messagePackCodec`).
161
163
 
162
164
  ### Invoking a service: the service proxy
163
165
 
@@ -269,7 +271,6 @@ Application.run({
269
271
  | `messagePackCodec`, `jsonCodec` | The codecs of the payloads |
270
272
  | `StringCodec`, `Codec`, `Subscription`, `RetentionPolicy` | Re-exported from `nats` |
271
273
  | `natsServiceEntrypoint` | The service adapter of an entrypoint served over NATS |
272
- | `setupNatsServiceEntrypoint` | Its 2.x name |
273
274
  | `NatsServiceEntrypointOptions` | Its options: `subject`, `queue`, `name`, `middlewares` |
274
275
  | `ServiceProxy` | The singleton provider invoking the actions of a remote service and listening to its events |
275
276
  | `buildServiceProxy` | Builds the provider options of a `ServiceProxy` |
@@ -82,21 +82,3 @@ export type NatsServiceEntrypointOptions = {
82
82
  * ```
83
83
  */
84
84
  export declare function natsServiceEntrypoint(natsComponentName: string, options?: NatsServiceEntrypointOptions): EntrypointAdapter<ServiceContext>;
85
- /**
86
- * The former name of {@link natsServiceEntrypoint}, kept for the applications written for 2.x; it behaves the same.
87
- * @param natsComponentName The name of the NATS component, as registered in the components.
88
- * @param options The subject, the queue group, the adapter name and its middlewares.
89
- * @returns The adapter, to give to the `service` option of `buildEntrypoints`.
90
- * @example
91
- * ```typescript
92
- * import {buildEntrypoints, Controller} from 'lakutata/com/entrypoint'
93
- * import {setupNatsServiceEntrypoint} from '@lakutata/nats'
94
- *
95
- * class OrderController extends Controller {
96
- * }
97
- *
98
- * //The same as natsServiceEntrypoint('nats')
99
- * export const entrypoint = buildEntrypoints({controllers: [OrderController], service: setupNatsServiceEntrypoint('nats')})
100
- * ```
101
- */
102
- export declare const setupNatsServiceEntrypoint: (natsComponentName: string, options?: NatsServiceEntrypointOptions) => EntrypointAdapter<ServiceContext>;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setupNatsServiceEntrypoint = void 0;
4
3
  exports.natsServiceEntrypoint = natsServiceEntrypoint;
5
4
  const core_1 = require("@lakutata/core");
6
5
  const entrypoint_1 = require("@lakutata/entrypoint");
@@ -107,21 +106,3 @@ function natsServiceEntrypoint(natsComponentName, options = {}) {
107
106
  }
108
107
  };
109
108
  }
110
- /**
111
- * The former name of {@link natsServiceEntrypoint}, kept for the applications written for 2.x; it behaves the same.
112
- * @param natsComponentName The name of the NATS component, as registered in the components.
113
- * @param options The subject, the queue group, the adapter name and its middlewares.
114
- * @returns The adapter, to give to the `service` option of `buildEntrypoints`.
115
- * @example
116
- * ```typescript
117
- * import {buildEntrypoints, Controller} from 'lakutata/com/entrypoint'
118
- * import {setupNatsServiceEntrypoint} from '@lakutata/nats'
119
- *
120
- * class OrderController extends Controller {
121
- * }
122
- *
123
- * //The same as natsServiceEntrypoint('nats')
124
- * export const entrypoint = buildEntrypoints({controllers: [OrderController], service: setupNatsServiceEntrypoint('nats')})
125
- * ```
126
- */
127
- exports.setupNatsServiceEntrypoint = natsServiceEntrypoint;
@@ -1,4 +1,4 @@
1
- export { natsServiceEntrypoint, setupNatsServiceEntrypoint, type NatsServiceEntrypointOptions } from '../entrypoints/NatsServiceEntrypoint.js';
1
+ export { natsServiceEntrypoint, type NatsServiceEntrypointOptions } from '../entrypoints/NatsServiceEntrypoint.js';
2
2
  export { ServiceProxy, buildServiceProxy, type BuildServiceProxyOptions } from '../providers/ServiceProxy.js';
3
3
  export { RetentionPolicy } from 'nats';
4
4
  export { NATS, buildNatsClientOptions } from '../components/NATS.js';
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NatsBulkException = exports.ServiceInvokeException = exports.NatsRequestTimeoutException = exports.NatsNotFoundException = exports.NatsNoRespondersAvailableException = exports.NatsInternalServerException = exports.NatsForbiddenException = exports.NatsBadRequestException = exports.StringCodec = exports.messagePackCodec = exports.jsonCodec = exports.buildNatsClientOptions = exports.NATS = exports.RetentionPolicy = exports.buildServiceProxy = exports.ServiceProxy = exports.setupNatsServiceEntrypoint = exports.natsServiceEntrypoint = void 0;
3
+ exports.NatsBulkException = exports.ServiceInvokeException = exports.NatsRequestTimeoutException = exports.NatsNotFoundException = exports.NatsNoRespondersAvailableException = exports.NatsInternalServerException = exports.NatsForbiddenException = exports.NatsBadRequestException = exports.StringCodec = exports.messagePackCodec = exports.jsonCodec = exports.buildNatsClientOptions = exports.NATS = exports.RetentionPolicy = exports.buildServiceProxy = exports.ServiceProxy = exports.natsServiceEntrypoint = void 0;
4
4
  var NatsServiceEntrypoint_js_1 = require("../entrypoints/NatsServiceEntrypoint.js");
5
5
  Object.defineProperty(exports, "natsServiceEntrypoint", { enumerable: true, get: function () { return NatsServiceEntrypoint_js_1.natsServiceEntrypoint; } });
6
- Object.defineProperty(exports, "setupNatsServiceEntrypoint", { enumerable: true, get: function () { return NatsServiceEntrypoint_js_1.setupNatsServiceEntrypoint; } });
7
6
  var ServiceProxy_js_1 = require("../providers/ServiceProxy.js");
8
7
  Object.defineProperty(exports, "ServiceProxy", { enumerable: true, get: function () { return ServiceProxy_js_1.ServiceProxy; } });
9
8
  Object.defineProperty(exports, "buildServiceProxy", { enumerable: true, get: function () { return ServiceProxy_js_1.buildServiceProxy; } });
@@ -103,21 +103,3 @@ export function natsServiceEntrypoint(natsComponentName, options = {}) {
103
103
  }
104
104
  };
105
105
  }
106
- /**
107
- * The former name of {@link natsServiceEntrypoint}, kept for the applications written for 2.x; it behaves the same.
108
- * @param natsComponentName The name of the NATS component, as registered in the components.
109
- * @param options The subject, the queue group, the adapter name and its middlewares.
110
- * @returns The adapter, to give to the `service` option of `buildEntrypoints`.
111
- * @example
112
- * ```typescript
113
- * import {buildEntrypoints, Controller} from 'lakutata/com/entrypoint'
114
- * import {setupNatsServiceEntrypoint} from '@lakutata/nats'
115
- *
116
- * class OrderController extends Controller {
117
- * }
118
- *
119
- * //The same as natsServiceEntrypoint('nats')
120
- * export const entrypoint = buildEntrypoints({controllers: [OrderController], service: setupNatsServiceEntrypoint('nats')})
121
- * ```
122
- */
123
- export const setupNatsServiceEntrypoint = natsServiceEntrypoint;
@@ -1,4 +1,4 @@
1
- export { natsServiceEntrypoint, setupNatsServiceEntrypoint } from '../entrypoints/NatsServiceEntrypoint.js';
1
+ export { natsServiceEntrypoint } from '../entrypoints/NatsServiceEntrypoint.js';
2
2
  export { ServiceProxy, buildServiceProxy } from '../providers/ServiceProxy.js';
3
3
  export { RetentionPolicy } from 'nats';
4
4
  export { NATS, buildNatsClientOptions } from '../components/NATS.js';
@@ -82,21 +82,3 @@ export type NatsServiceEntrypointOptions = {
82
82
  * ```
83
83
  */
84
84
  export declare function natsServiceEntrypoint(natsComponentName: string, options?: NatsServiceEntrypointOptions): EntrypointAdapter<ServiceContext>;
85
- /**
86
- * The former name of {@link natsServiceEntrypoint}, kept for the applications written for 2.x; it behaves the same.
87
- * @param natsComponentName The name of the NATS component, as registered in the components.
88
- * @param options The subject, the queue group, the adapter name and its middlewares.
89
- * @returns The adapter, to give to the `service` option of `buildEntrypoints`.
90
- * @example
91
- * ```typescript
92
- * import {buildEntrypoints, Controller} from 'lakutata/com/entrypoint'
93
- * import {setupNatsServiceEntrypoint} from '@lakutata/nats'
94
- *
95
- * class OrderController extends Controller {
96
- * }
97
- *
98
- * //The same as natsServiceEntrypoint('nats')
99
- * export const entrypoint = buildEntrypoints({controllers: [OrderController], service: setupNatsServiceEntrypoint('nats')})
100
- * ```
101
- */
102
- export declare const setupNatsServiceEntrypoint: (natsComponentName: string, options?: NatsServiceEntrypointOptions) => EntrypointAdapter<ServiceContext>;
@@ -1,4 +1,4 @@
1
- export { natsServiceEntrypoint, setupNatsServiceEntrypoint, type NatsServiceEntrypointOptions } from '../entrypoints/NatsServiceEntrypoint.js';
1
+ export { natsServiceEntrypoint, type NatsServiceEntrypointOptions } from '../entrypoints/NatsServiceEntrypoint.js';
2
2
  export { ServiceProxy, buildServiceProxy, type BuildServiceProxyOptions } from '../providers/ServiceProxy.js';
3
3
  export { RetentionPolicy } from 'nats';
4
4
  export { NATS, buildNatsClientOptions } from '../components/NATS.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lakutata/nats",
3
- "version": "3.0.0-beta.4",
3
+ "version": "3.0.0-beta.5",
4
4
  "description": "The NATS component of the lakutata framework: messaging, service proxies, service entrypoint and large payloads.",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/exports/Nats.js",
@@ -33,9 +33,9 @@
33
33
  "nats": "^2.29.3"
34
34
  },
35
35
  "peerDependencies": {
36
- "@lakutata/core": "3.0.0-beta.4",
37
- "@lakutata/entrypoint": "3.0.0-beta.4",
38
- "@lakutata/utils": "3.0.0-beta.4"
36
+ "@lakutata/core": "3.0.0-beta.5",
37
+ "@lakutata/entrypoint": "3.0.0-beta.5",
38
+ "@lakutata/utils": "3.0.0-beta.5"
39
39
  },
40
40
  "engines": {
41
41
  "node": ">=22"