@hexaijs/contracts 0.1.0 → 0.1.2
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/dist/command.d.ts +6 -0
- package/dist/command.d.ts.map +1 -0
- package/dist/command.js +7 -0
- package/dist/command.js.map +1 -0
- package/dist/decorators/index.d.ts +7 -8
- package/dist/decorators/index.d.ts.map +1 -0
- package/dist/decorators/index.js +6 -10
- package/dist/decorators/index.js.map +1 -1
- package/dist/index.d.ts +4 -14
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -25
- package/dist/index.js.map +1 -1
- package/dist/query.d.ts +6 -0
- package/dist/query.d.ts.map +1 -0
- package/dist/query.js +7 -0
- package/dist/query.js.map +1 -0
- package/package.json +53 -52
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,qBAAa,OAAO,CAAC,OAAO,GAAG,OAAO,EAAE,UAAU,GAAG,OAAO,CAAE,SAAQ,OAAO,CAAC,OAAO,CAAC;IAClF,SAAiB,UAAU,EAAE,UAAU,CAAC;IAExC,OAAgB,SAAS,IAAI,MAAM,CAElC;CACJ"}
|
package/dist/command.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,OAAO,OAAiD,SAAQ,OAAgB;IAGlF,MAAM,CAAU,SAAS;QACrB,OAAO,SAAS,CAAC;IACrB,CAAC;CACJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface PublicEventOptions {
|
|
1
|
+
export interface PublicEventOptions {
|
|
2
2
|
/**
|
|
3
3
|
* Event version for versioned events
|
|
4
4
|
* @example @PublicEvent({ version: 2 })
|
|
@@ -11,7 +11,7 @@ interface PublicEventOptions {
|
|
|
11
11
|
*/
|
|
12
12
|
context?: string;
|
|
13
13
|
}
|
|
14
|
-
interface PublicCommandOptions {
|
|
14
|
+
export interface PublicCommandOptions {
|
|
15
15
|
/**
|
|
16
16
|
* Business context this command belongs to.
|
|
17
17
|
* If not specified, inferred from package name.
|
|
@@ -25,7 +25,7 @@ interface PublicCommandOptions {
|
|
|
25
25
|
*/
|
|
26
26
|
response?: string;
|
|
27
27
|
}
|
|
28
|
-
interface PublicQueryOptions {
|
|
28
|
+
export interface PublicQueryOptions {
|
|
29
29
|
/**
|
|
30
30
|
* Business context this query belongs to.
|
|
31
31
|
* If not specified, inferred from package name.
|
|
@@ -39,8 +39,7 @@ interface PublicQueryOptions {
|
|
|
39
39
|
*/
|
|
40
40
|
response?: string;
|
|
41
41
|
}
|
|
42
|
-
declare function PublicEvent(_options?: PublicEventOptions): ClassDecorator;
|
|
43
|
-
declare function PublicCommand(_options?: PublicCommandOptions): ClassDecorator;
|
|
44
|
-
declare function PublicQuery(_options?: PublicQueryOptions): ClassDecorator;
|
|
45
|
-
|
|
46
|
-
export { PublicCommand, type PublicCommandOptions, PublicEvent, type PublicEventOptions, PublicQuery, type PublicQueryOptions };
|
|
42
|
+
export declare function PublicEvent(_options?: PublicEventOptions): ClassDecorator;
|
|
43
|
+
export declare function PublicCommand(_options?: PublicCommandOptions): ClassDecorator;
|
|
44
|
+
export declare function PublicQuery(_options?: PublicQueryOptions): ClassDecorator;
|
|
45
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,WAAW,CAAC,QAAQ,GAAE,kBAAuB,GAAG,cAAc,CAE7E;AAED,wBAAgB,aAAa,CAC3B,QAAQ,GAAE,oBAAyB,GAClC,cAAc,CAEhB;AAED,wBAAgB,WAAW,CAAC,QAAQ,GAAE,kBAAuB,GAAG,cAAc,CAE7E"}
|
package/dist/decorators/index.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (target) => target;
|
|
1
|
+
export function PublicEvent(_options = {}) {
|
|
2
|
+
return (target) => target;
|
|
4
3
|
}
|
|
5
|
-
function PublicCommand(_options = {}) {
|
|
6
|
-
|
|
4
|
+
export function PublicCommand(_options = {}) {
|
|
5
|
+
return (target) => target;
|
|
7
6
|
}
|
|
8
|
-
function PublicQuery(_options = {}) {
|
|
9
|
-
|
|
7
|
+
export function PublicQuery(_options = {}) {
|
|
8
|
+
return (target) => target;
|
|
10
9
|
}
|
|
11
|
-
|
|
12
|
-
export { PublicCommand, PublicEvent, PublicQuery };
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
14
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/decorators/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decorators/index.ts"],"names":[],"mappings":"AA+CA,MAAM,UAAU,WAAW,CAAC,QAAQ,GAAuB,EAAE;IAC3D,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,QAAQ,GAAyB,EAAE;IAEnC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,QAAQ,GAAuB,EAAE;IAC3D,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;AAC5B,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
readonly ResultType: ResultType;
|
|
6
|
-
static getIntent(): string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
declare class Query<Payload = unknown, ResultType = unknown> extends Message<Payload> {
|
|
10
|
-
readonly ResultType: ResultType;
|
|
11
|
-
static getIntent(): string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { Command, Query };
|
|
1
|
+
export { PublicEvent, PublicCommand, PublicQuery, type PublicEventOptions, type PublicCommandOptions, type PublicQueryOptions, } from "./decorators/index.js";
|
|
2
|
+
export { Command } from "./command.js";
|
|
3
|
+
export { Query } from "./query.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,aAAa,EACb,WAAW,EACX,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function PublicEvent(_options = {}) {
|
|
5
|
-
return (target) => target;
|
|
6
|
-
}
|
|
7
|
-
function PublicCommand(_options = {}) {
|
|
8
|
-
return (target) => target;
|
|
9
|
-
}
|
|
10
|
-
function PublicQuery(_options = {}) {
|
|
11
|
-
return (target) => target;
|
|
12
|
-
}
|
|
13
|
-
var Command = class extends Message {
|
|
14
|
-
static getIntent() {
|
|
15
|
-
return "command";
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
var Query = class extends Message {
|
|
19
|
-
static getIntent() {
|
|
20
|
-
return "query";
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export { Command, PublicCommand, PublicEvent, PublicQuery, Query };
|
|
25
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { PublicEvent, PublicCommand, PublicQuery, } from "./decorators/index.js";
|
|
2
|
+
export { Command } from "./command.js";
|
|
3
|
+
export { Query } from "./query.js";
|
|
26
4
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,aAAa,EACb,WAAW,GAIZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/query.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,qBAAa,KAAK,CAAC,OAAO,GAAG,OAAO,EAAE,UAAU,GAAG,OAAO,CAAE,SAAQ,OAAO,CAAC,OAAO,CAAC;IAChF,SAAiB,UAAU,EAAE,UAAU,CAAC;IAExC,OAAgB,SAAS,IAAI,MAAM,CAElC;CACJ"}
|
package/dist/query.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,OAAO,KAA+C,SAAQ,OAAgB;IAGhF,MAAM,CAAU,SAAS;QACrB,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,55 +1,56 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
"name": "@hexaijs/contracts",
|
|
3
|
+
"publishConfig": {
|
|
4
|
+
"access": "public"
|
|
5
|
+
},
|
|
6
|
+
"version": "0.1.2",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"description": "Zero-dependency marker decorators for hexai contract definitions",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"author": "Sangwoo Hyun <wkdny.hyun@gmail.com>",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/workingdanny911/hexai.git",
|
|
14
|
+
"directory": "packages/contracts"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://github.com/workingdanny911/hexai#readme",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/workingdanny911/hexai/issues"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"hexai",
|
|
22
|
+
"hexagonal",
|
|
23
|
+
"clean-architecture",
|
|
24
|
+
"ddd",
|
|
25
|
+
"contracts",
|
|
26
|
+
"decorators",
|
|
27
|
+
"typescript"
|
|
28
|
+
],
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"LICENSE"
|
|
32
|
+
],
|
|
33
|
+
"exports": {
|
|
34
|
+
".": {
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"import": "./dist/index.js"
|
|
5
37
|
},
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"author": "Sangwoo Hyun <wkdny.hyun@gmail.com>",
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "git+https://github.com/workingdanny911/hexai.git",
|
|
14
|
-
"directory": "packages/contracts"
|
|
38
|
+
"./decorators": {
|
|
39
|
+
"types": "./dist/decorators/index.d.ts",
|
|
40
|
+
"import": "./dist/decorators/index.js"
|
|
15
41
|
},
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"LICENSE"
|
|
32
|
-
],
|
|
33
|
-
"exports": {
|
|
34
|
-
".": {
|
|
35
|
-
"types": "./dist/index.d.ts",
|
|
36
|
-
"import": "./dist/index.js"
|
|
37
|
-
},
|
|
38
|
-
"./decorators": {
|
|
39
|
-
"types": "./dist/decorators/index.d.ts",
|
|
40
|
-
"import": "./dist/decorators/index.js"
|
|
41
|
-
},
|
|
42
|
-
"./package.json": "./package.json"
|
|
43
|
-
},
|
|
44
|
-
"scripts": {
|
|
45
|
-
"test": "vitest run",
|
|
46
|
-
"build": "tsup"
|
|
47
|
-
},
|
|
48
|
-
"peerDependencies": {
|
|
49
|
-
"@hexaijs/core": "^0.6.0"
|
|
50
|
-
},
|
|
51
|
-
"devDependencies": {
|
|
52
|
-
"@hexaijs/core": "workspace:^",
|
|
53
|
-
"@hexaijs/tooling": "workspace:*"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
42
|
+
"./package.json": "./package.json"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"@hexaijs/core": "^0.9.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@typescript/native-preview": "^7.0.0-dev",
|
|
49
|
+
"@hexaijs/core": "^0.9.1",
|
|
50
|
+
"@hexaijs/tooling": "0.1.0"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"test": "vitest run",
|
|
54
|
+
"build": "tsgo -p tsconfig.build.json"
|
|
55
|
+
}
|
|
56
|
+
}
|