@plentidev/cli-darwin-x64 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-darwin-x64
3
- size: 67418192 bytes
4
- sha256: 41661ef973c424a0418f7bdc625d85116f5936ce5453fd1f330b8c029de5f31d
3
+ size: 98840032 bytes
4
+ sha256: 27654862087f8f1b80cc346fb43db3b72d806ec703b8b7b16d5237cc7c03c917
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plentidev/cli-darwin-x64",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "Official Plenti CLI (plenti-darwin-x64)",
5
5
  "os": [
6
6
  "darwin"
@@ -9,7 +9,8 @@
9
9
  "x64"
10
10
  ],
11
11
  "files": [
12
- "bin"
12
+ "bin",
13
+ "templates"
13
14
  ],
14
15
  "publishConfig": {
15
16
  "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
+ }