@develit-services/notification 0.0.7 → 0.0.9

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.
@@ -0,0 +1,22 @@
1
+ import { base } from '@develit-io/backend-sdk';
2
+ import { sqliteTable, text } from 'drizzle-orm/sqlite-core';
3
+ import 'drizzle-orm';
4
+
5
+ const auditLog = sqliteTable("audit_log", {
6
+ ...base,
7
+ event: text("event").$type().notNull(),
8
+ ip: text("ip"),
9
+ userAgent: text("user_agent"),
10
+ description: text("description"),
11
+ initiatorService: text("initiator_service").notNull(),
12
+ initiatorUserId: text("initiator_user_id")
13
+ });
14
+
15
+ const schema = {
16
+ __proto__: null,
17
+ auditLog: auditLog
18
+ };
19
+
20
+ const tables = schema;
21
+
22
+ export { tables as t };
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ const backendSdk = require('@develit-io/backend-sdk');
4
+ const sqliteCore = require('drizzle-orm/sqlite-core');
5
+ require('drizzle-orm');
6
+
7
+ const auditLog = sqliteCore.sqliteTable("audit_log", {
8
+ ...backendSdk.base,
9
+ event: sqliteCore.text("event").$type().notNull(),
10
+ ip: sqliteCore.text("ip"),
11
+ userAgent: sqliteCore.text("user_agent"),
12
+ description: sqliteCore.text("description"),
13
+ initiatorService: sqliteCore.text("initiator_service").notNull(),
14
+ initiatorUserId: sqliteCore.text("initiator_user_id")
15
+ });
16
+
17
+ const schema = {
18
+ __proto__: null,
19
+ auditLog: auditLog
20
+ };
21
+
22
+ const tables = schema;
23
+
24
+ exports.tables = tables;
package/package.json CHANGED
@@ -1,34 +1,34 @@
1
1
  {
2
2
  "name": "@develit-services/notification",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {
7
- ".": {
8
- "import": "./dist/src.mjs",
9
- "require": "./dist/src.cjs",
10
- "types": "./dist/src.d.ts"
7
+ "./wrangler": {
8
+ "types": "./dist/export/wrangler.d.ts",
9
+ "import": "./dist/export/wrangler.mjs",
10
+ "require": "./dist/export/wrangler.cjs"
11
11
  },
12
12
  "./worker": {
13
- "import": "./dist/worker.mjs",
14
- "require": "./dist/worker.cjs",
15
- "types": "./dist/worker.d.ts"
13
+ "types": "./dist/export/worker.d.ts",
14
+ "import": "./dist/export/worker.mjs",
15
+ "require": "./dist/export/worker.cjs"
16
+ },
17
+ "./db": {
18
+ "types": "./dist/export/db.d.ts",
19
+ "import": "./dist/export/db.mjs",
20
+ "require": "./dist/export/db.cjs"
16
21
  },
17
22
  "./package.json": "./package.json"
18
23
  },
19
- "main": "./dist/src.cjs",
20
- "types": "./dist/src.d.ts",
21
24
  "files": [
22
25
  "./dist"
23
26
  ],
24
- "bin": {
25
- "notification-wrangler": "./scripts/generate-wrangler.ts"
26
- },
27
27
  "scripts": {
28
28
  "postinstall": "bun cf:typegen",
29
- "wrangler:generate": "bun ./scripts/generate-wrangler.ts",
30
- "cf:typegen": "bun wrangler:generate && wrangler types --include-runtime false --env-interface NotificationEnv",
31
- "dev": "bun cf:typegen && wrangler dev --port 9234",
29
+ "wrangler:generate": "bunx develit wrangler:generate",
30
+ "cf:typegen": "wrangler types --include-runtime false --env-interface NotificationEnv",
31
+ "dev": "bun wrangler:generate && wrangler dev --port 9234",
32
32
  "lint": "biome check",
33
33
  "lint:fix": "biome check --fix",
34
34
  "typecheck": "tsc",
@@ -1,13 +0,0 @@
1
- import fs from 'fs'
2
- import path from 'path'
3
- import wrangler from '../wrangler'
4
-
5
- const outputPath = path.resolve(__dirname, '../wrangler.jsonc')
6
-
7
- const header = `// ⚠️ AUTO-GENERATED FILE. DO NOT EDIT.
8
- // To make changes, update wrangler.ts and re-run the generation script.
9
- \n`
10
- const body = JSON.stringify(wrangler, null, 2)
11
-
12
- fs.writeFileSync(outputPath, header + body)
13
- console.log(`✅ Generated wrangler.jsonc at ${outputPath}`)
File without changes
File without changes
File without changes
File without changes
File without changes