@simplysm/sd-cli 14.0.49 → 14.0.51
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/README.md +22 -679
- package/dist/engines/EsbuildClientEngine.d.ts.map +1 -1
- package/dist/engines/EsbuildClientEngine.js +1 -2
- package/dist/engines/EsbuildClientEngine.js.map +1 -1
- package/dist/esbuild/esbuild-angular-compiler-plugin.js.map +1 -1
- package/dist/lint/lint-core.js.map +1 -1
- package/dist/orchestrators/DevOrchestrator.js.map +1 -1
- package/dist/orchestrators/ServerRuntimeManager.d.ts.map +1 -1
- package/dist/orchestrators/ServerRuntimeManager.js +2 -4
- package/dist/orchestrators/ServerRuntimeManager.js.map +1 -1
- package/dist/ts-compiler/SdTsCompiler.d.ts +1 -7
- package/dist/ts-compiler/SdTsCompiler.d.ts.map +1 -1
- package/dist/ts-compiler/SdTsCompiler.js +109 -116
- package/dist/ts-compiler/SdTsCompiler.js.map +1 -1
- package/dist/utils/package-utils.d.ts.map +1 -1
- package/dist/utils/package-utils.js.map +1 -1
- package/docs/angular-vite-plugin/sd-angular-plugin.md +54 -0
- package/docs/config/build-target.md +31 -0
- package/docs/config/npm-config.md +27 -0
- package/docs/config/sd-browser-support-config.md +19 -0
- package/docs/config/sd-build-package-config.md +21 -0
- package/docs/config/sd-capacitor-config.md +109 -0
- package/docs/config/sd-client-package-config.md +33 -0
- package/docs/config/sd-config.md +73 -0
- package/docs/config/sd-electron-config.md +27 -0
- package/docs/config/sd-package-config.md +18 -0
- package/docs/config/sd-post-publish-script-config.md +19 -0
- package/docs/config/sd-publish-config.md +72 -0
- package/docs/config/sd-pwa-config.md +41 -0
- package/docs/config/sd-scripts-package-config.md +19 -0
- package/docs/config/sd-server-package-config.md +32 -0
- package/docs/config/sd-watch-hook-config.md +19 -0
- package/docs/ts-compiler/sd-ts-compiler.md +152 -0
- package/package.json +6 -5
- package/src/engines/EsbuildClientEngine.ts +1 -2
- package/src/esbuild/esbuild-angular-compiler-plugin.ts +1 -1
- package/src/lint/lint-core.ts +1 -1
- package/src/orchestrators/DevOrchestrator.ts +3 -3
- package/src/orchestrators/ServerRuntimeManager.ts +2 -5
- package/src/ts-compiler/SdTsCompiler.ts +136 -154
- package/src/utils/package-utils.ts +1 -2
- package/tests/esbuild/esbuild-angular-compiler-plugin.spec.ts +1 -1
- package/tests/esbuild/esbuild-postcss-plugin.acc.spec.ts +1 -1
- package/tests/esbuild/esbuild-tsc-plugin.acc.spec.ts +2 -2
- package/tests/esbuild/esbuild-tsc-plugin.spec.ts +3 -3
- package/tests/esbuild/esbuild-worker-plugin.spec.ts +1 -1
- package/tests/orchestrators/build-orchestrator.spec.ts +9 -9
- package/tests/orchestrators/dev-orchestrator.spec.ts +4 -4
- package/tests/orchestrators/watch-orchestrator.spec.ts +2 -2
- package/tests/ts-compiler/SdTsCompiler-crash-handling.verify.md +24 -0
- package/tests/utils/copy-src.spec.ts +5 -5
- package/tests/utils/esbuild-client-config.acc.spec.ts +1 -1
- package/tests/utils/esbuild-client-config.spec.ts +4 -4
- package/tests/utils/esbuild-config.spec.ts +3 -3
- package/tests/utils/esbuild-postcss-plugin.spec.ts +1 -1
- package/tests/utils/hmr-client-script.acc.spec.ts +1 -1
- package/tests/utils/ngtsc-build-core.spec.ts +1 -1
- package/tests/utils/package-utils.spec.ts +6 -6
- package/tests/workers/server-build-worker.spec.ts +1 -1
|
@@ -215,7 +215,7 @@ describe("createClientEsbuildContext — PostCSS 플러그인 통합", () => {
|
|
|
215
215
|
await createClientEsbuildContext({
|
|
216
216
|
...baseBuild,
|
|
217
217
|
postcssPlugins: [["autoprefixer"]],
|
|
218
|
-
plugins: [customPlugin
|
|
218
|
+
plugins: [customPlugin],
|
|
219
219
|
legacyModule: true,
|
|
220
220
|
onEnd: vi.fn(),
|
|
221
221
|
});
|
|
@@ -294,7 +294,7 @@ describe("createClientEsbuildContext — 추가 옵션", () => {
|
|
|
294
294
|
const customPlugin = { name: "custom", setup: vi.fn() };
|
|
295
295
|
await createClientEsbuildContext({
|
|
296
296
|
...baseDev,
|
|
297
|
-
plugins: [customPlugin
|
|
297
|
+
plugins: [customPlugin],
|
|
298
298
|
});
|
|
299
299
|
const opts = vi.mocked(esbuild.context).mock.calls[0][0];
|
|
300
300
|
expect(opts.plugins).toContainEqual(customPlugin);
|
|
@@ -460,7 +460,7 @@ describe("createClientEsbuildContext — onEnd 플러그인", () => {
|
|
|
460
460
|
it("customPlugins가 angularPlugin 이전에 위치 (onStart에서 sourceFileCache 무효화 선행)", async () => {
|
|
461
461
|
await createClientEsbuildContext({
|
|
462
462
|
...baseDev,
|
|
463
|
-
plugins: [{ name: "custom", setup: vi.fn() }
|
|
463
|
+
plugins: [{ name: "custom", setup: vi.fn() }],
|
|
464
464
|
onEnd: vi.fn(),
|
|
465
465
|
});
|
|
466
466
|
const opts = vi.mocked(esbuild.context).mock.calls[0][0];
|
|
@@ -506,7 +506,7 @@ describe("createClientEsbuildContext — SCSS 플러그인 통합", () => {
|
|
|
506
506
|
const customPlugin = { name: "custom", setup: vi.fn() };
|
|
507
507
|
await createClientEsbuildContext({
|
|
508
508
|
...baseDev,
|
|
509
|
-
plugins: [customPlugin
|
|
509
|
+
plugins: [customPlugin],
|
|
510
510
|
});
|
|
511
511
|
const opts = vi.mocked(esbuild.context).mock.calls[0][0];
|
|
512
512
|
const pluginNames = opts.plugins!.map((p: any) => p.name);
|
|
@@ -123,7 +123,7 @@ describe("createEnvBanner", () => {
|
|
|
123
123
|
describe("writeChangedOutputFiles", () => {
|
|
124
124
|
beforeEach(() => {
|
|
125
125
|
vi.clearAllMocks();
|
|
126
|
-
vi.mocked(mockFs.mkdir).mockResolvedValue(undefined
|
|
126
|
+
vi.mocked(mockFs.mkdir).mockResolvedValue(undefined);
|
|
127
127
|
vi.mocked(mockFs.writeFile).mockResolvedValue();
|
|
128
128
|
});
|
|
129
129
|
|
|
@@ -160,7 +160,7 @@ describe("writeChangedOutputFiles", () => {
|
|
|
160
160
|
});
|
|
161
161
|
|
|
162
162
|
it("skips writing when transformed content matches existing file", async () => {
|
|
163
|
-
vi.mocked(mockFs.readFile).mockResolvedValue('import { bar } from "./bar.js";'
|
|
163
|
+
vi.mocked(mockFs.readFile).mockResolvedValue('import { bar } from "./bar.js";');
|
|
164
164
|
|
|
165
165
|
await writeChangedOutputFiles([
|
|
166
166
|
{
|
|
@@ -173,7 +173,7 @@ describe("writeChangedOutputFiles", () => {
|
|
|
173
173
|
});
|
|
174
174
|
|
|
175
175
|
it("writes file when content changed", async () => {
|
|
176
|
-
vi.mocked(mockFs.readFile).mockResolvedValue('import { old } from "./old.js";'
|
|
176
|
+
vi.mocked(mockFs.readFile).mockResolvedValue('import { old } from "./old.js";');
|
|
177
177
|
|
|
178
178
|
await writeChangedOutputFiles([
|
|
179
179
|
{
|
|
@@ -8,7 +8,7 @@ const mockCollectDiagnostics = vi.fn().mockReturnValue([]);
|
|
|
8
8
|
const mockEmitAffectedFiles = vi.fn().mockReturnValue([]);
|
|
9
9
|
const mockGetTsProgram = vi.fn().mockReturnValue({
|
|
10
10
|
getSourceFiles: () => [],
|
|
11
|
-
}
|
|
11
|
+
});
|
|
12
12
|
|
|
13
13
|
const angularCompilerConstructorSpy = vi.fn();
|
|
14
14
|
|
|
@@ -97,8 +97,8 @@ describe("mergeTestsPackagesIntoConfig", () => {
|
|
|
97
97
|
// Acceptance: targets 없이 watch 실행 시 tests 패키지가 포함된다
|
|
98
98
|
it("merges tests packages into config packages with target node", () => {
|
|
99
99
|
const configPackages: Record<string, SdPackageConfig | undefined> = {
|
|
100
|
-
"core-common": { target: "neutral" }
|
|
101
|
-
"core-node": { target: "node" }
|
|
100
|
+
"core-common": { target: "neutral" },
|
|
101
|
+
"core-node": { target: "node" },
|
|
102
102
|
};
|
|
103
103
|
const workspacePackages = new Map([
|
|
104
104
|
["core-common", "packages/core-common"],
|
|
@@ -124,7 +124,7 @@ describe("mergeTestsPackagesIntoConfig", () => {
|
|
|
124
124
|
// Acceptance: tests 패키지를 target으로 지정하여 watch 실행 (validateTargets에서 통합 맵 사용)
|
|
125
125
|
it("makes tests packages available for validateTargets", () => {
|
|
126
126
|
const configPackages: Record<string, SdPackageConfig | undefined> = {
|
|
127
|
-
"core-common": { target: "neutral" }
|
|
127
|
+
"core-common": { target: "neutral" },
|
|
128
128
|
};
|
|
129
129
|
const workspacePackages = new Map([
|
|
130
130
|
["core-common", "packages/core-common"],
|
|
@@ -140,7 +140,7 @@ describe("mergeTestsPackagesIntoConfig", () => {
|
|
|
140
140
|
// Unit: packages/ entries in workspacePackages are not added to merged (already in config)
|
|
141
141
|
it("does not duplicate packages/ entries from workspacePackages", () => {
|
|
142
142
|
const configPackages: Record<string, SdPackageConfig | undefined> = {
|
|
143
|
-
"core-common": { target: "neutral" }
|
|
143
|
+
"core-common": { target: "neutral" },
|
|
144
144
|
};
|
|
145
145
|
const workspacePackages = new Map([
|
|
146
146
|
["core-common", "packages/core-common"],
|
|
@@ -156,7 +156,7 @@ describe("mergeTestsPackagesIntoConfig", () => {
|
|
|
156
156
|
// Unit: empty workspacePackages returns config as-is
|
|
157
157
|
it("returns config unchanged when no workspace packages", () => {
|
|
158
158
|
const configPackages: Record<string, SdPackageConfig | undefined> = {
|
|
159
|
-
"core-common": { target: "neutral" }
|
|
159
|
+
"core-common": { target: "neutral" },
|
|
160
160
|
};
|
|
161
161
|
const workspacePackages = new Map<string, string>();
|
|
162
162
|
|
|
@@ -169,7 +169,7 @@ describe("mergeTestsPackagesIntoConfig", () => {
|
|
|
169
169
|
// Acceptance: 이름 충돌 시 에러 발생
|
|
170
170
|
it("throws when config package name collides with tests package name", () => {
|
|
171
171
|
const configPackages: Record<string, SdPackageConfig | undefined> = {
|
|
172
|
-
"orm": { target: "node" }
|
|
172
|
+
"orm": { target: "node" },
|
|
173
173
|
};
|
|
174
174
|
const workspacePackages = new Map([
|
|
175
175
|
["orm", "tests/orm"],
|
|
@@ -317,7 +317,7 @@ describe("server-build.worker build()", () => {
|
|
|
317
317
|
builderProgram: {},
|
|
318
318
|
isForAngular: false,
|
|
319
319
|
affectedFiles: undefined,
|
|
320
|
-
diagnostics: [{ code: 2345, category: 1 }]
|
|
320
|
+
diagnostics: [{ code: 2345, category: 1 }],
|
|
321
321
|
errorCount: 1,
|
|
322
322
|
warningCount: 0,
|
|
323
323
|
errors: ["TS2345: type error"],
|