@requence/service 1.0.0-alpha.0

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,OAAO,EAGb,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAEpE,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC1B,KAAK,CAAC,SAAS,CAAC,GAChB,IAAI,CAAA;AAER,qBAAa,UAAW,SAAQ,KAAK;IAChB,KAAK,CAAC,EAAE,MAAM;gBAAd,KAAK,CAAC,EAAE,MAAM,YAAA;CAGlC;AAED,qBAAa,UAAW,SAAQ,KAAK;CAAG;AAExC,QAAA,MAAM,YAAY,eAAyB,CAAA;AAE3C,KAAK,WAAW,GAAG;IACjB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,KAAK,EAAE,GAAG,CAAA;CACX,CAAA;AAMD,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO;;;EAK3C;AAED,MAAM,CAAC,OAAO,UAAU,2BAA2B,CAAC,OAAO,EAAE;IAC3D,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,KAAK,CAAA;IACZ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,KAAK,EAAE,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;IACvE,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;IACpC,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;CACzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAMkB,MAAM,GAAG,IAAI,SAAS,OAAO,GAAG,WAAW;qBARzC,MAAM,KAAK,MAAM;wBAgBd,OAAO;eAUsC,WAAW;WAGV,MAAM,CACtE,MAAM,EACN,GAAG,CACJ;;qBAEc,GAAG,EAAE;sBAGJ,GAAG,EAAE;sBAGL,GAAG,EAAE;uBAGJ,GAAG,EAAE;;kBAIR,MAAM;mBAGL,MAAM;EAIxB;AAED,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAC7C,OAAO,2BAA2B,CACnC,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { type Connection, type MessageHandler } from './connections/createAmqpConnection.js';
2
+ interface ServiceOptions<V extends string> {
3
+ serviceKey?: string;
4
+ version: V;
5
+ prefetch?: number;
6
+ connectionTimeout?: number;
7
+ silent?: boolean;
8
+ }
9
+ export default function createService<V extends keyof Requence.Version | (string & {})>(version: V, messageHandler: MessageHandler<V>): Connection;
10
+ export default function createService<V extends keyof Requence.Version | (string & {})>(options: ServiceOptions<V>, messageHandler: MessageHandler<V>): Connection;
11
+ export {};
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAKA,OAA6B,EAC3B,KAAK,UAAU,EACf,KAAK,cAAc,EACpB,MAAM,uCAAuC,CAAA;AAS9C,UAAU,cAAc,CAAC,CAAC,SAAS,MAAM;IACvC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,CAAC,CAAA;IACV,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAkBD,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,CAAC,SAAS,MAAM,QAAQ,CAAC,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,EAChD,OAAO,EAAE,CAAC,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,UAAU,CAAA;AAC5D,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,CAAC,SAAS,MAAM,QAAQ,CAAC,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,EAChD,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,UAAU,CAAA"}
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@requence/service",
3
+ "type": "module",
4
+ "version": "1.0.0-alpha.0",
5
+ "bin": {
6
+ "requence-service": "build/cli.js"
7
+ },
8
+ "scripts": {
9
+ "check-types": "tsc",
10
+ "build-declaration": "tsc -p tsconfig.declaration.json && tsc-alias -p tsconfig.declaration.json 2>/dev/null",
11
+ "build": "ADD_ENTRYPOINT=src/cli.ts bun -e \"import('@requence/utils/build-package.mts')\" && bun build-declaration"
12
+ },
13
+ "dependencies": {
14
+ "amqp-connection-manager": "^4.1.14",
15
+ "amqplib": "^0.10.4",
16
+ "chalk": "^5.3.0",
17
+ "prettier": "^3.3.3",
18
+ "semver": "^7.6.3",
19
+ "yargs": "^17.7.2",
20
+ "zod": "^3.23.8"
21
+ },
22
+ "devDependencies": {
23
+ "@requence/helpers": "workspace:*",
24
+ "@requence/utils": "workspace:*",
25
+ "@types/semver": "^7.5.8"
26
+ },
27
+ "exports": {
28
+ "default": "./build/index.js",
29
+ "types": "./build/types/service/src/index.d.ts"
30
+ }
31
+ }