MCPcopy
hub / github.com/drizzle-team/drizzle-orm / assertPackages

Function assertPackages

drizzle-kit/src/cli/utils.ts:32–48  ·  view source on GitHub ↗
(...pkgs: string[])

Source from the content-addressed store, hash-verified

30};
31
32export const assertPackages = async (...pkgs: string[]) => {
33 try {
34 for (let i = 0; i < pkgs.length; i++) {
35 const it = pkgs[i];
36 await import(it);
37 }
38 } catch (e) {
39 err(
40 `please install required packages: ${
41 pkgs
42 .map((it) => `'${it}'`)
43 .join(' ')
44 }`,
45 );
46 process.exit(1);
47 }
48};
49
50// ex: either pg or postgres are needed
51export const assertEitherPackage = async (

Callers 2

preparePostgresDBFunction · 0.90
schema.tsFile · 0.90

Calls 1

errFunction · 0.90

Tested by

no test coverage detected