
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
@a_team/prisma
Advanced tools
- This package contains a shared Prisma schema, organized into [multiple files](https://www.prisma.io/blog/organize-your-prisma-schema-with-multi-file-support), to be used across multiple repositories/projects. - By centralizing the schema definitions, we
X.Y.Z
represents the version):"optionalDependencies": {
"@a_team/prisma-win": "npm:@a_team/prisma@X.Y.Z-win",
"@a_team/prisma-macos": "npm:@a_team/prisma@X.Y.Z-macos",
"@a_team/prisma-linux": "npm:@a_team/prisma@X.Y.Z-linux",
"@a_team/prisma-linux-debian": "npm:@a_team/prisma@X.Y.Z-linux-debian"
}
postinstall
& change per need in your service:const fs = require('fs');
const path = require('path');
const getLinuxDistribution = () => {
try {
const osRelease = fs.readFileSync('/etc/os-release', 'utf-8');
const match = osRelease.match(/^ID=(.+)$/m);
return match ? match[1].replace(/"/g, '') : 'unknown';
} catch (error) {
console.error('Failed to detect Linux distribution:', error.message);
return 'unknown';
}
};
const getPlatformPackage = () => {
switch (process.platform) {
case 'darwin':
return '@a_team/prisma-macos';
case 'win32':
return '@a_team/prisma-win';
default:
const linuxDistro = getLinuxDistribution();
if (linuxDistro === 'debian') {
return '@a_team/prisma-linux-debian';
}
return '@a_team/prisma-linux';
}
};
const platformPackage = getPlatformPackage();
const nodeModulesPath = path.join(__dirname, '..', 'node_modules');
const sourcePath = path.join(nodeModulesPath, platformPackage);
const targetPath = path.join(nodeModulesPath, '@a_team/prisma');
if (fs.existsSync(sourcePath)) {
if (fs.existsSync(targetPath)) {
fs.rmSync(targetPath, { recursive: true, force: true });
}
fs.renameSync(sourcePath, targetPath);
console.log(`Renamed ${platformPackage} to @a_team/prisma`);
} else {
console.error(`Platform-specific package ${platformPackage} not found`);
process.exit(1);
}
import { ATeamPrismaClient } from '@a_team/prisma';
export class DbClient extends ATeamPrismaClient {
constructor(connectionUrl: string) {
super(connectionUrl);
}
async onModuleInit() {
await this.connect();
}
async onModuleDestroy() {
await this.disconnect();
}
}
.env.sample
file to .env
:cp .env.sample .env
.env
file.npx ts-node playground/missionSpec.ts
MAJOR.MINOR.PATCH
, incrementing and releasing should be done as:
MAJOR
version must be increased when incompatible service/code changes are made,MINOR
version must be increased when functionality in a backwards-compatible manner is made,PATCH
version must be increased when backwards-compatible bug fixes (for existing features) are made.Pull the latest changes on the main
branch and push the following tag to the repository:
git tag v<major>.<minor>.<patch> # matches v0.0.1
git push origin tag v<major>.<minor>.<patch> # runs the publishing process
This tag creates the new package versions needed and pushes them towards the npm repository,
A release
on the github
repository is generated,
A slack notification is sent to the required channel with the release changes.
FAQs
- This package contains a shared Prisma schema, organized into [multiple files](https://www.prisma.io/blog/organize-your-prisma-schema-with-multi-file-support), to be used across multiple repositories/projects. - By centralizing the schema definitions, we
The npm package @a_team/prisma receives a total of 529 weekly downloads. As such, @a_team/prisma popularity was classified as not popular.
We found that @a_team/prisma demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.