@simplysm/sd-cli 13.0.72 → 13.0.74

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.
@@ -1,86 +1,86 @@
1
- import ts from "typescript";
2
- import { fsExistsSync, fsReadSync } from "@simplysm/core-node";
3
-
4
- /**
5
- * Serialized Diagnostic that can be passed to Worker
6
- */
7
- export interface SerializedDiagnostic {
8
- category: number;
9
- code: number;
10
- messageText: string;
11
- file?: {
12
- fileName: string;
13
- };
14
- start?: number;
15
- length?: number;
16
- }
17
-
18
- /**
19
- * Convert Diagnostic to serializable form
20
- * (remove circular references/functions for structured clone communication between Worker threads)
21
- */
22
- export function serializeDiagnostic(diagnostic: ts.Diagnostic): SerializedDiagnostic {
23
- // If DiagnosticMessageChain, flatten entire chain to preserve all context info
24
- const messageText = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
25
-
26
- return {
27
- category: diagnostic.category,
28
- code: diagnostic.code,
29
- messageText,
30
- file: diagnostic.file
31
- ? {
32
- fileName: diagnostic.file.fileName,
33
- }
34
- : undefined,
35
- start: diagnostic.start,
36
- length: diagnostic.length,
37
- };
38
- }
39
-
40
- /**
41
- * Determine TypeScript ScriptKind from filename
42
- */
43
- function getScriptKind(fileName: string): ts.ScriptKind {
44
- if (fileName.endsWith(".tsx")) return ts.ScriptKind.TSX;
45
- if (fileName.endsWith(".jsx")) return ts.ScriptKind.JSX;
46
- if (fileName.endsWith(".js") || fileName.endsWith(".mjs") || fileName.endsWith(".cjs"))
47
- return ts.ScriptKind.JS;
48
- return ts.ScriptKind.TS;
49
- }
50
-
51
- /**
52
- * Restore SerializedDiagnostic to ts.Diagnostic
53
- * Reads actual file contents so source code context is displayed in formatDiagnosticsWithColorAndContext
54
- * @param serialized - Serialized diagnostic information
55
- * @param fileCache - File content cache (prevent duplicate reads of same file)
56
- * @returns Restored ts.Diagnostic object
57
- */
58
- export function deserializeDiagnostic(
59
- serialized: SerializedDiagnostic,
60
- fileCache: Map<string, string>,
61
- ): ts.Diagnostic {
62
- let file: ts.SourceFile | undefined;
63
- if (serialized.file != null) {
64
- const fileName = serialized.file.fileName;
65
-
66
- // Get cached file content (read and cache if not present)
67
- // If file was deleted or inaccessible, treat as empty content
68
- // (source code context won't be displayed but diagnostic message is shown normally)
69
- if (!fileCache.has(fileName)) {
70
- fileCache.set(fileName, fsExistsSync(fileName) ? fsReadSync(fileName) : "");
71
- }
72
- const content = fileCache.get(fileName)!;
73
-
74
- const scriptKind = getScriptKind(fileName);
75
- file = ts.createSourceFile(fileName, content, ts.ScriptTarget.Latest, false, scriptKind);
76
- }
77
-
78
- return {
79
- category: serialized.category,
80
- code: serialized.code,
81
- messageText: serialized.messageText,
82
- file,
83
- start: serialized.start,
84
- length: serialized.length,
85
- };
86
- }
1
+ import ts from "typescript";
2
+ import { fsExistsSync, fsReadSync } from "@simplysm/core-node";
3
+
4
+ /**
5
+ * Serialized Diagnostic that can be passed to Worker
6
+ */
7
+ export interface SerializedDiagnostic {
8
+ category: number;
9
+ code: number;
10
+ messageText: string;
11
+ file?: {
12
+ fileName: string;
13
+ };
14
+ start?: number;
15
+ length?: number;
16
+ }
17
+
18
+ /**
19
+ * Convert Diagnostic to serializable form
20
+ * (remove circular references/functions for structured clone communication between Worker threads)
21
+ */
22
+ export function serializeDiagnostic(diagnostic: ts.Diagnostic): SerializedDiagnostic {
23
+ // If DiagnosticMessageChain, flatten entire chain to preserve all context info
24
+ const messageText = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
25
+
26
+ return {
27
+ category: diagnostic.category,
28
+ code: diagnostic.code,
29
+ messageText,
30
+ file: diagnostic.file
31
+ ? {
32
+ fileName: diagnostic.file.fileName,
33
+ }
34
+ : undefined,
35
+ start: diagnostic.start,
36
+ length: diagnostic.length,
37
+ };
38
+ }
39
+
40
+ /**
41
+ * Determine TypeScript ScriptKind from filename
42
+ */
43
+ function getScriptKind(fileName: string): ts.ScriptKind {
44
+ if (fileName.endsWith(".tsx")) return ts.ScriptKind.TSX;
45
+ if (fileName.endsWith(".jsx")) return ts.ScriptKind.JSX;
46
+ if (fileName.endsWith(".js") || fileName.endsWith(".mjs") || fileName.endsWith(".cjs"))
47
+ return ts.ScriptKind.JS;
48
+ return ts.ScriptKind.TS;
49
+ }
50
+
51
+ /**
52
+ * Restore SerializedDiagnostic to ts.Diagnostic
53
+ * Reads actual file contents so source code context is displayed in formatDiagnosticsWithColorAndContext
54
+ * @param serialized - Serialized diagnostic information
55
+ * @param fileCache - File content cache (prevent duplicate reads of same file)
56
+ * @returns Restored ts.Diagnostic object
57
+ */
58
+ export function deserializeDiagnostic(
59
+ serialized: SerializedDiagnostic,
60
+ fileCache: Map<string, string>,
61
+ ): ts.Diagnostic {
62
+ let file: ts.SourceFile | undefined;
63
+ if (serialized.file != null) {
64
+ const fileName = serialized.file.fileName;
65
+
66
+ // Get cached file content (read and cache if not present)
67
+ // If file was deleted or inaccessible, treat as empty content
68
+ // (source code context won't be displayed but diagnostic message is shown normally)
69
+ if (!fileCache.has(fileName)) {
70
+ fileCache.set(fileName, fsExistsSync(fileName) ? fsReadSync(fileName) : "");
71
+ }
72
+ const content = fileCache.get(fileName)!;
73
+
74
+ const scriptKind = getScriptKind(fileName);
75
+ file = ts.createSourceFile(fileName, content, ts.ScriptTarget.Latest, false, scriptKind);
76
+ }
77
+
78
+ return {
79
+ category: serialized.category,
80
+ code: serialized.code,
81
+ messageText: serialized.messageText,
82
+ file,
83
+ start: serialized.start,
84
+ length: serialized.length,
85
+ };
86
+ }
@@ -17,8 +17,8 @@
17
17
  "vitest": "vitest"
