@allbluecn/database 0.4.16 → 0.4.18
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.
- package/dist/lib/share-utils.d.ts +2 -0
- package/dist/lib/share-utils.js +17 -0
- package/generated/browser.ts +10 -0
- package/generated/client.ts +10 -0
- package/generated/internal/class.ts +24 -4
- package/generated/internal/prismaNamespace.ts +188 -3
- package/generated/internal/prismaNamespaceBrowser.ts +37 -2
- package/generated/models/Iteration.ts +1878 -0
- package/generated/models/IterationAutoSchedule.ts +1485 -0
- package/generated/models/Project.ts +326 -0
- package/generated/models/Story.ts +393 -3
- package/generated/models/User.ts +618 -0
- package/generated/models.ts +2 -0
- package/generated-sqlite/browser.ts +15 -0
- package/generated-sqlite/client.ts +15 -0
- package/generated-sqlite/internal/class.ts +34 -4
- package/generated-sqlite/internal/prismaNamespace.ts +288 -2
- package/generated-sqlite/internal/prismaNamespaceBrowser.ts +62 -1
- package/generated-sqlite/models/Iteration.ts +1874 -0
- package/generated-sqlite/models/IterationAutoSchedule.ts +1483 -0
- package/generated-sqlite/models/Project.ts +484 -0
- package/generated-sqlite/models/Story.ts +3263 -0
- package/generated-sqlite/models/User.ts +2103 -107
- package/generated-sqlite/models.ts +3 -0
- package/index.ts +2 -2
- package/migrations/20260831203925_story_attachment_file_hash/migration.sql +2 -0
- package/migrations/20260901020000_story_attachment_file_hash/migration.sql +2 -0
- package/migrations/20260901134601_iterations/migration.sql +52 -0
- package/migrations/20260902000000_story_identifier_per_project/migration.sql +37 -0
- package/migrations/20260902000100_story_identifier_counter_init/migration.sql +11 -0
- package/package.json +14 -5
- package/schema.prisma +47 -4
- package/schema.sqlite.prisma +89 -4
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import bcrypt from "bcryptjs";
|
|
2
|
+
async function verifySharePassword(input, stored) {
|
|
3
|
+
if (input === stored) return true;
|
|
4
|
+
if (stored.startsWith("$2")) {
|
|
5
|
+
return bcrypt.compare(input, stored);
|
|
6
|
+
}
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
async function verifyPrdOwner(prdId, userId) {
|
|
10
|
+
const { prisma } = await import("@allbluecn/database");
|
|
11
|
+
const prd = await prisma.pRD.findUnique({ where: { id: prdId }, select: { userId: true } });
|
|
12
|
+
return prd?.userId === userId;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
verifyPrdOwner,
|
|
16
|
+
verifySharePassword
|
|
17
|
+
};
|
package/generated/browser.ts
CHANGED
|
@@ -522,3 +522,13 @@ export type Notification = Prisma.NotificationModel
|
|
|
522
522
|
*
|
|
523
523
|
*/
|
|
524
524
|
export type NotificationPreference = Prisma.NotificationPreferenceModel
|
|
525
|
+
/**
|
|
526
|
+
* Model Iteration
|
|
527
|
+
*
|
|
528
|
+
*/
|
|
529
|
+
export type Iteration = Prisma.IterationModel
|
|
530
|
+
/**
|
|
531
|
+
* Model IterationAutoSchedule
|
|
532
|
+
*
|
|
533
|
+
*/
|
|
534
|
+
export type IterationAutoSchedule = Prisma.IterationAutoScheduleModel
|
package/generated/client.ts
CHANGED
|
@@ -546,3 +546,13 @@ export type Notification = Prisma.NotificationModel
|
|
|
546
546
|
*
|
|
547
547
|
*/
|
|
548
548
|
export type NotificationPreference = Prisma.NotificationPreferenceModel
|
|
549
|
+
/**
|
|
550
|
+
* Model Iteration
|
|
551
|
+
*
|
|
552
|
+
*/
|
|
553
|
+
export type Iteration = Prisma.IterationModel
|
|
554
|
+
/**
|
|
555
|
+
* Model IterationAutoSchedule
|
|
556
|
+
*
|
|
557
|
+
*/
|
|
558
|
+
export type IterationAutoSchedule = Prisma.IterationAutoScheduleModel
|