@simplysm/service-server 13.0.24 → 13.0.26

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
@@ -96,7 +96,7 @@ Services are defined using the `defineService` function. Service methods are cal
96
96
  ```typescript
97
97
  import { defineService } from "@simplysm/service-server";
98
98
 
99
- export const MyService = defineService("MyService", (ctx) => ({
99
+ export const MyService = defineService("My", (ctx) => ({
100
100
  hello: async (name: string): Promise<string> => {
101
101
  return `Hello, ${name}!`;
102
102
  },
@@ -134,7 +134,7 @@ interface UserAuthInfo {
134
134
  }
135
135
 
136
136
  // Service-level auth: all methods require authentication
137
- export const UserService = defineService("UserService", auth((ctx) => ({
137
+ export const UserService = defineService("User", auth((ctx) => ({
138
138
  getProfile: async (): Promise<unknown> => {
139
139
  const userId = (ctx.authInfo as UserAuthInfo)?.userId;
140
140
  // ...
@@ -152,7 +152,7 @@ export type UserServiceMethods = import("@simplysm/service-server").ServiceMetho
152
152
 
153
153
  **Method-level auth only:**
154
154
  ```typescript
155
- export const MyService = defineService("MyService", (ctx) => ({
155
+ export const MyService = defineService("My", (ctx) => ({
156
156
  publicMethod: async (): Promise<void> => {
157
157
  // No auth required
158
158
  },
@@ -170,7 +170,7 @@ export const MyService = defineService("MyService", (ctx) => ({
170
170
  **Service-level auth with method override:**
171
171
  ```typescript
172
172
  // All methods require authentication by default
173
- export const SecureService = defineService("SecureService", auth((ctx) => ({
173
+ export const SecureService = defineService("Secure", auth((ctx) => ({
174
174
  normalMethod: async (): Promise<void> => {
175
175
  // Auth required (inherited from service level)
176
176
  },
@@ -188,8 +188,8 @@ See [Authentication](docs/authentication.md) for JWT token management and permis
188
188
  Service methods can be called via HTTP or WebSocket:
189
189
 
190
190
  ```
191
- GET /api/MyService/hello?json=["World"]
192
- POST /api/MyService/hello
191
+ GET /api/My/hello?json=["World"]
192
+ POST /api/My/hello
193
193
  ```
194
194
 
195
195
  See [HTTP API Call](docs/transport.md#http-api-call) and [ServiceSocket](docs/transport.md#servicesocket) for transport layer details.
@@ -8,7 +8,7 @@ Use the `auth()` wrapper to set authentication requirements on services or metho
8
8
  import { defineService, auth } from "@simplysm/service-server";
9
9
 
10
10
  // Service-level auth: all methods require login
11
- export const UserService = defineService("UserService", auth((ctx) => ({
11
+ export const UserService = defineService("User", auth((ctx) => ({
12
12
  // Login only required (inherits from service level)
13
13
  getProfile: async (): Promise<unknown> => {
14
14
  const userId = (ctx.authInfo as { userId: number; role: string })?.userId;
@@ -22,7 +22,7 @@ export const UserService = defineService("UserService", auth((ctx) => ({
22
22
  })));
23
23
 
24
24
  // No authentication required (no auth wrapper)
25
- export const PublicService = defineService("PublicService", (ctx) => ({
25
+ export const PublicService = defineService("Public", (ctx) => ({
26
26
  healthCheck: async (): Promise<string> => {
27
27
  return "OK";
28
28
  },
package/docs/server.md CHANGED
@@ -110,7 +110,7 @@ Define services using the `defineService` function. Service methods are called v
110
110
  ```typescript
111
111
  import { defineService } from "@simplysm/service-server";
112
112
 
113
- export const MyService = defineService("MyService", (ctx) => ({
113
+ export const MyService = defineService("My", (ctx) => ({
114
114
  hello: async (name: string): Promise<string> => {
115
115
  return `Hello, ${name}!`;
116
116
  },
@@ -150,7 +150,7 @@ Read sections from `.config.json` files using `ctx.getConfig()`. Root and per-cl
150
150
  ```typescript
151
151
  import { defineService } from "@simplysm/service-server";
152
152
 
153
- export const MyService = defineService("MyService", (ctx) => ({
153
+ export const MyService = defineService("My", (ctx) => ({
154
154
  getDbHost: async (): Promise<string> => {
155
155
  // Read "mySection" key from rootPath/.config.json or clientPath/.config.json
156
156
  const config = await ctx.getConfig<{ host: string }>("mySection");
@@ -221,7 +221,7 @@ import { createServiceServer, defineService, auth, OrmService, CryptoService } f
221
221
  import { defineEvent } from "@simplysm/service-common";
222
222
 
223
223
  // Define a custom service with auth
224
- export const UserService = defineService("UserService", auth((ctx) => ({
224
+ export const UserService = defineService("User", auth((ctx) => ({
225
225
  getProfile: async (): Promise<{ name: string }> => {
226
226
  const userId = (ctx.authInfo as { userId: number; role: string })?.userId;
227
227
  // Use ctx.getConfig(), ctx.socket, ctx.server, etc.
@@ -233,7 +233,7 @@ export const UserService = defineService("UserService", auth((ctx) => ({
233
233
  }),
234
234
  })));
235
235
 
236
- export const PublicService = defineService("PublicService", (ctx) => ({
236
+ export const PublicService = defineService("Public", (ctx) => ({
237
237
  healthCheck: async (): Promise<string> => {
238
238
  return "OK";
239
239
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplysm/service-server",
3
- "version": "13.0.24",
3
+ "version": "13.0.26",
4
4
  "description": "심플리즘 패키지 - 서비스 모듈 (server)",
5
5
  "author": "김석래",
6
6
  "license": "Apache-2.0",
@@ -34,11 +34,11 @@
34
34
  "semver": "^7.7.4",
35
35
  "utf-8-validate": "^6.0.6",
36
36
  "ws": "^8.19.0",
37
- "@simplysm/core-common": "13.0.24",
38
- "@simplysm/core-node": "13.0.24",
39
- "@simplysm/orm-node": "13.0.24",
40
- "@simplysm/orm-common": "13.0.24",
41
- "@simplysm/service-common": "13.0.24"
37
+ "@simplysm/core-common": "13.0.26",
38
+ "@simplysm/core-node": "13.0.26",
39
+ "@simplysm/orm-common": "13.0.26",
40
+ "@simplysm/orm-node": "13.0.26",
41
+ "@simplysm/service-common": "13.0.26"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/semver": "^7.7.1",