@tiddlywiki/mws 0.0.13 → 0.0.15
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/.env-cmdrc +5 -0
- package/dist/server.d.ts +1 -3
- package/dist/server.js +3 -9
- package/dist/server.js.map +1 -1
- package/package.json +3 -2
package/.env-cmdrc
ADDED
package/dist/server.d.ts
CHANGED
|
@@ -216,7 +216,6 @@ declare class Command {
|
|
|
216
216
|
declare class SqliteAdapter {
|
|
217
217
|
private databasePath;
|
|
218
218
|
constructor(databasePath: string);
|
|
219
|
-
setupRequired: boolean;
|
|
220
219
|
adapter: SqlMigrationAwareDriverAdapterFactory;
|
|
221
220
|
init(): Promise<void>;
|
|
222
221
|
createMigrationsTable(libsql: SqlDriverAdapter): Promise<void>;
|
|
@@ -255,8 +254,7 @@ declare class StartupCommander {
|
|
|
255
254
|
SessionManager: typeof SessionManager;
|
|
256
255
|
AttachmentService: typeof AttachmentService;
|
|
257
256
|
/** Signals that database setup is required. May be set to false by any qualified setup command. */
|
|
258
|
-
|
|
259
|
-
set setupRequired(v: boolean);
|
|
257
|
+
setupRequired: boolean;
|
|
260
258
|
outputPath: string;
|
|
261
259
|
}
|
|
262
260
|
/**
|
package/dist/server.js
CHANGED
|
@@ -16497,11 +16497,9 @@ var init_sqlite_adapter = __esm({
|
|
|
16497
16497
|
_SqliteAdapter = class _SqliteAdapter {
|
|
16498
16498
|
constructor(databasePath) {
|
|
16499
16499
|
this.databasePath = databasePath;
|
|
16500
|
-
this.setupRequired = true;
|
|
16501
16500
|
this.adapter = new PrismaBetterSQLite3({ url: "file:" + this.databasePath });
|
|
16502
16501
|
}
|
|
16503
16502
|
async init() {
|
|
16504
|
-
this.setupRequired = false;
|
|
16505
16503
|
const libsql = await this.adapter.connect();
|
|
16506
16504
|
if (process.env.RUN_OLD_MWS_DB_SETUP_FOR_TESTING) {
|
|
16507
16505
|
await libsql.executeScript(await readFile2(dist_resolve(
|
|
@@ -16585,6 +16583,8 @@ var init_commander = __esm({
|
|
|
16585
16583
|
this.config = config;
|
|
16586
16584
|
this.$tw = $tw2;
|
|
16587
16585
|
this.PasswordService = PasswordService;
|
|
16586
|
+
/** Signals that database setup is required. May be set to false by any qualified setup command. */
|
|
16587
|
+
this.setupRequired = true;
|
|
16588
16588
|
if (config.config?.pathPrefix) {
|
|
16589
16589
|
ok7(config.config.pathPrefix.startsWith("/"), "pathPrefix must start with a slash");
|
|
16590
16590
|
ok7(!config.config.pathPrefix.endsWith("/"), "pathPrefix must not end with a slash");
|
|
@@ -16619,6 +16619,7 @@ var init_commander = __esm({
|
|
|
16619
16619
|
}
|
|
16620
16620
|
async init() {
|
|
16621
16621
|
await this.adapter.init();
|
|
16622
|
+
this.setupRequired = false;
|
|
16622
16623
|
const users = await this.engine.users.count();
|
|
16623
16624
|
if (!users) {
|
|
16624
16625
|
this.setupRequired = true;
|
|
@@ -16627,13 +16628,6 @@ var init_commander = __esm({
|
|
|
16627
16628
|
$transaction(fn, options) {
|
|
16628
16629
|
return this.engine.$transaction(fn, options);
|
|
16629
16630
|
}
|
|
16630
|
-
/** Signals that database setup is required. May be set to false by any qualified setup command. */
|
|
16631
|
-
get setupRequired() {
|
|
16632
|
-
return this.adapter.setupRequired;
|
|
16633
|
-
}
|
|
16634
|
-
set setupRequired(v) {
|
|
16635
|
-
this.adapter.setupRequired = v;
|
|
16636
|
-
}
|
|
16637
16631
|
};
|
|
16638
16632
|
__name(_StartupCommander, "StartupCommander");
|
|
16639
16633
|
StartupCommander = _StartupCommander;
|