nx/tools/scripts/start-local-registry.ts
BAK BYEONG JUN 18932f4a5f
Some checks failed
CI / checks (push) Has been cancelled
init
2025-05-06 13:52:36 +00:00

32 lines
813 B
TypeScript

/**
* This script starts a local registry for e2e testing purposes.
* It is meant to be called in jest's globalSetup.
*/
import { startLocalRegistry } from '@nx/js/plugins/jest/local-registry';
import { releasePublish, releaseVersion } from 'nx/release';
export default async () => {
// local registry target to run
const localRegistryTarget = 'loafle:local-registry';
// storage folder for the local registry
const storage = './tmp/local-registry/storage';
(global as any).stopLocalRegistry = await startLocalRegistry({
localRegistryTarget,
storage,
verbose: true,
});
await releaseVersion({
specifier: '0.0.0-e2e',
gitCommit: false,
gitTag: false,
stageChanges: false,
verbose: true,
});
await releasePublish({
tag: 'e2e',
verbose: true,
});
};