@bhooai/nexus-core 2.0.17 → 2.0.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/package.json
CHANGED
|
@@ -161,7 +161,7 @@ export async function createNexusApp(opts: CreateNexusAppOptions = {}): Promise<
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
// ------------------------------------------------------------------
|
|
164
|
-
// User store —
|
|
164
|
+
// User store — Fusion (default) or Mongo (db.active: 'mongodb').
|
|
165
165
|
// ------------------------------------------------------------------
|
|
166
166
|
if (activeDatabase(config) === 'fusion') {
|
|
167
167
|
if (!fusionEnabled(config)) {
|
package/src/config/defaults.ts
CHANGED
|
@@ -21,7 +21,7 @@ export const defaults: NexusConfig = {
|
|
|
21
21
|
allowedTypes: [],
|
|
22
22
|
},
|
|
23
23
|
db: {
|
|
24
|
-
active: '
|
|
24
|
+
active: 'fusion',
|
|
25
25
|
mongodb: {
|
|
26
26
|
enabled: true,
|
|
27
27
|
uri: 'mongodb://localhost:27017/nexus',
|
|
@@ -29,7 +29,7 @@ export const defaults: NexusConfig = {
|
|
|
29
29
|
autoIndex: true,
|
|
30
30
|
},
|
|
31
31
|
fusion: {
|
|
32
|
-
enabled:
|
|
32
|
+
enabled: true,
|
|
33
33
|
dir: 'storage/fusion',
|
|
34
34
|
persist: true,
|
|
35
35
|
cacheCapacity: 10_000,
|
package/src/config/schema.ts
CHANGED
|
@@ -29,7 +29,7 @@ export const nexusConfigSchema = z.object({
|
|
|
29
29
|
}),
|
|
30
30
|
db: z
|
|
31
31
|
.object({
|
|
32
|
-
active: z.enum(['mongodb', 'fusion']).default('
|
|
32
|
+
active: z.enum(['mongodb', 'fusion']).default('fusion'),
|
|
33
33
|
mongodb: z
|
|
34
34
|
.object({
|
|
35
35
|
enabled: z.boolean().default(true),
|
|
@@ -46,7 +46,7 @@ export const nexusConfigSchema = z.object({
|
|
|
46
46
|
}),
|
|
47
47
|
fusion: z
|
|
48
48
|
.object({
|
|
49
|
-
enabled: z.boolean().default(
|
|
49
|
+
enabled: z.boolean().default(true),
|
|
50
50
|
dir: z.string().min(1),
|
|
51
51
|
persist: z.boolean().default(true),
|
|
52
52
|
cacheCapacity: z.number().int().positive(),
|
|
@@ -54,7 +54,7 @@ export const nexusConfigSchema = z.object({
|
|
|
54
54
|
walCompactThreshold: z.number().int().positive(),
|
|
55
55
|
})
|
|
56
56
|
.default({
|
|
57
|
-
enabled:
|
|
57
|
+
enabled: true,
|
|
58
58
|
dir: 'storage/fusion',
|
|
59
59
|
persist: true,
|
|
60
60
|
cacheCapacity: 10_000,
|
package/src/config/types.ts
CHANGED
|
@@ -50,7 +50,7 @@ export interface MongoDbConfig {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export interface FusionDbConfig {
|
|
53
|
-
/** Open the Fusion engine at boot when true. Default
|
|
53
|
+
/** Open the Fusion engine at boot when true. Default true. */
|
|
54
54
|
enabled: boolean;
|
|
55
55
|
/** Durable storage dir, relative to the project root. Omit/empty for in-memory. */
|
|
56
56
|
dir: string;
|
|
@@ -65,7 +65,7 @@ export interface FusionDbConfig {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
export interface DbConfig {
|
|
68
|
-
/** Which database backs the user store + ODM models. Default '
|
|
68
|
+
/** Which database backs the user store + ODM models. Default 'fusion'. */
|
|
69
69
|
active: ActiveDatabase;
|
|
70
70
|
mongodb: MongoDbConfig;
|
|
71
71
|
fusion: FusionDbConfig;
|