@tulipes/mongoose 0.2.0-rc.2 → 0.2.1-rc.2
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 +9 -6
- package/dist/connection-config.d.ts +46 -0
- package/dist/connection-config.js +28 -0
- package/dist/connection-config.js.map +1 -0
- package/dist/database.js +6 -13
- package/dist/database.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/settings-provider.js +5 -11
- package/dist/settings-provider.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -24,13 +24,16 @@ One line in the app's root `package.json`:
|
|
|
24
24
|
{ "tulipes": { "providers": { "models": "@tulipes/mongoose" } } }
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
and `
|
|
28
|
-
|
|
27
|
+
and `config.mongoose.uri` wired in `config/app.config.ts` from a variable the
|
|
28
|
+
app's sys `core` module declares — `mongoose: { uri: env.core.mongodbUri }`,
|
|
29
|
+
or by parts: `{ uri: env.core.mongodbHost, user, pass, dbName }`, which the
|
|
30
|
+
driver assembles so no credential is URL-encoded by hand. Modules with
|
|
31
|
+
`models/` or `bootstrap/` directories require the
|
|
29
32
|
provider automatically; a module that only reads models declares
|
|
30
33
|
`"tulipes": { "requires": ["models"] }` in its own manifest. Boot refuses an
|
|
31
34
|
unmet requirement before any module code is imported. Installing this package
|
|
32
|
-
without the declaration selects nothing; a `
|
|
33
|
-
nothing.
|
|
35
|
+
without the declaration selects nothing; a wired `config.mongoose.uri` on its
|
|
36
|
+
own connects nothing.
|
|
34
37
|
|
|
35
38
|
## Use it
|
|
36
39
|
|
|
@@ -89,6 +92,6 @@ cannot overwrite each other, and the document it replaced goes to
|
|
|
89
92
|
when the connection is to a replica set and by polling (every 2s) otherwise;
|
|
90
93
|
core validates every incoming document against the module's schema before
|
|
91
94
|
applying it. The store shares the models provider's connection when both
|
|
92
|
-
are this package, and opens its own from `
|
|
93
|
-
mongoose models. Without the declaration core keeps settings in
|
|
95
|
+
are this package, and opens its own from `config.mongoose` when the app
|
|
96
|
+
keeps no mongoose models. Without the declaration core keeps settings in
|
|
94
97
|
`config/settings.<APP_ENV>.json`.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ConnectOptions } from "mongoose";
|
|
2
|
+
import type { Ctx } from "@tulipes/core/boot";
|
|
3
|
+
import type { BootReport } from "@tulipes/core/errors";
|
|
4
|
+
/**
|
|
5
|
+
* Where this package reads how to reach MongoDB: `config.mongoose`, set by
|
|
6
|
+
* the app's `config/app.config.ts` from the variables its sys module
|
|
7
|
+
* declares. Either a full URI — the only way to name a replica set, an
|
|
8
|
+
* Atlas `mongodb+srv://` cluster or driver options — or a host URI with the
|
|
9
|
+
* credentials and database name beside it, which the driver assembles
|
|
10
|
+
* itself so nothing is URL-encoded by hand:
|
|
11
|
+
*
|
|
12
|
+
* mongoose: env.core.mongodbUri
|
|
13
|
+
* ? { uri: env.core.mongodbUri }
|
|
14
|
+
* : { uri: env.core.mongodbHost, user: env.core.mongodbUsername,
|
|
15
|
+
* pass: env.core.mongodbPassword, dbName: env.core.mongodbDbName },
|
|
16
|
+
*
|
|
17
|
+
* Core knows nothing of this key; the augmentation below types it for any
|
|
18
|
+
* app that compiles this package.
|
|
19
|
+
*/
|
|
20
|
+
export interface MongooseConnectionConfig {
|
|
21
|
+
/** `mongodb://host:port[/db]` or `mongodb+srv://…`. Required to connect. */
|
|
22
|
+
uri: string;
|
|
23
|
+
user?: string;
|
|
24
|
+
pass?: string;
|
|
25
|
+
/** Overrides the database named in `uri`, if any. */
|
|
26
|
+
dbName?: string;
|
|
27
|
+
}
|
|
28
|
+
declare module "@tulipes/core/config" {
|
|
29
|
+
interface GlobalConfig {
|
|
30
|
+
mongoose?: Partial<MongooseConnectionConfig>;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/** The key, spelled the way a boot report names it. */
|
|
34
|
+
export declare const CONNECTION_CONFIG = "config.mongoose.uri";
|
|
35
|
+
export interface ReadConnectionConfigResult {
|
|
36
|
+
uri: string;
|
|
37
|
+
/** What `createConnection(uri, options)` takes besides the URI. */
|
|
38
|
+
options: Pick<ConnectOptions, "user" | "pass" | "dbName">;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Reached only when the app declared one of this package's providers, so a
|
|
42
|
+
* missing URI is a contradiction the boot refuses, naming the key to wire.
|
|
43
|
+
* An empty string counts as missing: an unset variable with `default: ""`
|
|
44
|
+
* is how an optional part arrives.
|
|
45
|
+
*/
|
|
46
|
+
export declare function readConnectionConfig(ctx: Pick<Ctx, "config">, providerName: string, report: BootReport): ReadConnectionConfigResult | undefined;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** The key, spelled the way a boot report names it. */
|
|
2
|
+
export const CONNECTION_CONFIG = "config.mongoose.uri";
|
|
3
|
+
/**
|
|
4
|
+
* Reached only when the app declared one of this package's providers, so a
|
|
5
|
+
* missing URI is a contradiction the boot refuses, naming the key to wire.
|
|
6
|
+
* An empty string counts as missing: an unset variable with `default: ""`
|
|
7
|
+
* is how an optional part arrives.
|
|
8
|
+
*/
|
|
9
|
+
export function readConnectionConfig(ctx, providerName, report) {
|
|
10
|
+
const config = ctx.config.mongoose ?? {};
|
|
11
|
+
if (!config.uri) {
|
|
12
|
+
report.add({
|
|
13
|
+
scope: "providers",
|
|
14
|
+
message: `provider "${providerName}" is selected but ${CONNECTION_CONFIG} is not set — ` +
|
|
15
|
+
`wire it in config/app.config.ts from a variable a sys module declares: mongoose: { uri: env.core.mongodbUri }`,
|
|
16
|
+
});
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
uri: config.uri,
|
|
21
|
+
options: {
|
|
22
|
+
...(config.user && { user: config.user }),
|
|
23
|
+
...(config.pass && { pass: config.pass }),
|
|
24
|
+
...(config.dbName && { dbName: config.dbName }),
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=connection-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-config.js","sourceRoot":"","sources":["../src/connection-config.ts"],"names":[],"mappings":"AAoCA,uDAAuD;AACvD,MAAM,CAAC,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AAQvD;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAClC,GAAwB,EACxB,YAAoB,EACpB,MAAkB;IAElB,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC;IACzC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;QAChB,MAAM,CAAC,GAAG,CAAC;YACT,KAAK,EAAE,WAAW;YAClB,OAAO,EACL,aAAa,YAAY,qBAAqB,iBAAiB,gBAAgB;gBAC/E,+GAA+G;SAClH,CAAC,CAAC;QACH,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO;QACL,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,OAAO,EAAE;YACP,GAAG,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;YACzC,GAAG,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;YACzC,GAAG,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;SAChD;KACF,CAAC;AACJ,CAAC"}
|
package/dist/database.js
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
import { createConnection, Schema } from "mongoose";
|
|
2
2
|
import { importFile } from "@tulipes/core/boot";
|
|
3
|
+
import { CONNECTION_CONFIG, readConnectionConfig } from "./connection-config.js";
|
|
3
4
|
import { ModelStore } from "./model-store.js";
|
|
4
|
-
/** Well-known infra variable, declared by the app's sys core module. */
|
|
5
|
-
const MONGO_URI = "MONGO_URI";
|
|
6
5
|
export async function initDatabase(explored, ctx, report, options = {}) {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
: undefined;
|
|
10
|
-
if (!uri) {
|
|
11
|
-
report.add({
|
|
12
|
-
scope: "providers",
|
|
13
|
-
message: `provider "mongoose" is selected but "${MONGO_URI}" is not declared/set — declare it in a sys module's package.json tulipes.env and set it`,
|
|
14
|
-
});
|
|
6
|
+
const target = readConnectionConfig(ctx, "mongoose", report);
|
|
7
|
+
if (!target)
|
|
15
8
|
return undefined;
|
|
16
|
-
}
|
|
17
9
|
let connection;
|
|
18
10
|
try {
|
|
19
11
|
// Fail fast: default server selection waits 30s before reporting an
|
|
20
12
|
// unreachable database — far too long for a boot-time verdict.
|
|
21
|
-
connection = createConnection(uri, {
|
|
13
|
+
connection = createConnection(target.uri, {
|
|
14
|
+
...target.options,
|
|
22
15
|
serverSelectionTimeoutMS: 5_000,
|
|
23
16
|
});
|
|
24
17
|
options.onConnection?.(connection);
|
|
@@ -27,7 +20,7 @@ export async function initDatabase(explored, ctx, report, options = {}) {
|
|
|
27
20
|
catch (error) {
|
|
28
21
|
report.add({
|
|
29
22
|
scope: "boot",
|
|
30
|
-
message: `database connection failed (${
|
|
23
|
+
message: `database connection failed (${CONNECTION_CONFIG}): ${error.message}`,
|
|
31
24
|
});
|
|
32
25
|
return undefined;
|
|
33
26
|
}
|
package/dist/database.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.js","sourceRoot":"","sources":["../src/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAmB,MAAM,UAAU,CAAC;AAErE,OAAO,EAAE,UAAU,EAAY,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"database.js","sourceRoot":"","sources":["../src/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAmB,MAAM,UAAU,CAAC;AAErE,OAAO,EAAE,U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emaGeneric, Schema } from "mongoose";
|
|
2
2
|
export { initDatabase, type BootstrapFn, type ModelDef } from "./database.ts";
|
|
3
|
+
export { readConnectionConfig, type MongooseConnectionConfig } from "./connection-config.ts";
|
|
3
4
|
export { ModelStore } from "./model-store.ts";
|
|
4
5
|
export { MongoSettingsStore, type MongoSettingsStoreOptions, type SettingsDocument, type SettingsHistoryDocument } from "./settings-store.ts";
|
|
5
6
|
export { provider as settingsProvider } from "./settings-provider.ts";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { initDatabase } from "./database.js";
|
|
2
|
+
export { readConnectionConfig } from "./connection-config.js";
|
|
2
3
|
export { ModelStore } from "./model-store.js";
|
|
3
4
|
export { MongoSettingsStore } from "./settings-store.js";
|
|
4
5
|
export { provider as settingsProvider } from "./settings-provider.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAmC,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAuF,MAAM,qBAAqB,CAAC;AAC9I,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAmC,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAiC,MAAM,wBAAwB,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAuF,MAAM,qBAAqB,CAAC;AAC9I,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createConnection } from "mongoose";
|
|
2
|
+
import { CONNECTION_CONFIG, readConnectionConfig } from "./connection-config.js";
|
|
2
3
|
import { MongoSettingsStore } from "./settings-store.js";
|
|
3
|
-
/** Well-known infra variable, declared by the app's sys core module. */
|
|
4
|
-
const MONGO_URI = "MONGO_URI";
|
|
5
4
|
/**
|
|
6
5
|
* The "settings" provider an app selects with
|
|
7
6
|
* `"tulipes": { "providers": { "settings": "@tulipes/mongoose/settings" } }`.
|
|
@@ -20,16 +19,11 @@ export const provider = {
|
|
|
20
19
|
let connection = shared;
|
|
21
20
|
let store;
|
|
22
21
|
if (!connection) {
|
|
23
|
-
const
|
|
24
|
-
if (!
|
|
25
|
-
report.add({
|
|
26
|
-
scope: "providers",
|
|
27
|
-
message: `provider "mongoose-settings" is selected but "${MONGO_URI}" is not declared/set — declare it in a sys module's package.json tulipes.env and set it`,
|
|
28
|
-
});
|
|
22
|
+
const target = readConnectionConfig(ctx, "mongoose-settings", report);
|
|
23
|
+
if (!target)
|
|
29
24
|
return undefined;
|
|
30
|
-
}
|
|
31
25
|
try {
|
|
32
|
-
connection = createConnection(uri, { serverSelectionTimeoutMS: 5_000 });
|
|
26
|
+
connection = createConnection(target.uri, { ...target.options, serverSelectionTimeoutMS: 5_000 });
|
|
33
27
|
const owned = connection;
|
|
34
28
|
own({
|
|
35
29
|
dispose: async () => { await store?.dispose(); await owned.close(); },
|
|
@@ -39,7 +33,7 @@ export const provider = {
|
|
|
39
33
|
await connection.asPromise();
|
|
40
34
|
}
|
|
41
35
|
catch (error) {
|
|
42
|
-
report.add({ scope: "providers", message: `settings database connection failed (${
|
|
36
|
+
report.add({ scope: "providers", message: `settings database connection failed (${CONNECTION_CONFIG}): ${error.message}` });
|
|
43
37
|
return undefined;
|
|
44
38
|
}
|
|
45
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-provider.js","sourceRoot":"","sources":["../src/settings-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAmB,MAAM,UAAU,CAAC;AAI7D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"settings-provider.js","sourceRoot":"","sources":["../src/settings-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAmB,MAAM,UAAU,CAAC;AAI7D,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAyB;IAC5C,QAAQ,EAAE,CAAC;IACX,UAAU,EAAE,UAAU;IACtB,IAAI,EAAE,mBAAmB;IACzB,KAAK,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,GAAG;QAChC,MAAM,MAAM,GAAI,GAAG,CAAC,MAAkD,EAAE,UAAU,CAAC;QACnF,IAAI,UAAU,GAAG,MAAM,CAAC;QACxB,IAAI,KAAqC,CAAC;QAE1C,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,MAAM,GAAG,oBAAoB,CAAC,GAAG,EAAE,mBAAmB,EAAE,MAAM,CAAC,CAAC;YACtE,IAAI,CAAC,MAAM;gBAAE,OAAO,SAAS,CAAC;YAC9B,IAAI,CAAC;gBACH,UAAU,GAAG,gBAAgB,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,wBAAwB,EAAE,KAAK,EAAE,CAAC,CAAC;gBAClG,MAAM,KAAK,GAAG,UAAU,CAAC;gB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
"version": "0.2.
|
|
3
|
+
"version": "0.2.1-rc.2",
|
|
4
4
|
"description": "Mongoose models provider for Tulipes apps: connection, model registration and bootstrap behind core's models capability",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@tulipes/core": "^0.
|
|
19
|
+
"@tulipes/core": "^0.12.0-rc.2",
|
|
20
20
|
"mongoose": "^8"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^24.2.0",
|
|
24
24
|
"mongoose": "^8",
|
|
25
25
|
"typescript": "^7.0.2",
|
|
26
|
-
"@tulipes/core": "0.
|
|
26
|
+
"@tulipes/core": "0.12.0-rc.2"
|
|
27
27
|
},
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|