@razvan11/paladin 1.0.7 → 1.0.9
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/container/container.d.ts +0 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +14 -4
- package/package.json +2 -2
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Container } from 'inversify';
|
|
2
2
|
export declare const CONTAINER_KEYS: {
|
|
3
3
|
readonly APP_NAME: symbol;
|
|
4
|
-
readonly APP_DATABASE_URL: symbol;
|
|
5
|
-
readonly APP_URL: symbol;
|
|
6
4
|
readonly APP_SECRET: symbol;
|
|
7
5
|
readonly APP_CWD: symbol;
|
|
8
6
|
readonly APP_PUBLIC_DIR: symbol;
|
|
@@ -11,7 +9,6 @@ export declare const CONTAINER_KEYS: {
|
|
|
11
9
|
readonly APP_IS_STAGING: symbol;
|
|
12
10
|
readonly APP_IS_PRODUCTION: symbol;
|
|
13
11
|
readonly APP_DEBUG: symbol;
|
|
14
|
-
readonly APP_ENV: symbol;
|
|
15
12
|
};
|
|
16
13
|
declare const container: Container;
|
|
17
14
|
export { container };
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { database } from './functions/database';
|
|
|
14
14
|
export { default as config } from './functions/config';
|
|
15
15
|
export { default as validator } from './functions/validator';
|
|
16
16
|
export { default as env } from './functions/env';
|
|
17
|
+
export { getDataSourceForCLI } from './functions/database';
|
|
17
18
|
export { render, renderElement, createRenderer } from './functions/render';
|
|
18
19
|
export { LayoutView, PageLoader, type LayoutViewProps, } from './components/LayoutView';
|
|
19
20
|
export { asset, publicAsset, setAssetBasePath, getAssetBasePath, } from './functions/asset';
|
package/dist/index.js
CHANGED
|
@@ -18896,8 +18896,6 @@ class ne {
|
|
|
18896
18896
|
// src/container/container.ts
|
|
18897
18897
|
var CONTAINER_KEYS = {
|
|
18898
18898
|
APP_NAME: Symbol.for("app.name"),
|
|
18899
|
-
APP_DATABASE_URL: Symbol.for("app.databaseUrl"),
|
|
18900
|
-
APP_URL: Symbol.for("app.url"),
|
|
18901
18899
|
APP_SECRET: Symbol.for("app.secret"),
|
|
18902
18900
|
APP_CWD: Symbol.for("app.cwd"),
|
|
18903
18901
|
APP_PUBLIC_DIR: Symbol.for("app.publicDir"),
|
|
@@ -18905,8 +18903,7 @@ var CONTAINER_KEYS = {
|
|
|
18905
18903
|
APP_IS_DEVELOPMENT: Symbol.for("app.isDevelopment"),
|
|
18906
18904
|
APP_IS_STAGING: Symbol.for("app.isStaging"),
|
|
18907
18905
|
APP_IS_PRODUCTION: Symbol.for("app.isProduction"),
|
|
18908
|
-
APP_DEBUG: Symbol.for("app.debug")
|
|
18909
|
-
APP_ENV: Symbol.for("app.env")
|
|
18906
|
+
APP_DEBUG: Symbol.for("app.debug")
|
|
18910
18907
|
};
|
|
18911
18908
|
var container = new ne({
|
|
18912
18909
|
defaultScope: "Singleton"
|
|
@@ -19981,6 +19978,18 @@ function database(options2 = {}) {
|
|
|
19981
19978
|
return constructor;
|
|
19982
19979
|
};
|
|
19983
19980
|
}
|
|
19981
|
+
function getDataSourceForCLI(DatabaseClass, url) {
|
|
19982
|
+
const options2 = databaseRegistry.get(DatabaseClass);
|
|
19983
|
+
const instance = new DatabaseClass(url);
|
|
19984
|
+
const source = instance.getSource();
|
|
19985
|
+
if (options2?.migrations) {
|
|
19986
|
+
source.setOptions({
|
|
19987
|
+
migrations: [options2.migrations + "/*.ts"],
|
|
19988
|
+
migrationsTableName: options2.migrationsTable || "migrations"
|
|
19989
|
+
});
|
|
19990
|
+
}
|
|
19991
|
+
return source;
|
|
19992
|
+
}
|
|
19984
19993
|
// src/functions/config.ts
|
|
19985
19994
|
var getContainer6 = () => globalThis.container;
|
|
19986
19995
|
function config() {
|
|
@@ -21024,6 +21033,7 @@ export {
|
|
|
21024
21033
|
options,
|
|
21025
21034
|
logger,
|
|
21026
21035
|
inject,
|
|
21036
|
+
getDataSourceForCLI,
|
|
21027
21037
|
getAssetBasePath,
|
|
21028
21038
|
get,
|
|
21029
21039
|
env2 as env,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@razvan11/paladin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "A Bun-based backend framework with decorators, dependency injection, and controller registration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -64,4 +64,4 @@
|
|
|
64
64
|
"reflect-metadata": "^0.2.2",
|
|
65
65
|
"zod": "^4.2.1"
|
|
66
66
|
}
|
|
67
|
-
}
|
|
67
|
+
}
|