@simplysm/sd-cli 12.14.11 → 12.14.12
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/dist/pkg-builders/lib/SdCliIndexFileGenerator.d.ts +2 -2
- package/dist/pkg-builders/lib/SdCliIndexFileGenerator.js +7 -7
- package/dist/pkg-builders/lib/SdCliIndexFileGenerator.js.map +1 -1
- package/dist/pkg-builders/lib/SdTsLibBuildRunner.js +2 -2
- package/dist/pkg-builders/lib/SdTsLibBuildRunner.js.map +1 -1
- package/dist/types/config/ISdProjectConfig.d.ts +1 -2
- package/package.json +10 -10
- package/src/pkg-builders/lib/SdCliIndexFileGenerator.ts +7 -7
- package/src/pkg-builders/lib/SdTsLibBuildRunner.ts +2 -1
- package/src/types/config/ISdProjectConfig.ts +5 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare class SdCliIndexFileGenerator {
|
|
2
2
|
#private;
|
|
3
3
|
cachedHash?: string;
|
|
4
|
-
watchAsync(pkgPath: string, polyfills?: string[]): Promise<void>;
|
|
5
|
-
runAsync(pkgPath: string, polyfills?: string[]): Promise<{
|
|
4
|
+
watchAsync(pkgPath: string, polyfills?: string[], excludes?: string[]): Promise<void>;
|
|
5
|
+
runAsync(pkgPath: string, polyfills?: string[], excludes?: string[]): Promise<{
|
|
6
6
|
changed: boolean;
|
|
7
7
|
filePath: string;
|
|
8
8
|
content: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FsUtils, HashUtils, PathUtils, SdFsWatcher } from "@simplysm/sd-core-node";
|
|
2
2
|
import path from "path";
|
|
3
3
|
export class SdCliIndexFileGenerator {
|
|
4
|
-
async watchAsync(pkgPath, polyfills) {
|
|
4
|
+
async watchAsync(pkgPath, polyfills, excludes) {
|
|
5
5
|
const indexFilePath = path.resolve(pkgPath, "src/index.ts");
|
|
6
6
|
this.cachedHash = FsUtils.exists(indexFilePath)
|
|
7
7
|
? HashUtils.get(await FsUtils.readFileAsync(indexFilePath))
|
|
@@ -11,11 +11,11 @@ export class SdCliIndexFileGenerator {
|
|
|
11
11
|
});
|
|
12
12
|
watcher.onChange({ delay: 50 }, async (changeInfos) => {
|
|
13
13
|
if (changeInfos.some((item) => ["add", "addDir", "unlink", "unlinkDir"].includes(item.event)))
|
|
14
|
-
await this.runAsync(pkgPath, polyfills);
|
|
14
|
+
await this.runAsync(pkgPath, polyfills, excludes);
|
|
15
15
|
});
|
|
16
|
-
await this.runAsync(pkgPath, polyfills);
|
|
16
|
+
await this.runAsync(pkgPath, polyfills, excludes);
|
|
17
17
|
}
|
|
18
|
-
async runAsync(pkgPath, polyfills) {
|
|
18
|
+
async runAsync(pkgPath, polyfills, excludes) {
|
|
19
19
|
const indexFilePath = path.resolve(pkgPath, "src/index.ts");
|
|
20
20
|
const importTexts = [];
|
|
21
21
|
// polyfills 를 모두 import
|
|
@@ -25,7 +25,7 @@ export class SdCliIndexFileGenerator {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
// 내부 파일들 import
|
|
28
|
-
const filePaths = await this.#getFilePathsAsync(pkgPath);
|
|
28
|
+
const filePaths = await this.#getFilePathsAsync(pkgPath, excludes);
|
|
29
29
|
for (const filePath of filePaths.orderBy()) {
|
|
30
30
|
const requirePath = PathUtils.posix(path.relative(path.dirname(indexFilePath), filePath))
|
|
31
31
|
.replace(/\.tsx?$/, "")
|
|
@@ -49,13 +49,13 @@ export class SdCliIndexFileGenerator {
|
|
|
49
49
|
return { changed: false, filePath: indexFilePath, content };
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
async #getFilePathsAsync(pkgPath) {
|
|
52
|
+
async #getFilePathsAsync(pkgPath, excludes) {
|
|
53
53
|
const indexFilePath = path.resolve(pkgPath, "src/index.ts");
|
|
54
54
|
const tsconfig = await FsUtils.readJsonAsync(path.resolve(pkgPath, "tsconfig.json"));
|
|
55
55
|
const entryFilePaths = tsconfig.files?.map((item) => path.resolve(pkgPath, item)) ?? [];
|
|
56
56
|
return (await FsUtils.globAsync(path.resolve(pkgPath, "src/**/*{.ts,.tsx}"), {
|
|
57
57
|
nodir: true,
|
|
58
|
-
ignore: tsconfig.excludes,
|
|
58
|
+
ignore: [...(tsconfig.excludes ?? []), ...(excludes ?? [])],
|
|
59
59
|
})).filter((item) => !entryFilePaths.includes(item) && item !== indexFilePath && !item.endsWith(".d.ts"));
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdCliIndexFileGenerator.js","sourceRoot":"","sources":["../../../src/pkg-builders/lib/SdCliIndexFileGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,OAAO,uBAAuB;IAGlC,KAAK,CAAC,UAAU,CAAC,OAAe,EAAE,SAAoB;
|
|
1
|
+
{"version":3,"file":"SdCliIndexFileGenerator.js","sourceRoot":"","sources":["../../../src/pkg-builders/lib/SdCliIndexFileGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,OAAO,uBAAuB;IAGlC,KAAK,CAAC,UAAU,CAAC,OAAe,EAAE,SAAoB,EAAE,QAAmB;QACzE,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAC5D,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC;YAC7C,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;YAC3D,CAAC,CAAC,SAAS,CAAC;QAEd,MAAM,OAAO,GAAG,MAAM,W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QAAQ,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC;QACrF,MAAM,cAAc,GAClB,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;QAEnE,OAAO,CACL,MAAM,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,oBAAoB,CAAC,EAAE;YACnE,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;SAC5D,CAAC,CACH,CAAC,MAAM,CACN,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,KAAK,aAAa,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAC9F,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -14,9 +14,9 @@ export class SdTsLibBuildRunner extends SdBuildRunnerBase {
|
|
|
14
14
|
if (!modifiedFileSet) {
|
|
15
15
|
if (!this._opt.watch?.noEmit) {
|
|
16
16
|
// index
|
|
17
|
-
if (
|
|
17
|
+
if (this._pkgConf.index !== false) {
|
|
18
18
|
this._debug("GEN index.ts...");
|
|
19
|
-
await new SdCliIndexFileGenerator().watchAsync(this._opt.pkgPath, this._pkgConf.polyfills);
|
|
19
|
+
await new SdCliIndexFileGenerator().watchAsync(this._opt.pkgPath, this._pkgConf.polyfills, this._pkgConf.index?.excludes);
|
|
20
20
|
}
|
|
21
21
|
// db-context
|
|
22
22
|
if (this._pkgConf.dbContext != null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdTsLibBuildRunner.js","sourceRoot":"","sources":["../../../src/pkg-builders/lib/SdTsLibBuildRunner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,MAAM,OAAO,kBAAmB,SAAQ,iBAA4B;IAApE;;QACqB,YAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,QAAQ,EAAE,oBAAoB,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"SdTsLibBuildRunner.js","sourceRoot":"","sources":["../../../src/pkg-builders/lib/SdTsLibBuildRunner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,MAAM,OAAO,kBAAmB,SAAQ,iBAA4B;IAApE;;QACqB,YAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,QAAQ,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAsC1F,CAAC;IApCC,QAAQ,CAAkB;IAEP,KAAK,CAAC,SAAS,CAAC,eAAgC;QACjE,OAAO;QACP,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;gBAC7B,QAAQ;gBACR,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,KAAK,KAAK,EAAE,CAAC;oBAClC,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;oBAC/B,MAAM,IAAI,uBAAuB,EAAE,CAAC,UAAU,CAC5C,IAAI,CAAC,IAAI,CAAC,OAAO,EACjB,IAAI,CAAC,QAAQ,CAAC,SAAS,EACvB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAC9B,CAAC;gBACJ,CAAC;gBAED,aAAa;gBACb,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,IAAI,IAAI,EAAE,CAAC;oBACpC,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,QAAQ,CAAC,CAAC;oBACpD,MAAM,IAAI,2BAA2B,EAAE,CAAC,UAAU,CAChD,IAAI,CAAC,IAAI,CAAC,OAAO,EACjB,IAAI,CAAC,QAAQ,CAAC,SAAS,CACxB,CAAC;gBACJ,CAAC;YACH,CAAC;YAED,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;YAC3B,IAAI,CAAC,QAAQ,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACxB,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,QAAS,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;QAErE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACrB,OAAO,WAAW,CAAC;IACrB,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simplysm/sd-cli",
|
|
3
|
-
"version": "12.14.
|
|
3
|
+
"version": "12.14.12",
|
|
4
4
|
"description": "심플리즘 패키지 - CLI",
|
|
5
5
|
"author": "김석래",
|
|
6
6
|
"repository": {
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@angular/build": "^20.3.10",
|
|
16
|
-
"@angular/compiler": "^20.3.
|
|
17
|
-
"@angular/compiler-cli": "^20.3.
|
|
18
|
-
"@anthropic-ai/sdk": "^0.
|
|
16
|
+
"@angular/compiler": "^20.3.12",
|
|
17
|
+
"@angular/compiler-cli": "^20.3.12",
|
|
18
|
+
"@anthropic-ai/sdk": "^0.69.0",
|
|
19
19
|
"@electron/rebuild": "^4.0.1",
|
|
20
|
-
"@simplysm/sd-core-common": "12.14.
|
|
21
|
-
"@simplysm/sd-core-node": "12.14.
|
|
22
|
-
"@simplysm/sd-service-server": "12.14.
|
|
23
|
-
"@simplysm/sd-storage": "12.14.
|
|
20
|
+
"@simplysm/sd-core-common": "12.14.12",
|
|
21
|
+
"@simplysm/sd-core-node": "12.14.12",
|
|
22
|
+
"@simplysm/sd-service-server": "12.14.12",
|
|
23
|
+
"@simplysm/sd-storage": "12.14.12",
|
|
24
24
|
"browserslist": "^4.28.0",
|
|
25
25
|
"cordova": "^12.0.0",
|
|
26
|
-
"electron": "^39.2.
|
|
26
|
+
"electron": "^39.2.1",
|
|
27
27
|
"electron-builder": "26.0.12",
|
|
28
28
|
"esbuild": "0.25.9",
|
|
29
29
|
"esbuild-sass-plugin": "^3.3.1",
|
|
@@ -41,6 +41,6 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/xml2js": "^0.4.14",
|
|
44
|
-
"@types/yargs": "^17.0.
|
|
44
|
+
"@types/yargs": "^17.0.35"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -4,7 +4,7 @@ import path from "path";
|
|
|
4
4
|
export class SdCliIndexFileGenerator {
|
|
5
5
|
cachedHash?: string;
|
|
6
6
|
|
|
7
|
-
async watchAsync(pkgPath: string, polyfills?: string[]) {
|
|
7
|
+
async watchAsync(pkgPath: string, polyfills?: string[], excludes?: string[]) {
|
|
8
8
|
const indexFilePath = path.resolve(pkgPath, "src/index.ts");
|
|
9
9
|
this.cachedHash = FsUtils.exists(indexFilePath)
|
|
10
10
|
? HashUtils.get(await FsUtils.readFileAsync(indexFilePath))
|
|
@@ -15,13 +15,13 @@ export class SdCliIndexFileGenerator {
|
|
|
15
15
|
});
|
|
16
16
|
watcher.onChange({ delay: 50 }, async (changeInfos) => {
|
|
17
17
|
if (changeInfos.some((item) => ["add", "addDir", "unlink", "unlinkDir"].includes(item.event)))
|
|
18
|
-
await this.runAsync(pkgPath, polyfills);
|
|
18
|
+
await this.runAsync(pkgPath, polyfills, excludes);
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
await this.runAsync(pkgPath, polyfills);
|
|
21
|
+
await this.runAsync(pkgPath, polyfills, excludes);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
async runAsync(pkgPath: string, polyfills?: string[]) {
|
|
24
|
+
async runAsync(pkgPath: string, polyfills?: string[], excludes?: string[]) {
|
|
25
25
|
const indexFilePath = path.resolve(pkgPath, "src/index.ts");
|
|
26
26
|
|
|
27
27
|
const importTexts: string[] = [];
|
|
@@ -34,7 +34,7 @@ export class SdCliIndexFileGenerator {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
// 내부 파일들 import
|
|
37
|
-
const filePaths = await this.#getFilePathsAsync(pkgPath);
|
|
37
|
+
const filePaths = await this.#getFilePathsAsync(pkgPath, excludes);
|
|
38
38
|
for (const filePath of filePaths.orderBy()) {
|
|
39
39
|
const requirePath = PathUtils.posix(path.relative(path.dirname(indexFilePath), filePath))
|
|
40
40
|
.replace(/\.tsx?$/, "")
|
|
@@ -59,7 +59,7 @@ export class SdCliIndexFileGenerator {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
async #getFilePathsAsync(pkgPath: string) {
|
|
62
|
+
async #getFilePathsAsync(pkgPath: string, excludes?: string[]) {
|
|
63
63
|
const indexFilePath = path.resolve(pkgPath, "src/index.ts");
|
|
64
64
|
|
|
65
65
|
const tsconfig = await FsUtils.readJsonAsync(path.resolve(pkgPath, "tsconfig.json"));
|
|
@@ -69,7 +69,7 @@ export class SdCliIndexFileGenerator {
|
|
|
69
69
|
return (
|
|
70
70
|
await FsUtils.globAsync(path.resolve(pkgPath, "src/**/*{.ts,.tsx}"), {
|
|
71
71
|
nodir: true,
|
|
72
|
-
ignore: tsconfig.excludes,
|
|
72
|
+
ignore: [...(tsconfig.excludes ?? []), ...(excludes ?? [])],
|
|
73
73
|
})
|
|
74
74
|
).filter(
|
|
75
75
|
(item) => !entryFilePaths.includes(item) && item !== indexFilePath && !item.endsWith(".d.ts"),
|
|
@@ -15,11 +15,12 @@ export class SdTsLibBuildRunner extends SdBuildRunnerBase<"library"> {
|
|
|
15
15
|
if (!modifiedFileSet) {
|
|
16
16
|
if (!this._opt.watch?.noEmit) {
|
|
17
17
|
// index
|
|
18
|
-
if (
|
|
18
|
+
if (this._pkgConf.index !== false) {
|
|
19
19
|
this._debug("GEN index.ts...");
|
|
20
20
|
await new SdCliIndexFileGenerator().watchAsync(
|
|
21
21
|
this._opt.pkgPath,
|
|
22
22
|
this._pkgConf.polyfills,
|
|
23
|
+
this._pkgConf.index?.excludes,
|
|
23
24
|
);
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -22,10 +22,11 @@ export interface ISdLibPackageConfig {
|
|
|
22
22
|
type: "library";
|
|
23
23
|
publish?: "npm";
|
|
24
24
|
polyfills?: string[];
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
index?:
|
|
26
|
+
| {
|
|
27
|
+
excludes?: string[];
|
|
28
|
+
}
|
|
29
|
+
| false;
|
|
29
30
|
dbContext?: string;
|
|
30
31
|
forceProductionMode?: boolean;
|
|
31
32
|
}
|