@tiddlywiki/mws 0.1.13 → 0.2.0
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/README.md +41 -20
- package/dist/metafile-esm.json +1 -1
- package/dist/mws.js +40249 -20249
- package/dist/mws.js.map +1 -1
- package/mws.run.mjs +28 -8
- package/package.json +20 -33
- package/plugins/client/plugin.info +1 -1
- package/plugins/client/src/multiwikiclientadaptor.ts +11 -39
- package/plugins/client/src/mws.d.ts +2 -1
- package/plugins/client/src/new-multiwikiclientadaptor.ts +634 -0
- package/plugins/client/src/types.d.ts +2531 -1036
- package/plugins/client/tiddlers/managetiddleraction.js +0 -5
- package/plugins/client/tiddlers/syncer/multiwikiclientadaptor.js +1 -1
- package/plugins/client/tiddlers/syncer/new-multiwikiclientadaptor.js +432 -0
- package/plugins/client/tiddlers/syncer/syncer.js +123 -241
- package/plugins/client/tsconfig.json +5 -1
- package/prisma/browser.ts +2 -0
- package/prisma/client/browser.ts +84 -0
- package/prisma/client/client.ts +108 -0
- package/prisma/client/commonInputTypes.ts +598 -0
- package/prisma/client/enums.ts +42 -0
- package/prisma/client/internal/class.ts +326 -0
- package/prisma/client/internal/prismaNamespace.ts +1870 -0
- package/prisma/client/internal/prismaNamespaceBrowser.ts +259 -0
- package/prisma/client/models/Bag.ts +1701 -0
- package/prisma/client/models/BagPermission.ts +1284 -0
- package/prisma/client/models/Recipe.ts +1722 -0
- package/prisma/client/models/RecipeBag.ts +1518 -0
- package/prisma/client/models/RecipePermission.ts +1284 -0
- package/prisma/client/models/Roles.ts +1316 -0
- package/prisma/client/models/Sessions.ts +1344 -0
- package/prisma/client/models/Settings.ts +1093 -0
- package/prisma/client/models/Template.ts +1477 -0
- package/prisma/client/models/TemplatePermission.ts +1284 -0
- package/prisma/client/models/Tiddler.ts +1434 -0
- package/prisma/client/models/TiddlerEvent.ts +1360 -0
- package/prisma/client/models/Users.ts +1579 -0
- package/prisma/client/models.ts +24 -0
- package/prisma/client/pjtg.ts +183 -0
- package/prisma/index.ts +74 -0
- package/prisma/migrations/20260708160259_init/migration.sql +172 -0
- package/prisma/migrations-v1/migration_lock.toml +3 -0
- package/prisma/package.json +12 -0
- package/prisma/schema.prisma +147 -89
- package/prisma/types.ts +9 -0
- package/public/.default.html +1 -0
- package/public/admin-vanilla/fish.svg +399 -0
- package/public/admin-vanilla/fish2.svg +389 -0
- package/public/admin-vanilla/main-64WYHWYI.js +1791 -0
- package/public/admin-vanilla/main-64WYHWYI.js.map +7 -0
- package/public/admin-vanilla/main-LYDE4NDJ.css +1 -0
- package/public/admin-vanilla/normalize.css +349 -0
- package/public/admin-vanilla/polyfill-ADOI2A4V.js +2 -0
- package/public/admin-vanilla/polyfill-ADOI2A4V.js.map +7 -0
- package/public/{react-admin → admin-vanilla}/site.webmanifest +1 -1
- package/public/admin-vanilla.html +62 -0
- package/public/admin-vanilla.json +1 -0
- package/public/{react-admin → stats}/stats.html +5 -2
- package/public/{react-admin → stats}/stats.js +2 -1
- package/scripts/build-docs.sh +30 -0
- package/scripts/helpers.mjs +107 -0
- package/scripts/json.js +8 -0
- package/scripts/scripts.mjs +114 -0
- package/prisma/client/client.d.ts +0 -1
- package/prisma/client/client.js +0 -3
- package/prisma/client/default.d.ts +0 -1
- package/prisma/client/default.js +0 -3
- package/prisma/client/edge.d.ts +0 -1
- package/prisma/client/edge.js +0 -297
- package/prisma/client/index-browser.js +0 -275
- package/prisma/client/index.d.ts +0 -17770
- package/prisma/client/index.js +0 -324
- package/prisma/client/package.json +0 -173
- package/prisma/client/query_engine_bg.js +0 -811
- package/prisma/client/query_engine_bg.wasm +0 -0
- package/prisma/client/runtime/edge-esm.js +0 -10000
- package/prisma/client/runtime/edge.js +0 -10036
- package/prisma/client/runtime/index-browser.d.ts +0 -370
- package/prisma/client/runtime/index-browser.js +0 -2300
- package/prisma/client/runtime/library.d.ts +0 -3681
- package/prisma/client/runtime/library.js +0 -10604
- package/prisma/client/runtime/react-native.js +0 -10629
- package/prisma/client/runtime/wasm-compiler-edge.js +0 -11238
- package/prisma/client/runtime/wasm-engine-edge.js +0 -7801
- package/prisma/client/schema.prisma +0 -156
- package/prisma/client/wasm-edge-light-loader.mjs +0 -4
- package/prisma/client/wasm-worker-loader.mjs +0 -4
- package/prisma/client/wasm.d.ts +0 -1
- package/prisma/client/wasm.js +0 -304
- package/prisma/global.ts +0 -53
- package/public/react-admin/chunk-YALWN5OT.js +0 -2
- package/public/react-admin/esm-L4WLVWJN.js +0 -3
- package/public/react-admin/esm-L4WLVWJN.js.map +0 -7
- package/public/react-admin/esm-QMNGI3LF.js +0 -3
- package/public/react-admin/esm-QMNGI3LF.js.map +0 -7
- package/public/react-admin/index.html +0 -36
- package/public/react-admin/main.js +0 -268
- package/public/react-admin/main.js.map +0 -7
- package/public/react-admin/stats.json +0 -1
- package/scripts.mjs +0 -142
- /package/prisma/{migrations → migrations-v1}/20250606001949_init/migration.sql +0 -0
- /package/prisma/{migrations → migrations-v1}/20250613000526_remove_group/migration.sql +0 -0
- /package/prisma/{migrations → migrations-v1}/20250620014502_settings/migration.sql +0 -0
- /package/prisma/{migrations → migrations-v1}/20250707205229_recipes/migration.sql +0 -0
- /package/public/{react-admin → admin-vanilla}/android-chrome-192x192.png +0 -0
- /package/public/{react-admin → admin-vanilla}/android-chrome-512x512.png +0 -0
- /package/public/{react-admin → admin-vanilla}/apple-touch-icon.png +0 -0
- /package/public/{react-admin → admin-vanilla}/favicon-16x16.png +0 -0
- /package/public/{react-admin → admin-vanilla}/favicon-32x32.png +0 -0
- /package/public/{react-admin → admin-vanilla}/favicon.ico +0 -0
- /package/public/{react-admin → admin-vanilla}/favicon.png +0 -0
- /package/public/{react-admin/chunk-YALWN5OT.js.map → admin-vanilla/main-LYDE4NDJ.css.map} +0 -0
- /package/public/{react-admin → admin-vanilla}/missing-favicon.png +0 -0
- /package/public/{react-admin → admin-vanilla}/motovun-jack.jpg +0 -0
- /package/public/{react-admin → admin-vanilla}/mws-icon.png +0 -0
- /package/public/{react-admin → admin-vanilla}/vite.svg +0 -0
- /package/public/{react-admin → stats}/stats.css +0 -0
- /package/public/{react-admin → stats}/stats.svg +0 -0
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
datasource db {
|
|
2
|
-
provider = "sqlite"
|
|
3
|
-
url = env("DATABASE_URL")
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
generator client {
|
|
7
|
-
// prisma 7 will remove the need for native node files, everything will be js and wasm
|
|
8
|
-
provider = "prisma-client-js"
|
|
9
|
-
previewFeatures = ["relationJoins", "driverAdapters"]
|
|
10
|
-
binaryTargets = []
|
|
11
|
-
output = "client"
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
generator json {
|
|
15
|
-
provider = "prisma-json-types-generator"
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
enum Permission {
|
|
19
|
-
READ
|
|
20
|
-
WRITE
|
|
21
|
-
ADMIN
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// The `packages/mws/src/managers/` folder is the primary place this schema is used.
|
|
25
|
-
// SQLite initialization is done in `packages/mws/src/db/sqlite-adapter.ts`.
|
|
26
|
-
|
|
27
|
-
model Settings {
|
|
28
|
-
key String @id
|
|
29
|
-
value String
|
|
30
|
-
|
|
31
|
-
@@map("settings")
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
model Recipes {
|
|
35
|
-
recipe_id String @id @default(uuid(7))
|
|
36
|
-
recipe_name String @unique
|
|
37
|
-
description String
|
|
38
|
-
owner_id String?
|
|
39
|
-
/// [Recipes_plugin_names]
|
|
40
|
-
plugin_names Json
|
|
41
|
-
skip_required_plugins Boolean @default(false)
|
|
42
|
-
skip_core Boolean @default(false)
|
|
43
|
-
preload_store Boolean @default(false)
|
|
44
|
-
custom_wiki String?
|
|
45
|
-
recipe_bags Recipe_bags[]
|
|
46
|
-
acl RecipeAcl[]
|
|
47
|
-
|
|
48
|
-
@@map("recipes")
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
model RecipeAcl {
|
|
52
|
-
acl_id Int @id @default(autoincrement())
|
|
53
|
-
role_id String
|
|
54
|
-
permission Permission
|
|
55
|
-
recipe Recipes @relation(fields: [recipe_id], references: [recipe_id], onDelete: Cascade)
|
|
56
|
-
recipe_id String
|
|
57
|
-
|
|
58
|
-
@@map("recipe_acl")
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
model Recipe_bags {
|
|
62
|
-
recipe_id String
|
|
63
|
-
bag_id String
|
|
64
|
-
position Int
|
|
65
|
-
with_acl Boolean @default(false)
|
|
66
|
-
load_modules Boolean @default(false)
|
|
67
|
-
|
|
68
|
-
bag Bags @relation(fields: [bag_id], references: [bag_id], onDelete: Cascade)
|
|
69
|
-
recipe Recipes @relation(fields: [recipe_id], references: [recipe_id], onDelete: Cascade)
|
|
70
|
-
|
|
71
|
-
@@unique([recipe_id, bag_id])
|
|
72
|
-
@@index([recipe_id])
|
|
73
|
-
@@map("recipe_bags")
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
model Bags {
|
|
77
|
-
bag_id String @id @default(uuid(7))
|
|
78
|
-
bag_name String @unique
|
|
79
|
-
description String
|
|
80
|
-
owner_id String?
|
|
81
|
-
recipe_bags Recipe_bags[]
|
|
82
|
-
tiddlers Tiddlers[]
|
|
83
|
-
acl BagAcl[]
|
|
84
|
-
|
|
85
|
-
@@map("bags")
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
model BagAcl {
|
|
89
|
-
acl_id Int @id @default(autoincrement())
|
|
90
|
-
bag_id String
|
|
91
|
-
bag Bags @relation(fields: [bag_id], references: [bag_id], onDelete: Cascade)
|
|
92
|
-
role_id String
|
|
93
|
-
permission Permission
|
|
94
|
-
|
|
95
|
-
@@map("bag_acl")
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
model Tiddlers {
|
|
99
|
-
revision_id String @id @default(uuid(7))
|
|
100
|
-
bag_id String
|
|
101
|
-
title String
|
|
102
|
-
is_deleted Boolean
|
|
103
|
-
attachment_hash String?
|
|
104
|
-
fields Fields[]
|
|
105
|
-
// Deleting a referenced record (bag) will trigger the deletion of referencing record (tiddler).
|
|
106
|
-
bag Bags @relation(fields: [bag_id], references: [bag_id], onDelete: Cascade)
|
|
107
|
-
|
|
108
|
-
@@unique([bag_id, title])
|
|
109
|
-
@@index([bag_id])
|
|
110
|
-
@@map("tiddlers")
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
model Fields {
|
|
114
|
-
revision_id String
|
|
115
|
-
field_name String
|
|
116
|
-
field_value String
|
|
117
|
-
// Deleting a referenced record (tiddler) will trigger the deletion of referencing record (field).
|
|
118
|
-
tiddler Tiddlers @relation(fields: [revision_id], references: [revision_id], onDelete: Cascade)
|
|
119
|
-
|
|
120
|
-
@@id([revision_id, field_name])
|
|
121
|
-
@@index([revision_id])
|
|
122
|
-
@@map("fields")
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
model Roles {
|
|
126
|
-
role_id String @id @default(uuid(7))
|
|
127
|
-
role_name String @unique()
|
|
128
|
-
description String?
|
|
129
|
-
users Users[]
|
|
130
|
-
|
|
131
|
-
@@map("roles")
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
model Users {
|
|
135
|
-
user_id String @id @default(uuid(7))
|
|
136
|
-
username String @unique
|
|
137
|
-
email String @unique
|
|
138
|
-
password String
|
|
139
|
-
created_at DateTime @default(now())
|
|
140
|
-
last_login DateTime?
|
|
141
|
-
sessions Sessions[]
|
|
142
|
-
roles Roles[]
|
|
143
|
-
|
|
144
|
-
@@map("users")
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
model Sessions {
|
|
148
|
-
session_id String @id
|
|
149
|
-
created_at DateTime @default(now())
|
|
150
|
-
last_accessed DateTime
|
|
151
|
-
session_key String?
|
|
152
|
-
user_id String
|
|
153
|
-
user Users @relation(fields: [user_id], references: [user_id], onDelete: NoAction, onUpdate: NoAction)
|
|
154
|
-
|
|
155
|
-
@@map("sessions")
|
|
156
|
-
}
|
package/prisma/client/wasm.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./default"
|
package/prisma/client/wasm.js
DELETED
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
/* !!! This is code generated by Prisma. Do not edit directly. !!!
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
|
|
6
|
-
const {
|
|
7
|
-
PrismaClientKnownRequestError,
|
|
8
|
-
PrismaClientUnknownRequestError,
|
|
9
|
-
PrismaClientRustPanicError,
|
|
10
|
-
PrismaClientInitializationError,
|
|
11
|
-
PrismaClientValidationError,
|
|
12
|
-
getPrismaClient,
|
|
13
|
-
sqltag,
|
|
14
|
-
empty,
|
|
15
|
-
join,
|
|
16
|
-
raw,
|
|
17
|
-
skip,
|
|
18
|
-
Decimal,
|
|
19
|
-
Debug,
|
|
20
|
-
objectEnumValues,
|
|
21
|
-
makeStrictEnum,
|
|
22
|
-
Extensions,
|
|
23
|
-
warnOnce,
|
|
24
|
-
defineDmmfProperty,
|
|
25
|
-
Public,
|
|
26
|
-
getRuntime,
|
|
27
|
-
createParam,
|
|
28
|
-
} = require("./runtime/wasm-engine-edge.js");
|
|
29
|
-
|
|
30
|
-
const Prisma = {};
|
|
31
|
-
|
|
32
|
-
exports.Prisma = Prisma;
|
|
33
|
-
exports.$Enums = {};
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Prisma Client JS version: 6.10.1
|
|
37
|
-
* Query Engine version: 9b628578b3b7cae625e8c927178f15a170e74a9c
|
|
38
|
-
*/
|
|
39
|
-
Prisma.prismaVersion = {
|
|
40
|
-
client: "6.10.1",
|
|
41
|
-
engine: "9b628578b3b7cae625e8c927178f15a170e74a9c",
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError;
|
|
45
|
-
Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError;
|
|
46
|
-
Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError;
|
|
47
|
-
Prisma.PrismaClientInitializationError = PrismaClientInitializationError;
|
|
48
|
-
Prisma.PrismaClientValidationError = PrismaClientValidationError;
|
|
49
|
-
Prisma.Decimal = Decimal;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Re-export of sql-template-tag
|
|
53
|
-
*/
|
|
54
|
-
Prisma.sql = sqltag;
|
|
55
|
-
Prisma.empty = empty;
|
|
56
|
-
Prisma.join = join;
|
|
57
|
-
Prisma.raw = raw;
|
|
58
|
-
Prisma.validator = Public.validator;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Extensions
|
|
62
|
-
*/
|
|
63
|
-
Prisma.getExtensionContext = Extensions.getExtensionContext;
|
|
64
|
-
Prisma.defineExtension = Extensions.defineExtension;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Shorthand utilities for JSON filtering
|
|
68
|
-
*/
|
|
69
|
-
Prisma.DbNull = objectEnumValues.instances.DbNull;
|
|
70
|
-
Prisma.JsonNull = objectEnumValues.instances.JsonNull;
|
|
71
|
-
Prisma.AnyNull = objectEnumValues.instances.AnyNull;
|
|
72
|
-
|
|
73
|
-
Prisma.NullTypes = {
|
|
74
|
-
DbNull: objectEnumValues.classes.DbNull,
|
|
75
|
-
JsonNull: objectEnumValues.classes.JsonNull,
|
|
76
|
-
AnyNull: objectEnumValues.classes.AnyNull,
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Enums
|
|
81
|
-
*/
|
|
82
|
-
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
|
|
83
|
-
Serializable: "Serializable",
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
exports.Prisma.SettingsScalarFieldEnum = {
|
|
87
|
-
key: "key",
|
|
88
|
-
value: "value",
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
exports.Prisma.RecipesScalarFieldEnum = {
|
|
92
|
-
recipe_id: "recipe_id",
|
|
93
|
-
recipe_name: "recipe_name",
|
|
94
|
-
description: "description",
|
|
95
|
-
owner_id: "owner_id",
|
|
96
|
-
plugin_names: "plugin_names",
|
|
97
|
-
skip_required_plugins: "skip_required_plugins",
|
|
98
|
-
skip_core: "skip_core",
|
|
99
|
-
preload_store: "preload_store",
|
|
100
|
-
custom_wiki: "custom_wiki",
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
exports.Prisma.RecipeAclScalarFieldEnum = {
|
|
104
|
-
acl_id: "acl_id",
|
|
105
|
-
role_id: "role_id",
|
|
106
|
-
permission: "permission",
|
|
107
|
-
recipe_id: "recipe_id",
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
exports.Prisma.Recipe_bagsScalarFieldEnum = {
|
|
111
|
-
recipe_id: "recipe_id",
|
|
112
|
-
bag_id: "bag_id",
|
|
113
|
-
position: "position",
|
|
114
|
-
with_acl: "with_acl",
|
|
115
|
-
load_modules: "load_modules",
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
exports.Prisma.BagsScalarFieldEnum = {
|
|
119
|
-
bag_id: "bag_id",
|
|
120
|
-
bag_name: "bag_name",
|
|
121
|
-
description: "description",
|
|
122
|
-
owner_id: "owner_id",
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
exports.Prisma.BagAclScalarFieldEnum = {
|
|
126
|
-
acl_id: "acl_id",
|
|
127
|
-
bag_id: "bag_id",
|
|
128
|
-
role_id: "role_id",
|
|
129
|
-
permission: "permission",
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
exports.Prisma.TiddlersScalarFieldEnum = {
|
|
133
|
-
revision_id: "revision_id",
|
|
134
|
-
bag_id: "bag_id",
|
|
135
|
-
title: "title",
|
|
136
|
-
is_deleted: "is_deleted",
|
|
137
|
-
attachment_hash: "attachment_hash",
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
exports.Prisma.FieldsScalarFieldEnum = {
|
|
141
|
-
revision_id: "revision_id",
|
|
142
|
-
field_name: "field_name",
|
|
143
|
-
field_value: "field_value",
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
exports.Prisma.RolesScalarFieldEnum = {
|
|
147
|
-
role_id: "role_id",
|
|
148
|
-
role_name: "role_name",
|
|
149
|
-
description: "description",
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
exports.Prisma.UsersScalarFieldEnum = {
|
|
153
|
-
user_id: "user_id",
|
|
154
|
-
username: "username",
|
|
155
|
-
email: "email",
|
|
156
|
-
password: "password",
|
|
157
|
-
created_at: "created_at",
|
|
158
|
-
last_login: "last_login",
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
exports.Prisma.SessionsScalarFieldEnum = {
|
|
162
|
-
session_id: "session_id",
|
|
163
|
-
created_at: "created_at",
|
|
164
|
-
last_accessed: "last_accessed",
|
|
165
|
-
session_key: "session_key",
|
|
166
|
-
user_id: "user_id",
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
exports.Prisma.SortOrder = {
|
|
170
|
-
asc: "asc",
|
|
171
|
-
desc: "desc",
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
exports.Prisma.JsonNullValueInput = {
|
|
175
|
-
JsonNull: Prisma.JsonNull,
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
exports.Prisma.JsonNullValueFilter = {
|
|
179
|
-
DbNull: Prisma.DbNull,
|
|
180
|
-
JsonNull: Prisma.JsonNull,
|
|
181
|
-
AnyNull: Prisma.AnyNull,
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
exports.Prisma.QueryMode = {
|
|
185
|
-
default: "default",
|
|
186
|
-
insensitive: "insensitive",
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
exports.Prisma.NullsOrder = {
|
|
190
|
-
first: "first",
|
|
191
|
-
last: "last",
|
|
192
|
-
};
|
|
193
|
-
exports.Permission = exports.$Enums.Permission = {
|
|
194
|
-
READ: "READ",
|
|
195
|
-
WRITE: "WRITE",
|
|
196
|
-
ADMIN: "ADMIN",
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
exports.Prisma.ModelName = {
|
|
200
|
-
Settings: "Settings",
|
|
201
|
-
Recipes: "Recipes",
|
|
202
|
-
RecipeAcl: "RecipeAcl",
|
|
203
|
-
Recipe_bags: "Recipe_bags",
|
|
204
|
-
Bags: "Bags",
|
|
205
|
-
BagAcl: "BagAcl",
|
|
206
|
-
Tiddlers: "Tiddlers",
|
|
207
|
-
Fields: "Fields",
|
|
208
|
-
Roles: "Roles",
|
|
209
|
-
Users: "Users",
|
|
210
|
-
Sessions: "Sessions",
|
|
211
|
-
};
|
|
212
|
-
/**
|
|
213
|
-
* Create the Client
|
|
214
|
-
*/
|
|
215
|
-
const config = {
|
|
216
|
-
generator: {
|
|
217
|
-
name: "client",
|
|
218
|
-
provider: {
|
|
219
|
-
fromEnvVar: null,
|
|
220
|
-
value: "prisma-client-js",
|
|
221
|
-
},
|
|
222
|
-
output: {
|
|
223
|
-
value: "/home/arlen2/GitHub/MWS-main/prisma/client",
|
|
224
|
-
fromEnvVar: null,
|
|
225
|
-
},
|
|
226
|
-
config: {
|
|
227
|
-
engineType: "library",
|
|
228
|
-
},
|
|
229
|
-
binaryTargets: [
|
|
230
|
-
{
|
|
231
|
-
fromEnvVar: null,
|
|
232
|
-
value: "debian-openssl-3.0.x",
|
|
233
|
-
native: true,
|
|
234
|
-
},
|
|
235
|
-
],
|
|
236
|
-
previewFeatures: ["driverAdapters", "relationJoins"],
|
|
237
|
-
sourceFilePath: "/home/arlen2/GitHub/MWS-main/prisma/schema.prisma",
|
|
238
|
-
isCustomOutput: true,
|
|
239
|
-
},
|
|
240
|
-
relativeEnvPaths: {
|
|
241
|
-
rootEnvPath: null,
|
|
242
|
-
},
|
|
243
|
-
relativePath: "..",
|
|
244
|
-
clientVersion: "6.10.1",
|
|
245
|
-
engineVersion: "9b628578b3b7cae625e8c927178f15a170e74a9c",
|
|
246
|
-
datasourceNames: ["db"],
|
|
247
|
-
activeProvider: "sqlite",
|
|
248
|
-
postinstall: false,
|
|
249
|
-
inlineDatasources: {
|
|
250
|
-
db: {
|
|
251
|
-
url: {
|
|
252
|
-
fromEnvVar: "DATABASE_URL",
|
|
253
|
-
value: null,
|
|
254
|
-
},
|
|
255
|
-
},
|
|
256
|
-
},
|
|
257
|
-
inlineSchema:
|
|
258
|
-
'datasource db {\n provider = "sqlite"\n url = env("DATABASE_URL")\n}\n\ngenerator client {\n // prisma 7 will remove the need for native node files, everything will be js and wasm\n provider = "prisma-client-js"\n previewFeatures = ["relationJoins", "driverAdapters"]\n binaryTargets = []\n output = "client"\n}\n\ngenerator json {\n provider = "prisma-json-types-generator"\n}\n\nenum Permission {\n READ\n WRITE\n ADMIN\n}\n\n// The `packages/mws/src/managers/` folder is the primary place this schema is used. \n// SQLite initialization is done in `packages/mws/src/db/sqlite-adapter.ts`.\n\nmodel Settings {\n key String @id\n value String\n\n @@map("settings")\n}\n\nmodel Recipes {\n recipe_id String @id @default(uuid(7))\n recipe_name String @unique\n description String\n owner_id String?\n /// [Recipes_plugin_names]\n plugin_names Json\n skip_required_plugins Boolean @default(false)\n skip_core Boolean @default(false)\n preload_store Boolean @default(false)\n custom_wiki String?\n recipe_bags Recipe_bags[]\n acl RecipeAcl[]\n\n @@map("recipes")\n}\n\nmodel RecipeAcl {\n acl_id Int @id @default(autoincrement())\n role_id String\n permission Permission\n recipe Recipes @relation(fields: [recipe_id], references: [recipe_id], onDelete: Cascade)\n recipe_id String\n\n @@map("recipe_acl")\n}\n\nmodel Recipe_bags {\n recipe_id String\n bag_id String\n position Int\n with_acl Boolean @default(false)\n load_modules Boolean @default(false)\n\n bag Bags @relation(fields: [bag_id], references: [bag_id], onDelete: Cascade)\n recipe Recipes @relation(fields: [recipe_id], references: [recipe_id], onDelete: Cascade)\n\n @@unique([recipe_id, bag_id])\n @@index([recipe_id])\n @@map("recipe_bags")\n}\n\nmodel Bags {\n bag_id String @id @default(uuid(7))\n bag_name String @unique\n description String\n owner_id String?\n recipe_bags Recipe_bags[]\n tiddlers Tiddlers[]\n acl BagAcl[]\n\n @@map("bags")\n}\n\nmodel BagAcl {\n acl_id Int @id @default(autoincrement())\n bag_id String\n bag Bags @relation(fields: [bag_id], references: [bag_id], onDelete: Cascade)\n role_id String\n permission Permission\n\n @@map("bag_acl")\n}\n\nmodel Tiddlers {\n revision_id String @id @default(uuid(7))\n bag_id String\n title String\n is_deleted Boolean\n attachment_hash String?\n fields Fields[]\n // Deleting a referenced record (bag) will trigger the deletion of referencing record (tiddler).\n bag Bags @relation(fields: [bag_id], references: [bag_id], onDelete: Cascade)\n\n @@unique([bag_id, title])\n @@index([bag_id])\n @@map("tiddlers")\n}\n\nmodel Fields {\n revision_id String\n field_name String\n field_value String\n // Deleting a referenced record (tiddler) will trigger the deletion of referencing record (field).\n tiddler Tiddlers @relation(fields: [revision_id], references: [revision_id], onDelete: Cascade)\n\n @@id([revision_id, field_name])\n @@index([revision_id])\n @@map("fields")\n}\n\nmodel Roles {\n role_id String @id @default(uuid(7))\n role_name String @unique()\n description String?\n users Users[]\n\n @@map("roles")\n}\n\nmodel Users {\n user_id String @id @default(uuid(7))\n username String @unique\n email String @unique\n password String\n created_at DateTime @default(now())\n last_login DateTime?\n sessions Sessions[]\n roles Roles[]\n\n @@map("users")\n}\n\nmodel Sessions {\n session_id String @id\n created_at DateTime @default(now())\n last_accessed DateTime\n session_key String?\n user_id String\n user Users @relation(fields: [user_id], references: [user_id], onDelete: NoAction, onUpdate: NoAction)\n\n @@map("sessions")\n}\n',
|
|
259
|
-
inlineSchemaHash:
|
|
260
|
-
"4bb965dd8e129acd3ade7565ddec7d8baac655f0946e22165f3b5375cf67c75f",
|
|
261
|
-
copyEngine: true,
|
|
262
|
-
};
|
|
263
|
-
config.dirname = "/";
|
|
264
|
-
|
|
265
|
-
config.runtimeDataModel = JSON.parse(
|
|
266
|
-
'{"models":{"Settings":{"fields":[{"name":"key","kind":"scalar","type":"String"},{"name":"value","kind":"scalar","type":"String"}],"dbName":"settings"},"Recipes":{"fields":[{"name":"recipe_id","kind":"scalar","type":"String"},{"name":"recipe_name","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"owner_id","kind":"scalar","type":"String"},{"name":"plugin_names","kind":"scalar","type":"Json"},{"name":"skip_required_plugins","kind":"scalar","type":"Boolean"},{"name":"skip_core","kind":"scalar","type":"Boolean"},{"name":"preload_store","kind":"scalar","type":"Boolean"},{"name":"custom_wiki","kind":"scalar","type":"String"},{"name":"recipe_bags","kind":"object","type":"Recipe_bags","relationName":"Recipe_bagsToRecipes"},{"name":"acl","kind":"object","type":"RecipeAcl","relationName":"RecipeAclToRecipes"}],"dbName":"recipes"},"RecipeAcl":{"fields":[{"name":"acl_id","kind":"scalar","type":"Int"},{"name":"role_id","kind":"scalar","type":"String"},{"name":"permission","kind":"enum","type":"Permission"},{"name":"recipe","kind":"object","type":"Recipes","relationName":"RecipeAclToRecipes"},{"name":"recipe_id","kind":"scalar","type":"String"}],"dbName":"recipe_acl"},"Recipe_bags":{"fields":[{"name":"recipe_id","kind":"scalar","type":"String"},{"name":"bag_id","kind":"scalar","type":"String"},{"name":"position","kind":"scalar","type":"Int"},{"name":"with_acl","kind":"scalar","type":"Boolean"},{"name":"load_modules","kind":"scalar","type":"Boolean"},{"name":"bag","kind":"object","type":"Bags","relationName":"BagsToRecipe_bags"},{"name":"recipe","kind":"object","type":"Recipes","relationName":"Recipe_bagsToRecipes"}],"dbName":"recipe_bags"},"Bags":{"fields":[{"name":"bag_id","kind":"scalar","type":"String"},{"name":"bag_name","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"owner_id","kind":"scalar","type":"String"},{"name":"recipe_bags","kind":"object","type":"Recipe_bags","relationName":"BagsToRecipe_bags"},{"name":"tiddlers","kind":"object","type":"Tiddlers","relationName":"BagsToTiddlers"},{"name":"acl","kind":"object","type":"BagAcl","relationName":"BagAclToBags"}],"dbName":"bags"},"BagAcl":{"fields":[{"name":"acl_id","kind":"scalar","type":"Int"},{"name":"bag_id","kind":"scalar","type":"String"},{"name":"bag","kind":"object","type":"Bags","relationName":"BagAclToBags"},{"name":"role_id","kind":"scalar","type":"String"},{"name":"permission","kind":"enum","type":"Permission"}],"dbName":"bag_acl"},"Tiddlers":{"fields":[{"name":"revision_id","kind":"scalar","type":"String"},{"name":"bag_id","kind":"scalar","type":"String"},{"name":"title","kind":"scalar","type":"String"},{"name":"is_deleted","kind":"scalar","type":"Boolean"},{"name":"attachment_hash","kind":"scalar","type":"String"},{"name":"fields","kind":"object","type":"Fields","relationName":"FieldsToTiddlers"},{"name":"bag","kind":"object","type":"Bags","relationName":"BagsToTiddlers"}],"dbName":"tiddlers"},"Fields":{"fields":[{"name":"revision_id","kind":"scalar","type":"String"},{"name":"field_name","kind":"scalar","type":"String"},{"name":"field_value","kind":"scalar","type":"String"},{"name":"tiddler","kind":"object","type":"Tiddlers","relationName":"FieldsToTiddlers"}],"dbName":"fields"},"Roles":{"fields":[{"name":"role_id","kind":"scalar","type":"String"},{"name":"role_name","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"users","kind":"object","type":"Users","relationName":"RolesToUsers"}],"dbName":"roles"},"Users":{"fields":[{"name":"user_id","kind":"scalar","type":"String"},{"name":"username","kind":"scalar","type":"String"},{"name":"email","kind":"scalar","type":"String"},{"name":"password","kind":"scalar","type":"String"},{"name":"created_at","kind":"scalar","type":"DateTime"},{"name":"last_login","kind":"scalar","type":"DateTime"},{"name":"sessions","kind":"object","type":"Sessions","relationName":"SessionsToUsers"},{"name":"roles","kind":"object","type":"Roles","relationName":"RolesToUsers"}],"dbName":"users"},"Sessions":{"fields":[{"name":"session_id","kind":"scalar","type":"String"},{"name":"created_at","kind":"scalar","type":"DateTime"},{"name":"last_accessed","kind":"scalar","type":"DateTime"},{"name":"session_key","kind":"scalar","type":"String"},{"name":"user_id","kind":"scalar","type":"String"},{"name":"user","kind":"object","type":"Users","relationName":"SessionsToUsers"}],"dbName":"sessions"}},"enums":{},"types":{}}',
|
|
267
|
-
);
|
|
268
|
-
defineDmmfProperty(exports.Prisma, config.runtimeDataModel);
|
|
269
|
-
config.engineWasm = {
|
|
270
|
-
getRuntime: async () => require("./query_engine_bg.js"),
|
|
271
|
-
getQueryEngineWasmModule: async () => {
|
|
272
|
-
const loader = (await import("#wasm-engine-loader")).default;
|
|
273
|
-
const engine = (await loader).default;
|
|
274
|
-
return engine;
|
|
275
|
-
},
|
|
276
|
-
};
|
|
277
|
-
config.compilerWasm = undefined;
|
|
278
|
-
|
|
279
|
-
config.injectableEdgeEnv = () => ({
|
|
280
|
-
parsed: {
|
|
281
|
-
DATABASE_URL:
|
|
282
|
-
(typeof globalThis !== "undefined" && globalThis["DATABASE_URL"]) ||
|
|
283
|
-
(typeof process !== "undefined" &&
|
|
284
|
-
process.env &&
|
|
285
|
-
process.env.DATABASE_URL) ||
|
|
286
|
-
undefined,
|
|
287
|
-
},
|
|
288
|
-
});
|
|
289
|
-
|
|
290
|
-
if (
|
|
291
|
-
(typeof globalThis !== "undefined" && globalThis["DEBUG"]) ||
|
|
292
|
-
(typeof process !== "undefined" && process.env && process.env.DEBUG) ||
|
|
293
|
-
undefined
|
|
294
|
-
) {
|
|
295
|
-
Debug.enable(
|
|
296
|
-
(typeof globalThis !== "undefined" && globalThis["DEBUG"]) ||
|
|
297
|
-
(typeof process !== "undefined" && process.env && process.env.DEBUG) ||
|
|
298
|
-
undefined,
|
|
299
|
-
);
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
const PrismaClient = getPrismaClient(config);
|
|
303
|
-
exports.PrismaClient = PrismaClient;
|
|
304
|
-
Object.assign(exports, Prisma);
|
package/prisma/global.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { Prisma } from "prisma-client";
|
|
2
|
-
|
|
3
|
-
declare global {
|
|
4
|
-
namespace PrismaJson {
|
|
5
|
-
type Recipes_plugin_names = string[];
|
|
6
|
-
type Recipe_bags_partitioned_bags = {
|
|
7
|
-
/** partitioned bags allow each user with write access to write to `${title_prefix}${username}` */
|
|
8
|
-
title_prefix: string;
|
|
9
|
-
/**
|
|
10
|
-
* everyone with acl read can read all tiddlers
|
|
11
|
-
*
|
|
12
|
-
* if this is false, admins can still do this, but they will be in a restricted readonly mode.
|
|
13
|
-
*/
|
|
14
|
-
everyone_readable: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* everyone with acl write can write normal tiddlers.
|
|
17
|
-
*
|
|
18
|
-
* site and entity admins can always do this.
|
|
19
|
-
*/
|
|
20
|
-
normally_writable: boolean;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
declare global {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* This primarily makes sure that positional arguments are used correctly
|
|
30
|
-
* (so you can't switch a title and bag_name around).
|
|
31
|
-
*
|
|
32
|
-
* If you assign the wrong value (like `5 as PrismaField<"Bags", "bag_name">`),
|
|
33
|
-
* this will result in a type error on the as keyword, allowing you to catch incorrect types quickly.
|
|
34
|
-
*/
|
|
35
|
-
type PrismaField<T extends Prisma.ModelName, K extends keyof PrismaPayloadScalars<T>> =
|
|
36
|
-
// manually map foriegn keys to their corresponding primary key so comparisons work
|
|
37
|
-
// this should remove the need for any global helper functions to convert between types.
|
|
38
|
-
|
|
39
|
-
// I've tried to prevent this from being flattened, but I can't figure out how.
|
|
40
|
-
// It doesn't really matter, just annoying.
|
|
41
|
-
(
|
|
42
|
-
[T, K] extends ["Tiddlers", "bag_id"] ? PrismaField<"Bags", "bag_id"> :
|
|
43
|
-
[T, K] extends ["Sessions", "user_id"] ? PrismaField<"Users", "user_id"> :
|
|
44
|
-
[T, K] extends ["Recipe_bags", "bag_id"] ? PrismaField<"Bags", "bag_id"> :
|
|
45
|
-
[T, K] extends ["Recipe_bags", "recipe_id"] ? PrismaField<"Recipes", "recipe_id"> :
|
|
46
|
-
[T, K] extends ["Recipes", "owner_id"] ? PrismaField<"Users", "user_id"> :
|
|
47
|
-
[T, K] extends ["Bags", "owner_id"] ? PrismaField<"Users", "user_id"> :
|
|
48
|
-
(PrismaPayloadScalars<T>[K] & { __prisma_table: T, __prisma_field: K })
|
|
49
|
-
) | (null extends PrismaPayloadScalars<T>[K] ? null : never);
|
|
50
|
-
|
|
51
|
-
type PrismaPayloadScalars<T extends Prisma.ModelName>
|
|
52
|
-
= Prisma.TypeMap["model"][T]["payload"]["scalars"]
|
|
53
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var i=Object.create;var f=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var g=a=>{throw TypeError(a)};var n=(a,b,c)=>b in a?f(a,b,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[b]=c;var p=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var o=(a,b,c,d)=>{if(b&&typeof b=="object"||typeof b=="function")for(let e of k(b))!m.call(a,e)&&e!==c&&f(a,e,{get:()=>b[e],enumerable:!(d=j(b,e))||d.enumerable});return a};var q=(a,b,c)=>(c=a!=null?i(l(a)):{},o(b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c,a));var r=(a,b,c)=>n(a,typeof b!="symbol"?b+"":b,c),h=(a,b,c)=>b.has(a)||g("Cannot "+c);var s=(a,b,c)=>(h(a,b,"read from private field"),c?c.call(a):b.get(a)),t=(a,b,c)=>b.has(a)?g("Cannot add the same private member more than once"):b instanceof WeakSet?b.add(a):b.set(a,c),u=(a,b,c,d)=>(h(a,b,"write to private field"),d?d.call(a,c):b.set(a,c),c);export{p as a,q as b,r as c,s as d,t as e,u as f};
|
|
2
|
-
//# sourceMappingURL=chunk-YALWN5OT.js.map
|