@arkstack/database 0.12.3 → 0.12.4
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/index.d.ts
CHANGED
|
@@ -29,5 +29,4 @@ declare class ValidatorDBDriver extends IDatabaseDriver {
|
|
|
29
29
|
}: ValidationDatabaseExistsInput): Promise<boolean>;
|
|
30
30
|
}
|
|
31
31
|
//#endregion
|
|
32
|
-
export { DB, Migration, Model, ModelFactory, SchemaBuilder, Seeder, ValidatorDBDriver };
|
|
33
|
-
//# sourceMappingURL=index.d.ts.map
|
|
32
|
+
export { DB, Migration, Model, ModelFactory, SchemaBuilder, Seeder, ValidatorDBDriver };
|
package/dist/index.js
CHANGED
package/dist/setup.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkstack/database",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Database module for Arkstack, providing core database integration and data layer features.",
|
|
6
6
|
"homepage": "https://arkstack.toneflix.net",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@arkormx/plugin-clear-router": "^0.1.27",
|
|
52
52
|
"arkormx": "^ 2.4.1",
|
|
53
|
-
"@arkstack/common": "^0.12.
|
|
54
|
-
"@arkstack/contract": "^0.12.
|
|
53
|
+
"@arkstack/common": "^0.12.4",
|
|
54
|
+
"@arkstack/contract": "^0.12.4"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "tsdown --config-loader unrun",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ValidatorDBDriver-DUvJ-_jF.js","names":[],"sources":["../src/ValidatorDBDriver.ts"],"sourcesContent":["import { IDatabaseDriver, ValidationDatabaseExistsInput } from 'kanun'\n\nimport { DB } from 'arkormx'\n\nexport class ValidatorDBDriver extends IDatabaseDriver {\n async exists ({ table, column, value, ignore }: ValidationDatabaseExistsInput) {\n try {\n const query = DB.table<{ id: string }>(table).where({ [column]: value })\n\n if (ignore) {\n query.whereNot({ [column]: ignore })\n }\n\n return await query.exists()\n } catch {\n return false\n }\n }\n}"],"mappings":";;;AAIA,IAAa,oBAAb,cAAuC,gBAAgB;CACnD,MAAM,OAAQ,EAAE,OAAO,QAAQ,OAAO,UAAyC;EAC3E,IAAI;GACA,MAAM,QAAQ,GAAG,MAAsB,MAAM,CAAC,MAAM,GAAG,SAAS,OAAO,CAAC;GAExE,IAAI,QACA,MAAM,SAAS,GAAG,SAAS,QAAQ,CAAC;GAGxC,OAAO,MAAM,MAAM,QAAQ;UACvB;GACJ,OAAO"}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["BaseDB","BaseModelFactory","BaseMigration","BaseModel","BaseSchemaBuilder","BaseSeeder"],"sources":["../src/extensions/DB.ts","../src/extensions/Factory.ts","../src/extensions/Migration.ts","../src/extensions/Model.ts","../src/extensions/SchemaBuilder.ts","../src/extensions/Seeder.ts"],"sourcesContent":["import { DB as BaseDB } from 'arkormx'\n\nexport class DB extends BaseDB {\n}","import { ModelFactory as BaseModelFactory, FactoryAttributes, ModelAttributes } from 'arkormx'\n\nexport abstract class ModelFactory<TModel, TAttributes extends FactoryAttributes = Partial<ModelAttributes<TModel>>> extends BaseModelFactory<TModel, TAttributes> {\n}","import { Migration as BaseMigration } from 'arkormx'\n\nexport abstract class Migration extends BaseMigration {\n}","import { Model as BaseModel, ModelAttributesOf, ModelQuerySchemaLike } from 'arkormx'\n\nexport abstract class Model<TSchema extends ModelQuerySchemaLike | Record<string, unknown> | string = Record<string, any>, TAttributes extends Record<string, unknown> = ModelAttributesOf<TSchema>> extends BaseModel<TSchema, TAttributes> {\n}","import { SchemaBuilder as BaseSchemaBuilder } from 'arkormx'\n\nexport class SchemaBuilder extends BaseSchemaBuilder {\n}","import { Seeder as BaseSeeder } from 'arkormx'\n\nexport abstract class Seeder extends BaseSeeder {\n}"],"mappings":";;;AAEA,IAAa,KAAb,cAAwBA,KAAO;;;ACA/B,IAAsB,eAAtB,cAA6HC,eAAsC;;;ACAnK,IAAsB,YAAtB,cAAwCC,YAAc;;;ACAtD,IAAsB,QAAtB,cAA6MC,QAAgC;;;ACA7O,IAAa,gBAAb,cAAmCC,gBAAkB;;;ACArD,IAAsB,SAAtB,cAAqCC,SAAW"}
|
package/dist/setup.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","names":[],"sources":["../src/setup.ts"],"sourcesContent":["import { CoreRouter } from 'clear-router/core'\nimport { Validator } from 'kanun'\nimport { ValidatorDBDriver } from './ValidatorDBDriver'\nimport { clearRouterPlugin } from '@arkormx/plugin-clear-router'\n\nCoreRouter.use(clearRouterPlugin)\nValidator.useDatabase(new ValidatorDBDriver())"],"mappings":";;;;;AAKA,WAAW,IAAI,kBAAkB;AACjC,UAAU,YAAY,IAAI,mBAAmB,CAAA"}
|