Registry / database / capstone-database

capstone-database

JSON →
library1.0.125jsnpmunverified

capstone-database is a database repository package for the TKR Computers e-commerce application. Current stable version is 1.0.125. It is released on npm and requires @prisma/client >=5 as a peer dependency. This package provides database access and business logic for a computer products online store. Key differentiators include integration with Prisma ORM and a focus on e-commerce features like product catalogs, cart management, and secure checkout. It is designed for use with Node.js and TypeScript.

npm install capstone-database
INSTALL
IMPORT
SIG · CAPSTONE-DATABASE
C
capstone-database
databasejavascriptv1.0.125
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import capstoneDatabase from 'capstone-database'
const capstoneDatabase = require('capstone-database')
This is an ESM-only package; require() will fail. Use import statement.
PrismaClient
import { PrismaClient } from '@prisma/client'
import { PrismaClient } from 'capstone-database'
PrismaClient is re-exported from capstone-database; use separate import from @prisma/client for clarity.
type definitions
import type { Product, CartItem } from 'capstone-database'
TypeScript types are exported; use type import for better tree-shaking.

Initializes Prisma client, imports the main database module, and fetches product list.

import capstoneDatabase from 'capstone-database'; import { PrismaClient } from '@prisma/client'; const prisma = new PrismaClient(); async function main() { const products = await capstoneDatabase.getProducts(prisma); console.log(products); } main().catch(console.error);
Debug
Known issues
breakingRequires @prisma/client version >=5. Versions below 5 are not supported and will cause runtime errors.
fix
Update @prisma/client to version 5 or higher.
affects: >=1.0.0
deprecatedThe `getCart` method has been deprecated in favor of `fetchCart`. `getCart` will be removed in v2.
fix
Replace calls to `getCart` with `fetchCart`.
affects: >=1.0.100
gotchaThe package exposes a default export that is an object, not a class. Attempting to use `new` will throw an error.
fix
Use the default import directly without the `new` keyword.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'capstone-database'
Package not installed or missing from node_modules.
fix
Run `npm install capstone-database` in your project directory.
TypeError: capstoneDatabase is not a function
Default export is an object, not a function. Tried to invoke directly.
fix
Access methods on the imported object, e.g., `capstoneDatabase.getProducts()`.
Upgrade
Version history
1.0.125latest on npm
Audit
Dependencies
@prisma/clientrequiredRequired as peer dependency to interact with the database via Prisma ORM
Agent activity
13 hits · last 30 days
node
10
Bingbot
1
OpenAI (training)
1
Resources
capstone-database — npm install capstone-database · libregistry