@simplysm/sd-cli 7.0.224 → 7.0.231

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/src/commons.ts CHANGED
@@ -1,135 +1,138 @@
1
- export interface INpmConfig {
2
- name: string;
3
- version: string;
4
- description?: string;
5
- author?: string;
6
- license?: string;
7
- repository: string | {
8
- type: string;
9
- url: string;
10
- directory?: string;
11
- };
12
- type?: "module";
13
- workspaces?: string[];
14
- main?: string;
15
- types?: string;
16
- exports?: Record<string, {
17
- types?: string;
18
- }>;
19
- scripts?: Record<string, string>;
20
-
21
- dependencies?: Record<string, string>;
22
- optionalDependencies?: Record<string, string>;
23
- devDependencies?: Record<string, string>;
24
- peerDependencies?: Record<string, string>;
25
- peerDependenciesMeta?: Record<string, { optional?: boolean }>;
26
- }
27
-
28
- export interface ITsconfig {
29
- compilerOptions?: {
30
- outDir?: string;
31
- baseUrl?: string;
32
- paths?: Record<string, string[]>;
33
- declaration?: boolean;
34
- };
35
- files?: string[];
36
- angularCompilerOptions?: Record<string, any>;
37
- }
38
-
39
- export interface ISdCliPackageBuildResult {
40
- filePath: string | undefined;
41
- line: number | undefined;
42
- char: number | undefined;
43
- code: string | undefined;
44
- severity: "error" | "warning";
45
- message: string;
46
- }
47
-
48
- export interface ISdCliConfig {
49
- packages: Record<string, TSdCliPackageConfig | undefined>;
50
- localUpdates?: Record<string, string>;
51
- }
52
-
53
- export type TSdCliPackageConfig = ISdCliLibPackageConfig | ISdCliServerPackageConfig | ISdCliClientPackageConfig;
54
-
55
- export interface ISdCliLibPackageConfig {
56
- type: "library";
57
- autoIndex?: {
58
- polyfills?: string[];
59
- };
60
- publish?: "npm";
61
- }
62
-
63
- export interface ISdCliServerPackageConfig {
64
- type: "server";
65
- env?: Record<string, string>;
66
- configs?: Record<string, any>;
67
- pm2?: Record<string, any> | boolean;
68
- externalNodeModules?: string[];
69
- publish?: TSdCliPublishConfig;
70
- }
71
-
72
- export interface ISdCliClientPackageConfig {
73
- type: "client";
74
- builder?: {
75
- web?: ISdCliClientBuilderWebConfig;
76
- cordova?: ISdCliClientBuilderCordovaConfig;
77
- electron?: ISdCliClientBuilderElectronConfig;
78
- };
79
- server: string | { port: number };
80
- env?: Record<string, string>;
81
- configs?: Record<string, any>;
82
- publish?: TSdCliPublishConfig;
83
- }
84
-
85
- export type TSdCliPublishConfig = ISdCliFtpPublishConfig | ISdCliLocalDirectoryPublishConfig | ISdCliGithubPublishConfig;
86
-
87
- export interface ISdCliFtpPublishConfig {
88
- type: "ftp" | "ftps" | "sftp";
89
- host: string;
90
- port?: number;
91
- path: string;
92
- user: string;
93
- pass: string;
94
- }
95
-
96
- export interface ISdCliLocalDirectoryPublishConfig {
97
- type: "local-directory";
98
- path: string;
99
- }
100
-
101
- export interface ISdCliGithubPublishConfig {
102
- type: "github";
103
- apiKey: string;
104
- files: { from: string; to: string }[];
105
- }
106
-
107
- export interface ISdCliClientBuilderWebConfig {
108
- }
109
-
110
- export interface ISdCliClientBuilderCordovaConfig {
111
- appId: string;
112
- appName: string;
113
- plugins?: string[];
114
- icon?: string;
115
- debug?: boolean;
116
- target?: {
117
- browser?: {};
118
- android?: {
119
- bundle?: boolean;
120
- sign?: {
121
- keystore: string;
122
- storePassword: string;
123
- alias: string;
124
- password: string;
125
- keystoreType: string;
126
- };
127
- };
128
- };
129
- }
130
-
131
- export interface ISdCliClientBuilderElectronConfig {
132
- appId: string;
133
- icon?: string;
134
- installerIcon?: string;
135
- }
1
+ export interface INpmConfig {
2
+ name: string;
3
+ version: string;
4
+ description?: string;
5
+ author?: string;
6
+ license?: string;
7
+ repository: string | {
8
+ type: string;
9
+ url: string;
10
+ directory?: string;
11
+ };
12
+ type?: "module";
13
+ workspaces?: string[];
14
+ main?: string;
15
+ types?: string;
16
+ exports?: Record<string, {
17
+ types?: string;
18
+ }>;
19
+ scripts?: Record<string, string>;
20
+
21
+ dependencies?: Record<string, string>;
22
+ optionalDependencies?: Record<string, string>;
23
+ devDependencies?: Record<string, string>;
24
+ peerDependencies?: Record<string, string>;
25
+ peerDependenciesMeta?: Record<string, { optional?: boolean }>;
26
+ }
27
+
28
+ export interface ITsconfig {
29
+ compilerOptions?: {
30
+ outDir?: string;
31
+ baseUrl?: string;
32
+ paths?: Record<string, string[]>;
33
+ declaration?: boolean;
34
+ };
35
+ files?: string[];
36
+ angularCompilerOptions?: Record<string, any>;
37
+ }
38
+
39
+ export interface ISdCliPackageBuildResult {
40
+ filePath: string | undefined;
41
+ line: number | undefined;
42
+ char: number | undefined;
43
+ code: string | undefined;
44
+ severity: "error" | "warning";
45
+ message: string;
46
+ }
47
+
48
+ export interface ISdCliConfig {
49
+ packages: Record<string, TSdCliPackageConfig | undefined>;
50
+ localUpdates?: Record<string, string>;
51
+ }
52
+
53
+ export type TSdCliPackageConfig = ISdCliLibPackageConfig | ISdCliServerPackageConfig | ISdCliClientPackageConfig;
54
+
55
+ export interface ISdCliLibPackageConfig {
56
+ type: "library";
57
+ autoIndex?: {
58
+ polyfills?: string[];
59
+ };
60
+ publish?: "npm";
61
+ }
62
+
63
+ export interface ISdCliServerPackageConfig {
64
+ type: "server";
65
+ env?: Record<string, string>;
66
+ configs?: Record<string, any>;
67
+ pm2?: Record<string, any> | boolean;
68
+ externalNodeModules?: string[];
69
+ publish?: TSdCliPublishConfig;
70
+ }
71
+
72
+ export interface ISdCliClientPackageConfig {
73
+ type: "client";
74
+ builder?: {
75
+ web?: ISdCliClientBuilderWebConfig;
76
+ cordova?: ISdCliClientBuilderCordovaConfig;
77
+ electron?: ISdCliClientBuilderElectronConfig;
78
+ };
79
+ server: string | { port: number };
80
+ env?: Record<string, string>;
81
+ configs?: Record<string, any>;
82
+ publish?: TSdCliPublishConfig;
83
+ }
84
+
85
+ export type TSdCliPublishConfig =
86
+ ISdCliFtpPublishConfig
87
+ | ISdCliLocalDirectoryPublishConfig
88
+ | ISdCliGithubPublishConfig;
89
+
90
+ export interface ISdCliFtpPublishConfig {
91
+ type: "ftp" | "ftps" | "sftp";
92
+ host: string;
93
+ port?: number;
94
+ path: string;
95
+ user: string;
96
+ pass: string;
97
+ }
98
+
99
+ export interface ISdCliLocalDirectoryPublishConfig {
100
+ type: "local-directory";
101
+ path: string;
102
+ }
103
+
104
+ export interface ISdCliGithubPublishConfig {
105
+ type: "github";
106
+ apiKey: string;
107
+ files: { from: string; to: string }[];
108
+ }
109
+
110
+ export interface ISdCliClientBuilderWebConfig {
111
+ }
112
+
113
+ export interface ISdCliClientBuilderCordovaConfig {
114
+ appId: string;
115
+ appName: string;
116
+ plugins?: string[];
117
+ icon?: string;
118
+ debug?: boolean;
119
+ target?: {
120
+ browser?: {};
121
+ android?: {
122
+ bundle?: boolean;
123
+ sign?: {
124
+ keystore: string;
125
+ storePassword: string;
126
+ alias: string;
127
+ password: string;
128
+ keystoreType: string;
129
+ };
130
+ };
131
+ };
132
+ }
133
+
134
+ export interface ISdCliClientBuilderElectronConfig {
135
+ appId: string;
136
+ icon?: string;
137
+ installerIcon?: string;
138
+ }
@@ -1,26 +1,19 @@
1
- import { Logger, SdProcess } from "@simplysm/sd-core-node";
2
- import { SdCliPrepare } from "./SdCliPrepare";
3
-
4
- export class SdCliNpm {
5
- private readonly _logger = Logger.get(["simplysm", "sd-cli", this.constructor.name]);
6
-
7
- public constructor(private readonly _rootPath: string) {
8
- }
9
-
10
- public async updateAsync(): Promise<void> {
11
- try {
12
- this._logger.debug("업데이트할 패키지 확인...");
13
- await SdProcess.spawnAsync("npm outdated", { cwd: this._rootPath });
14
- }
15
- catch (err) {
16
- }
17
-
18
- this._logger.debug("업데이트 시작...");
19
- await SdProcess.spawnAsync("npm update", { cwd: this._rootPath });
20
-
21
- this._logger.debug("sd-cli 준비...");
22
- await new SdCliPrepare().prepareAsync();
23
-
24
- this._logger.info("노드 패키지 업데이트 완료");
25
- }
26
- }
1
+ import { Logger, SdProcess } from "@simplysm/sd-core-node";
2
+ import { SdCliPrepare } from "./SdCliPrepare";
3
+
4
+ export class SdCliNpm {
5
+ private readonly _logger = Logger.get(["simplysm", "sd-cli", this.constructor.name]);
6
+
7
+ public constructor(private readonly _rootPath: string) {
8
+ }
9
+
10
+ public async updateAsync(): Promise<void> {
11
+ this._logger.debug("업데이트 시작...");
12
+ await SdProcess.spawnAsync("yarn up", { cwd: this._rootPath });
13
+
14
+ this._logger.debug("sd-cli 준비...");
15
+ await new SdCliPrepare().prepareAsync();
16
+
17
+ this._logger.info("노드 패키지 업데이트 완료");
18
+ }
19
+ }