18
18
  },
19
19
  "devDependencies": {
20
- "@simplysm/lint": "~13.0.72",
21
- "@simplysm/sd-cli": "~13.0.72",
20
+ "@simplysm/lint": "~13.0.74",
21
+ "@simplysm/sd-cli": "~13.0.74",
22
22
  "@types/node": "^20.19.35",
23
23
  "eslint": "^9.39.3",
24
24
  "prettier": "^3.8.1",
@@ -6,12 +6,12 @@
6
6
  "private": true,
7
7
  "dependencies": {
8
8
  "@{{projectName}}/db-main": "workspace:*",
9
- "@simplysm/core-browser": "~13.0.72",
10
- "@simplysm/core-common": "~13.0.72",
9
+ "@simplysm/core-browser": "~13.0.74",
10
+ "@simplysm/core-common": "~13.0.74",
11
11
  "@simplysm/excel": "^13.0.71",
12
- "@simplysm/orm-common": "~13.0.72",
13
- "@simplysm/service-client": "~13.0.72",
14
- "@simplysm/solid": "~13.0.72",
12
+ "@simplysm/orm-common": "~13.0.74",
13
+ "@simplysm/service-client": "~13.0.74",
14
+ "@simplysm/solid": "~13.0.74",
15
15
  "@solid-primitives/event-listener": "^2.4.5",
16
16
  "@solidjs/router": "^0.15.4",
17
17
  "@tabler/icons-solidjs": "^3.37.1",
@@ -4,7 +4,7 @@ import {
4
4
  CrudSheet,
5
5
  type ExcelConfig,
6
6
  FormGroup,
7
- type ModalEditConfig,
7
+ type DialogEditConfig,
8
8
  type SortingDef,
9
9
  TextInput,
10
10
  useDialog,
@@ -73,7 +73,7 @@ export function EmployeeSheet() {
73
73
  const { perms } = useAppStructure();
74
74
  const employeePerms = perms.home.base.employee;
75
75
 
76
- const modalEdit: ModalEditConfig<SheetItem> = {
76
+ const dialogEdit: DialogEditConfig<SheetItem> = {
77
77
  editItem: (item) =>
78
78
  dialog.show(() => <EmployeeDetail itemId={item?.id} />, {
79
79
  header: item ? "직원 수정" : "직원 등록",
@@ -169,7 +169,7 @@ export function EmployeeSheet() {
169
169
  persistKey="employee-page"
170
170
  editable={employeePerms.edit}
171
171
  filterInitial=\{{ isIncludeLeft: false, isIncludeDeleted: false } as Filter}
172
- modalEdit={modalEdit}
172
+ dialogEdit={dialogEdit}
173
173
  excel={excel}
174
174
  lastModifiedAtProp="lastDataLog.dateTime"
175
175
  lastModifiedByProp="lastDataLog.employeeName"
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Checkbox,
3
3
  CrudSheet,
4
- type ModalEditConfig,
4
+ type DialogEditConfig,
5
5
  type SortingDef,
6
6
  TextInput,
7
7
  useDialog,
@@ -34,7 +34,7 @@ export function RoleSheet() {
34
34
 
35
35
  const rolePerms = appStructure.perms.home.base["role-permission"];
36
36
 
37
- const modalEdit: ModalEditConfig<SheetItem> = {
37
+ const dialogEdit: DialogEditConfig<SheetItem> = {
38
38
  editItem: (item) =>
39
39
  dialog.show(() => <RoleDetail itemId={item?.id} />, {
40
40
  header: item ? "권한그룹 수정" : "권한그룹 등록",
@@ -90,7 +90,7 @@ export function RoleSheet() {
90
90
  persistKey="role-sheet-page"
91
91
  editable={rolePerms.edit}
92
92
  filterInitial=\{{ isIncludeDeleted: false } as Filter}
93
- modalEdit={modalEdit}
93
+ dialogEdit={dialogEdit}
94
94
  >
95
95
  <CrudSheet.Filter<Filter>>
96
96
  {(filter, setFilter) => (
@@ -7,7 +7,7 @@
7
7
  ".": "./src/index.ts"
8
8
  },
9
9
  "dependencies": {
10
- "@simplysm/core-common": "~13.0.72",
11
- "@simplysm/orm-common": "~13.0.72"
10
+ "@simplysm/core-common": "~13.0.74",
11
+ "@simplysm/orm-common": "~13.0.74"
12
12
  }
13
13
  }
@@ -5,11 +5,11 @@
5
5
  "private": true,
6
6
  "dependencies": {
7
7
  "@{{projectName}}/db-main": "workspace:*",
8
- "@simplysm/core-common": "~13.0.72",
8
+ "@simplysm/core-common": "~13.0.74",
9
9
  "@simplysm/excel": "^13.0.71",
10
- "@simplysm/orm-common": "~13.0.72",
11
- "@simplysm/orm-node": "~13.0.72",
12
- "@simplysm/service-server": "~13.0.72",
10
+ "@simplysm/orm-common": "~13.0.74",
11
+ "@simplysm/orm-node": "~13.0.74",
12
+ "@simplysm/service-server": "~13.0.74",
13
13
  "bcrypt": "^6.0.0",
14
14
  "pg": "^8.19.0",
15
15
  "pg-copy-streams": "^7.0.0"
@@ -6,7 +6,7 @@
6
6
  "private": true,
7
7
  "dependencies": {
8
8
  "@{{projectName}}/db-main": "workspace:*",
9
- "@simplysm/orm-node": "~13.0.72",
9
+ "@simplysm/orm-node": "~13.0.74",
10
10
  "bcrypt": "^6.0.0",
11
11
  "playwright": "^1.58.2"
12
12
  },
@@ -10,7 +10,7 @@ export function employeeCrudTests(ctx: { page: Page; baseUrl: string }) {
10
10
  }
11
11
 
12
12
  function dialogLocator() {
13
- return ctx.page.locator("[data-modal-dialog]").last();
13
+ return ctx.page.locator("[data-dialog-panel]").last();
14
14
  }
15
15
 
16
16
  async function waitForSheetLoaded() {
@@ -25,8 +25,8 @@ export function employeeCrudTests(ctx: { page: Page; baseUrl: string }) {
25
25
  async function waitForDialogClosed() {
26
26
  await ctx.page.waitForFunction(
27
27
  () =>
28
- document.querySelectorAll("[data-modal-dialog]").length === 0 &&
29
- document.querySelectorAll("[data-modal-backdrop]").length === 0,
28
+ document.querySelectorAll("[data-dialog-panel]").length === 0 &&
29
+ document.querySelectorAll("[data-dialog-backdrop]").length === 0,
30
30
  );
31
31
  }
32
32