@simplysm/service-common 14.0.85 → 14.0.86

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.
@@ -13,15 +13,15 @@ export interface ServiceEventDef<TInfo = unknown, TData = unknown> {
13
13
  * 타입 안전한 info와 data를 가진 서비스 이벤트를 정의한다.
14
14
  *
15
15
  * @example
16
- * // 서버에서 이벤트 정의 + 타입 export
16
+ * // 서버·클라이언트 공통 패키지에서 이벤트 정의 + export
17
17
  * export const OrderUpdated = defineEvent<{ orderId: number }, { status: string }>("OrderUpdated");
18
18
  *
19
- * // 서버에서 이벤트 발생
20
- * await server.emitEvent<typeof OrderUpdated>("OrderUpdated", (info) => info.orderId === 123, { status: "shipped" });
19
+ * // 서버에서 이벤트 발생 (정의 객체를 그대로 전달, 이름·타입 자동 추론)
20
+ * await server.emitEvent(OrderUpdated, (info) => info.orderId === 123, { status: "shipped" });
21
21
  *
22
- * // 클라이언트에서 구독 (import type으로 타입만 가져옴)
23
- * import type { OrderUpdated } from "@server-package";
24
- * await client.addListener<typeof OrderUpdated>("OrderUpdated", { orderId: 123 }, async (data) => {
22
+ * // 클라이언트에서 구독
23
+ * import { OrderUpdated } from "@common-package";
24
+ * await client.addListener(OrderUpdated, { orderId: 123 }, async (data) => {
25
25
  * console.log(data.status); // typed
26
26
  * });
27
27
  */
@@ -2,15 +2,15 @@
2
2
  * 타입 안전한 info와 data를 가진 서비스 이벤트를 정의한다.
3
3
  *
4
4
  * @example
5
- * // 서버에서 이벤트 정의 + 타입 export
5
+ * // 서버·클라이언트 공통 패키지에서 이벤트 정의 + export
6
6
  * export const OrderUpdated = defineEvent<{ orderId: number }, { status: string }>("OrderUpdated");
7
7
  *
8
- * // 서버에서 이벤트 발생
9
- * await server.emitEvent<typeof OrderUpdated>("OrderUpdated", (info) => info.orderId === 123, { status: "shipped" });
8
+ * // 서버에서 이벤트 발생 (정의 객체를 그대로 전달, 이름·타입 자동 추론)
9
+ * await server.emitEvent(OrderUpdated, (info) => info.orderId === 123, { status: "shipped" });
10
10
  *
11
- * // 클라이언트에서 구독 (import type으로 타입만 가져옴)
12
- * import type { OrderUpdated } from "@server-package";
13
- * await client.addListener<typeof OrderUpdated>("OrderUpdated", { orderId: 123 }, async (data) => {
11
+ * // 클라이언트에서 구독
12
+ * import { OrderUpdated } from "@common-package";
13
+ * await client.addListener(OrderUpdated, { orderId: 123 }, async (data) => {
14
14
  * console.log(data.status); // typed
15
15
  * });
16
16
  */
package/dist/index.d.ts CHANGED
@@ -2,7 +2,6 @@ export * from "./protocol/protocol.types";
2
2
  export * from "./protocol/create-service-protocol";
3
3
  export * from "./service-types/orm-service.types";
4
4
  export * from "./service-types/auto-update-service.types";
5
- export * from "./service-types/app-structure-service.types";
6
5
  export * from "./types";
7
6
  export * from "./app-structure/app-structure.types";
8
7
  export * from "./app-structure/app-structure.utils";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AAGnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAE5D,cAAc,SAAS,CAAC;AAGxB,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AAGpD,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AAGnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAE1D,cAAc,SAAS,CAAC;AAGxB,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AAGpD,cAAc,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -4,7 +4,6 @@ export * from "./protocol/create-service-protocol.js";
4
4
  // 서비스 타입
5
5
  export * from "./service-types/orm-service.types.js";
6
6
  export * from "./service-types/auto-update-service.types.js";
7
- export * from "./service-types/app-structure-service.types.js";
8
7
  // 타입
9
8
  export * from "./types.js";
10
9
  // App Structure
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO;AACP,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AAEnD,SAAS;AACT,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,KAAK;AACL,cAAc,SAAS,CAAC;AAExB,gBAAgB;AAChB,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AAEpD,KAAK;AACL,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO;AACP,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AAEnD,SAAS;AACT,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,KAAK;AACL,cAAc,SAAS,CAAC;AAExB,gBAAgB;AAChB,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AAEpD,KAAK;AACL,cAAc,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplysm/service-common",
3
- "version": "14.0.85",
3
+ "version": "14.0.86",
4
4
  "description": "심플리즘 패키지 - 서비스 (common)",
5
5
  "author": "심플리즘",
6
6
  "license": "Apache-2.0",
@@ -21,7 +21,7 @@
21
21
  "@types/node": "^20.19.41"
22
22
  },
23
23
  "dependencies": {
24
- "@simplysm/core-common": "14.0.85",
25
- "@simplysm/orm-common": "14.0.85"
24
+ "@simplysm/core-common": "14.0.86",
25
+ "@simplysm/orm-common": "14.0.86"
26
26
  }
27
27
  }
@@ -14,15 +14,15 @@ export interface ServiceEventDef<TInfo = unknown, TData = unknown> {
14
14
  * 타입 안전한 info와 data를 가진 서비스 이벤트를 정의한다.
15
15
  *
16
16
  * @example
17
- * // 서버에서 이벤트 정의 + 타입 export
17
+ * // 서버·클라이언트 공통 패키지에서 이벤트 정의 + export
18
18
  * export const OrderUpdated = defineEvent<{ orderId: number }, { status: string }>("OrderUpdated");
19
19
  *
20
- * // 서버에서 이벤트 발생
21
- * await server.emitEvent<typeof OrderUpdated>("OrderUpdated", (info) => info.orderId === 123, { status: "shipped" });
20
+ * // 서버에서 이벤트 발생 (정의 객체를 그대로 전달, 이름·타입 자동 추론)
21
+ * await server.emitEvent(OrderUpdated, (info) => info.orderId === 123, { status: "shipped" });
22
22
  *
23
- * // 클라이언트에서 구독 (import type으로 타입만 가져옴)
24
- * import type { OrderUpdated } from "@server-package";
25
- * await client.addListener<typeof OrderUpdated>("OrderUpdated", { orderId: 123 }, async (data) => {
23
+ * // 클라이언트에서 구독
24
+ * import { OrderUpdated } from "@common-package";
25
+ * await client.addListener(OrderUpdated, { orderId: 123 }, async (data) => {
26
26
  * console.log(data.status); // typed
27
27
  * });
28
28
  */
package/src/index.ts CHANGED
@@ -5,7 +5,6 @@ export * from "./protocol/create-service-protocol";
5
5
  // 서비스 타입
6
6
  export * from "./service-types/orm-service.types";
7
7
  export * from "./service-types/auto-update-service.types";
8
- export * from "./service-types/app-structure-service.types";
9
8
  // 타입
10
9
  export * from "./types";
11
10
 
@@ -1,10 +0,0 @@
1
- import type { AppStructureItem } from "../app-structure/app-structure.types";
2
- /**
3
- * AppStructure 서비스 인터페이스
4
- *
5
- * 서버에 등록된 앱 구조 항목을 클라이언트명 기준 맵으로 조회한다.
6
- */
7
- export interface AppStructureService {
8
- getItems(): Record<string, AppStructureItem[]>;
9
- }
10
- //# sourceMappingURL=app-structure-service.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-structure-service.types.d.ts","sourceRoot":"","sources":["../../src/service-types/app-structure-service.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAE7E;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;CAChD"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=app-structure-service.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-structure-service.types.js","sourceRoot":"","sources":["../../src/service-types/app-structure-service.types.ts"],"names":[],"mappings":""}
@@ -1,10 +0,0 @@
1
- import type { AppStructureItem } from "../app-structure/app-structure.types";
2
-
3
- /**
4
- * AppStructure 서비스 인터페이스
5
- *
6
- * 서버에 등록된 앱 구조 항목을 클라이언트명 기준 맵으로 조회한다.
7
- */
8
- export interface AppStructureService {
9
- getItems(): Record<string, AppStructureItem[]>;
10
- }