@simplysm/sd-cli 14.0.78 → 14.0.80
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simplysm/sd-cli",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.80",
|
|
4
4
|
"description": "Simplysm package - CLI tool",
|
|
5
5
|
"author": "simplysm",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,18 +36,18 @@
|
|
|
36
36
|
"lmdb": "^3.5.4",
|
|
37
37
|
"mime": "^4.1.0",
|
|
38
38
|
"postcss": "^8.5.15",
|
|
39
|
-
"sass": "^1.
|
|
40
|
-
"semver": "^7.8.
|
|
39
|
+
"sass": "^1.100.0",
|
|
40
|
+
"semver": "^7.8.1",
|
|
41
41
|
"sharp": "^0.34.5",
|
|
42
42
|
"smol-toml": "^1.6.1",
|
|
43
43
|
"ssh2": "^1.17.0",
|
|
44
44
|
"typescript": "^5.9.3",
|
|
45
|
-
"ws": "^8.
|
|
45
|
+
"ws": "^8.21.0",
|
|
46
46
|
"yaml": "^2.9.0",
|
|
47
47
|
"yargs": "^18.0.0",
|
|
48
|
-
"@simplysm/core-
|
|
49
|
-
"@simplysm/storage": "14.0.
|
|
50
|
-
"@simplysm/core-
|
|
48
|
+
"@simplysm/core-node": "14.0.80",
|
|
49
|
+
"@simplysm/storage": "14.0.80",
|
|
50
|
+
"@simplysm/core-common": "14.0.80"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/semver": "^7.7.1",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import consola from "consola";
|
|
1
2
|
import { enableProdMode } from "@angular/core";
|
|
2
3
|
import { bootstrapApplication } from "@angular/platform-browser";
|
|
3
4
|
import { provideHttpClient, withFetch } from "@angular/common/http";
|
|
@@ -13,6 +14,8 @@ import "./styles.scss";
|
|
|
13
14
|
|
|
14
15
|
if (typeof ngDevMode !== "undefined" && !ngDevMode) {
|
|
15
16
|
enableProdMode();
|
|
17
|
+
} else {
|
|
18
|
+
consola.log("dev mode");
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
bootstrapApplication(AppPage, {
|
|
@@ -24,5 +27,5 @@ bootstrapApplication(AppPage, {
|
|
|
24
27
|
provideSdAngular({ clientName: "{{client.name}}" }),
|
|
25
28
|
],
|
|
26
29
|
}).catch((err: unknown) => {
|
|
27
|
-
|
|
30
|
+
consola.error(err);
|
|
28
31
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { describe, it, expect, vi, beforeEach } from "vitest";
|
|
2
|
-
import * as coreCommon from "@simplysm/core-common";
|
|
3
2
|
|
|
4
|
-
//
|
|
5
|
-
|
|
3
|
+
// lint-with-program.ts 가 module-level 에서 createLogger 를 호출하므로
|
|
4
|
+
// import 평가 전에 mock 이 적용되어야 한다 — vi.mock 사용 (hoist 됨).
|
|
5
|
+
const { mockLintFiles, mockLoadFormatter, MockESLintClass, mockLintLogger } = vi.hoisted(() => {
|
|
6
6
|
const lintFilesFn = vi.fn();
|
|
7
7
|
const loadFormatterFn = vi.fn();
|
|
8
8
|
const ESLintCls = vi.fn().mockImplementation(function () {
|
|
@@ -11,21 +11,31 @@ const { mockLintFiles, mockLoadFormatter, MockESLintClass } = vi.hoisted(() => {
|
|
|
11
11
|
loadFormatter: loadFormatterFn,
|
|
12
12
|
};
|
|
13
13
|
});
|
|
14
|
-
|
|
14
|
+
const logger = {
|
|
15
|
+
debug: vi.fn(),
|
|
16
|
+
info: vi.fn(),
|
|
17
|
+
warn: vi.fn(),
|
|
18
|
+
error: vi.fn(),
|
|
19
|
+
};
|
|
20
|
+
return {
|
|
21
|
+
mockLintFiles: lintFilesFn,
|
|
22
|
+
mockLoadFormatter: loadFormatterFn,
|
|
23
|
+
MockESLintClass: ESLintCls,
|
|
24
|
+
mockLintLogger: logger,
|
|
25
|
+
};
|
|
15
26
|
});
|
|
16
27
|
|
|
17
28
|
vi.mock("eslint", () => ({
|
|
18
29
|
ESLint: MockESLintClass,
|
|
19
30
|
}));
|
|
20
31
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
vi.spyOn(coreCommon, "createLogger").mockReturnValue(mockLintLogger as any);
|
|
32
|
+
vi.mock("@simplysm/core-common", async () => {
|
|
33
|
+
const actual = await vi.importActual<typeof import("@simplysm/core-common")>("@simplysm/core-common");
|
|
34
|
+
return {
|
|
35
|
+
...actual,
|
|
36
|
+
createLogger: vi.fn(() => mockLintLogger),
|
|
37
|
+
};
|
|
38
|
+
});
|
|
29
39
|
|
|
30
40
|
import { LintWithProgramRunner } from "../../src/lint/lint-with-program";
|
|
31
41
|
|