@simplysm/sd-cli 7.3.1 → 10.0.4
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/.eslintrc.cjs +18 -0
- package/dist/build-cluster.js +75 -0
- package/dist/build-cluster.js.map +1 -0
- package/dist/builders/SdCliJsLibLinter.d.ts +18 -0
- package/dist/builders/SdCliJsLibLinter.js +69 -0
- package/dist/builders/SdCliJsLibLinter.js.map +1 -0
- package/dist/builders/SdCliTsLibBuilder.d.ts +20 -0
- package/dist/builders/SdCliTsLibBuilder.js +205 -0
- package/dist/builders/SdCliTsLibBuilder.js.map +1 -0
- package/dist/commons.d.ts +3 -117
- package/dist/commons.js +2 -0
- package/dist/commons.js.map +1 -0
- package/dist/entry/SdCliProject.d.ts +28 -0
- package/dist/entry/SdCliProject.js +269 -0
- package/dist/entry/SdCliProject.js.map +1 -0
- package/dist/sd-cli.js +118 -0
- package/dist/sd-cli.js.map +1 -0
- package/dist/utils/SdCliBuildResultUtil.d.ts +1 -4
- package/dist/utils/SdCliBuildResultUtil.js +37 -0
- package/dist/utils/SdCliBuildResultUtil.js.map +1 -0
- package/dist/utils/SdCliConfigUtil.js +69 -0
- package/dist/utils/SdCliConfigUtil.js.map +1 -0
- package/package.json +10 -59
- package/src/build-cluster.ts +82 -0
- package/src/builders/SdCliJsLibLinter.ts +84 -0
- package/src/builders/SdCliTsLibBuilder.ts +265 -0
- package/src/commons.ts +3 -123
- package/src/entry/SdCliProject.ts +351 -0
- package/src/sd-cli.ts +135 -0
- package/src/utils/SdCliBuildResultUtil.ts +5 -38
- package/tsconfig.json +18 -0
- package/README.md +0 -105
- package/assets/client-files/assets/icons/icon-128x128.png +0 -0
- package/assets/client-files/assets/icons/icon-144x144.png +0 -0
- package/assets/client-files/assets/icons/icon-152x152.png +0 -0
- package/assets/client-files/assets/icons/icon-192x192.png +0 -0
- package/assets/client-files/assets/icons/icon-384x384.png +0 -0
- package/assets/client-files/assets/icons/icon-512x512.png +0 -0
- package/assets/client-files/assets/icons/icon-72x72.png +0 -0
- package/assets/client-files/assets/icons/icon-96x96.png +0 -0
- package/assets/client-files/favicon.ico +0 -0
- package/dist/SdCliBuildResultError.d.ts +0 -5
- package/dist/SdCliBuildResultError.mjs +0 -8
- package/dist/bin/sd-cli.d.ts +0 -2
- package/dist/bin/sd-cli.mjs +0 -410
- package/dist/build-tool/SdCliCacheCompilerHost.d.ts +0 -10
- package/dist/build-tool/SdCliCacheCompilerHost.mjs +0 -51
- package/dist/build-tool/SdCliCordova.d.ts +0 -16
- package/dist/build-tool/SdCliCordova.mjs +0 -212
- package/dist/build-tool/SdCliElectron.d.ts +0 -9
- package/dist/build-tool/SdCliElectron.mjs +0 -71
- package/dist/build-tool/SdCliGithubApi.d.ts +0 -13
- package/dist/build-tool/SdCliGithubApi.mjs +0 -92
- package/dist/build-tool/SdCliIndexFileGenerator.d.ts +0 -13
- package/dist/build-tool/SdCliIndexFileGenerator.mjs +0 -62
- package/dist/build-tool/SdCliNgCacheCompilerHost.d.ts +0 -12
- package/dist/build-tool/SdCliNgCacheCompilerHost.mjs +0 -43
- package/dist/build-tool/SdCliPackageLinter.d.ts +0 -8
- package/dist/build-tool/SdCliPackageLinter.mjs +0 -62
- package/dist/builder/SdCliClientBuilder.d.ts +0 -26
- package/dist/builder/SdCliClientBuilder.mjs +0 -761
- package/dist/builder/SdCliJsLibBuilder.d.ts +0 -14
- package/dist/builder/SdCliJsLibBuilder.mjs +0 -54
- package/dist/builder/SdCliServerBuilder.d.ts +0 -28
- package/dist/builder/SdCliServerBuilder.mjs +0 -482
- package/dist/builder/SdCliTsLibBuilder.d.ts +0 -35
- package/dist/builder/SdCliTsLibBuilder.mjs +0 -317
- package/dist/commons.mjs +0 -2
- package/dist/entry-points/SdCliFileCrypto.d.ts +0 -7
- package/dist/entry-points/SdCliFileCrypto.mjs +0 -72
- package/dist/entry-points/SdCliLocalUpdate.d.ts +0 -13
- package/dist/entry-points/SdCliLocalUpdate.mjs +0 -100
- package/dist/entry-points/SdCliPrepare.d.ts +0 -5
- package/dist/entry-points/SdCliPrepare.mjs +0 -86
- package/dist/entry-points/SdCliProject.d.ts +0 -34
- package/dist/entry-points/SdCliProject.mjs +0 -416
- package/dist/entry-points/SdCliProjectGenerator.d.ts +0 -44
- package/dist/entry-points/SdCliProjectGenerator.mjs +0 -326
- package/dist/entry-points/file/base/fc_package_eslintrc.d.ts +0 -3
- package/dist/entry-points/file/base/fc_package_eslintrc.mjs +0 -31
- package/dist/entry-points/file/base/fc_package_npmconfig.d.ts +0 -9
- package/dist/entry-points/file/base/fc_package_npmconfig.mjs +0 -32
- package/dist/entry-points/file/base/fc_package_tsconfig.d.ts +0 -5
- package/dist/entry-points/file/base/fc_package_tsconfig.mjs +0 -13
- package/dist/entry-points/file/client/fc_package_AppModule.d.ts +0 -1
- package/dist/entry-points/file/client/fc_package_AppModule.mjs +0 -37
- package/dist/entry-points/file/client/fc_package_AppPage.d.ts +0 -1
- package/dist/entry-points/file/client/fc_package_AppPage.mjs +0 -14
- package/dist/entry-points/file/client/fc_package_Page.d.ts +0 -4
- package/dist/entry-points/file/client/fc_package_Page.mjs +0 -19
- package/dist/entry-points/file/client/fc_package_client_main.d.ts +0 -1
- package/dist/entry-points/file/client/fc_package_client_main.mjs +0 -19
- package/dist/entry-points/file/client/fc_package_index.d.ts +0 -3
- package/dist/entry-points/file/client/fc_package_index.mjs +0 -88
- package/dist/entry-points/file/client/fc_package_manifest.d.ts +0 -5
- package/dist/entry-points/file/client/fc_package_manifest.mjs +0 -54
- package/dist/entry-points/file/client/fc_package_polyfills.d.ts +0 -1
- package/dist/entry-points/file/client/fc_package_polyfills.mjs +0 -11
- package/dist/entry-points/file/client/fc_package_styles.d.ts +0 -1
- package/dist/entry-points/file/client/fc_package_styles.mjs +0 -7
- package/dist/entry-points/file/db/fc_package_DbContext.d.ts +0 -3
- package/dist/entry-points/file/db/fc_package_DbContext.mjs +0 -14
- package/dist/entry-points/file/db/fc_package_DbModel.d.ts +0 -4
- package/dist/entry-points/file/db/fc_package_DbModel.mjs +0 -12
- package/dist/entry-points/file/project/fc_project_editor_config.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_editor_config.mjs +0 -22
- package/dist/entry-points/file/project/fc_project_eslintrc.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_eslintrc.mjs +0 -30
- package/dist/entry-points/file/project/fc_project_gitattributes.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_gitattributes.mjs +0 -6
- package/dist/entry-points/file/project/fc_project_gitignore.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_gitignore.mjs +0 -27
- package/dist/entry-points/file/project/fc_project_npmconfig.d.ts +0 -7
- package/dist/entry-points/file/project/fc_project_npmconfig.mjs +0 -37
- package/dist/entry-points/file/project/fc_project_readme.d.ts +0 -3
- package/dist/entry-points/file/project/fc_project_readme.mjs +0 -13
- package/dist/entry-points/file/project/fc_project_simplysm.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_simplysm.mjs +0 -2
- package/dist/entry-points/file/project/fc_project_tsconfig.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_tsconfig.mjs +0 -25
- package/dist/entry-points/file/server/fc_package_server_main.d.ts +0 -5
- package/dist/entry-points/file/server/fc_package_server_main.mjs +0 -60
- package/dist/index.d.ts +0 -54
- package/dist/index.mjs +0 -55
- package/dist/ng-tools/SdCliNgModuleGenerator.d.ts +0 -29
- package/dist/ng-tools/SdCliNgModuleGenerator.mjs +0 -502
- package/dist/ng-tools/babel/SdCliBbFileMetadata.d.ts +0 -25
- package/dist/ng-tools/babel/SdCliBbFileMetadata.mjs +0 -539
- package/dist/ng-tools/babel/SdCliBbRootMetadata.d.ts +0 -23
- package/dist/ng-tools/babel/SdCliBbRootMetadata.mjs +0 -247
- package/dist/ng-tools/babel/SdCliBbUtil.d.ts +0 -5
- package/dist/ng-tools/babel/SdCliBbUtil.mjs +0 -14
- package/dist/ng-tools/babel/TSdCliBbNgMetadata.d.ts +0 -42
- package/dist/ng-tools/babel/TSdCliBbNgMetadata.mjs +0 -216
- package/dist/ng-tools/babel/TSdCliBbTypeMetadata.d.ts +0 -55
- package/dist/ng-tools/babel/TSdCliBbTypeMetadata.mjs +0 -151
- package/dist/ng-tools/commons.d.ts +0 -9
- package/dist/ng-tools/commons.mjs +0 -2
- package/dist/ng-tools/typescript/SdCliTsFileMetadata.d.ts +0 -61
- package/dist/ng-tools/typescript/SdCliTsFileMetadata.mjs +0 -325
- package/dist/ng-tools/typescript/SdCliTsRootMetadata.d.ts +0 -8
- package/dist/ng-tools/typescript/SdCliTsRootMetadata.mjs +0 -28
- package/dist/ng-tools/typescript/SdCliTsUtil.d.ts +0 -5
- package/dist/ng-tools/typescript/SdCliTsUtil.mjs +0 -28
- package/dist/packages/SdCliPackage.d.ts +0 -22
- package/dist/packages/SdCliPackage.mjs +0 -206
- package/dist/utils/SdCliBuildResultUtil.mjs +0 -63
- package/dist/utils/SdCliConfigUtil.mjs +0 -69
- package/dist/utils/SdCliNpmConfigUtil.d.ts +0 -7
- package/dist/utils/SdCliNpmConfigUtil.mjs +0 -15
- package/dist/worker/build-worker.mjs +0 -67
- package/dist/worker/server-worker.mjs +0 -67
- package/docs/client-add-page.md +0 -8
- package/docs/client-router.md +0 -85
- package/docs/client-sw.md +0 -101
- package/docs/conf-orm.md +0 -81
- package/docs/conf-usage.md +0 -5
- package/docs/lib-local-update.md +0 -50
- package/docs/lib-ts-paths.md +0 -25
- package/lib/cordova-entry.js +0 -22
- package/src/SdCliBuildResultError.ts +0 -9
- package/src/bin/sd-cli.ts +0 -493
- package/src/build-tool/SdCliCacheCompilerHost.ts +0 -79
- package/src/build-tool/SdCliCordova.ts +0 -263
- package/src/build-tool/SdCliElectron.ts +0 -84
- package/src/build-tool/SdCliGithubApi.ts +0 -111
- package/src/build-tool/SdCliIndexFileGenerator.ts +0 -79
- package/src/build-tool/SdCliNgCacheCompilerHost.ts +0 -58
- package/src/build-tool/SdCliPackageLinter.ts +0 -74
- package/src/builder/SdCliClientBuilder.ts +0 -871
- package/src/builder/SdCliJsLibBuilder.ts +0 -70
- package/src/builder/SdCliServerBuilder.ts +0 -552
- package/src/builder/SdCliTsLibBuilder.ts +0 -450
- package/src/entry-points/SdCliFileCrypto.ts +0 -87
- package/src/entry-points/SdCliLocalUpdate.ts +0 -121
- package/src/entry-points/SdCliPrepare.ts +0 -86
- package/src/entry-points/SdCliProject.ts +0 -491
- package/src/entry-points/SdCliProjectGenerator.ts +0 -402
- package/src/entry-points/file/base/fc_package_eslintrc.ts +0 -30
- package/src/entry-points/file/base/fc_package_npmconfig.ts +0 -43
- package/src/entry-points/file/base/fc_package_tsconfig.ts +0 -12
- package/src/entry-points/file/client/fc_package_AppModule.ts +0 -36
- package/src/entry-points/file/client/fc_package_AppPage.ts +0 -13
- package/src/entry-points/file/client/fc_package_Page.ts +0 -19
- package/src/entry-points/file/client/fc_package_client_main.ts +0 -18
- package/src/entry-points/file/client/fc_package_index.ts +0 -87
- package/src/entry-points/file/client/fc_package_manifest.ts +0 -53
- package/src/entry-points/file/client/fc_package_polyfills.ts +0 -10
- package/src/entry-points/file/client/fc_package_styles.ts +0 -6
- package/src/entry-points/file/db/fc_package_DbContext.ts +0 -14
- package/src/entry-points/file/db/fc_package_DbModel.ts +0 -11
- package/src/entry-points/file/project/fc_project_editor_config.ts +0 -21
- package/src/entry-points/file/project/fc_project_eslintrc.ts +0 -29
- package/src/entry-points/file/project/fc_project_gitattributes.ts +0 -5
- package/src/entry-points/file/project/fc_project_gitignore.ts +0 -26
- package/src/entry-points/file/project/fc_project_npmconfig.ts +0 -36
- package/src/entry-points/file/project/fc_project_readme.ts +0 -12
- package/src/entry-points/file/project/fc_project_simplysm.ts +0 -1
- package/src/entry-points/file/project/fc_project_tsconfig.ts +0 -24
- package/src/entry-points/file/server/fc_package_server_main.ts +0 -62
- package/src/index.ts +0 -54
- package/src/ng-tools/SdCliNgModuleGenerator.ts +0 -672
- package/src/ng-tools/babel/SdCliBbFileMetadata.ts +0 -629
- package/src/ng-tools/babel/SdCliBbRootMetadata.ts +0 -292
- package/src/ng-tools/babel/SdCliBbUtil.ts +0 -15
- package/src/ng-tools/babel/TSdCliBbNgMetadata.ts +0 -251
- package/src/ng-tools/babel/TSdCliBbTypeMetadata.ts +0 -212
- package/src/ng-tools/commons.ts +0 -3
- package/src/ng-tools/typescript/SdCliTsFileMetadata.ts +0 -384
- package/src/ng-tools/typescript/SdCliTsRootMetadata.ts +0 -32
- package/src/ng-tools/typescript/SdCliTsUtil.ts +0 -29
- package/src/packages/SdCliPackage.ts +0 -259
- package/src/utils/SdCliNpmConfigUtil.ts +0 -16
- package/src/worker/build-worker.ts +0 -73
- package/src/worker/server-worker.ts +0 -72
- /package/dist/{worker/build-worker.d.ts → build-cluster.d.ts} +0 -0
- /package/dist/{worker/server-worker.d.ts → sd-cli.d.ts} +0 -0
package/docs/client-router.md
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# 클라이언트 패키지에 Router 기능 추가
|
|
2
|
-
|
|
3
|
-
## @angular/router 의존성 추가
|
|
4
|
-
|
|
5
|
-
package.json
|
|
6
|
-
|
|
7
|
-
``` json
|
|
8
|
-
{
|
|
9
|
-
...,
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"@angular/router": "^14.1.1",
|
|
12
|
-
...
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## RouterModule import
|
|
18
|
-
|
|
19
|
-
AppModule.ts
|
|
20
|
-
|
|
21
|
-
``` ts
|
|
22
|
-
...
|
|
23
|
-
import { AppPageModule } from "./_modules/AppPageModule";
|
|
24
|
-
import { routes } from "./_routes";
|
|
25
|
-
...
|
|
26
|
-
|
|
27
|
-
@NgModule({
|
|
28
|
-
imports: [
|
|
29
|
-
RouterModule.forRoot([
|
|
30
|
-
// 경로 미지정시, 첫 화면으로 표시될 경로
|
|
31
|
-
{ path: "", redirectTo: "/login", pathMatch: "full" },
|
|
32
|
-
...routes
|
|
33
|
-
], { useHash: true }),
|
|
34
|
-
...
|
|
35
|
-
]
|
|
36
|
-
})
|
|
37
|
-
export class AppModule implements DoBootstrap {
|
|
38
|
-
...
|
|
39
|
-
}
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## ROOT 페이지에 로딩바 추가
|
|
43
|
-
|
|
44
|
-
``` ts
|
|
45
|
-
@Component({
|
|
46
|
-
selector: "app-root",
|
|
47
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
48
|
-
template: `
|
|
49
|
-
<sd-busy-container [busy]="busyCount > 0" noFade type="bar">
|
|
50
|
-
<router-outlet></router-outlet>
|
|
51
|
-
</sd-busy-container>
|
|
52
|
-
`
|
|
53
|
-
})
|
|
54
|
-
export class AppPage implements OnInit {
|
|
55
|
-
public busyCount = 0;
|
|
56
|
-
|
|
57
|
-
public constructor(private readonly _router: Router,
|
|
58
|
-
private readonly _cdr: ChangeDetectorRef) {
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
public ngOnInit(): void {
|
|
62
|
-
// 페이지 이동시 로딩 표시
|
|
63
|
-
this._router.events.subscribe((event) => {
|
|
64
|
-
if (event instanceof NavigationStart) {
|
|
65
|
-
this.busyCount++;
|
|
66
|
-
}
|
|
67
|
-
else if (
|
|
68
|
-
event instanceof NavigationEnd
|
|
69
|
-
|| event instanceof NavigationCancel
|
|
70
|
-
|| event instanceof NavigationError
|
|
71
|
-
) {
|
|
72
|
-
this.busyCount--;
|
|
73
|
-
}
|
|
74
|
-
this._cdr.markForCheck();
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
...
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
## 추가 작업
|
|
84
|
-
|
|
85
|
-
* [클라이언트 패키지에 라우팅 페이지 생성](client-add-page.md)
|
package/docs/client-sw.md
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
# 클라이언트 패키지에 ServiceWorker 기능 추가
|
|
2
|
-
|
|
3
|
-
## @angular/service-worker 의존성 추가
|
|
4
|
-
|
|
5
|
-
package.json
|
|
6
|
-
|
|
7
|
-
``` json
|
|
8
|
-
{
|
|
9
|
-
...,
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"@angular/service-worker": "^14.1.1",
|
|
12
|
-
...
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## 패키지 루트에 ngsw-config.json 파일 추가
|
|
18
|
-
|
|
19
|
-
```json
|
|
20
|
-
{
|
|
21
|
-
"$schema": "../../node_modules/@angular/service-worker/config/schema.json",
|
|
22
|
-
"index": "/index.html",
|
|
23
|
-
"assetGroups": [
|
|
24
|
-
{
|
|
25
|
-
"name": "app",
|
|
26
|
-
"installMode": "prefetch",
|
|
27
|
-
"resources": {
|
|
28
|
-
"files": [
|
|
29
|
-
"/favicon.ico",
|
|
30
|
-
"/index.html",
|
|
31
|
-
"/manifest.json",
|
|
32
|
-
"/*.css",
|
|
33
|
-
"/*.js"
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"name": "assets",
|
|
39
|
-
"installMode": "lazy",
|
|
40
|
-
"updateMode": "prefetch",
|
|
41
|
-
"resources": {
|
|
42
|
-
"files": [
|
|
43
|
-
"/assets/**",
|
|
44
|
-
"/*.(eot|svg|cur|jpg|jpeg|png|webp|gif|otf|ttf|woff|woff2|ani|csv|xlsx|pptx|docx|zip|xls|ppt|doc)"
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## ServiceWorkerModule 추가
|
|
54
|
-
|
|
55
|
-
AppModule.ts
|
|
56
|
-
|
|
57
|
-
``` ts
|
|
58
|
-
@NgModule({
|
|
59
|
-
imports: [
|
|
60
|
-
ServiceWorkerModule.register("ngsw-worker.js", {
|
|
61
|
-
enabled: process.env["NODE_ENV"] === "production",
|
|
62
|
-
registrationStrategy: "registerWhenStable:30000"
|
|
63
|
-
}),
|
|
64
|
-
...
|
|
65
|
-
]
|
|
66
|
-
})
|
|
67
|
-
export class AppModule implements DoBootstrap {
|
|
68
|
-
...
|
|
69
|
-
}
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## ServiceWorker 업데이트 체크 로직 추가
|
|
73
|
-
|
|
74
|
-
AppModule.ts
|
|
75
|
-
|
|
76
|
-
``` ts
|
|
77
|
-
@NgModule({
|
|
78
|
-
...
|
|
79
|
-
})
|
|
80
|
-
export class AppModule implements DoBootstrap {
|
|
81
|
-
...
|
|
82
|
-
|
|
83
|
-
public constructor(private readonly _swUpdate: SwUpdate) {
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
public async ngDoBootstrap(appRef: ApplicationRef): Promise<void> {
|
|
87
|
-
...
|
|
88
|
-
appRef.bootstrap(AppPage);
|
|
89
|
-
|
|
90
|
-
// 업데이트 체크 (비동기)
|
|
91
|
-
if (this._swUpdate.isEnabled) {
|
|
92
|
-
if (await this._swUpdate.checkForUpdate()) {
|
|
93
|
-
if (window.confirm("클라이언트가 업데이트되었습니다. 새로고침하시겠습니까?\n\n - 새로고침하지 않으면 몇몇 기능이 정상적으로 동작하지 않을 수 있습니다.")) {
|
|
94
|
-
await this._swUpdate.activateUpdate();
|
|
95
|
-
window.location.reload();
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
```
|
package/docs/conf-orm.md
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
# 각 패키지에 orm 설정
|
|
2
|
-
|
|
3
|
-
orm(DB)를 사용하는 모든 클라이언트 및 서버 패키지에 ORM 설정 추가
|
|
4
|
-
|
|
5
|
-
## simplysm.json 각 패키지 설정
|
|
6
|
-
|
|
7
|
-
아래 설정을 추천 예시 설정입니다.
|
|
8
|
-
|
|
9
|
-
(클라이언트/서버 패키지에만 추가, 라이브러리에는 추가하지 않음)
|
|
10
|
-
|
|
11
|
-
``` json
|
|
12
|
-
{
|
|
13
|
-
"packages": {
|
|
14
|
-
"client": {
|
|
15
|
-
...,
|
|
16
|
-
"configs": {
|
|
17
|
-
"orm": {
|
|
18
|
-
"MAIN": {
|
|
19
|
-
"dialect": "mysql",
|
|
20
|
-
"host": "localhost",
|
|
21
|
-
"port": 3306,
|
|
22
|
-
"username": "username",
|
|
23
|
-
"password": "password",
|
|
24
|
-
"defaultIsolationLevel": "READ_UNCOMMITTED"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
...
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
* [simplysm.json 사용법](conf-usage.md)
|
|
34
|
-
|
|
35
|
-
위의 옵션은, 심플리즘 라이브러리를 통해 "MAIN"이라는 이름으로 접속시, 하위 접속정보에 해당하는 DB로 접속하는 옵션입니다.
|
|
36
|
-
|
|
37
|
-
옵션값 각각의 의미는 다음과 같습니다.
|
|
38
|
-
|
|
39
|
-
* **dialect**: *[필수]* DB 컨테이너 구분 (mysql, mssql, mssql-azure, sqlite), 각각에 맞는 패키지가 서버에 설치되어 있어야 합니다. (sd-orm-node-mssql...)
|
|
40
|
-
* **host**: *[필수]* 접속 HOST (or IP)
|
|
41
|
-
* **port**: *[옵션]* 접속 PORT번호 (기본값: mssql=3306, mssql=1433, mssql-azure=1433)
|
|
42
|
-
* **username**: *[필수]* 인증 아이디
|
|
43
|
-
* **password**: *[필수]* 인증 비밀번호
|
|
44
|
-
* **defaultIsolationLevel**: *[옵션]* ISOLATION LEVEL, DIALECT에 따라 입력가능 정보가 다릅니다.
|
|
45
|
-
* MSSQL: REPEATABLE_READ, READ_COMMITTED(*기본값*), READ_UNCOMMITTED, SERIALIZABLE, SNAPSHOT
|
|
46
|
-
* MYSQL: REPEATABLE_READ(*기본값*), READ_COMMITTED, READ_UNCOMMITTED, SERIALIZABLE
|
|
47
|
-
* 자세한 사항은 각 Dialect 공식문서를 참고하세요.
|
|
48
|
-
|
|
49
|
-
## ORM 사용 패키지의 package.json 의존성 추가
|
|
50
|
-
|
|
51
|
-
ORM 라이브러리 의존성 추가
|
|
52
|
-
|
|
53
|
-
``` json
|
|
54
|
-
{
|
|
55
|
-
...,
|
|
56
|
-
"dependencies": {
|
|
57
|
-
...,
|
|
58
|
-
"@simplysm/sd-orm-common": "~7.1.0"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
DB 라이브러리 의존성 추가 예제
|
|
64
|
-
|
|
65
|
-
``` json
|
|
66
|
-
{
|
|
67
|
-
...,
|
|
68
|
-
"dependencies": {
|
|
69
|
-
...,
|
|
70
|
-
"@simplysm-ts/db-main": "1.0.0"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
위 의존성은 아래 상황을 가정하여 입력된 예제입니다.
|
|
76
|
-
* 프로젝트명: simplysm-ts
|
|
77
|
-
* DB패키지명: main
|
|
78
|
-
* 프로젝트버전: 1.0.0
|
|
79
|
-
|
|
80
|
-
DB 라이브러리 의존성을 추가했다면, 해당 라이브러리를 tsconfig.json에도 경로를 추가해야함
|
|
81
|
-
* [내부 라이브러리에 대한 tsconfig.json에 경로 추가](lib-ts-paths.md)
|
package/docs/conf-usage.md
DELETED
package/docs/lib-local-update.md
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# 라이브러리 패키지 로컬업데이트 설정
|
|
2
|
-
|
|
3
|
-
라이브러리를 로컬 디렉토리에 있는 라이브러리 소스에서 자동으로 업데이트 합니다.
|
|
4
|
-
|
|
5
|
-
## 사용법
|
|
6
|
-
|
|
7
|
-
프로젝트 디렉토리의 simplysm.json 에 다음 옵션을 추가합니다.
|
|
8
|
-
|
|
9
|
-
``` json
|
|
10
|
-
{
|
|
11
|
-
"packages": {
|
|
12
|
-
...
|
|
13
|
-
},
|
|
14
|
-
...,
|
|
15
|
-
"localUpdates": {
|
|
16
|
-
"@simplysm/*": "../simplysm/packages/*"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
```
|
|
20
|
-
위 예제는 다음을 의미합니다.
|
|
21
|
-
* scope `simplysm` 안의 모든 패키지를 `../simplysm/packages/*`안의 파일로 모두 전환합니다.
|
|
22
|
-
* 즉 `node_modules/@simplysm` 폴더에 `../simplysm/packages`폴더를 복사하여 덮어씁니다.
|
|
23
|
-
|
|
24
|
-
이제 다음 명령어를 실행하면 위의 동작이 수행됩니다.
|
|
25
|
-
|
|
26
|
-
``` bat
|
|
27
|
-
:: 주의사항: 대상이되는 라이브러리는 반드시 빌드되어 있거나, 변경감지 중이여야 합니다.
|
|
28
|
-
:: sd-cli local-update --help 참고
|
|
29
|
-
npx sd-cli local-update
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
또한, `sd-cli watch` 를 수행할 경우에는, 로컬 라이브러리 파일이 변경되면 자동으로 해당 파일을 다시 덮어씁니다.
|
|
33
|
-
|
|
34
|
-
## (선택) package.json script 수정
|
|
35
|
-
|
|
36
|
-
로컬업데이트 사용시에는, 다음과 같이 스크립트를 수정하여, `sd-cli`가 수행되기 전에 `local-update`를 수행하는 것을 추천합니다.
|
|
37
|
-
|
|
38
|
-
``` json
|
|
39
|
-
{
|
|
40
|
-
...,
|
|
41
|
-
"scripts": {
|
|
42
|
-
"watch": "sd-cli local-update && sd-cli watch",
|
|
43
|
-
"build": "sd-cli local-update && sd-cli build",
|
|
44
|
-
"publish": "sd-cli local-update && sd-cli publish",
|
|
45
|
-
"----- utils": "",
|
|
46
|
-
"postinstall": "npx sd-cli local-update && npx sd-cli prepare"
|
|
47
|
-
},
|
|
48
|
-
...
|
|
49
|
-
}
|
|
50
|
-
```
|
package/docs/lib-ts-paths.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# 내부 라이브러리에 대한 tsconfig.json에 경로 추가
|
|
2
|
-
|
|
3
|
-
내부 라이브러리가 빌드되지 않더라도, IDE 에서 ts 타입을 제대로 체크하도록 tsconfig.json에 baseUrl과 paths를 추가함
|
|
4
|
-
|
|
5
|
-
패키지의 tsconfig.json
|
|
6
|
-
``` json
|
|
7
|
-
{
|
|
8
|
-
...,
|
|
9
|
-
"compilerOptions": {
|
|
10
|
-
...,
|
|
11
|
-
"baseUrl": ".",
|
|
12
|
-
"paths": {
|
|
13
|
-
...,
|
|
14
|
-
"@simplysm-ts/common": [
|
|
15
|
-
"../common/src/index.ts"
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
위 예제은 아래 상황을 가정하여 입력된 예제입니다.
|
|
23
|
-
* 프로젝트명: simplysm-ts
|
|
24
|
-
* 내부 라이브러리 패키지명: common
|
|
25
|
-
* 내부 라이브러리 상대경로: "../common/src/index.ts"
|
package/lib/cordova-entry.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
const script = document.createElement("script");
|
|
4
|
-
script.onload = () => {
|
|
5
|
-
console.log("cordova.js Loaded");
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
if (process.env["NODE_ENV"] === "production") {
|
|
9
|
-
script.src = "cordova.js";
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
if (navigator.userAgent.toLowerCase().indexOf("android") !== -1) {
|
|
13
|
-
script.src = "cordova-android/cordova.js";
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
script.src = "cordova-browser/cordova.js";
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
script.defer = true;
|
|
21
|
-
|
|
22
|
-
document.body.appendChild(script);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SdError } from "@simplysm/sd-core-common";
|
|
2
|
-
import { ISdCliPackageBuildResult } from "./commons";
|
|
3
|
-
import { SdCliBuildResultUtil } from "./utils/SdCliBuildResultUtil";
|
|
4
|
-
|
|
5
|
-
export class SdCliBuildResultError extends SdError {
|
|
6
|
-
public constructor(buildResult: ISdCliPackageBuildResult) {
|
|
7
|
-
super(SdCliBuildResultUtil.getMessage(buildResult));
|
|
8
|
-
}
|
|
9
|
-
}
|