MCPcopy Create free account
hub / github.com/instantdb/instant / getInstantModuleName

Function getInstantModuleName

client/packages/cli/src/context/projectInfo.ts:197–210  ·  view source on GitHub ↗
(pkgJson: PackageJson)

Source from the content-addressed store, hash-verified

195) => Layer.effect(ProjectInfo, getProjectInfo(coerce, packageName));
196
197function getInstantModuleName(pkgJson: PackageJson) {
198 const deps = pkgJson.dependencies || {};
199 const devDeps = pkgJson.devDependencies || {};
200 const instantModuleName = [
201 '@instantdb/react',
202 '@instantdb/react-native',
203 '@instantdb/core',
204 '@instantdb/admin',
205 '@instantdb/solidjs',
206 '@instantdb/svelte',
207 '@instantdb/vue',
208 ].find((name) => deps[name] || devDeps[name]);
209 return instantModuleName;
210}
211
212function getInstallCommand(packageManager: string, moduleName: string) {
213 if (packageManager === 'npm') {

Callers 1

getProjectInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected