Restores and stabilizes a new `fusion-plugin-cli-printing-press` plugin scaffold, including the plugin manifest, TypeScript configuration, source entry point, and test suite, with vitest aliases added in a follow-up fix. Fusion-Task-Id: FN-3907
27 lines
1.0 KiB
TypeScript
27 lines
1.0 KiB
TypeScript
import { defineConfig } from "vitest/config";
|
|
import { fileURLToPath } from "node:url";
|
|
import { computeMaxWorkers } from "../../packages/core/src/__test-utils__/vitest-workers";
|
|
|
|
const maxWorkers = computeMaxWorkers();
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: [
|
|
{ find: "@fusion/core", replacement: fileURLToPath(new URL("../../packages/core/src/index.ts", import.meta.url)) },
|
|
{
|
|
find: "@fusion/plugin-sdk",
|
|
replacement: fileURLToPath(new URL("../../packages/plugin-sdk/src/index.ts", import.meta.url)),
|
|
},
|
|
],
|
|
},
|
|
test: {
|
|
include: ["src/**/*.test.{ts,tsx}"],
|
|
environment: "node",
|
|
setupFiles: [fileURLToPath(new URL("../../packages/core/src/__test-utils__/vitest-setup.ts", import.meta.url))],
|
|
globalSetup: [fileURLToPath(new URL("../../packages/core/src/__test-utils__/vitest-teardown.ts", import.meta.url))],
|
|
pool: "threads",
|
|
maxWorkers,
|
|
poolOptions: { threads: { minThreads: 1, maxThreads: maxWorkers }, forks: { minForks: 1, maxForks: maxWorkers } },
|
|
},
|
|
});
|