schematic-pg 0.1.2 → 0.1.3

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,5 +1,15 @@
1
- import { PACKAGE_NAME } from '../constants.js';
2
- export const APP_SCHEMA_TEMPLATE = `models {
1
+ import { PACKAGE_NAME, PACKAGE_VERSION } from '../constants.js';
2
+
3
+ //always leave the extensions and enums empty
4
+ export const APP_SCHEMA_TEMPLATE = `extensions {
5
+
6
+ }
7
+
8
+ enums {
9
+
10
+ }
11
+
12
+ models {
3
13
  model User {
4
14
  id: UUID @id @default(gen_random_uuid())
5
15
  email: VARCHAR(255) @unique
@@ -70,7 +80,7 @@ export function createPackageJsonTemplate(projectName) {
70
80
  '@hono/zod-validator': '^0.8.0',
71
81
  hono: '^4.12.27',
72
82
  pg: '^8.22.0',
73
- [PACKAGE_NAME]: '^0.1.0',
83
+ [PACKAGE_NAME]: `^${PACKAGE_VERSION}`,
74
84
  zod: '^4.4.3',
75
85
  },
76
86
  devDependencies: {
@@ -1 +1,2 @@
1
1
  export declare const PACKAGE_NAME = "schematic-pg";
2
+ export declare const PACKAGE_VERSION: string;
package/dist/constants.js CHANGED
@@ -1 +1,5 @@
1
+ import { createRequire } from 'node:module';
2
+ const require = createRequire(import.meta.url);
3
+ const { version } = require('../package.json');
1
4
  export const PACKAGE_NAME = 'schematic-pg';
5
+ export const PACKAGE_VERSION = version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "schematic-pg",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Single-file backend framework for PostgreSQL and Node.js",
5
5
  "type": "module",
6
6
  "license": "MIT",