@simplysm/sd-cli 7.0.222 → 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/.eslintrc.cjs +21 -21
- package/dist/bin/sd-cli.mjs +2 -2
- package/dist/builder/SdCliClientBuilder.mjs +4 -3
- package/dist/builder/SdCliServerBuilder.mjs +2 -2
- package/dist/entry-points/SdCliNpm.mjs +2 -8
- package/dist/packages/SdCliPackage.mjs +2 -2
- package/package.json +37 -38
- package/src/bin/sd-cli.ts +274 -274
- package/src/build-tool/SdCliElectron.ts +81 -81
- package/src/builder/SdCliClientBuilder.ts +737 -736
- package/src/builder/SdCliServerBuilder.ts +483 -483
- package/src/commons.ts +138 -135
- package/src/entry-points/SdCliNpm.ts +19 -26
- package/src/packages/SdCliPackage.ts +242 -242
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 =
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export interface
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
+
}
|