@plentidev/cli-linux-x64-musl 0.0.18 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/bin/plenti-linux-x64-musl
3
- size: 95672704 bytes
4
- sha256: 33bc45b20403ac810d988559ccf36cccd3b16d8e2d43f2f90d9da9d9eb90959c
3
+ size: 103392680 bytes
4
+ sha256: 538b72717d061dbc17811088933340a8e3fa9f916bf5ced131c46fdccda52ccd
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plentidev/cli-linux-x64-musl",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "Official Plenti CLI (plenti-linux-x64-musl)",
5
5
  "os": [
6
6
  "linux"
@@ -12,7 +12,8 @@
12
12
  "musl"
13
13
  ],
14
14
  "files": [
15
- "bin"
15
+ "bin",
16
+ "templates"
16
17
  ],
17
18
  "publishConfig": {
18
19
  "access": "public"
@@ -0,0 +1,11 @@
1
+ generator client {
2
+ provider = "prisma-client"
3
+ output = "../src/generated/prisma"
4
+ runtime = "nodejs"
5
+ moduleFormat = "esm"
6
+ generatedFileExtension = "ts"
7
+ }
8
+
9
+ datasource db {
10
+ provider = "postgresql"
11
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "{{projectName}}",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "postinstall": "bun db:generate",
7
+ "db:generate": "DATABASE_URL=dummy prisma generate",
8
+ "clean": "rm -rf node_modules",
9
+ "typecheck": "tsgo --noEmit"
10
+ },
11
+ "dependencies": {
12
+ "@prisma/adapter-pg": "^7.7.0",
13
+ "@prisma/client": "^7.7.0"
14
+ },
15
+ "devDependencies": {
16
+ "@types/aws-lambda": "^8.10.0",
17
+ "@typescript/native-preview": "latest",
18
+ "prisma": "^7.7.0",
19
+ "typescript": "^5.0.0"
20
+ }
21
+ }
@@ -0,0 +1,8 @@
1
+ import { env, type PrismaConfig } from 'prisma/config'
2
+
3
+ export default {
4
+ schema: 'db',
5
+ datasource: {
6
+ url: env('DATABASE_URL'),
7
+ },
8
+ } satisfies PrismaConfig
@@ -0,0 +1,14 @@
1
+ const required = (name: string, value: string | undefined) => {
2
+ if (!value) {
3
+ throw new Error(`Missing required environment variable: ${name}`);
4
+ }
5
+
6
+ return value;
7
+ };
8
+
9
+ export const env = {
10
+ NODE_ENV: (process.env.NODE_ENV || 'development') as
11
+ | 'development'
12
+ | 'production',
13
+ DATABASE_URL: required('DATABASE_URL', process.env.DATABASE_URL),
14
+ };
@@ -0,0 +1,8 @@
1
+ import type { ScheduledEvent } from 'aws-lambda';
2
+
3
+ export async function handler(event: ScheduledEvent) {
4
+ console.log('Running scheduled job for {{projectName}}', {
5
+ id: event.id,
6
+ time: event.time,
7
+ });
8
+ }
@@ -0,0 +1,8 @@
1
+ import { PrismaPg } from '@prisma/adapter-pg';
2
+ import { DATABASE_URL } from '../../config/env';
3
+ import { type Prisma, PrismaClient } from '../../generated/prisma/client.js';
4
+
5
+ const adapter = new PrismaPg({ connectionString: DATABASE_URL });
6
+ export const db = new PrismaClient({ adapter });
7
+
8
+ export type Tx = Prisma.TransactionClient;
@@ -0,0 +1,12 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
+ "strict": true,
7
+ "esModuleInterop": true,
8
+ "skipLibCheck": true,
9
+ "outDir": "dist"
10
+ },
11
+ "include": ["src"]
12
+ }