@arkstack/database 0.9.1 → 0.10.1
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/commands/MakeFactoryCommand.js +1 -1
- package/dist/commands/MakeMigrationCommand.js +1 -1
- package/dist/commands/MakeModelCommand.js +1 -1
- package/dist/commands/MakeSeederCommand.js +1 -1
- package/dist/commands/{Rebuilder-DMFg_sP7.js → Rebuilder-a3FLKQ9t.js} +4 -3
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Rebuilder } from "./Rebuilder-
|
|
1
|
+
import { t as Rebuilder } from "./Rebuilder-a3FLKQ9t.js";
|
|
2
2
|
import { CliApp, MakeFactoryCommand as MakeFactoryCommand$1 } from "arkormx";
|
|
3
3
|
//#region src/commands/MakeFactoryCommand.ts
|
|
4
4
|
var MakeFactoryCommand = class extends MakeFactoryCommand$1 {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Rebuilder } from "./Rebuilder-
|
|
1
|
+
import { t as Rebuilder } from "./Rebuilder-a3FLKQ9t.js";
|
|
2
2
|
import { CliApp, MakeMigrationCommand as MakeMigrationCommand$1 } from "arkormx";
|
|
3
3
|
//#region src/commands/MakeMigrationCommand.ts
|
|
4
4
|
var MakeMigrationCommand = class extends MakeMigrationCommand$1 {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Rebuilder } from "./Rebuilder-
|
|
1
|
+
import { t as Rebuilder } from "./Rebuilder-a3FLKQ9t.js";
|
|
2
2
|
import { CliApp, MakeModelCommand as MakeModelCommand$1 } from "arkormx";
|
|
3
3
|
//#region src/commands/MakeModelCommand.ts
|
|
4
4
|
var MakeModelCommand = class extends MakeModelCommand$1 {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Rebuilder } from "./Rebuilder-
|
|
1
|
+
import { t as Rebuilder } from "./Rebuilder-a3FLKQ9t.js";
|
|
2
2
|
import { CliApp, MakeSeederCommand as MakeSeederCommand$1 } from "arkormx";
|
|
3
3
|
//#region src/commands/MakeSeederCommand.ts
|
|
4
4
|
var MakeSeederCommand = class extends MakeSeederCommand$1 {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import { readFile, writeFile } from "node:fs/promises";
|
|
3
|
+
import { Arkstack } from "@arkstack/contract";
|
|
3
4
|
import { Logger } from "@arkstack/common";
|
|
4
5
|
import { globSync } from "node:fs";
|
|
5
6
|
import { join } from "node:path";
|
|
@@ -12,10 +13,10 @@ var Rebuilder = class Rebuilder {
|
|
|
12
13
|
static async build(app, name, type = "models") {
|
|
13
14
|
try {
|
|
14
15
|
const inst = new Rebuilder(app);
|
|
15
|
-
const dir = inst.paths()[type] ?? join(
|
|
16
|
+
const dir = inst.paths()[type] ?? join(Arkstack.rootDir(), "src", type);
|
|
16
17
|
let outputPath = join(dir, `${name}.${inst.resolveOutputExt()}`);
|
|
17
18
|
if (type === "migrations") outputPath = globSync(`${join(dir, inst.date())}*_${name}.ts`, {
|
|
18
|
-
cwd:
|
|
19
|
+
cwd: Arkstack.rootDir(),
|
|
19
20
|
withFileTypes: false
|
|
20
21
|
}).sort().at(-1);
|
|
21
22
|
const content = inst.content(await readFile(outputPath, "utf8"), type);
|
|
@@ -43,7 +44,7 @@ var Rebuilder = class Rebuilder {
|
|
|
43
44
|
}
|
|
44
45
|
hasTypeScriptInstalled() {
|
|
45
46
|
try {
|
|
46
|
-
createRequire(import.meta.url).resolve("typescript", { paths: [
|
|
47
|
+
createRequire(import.meta.url).resolve("typescript", { paths: [Arkstack.rootDir()] });
|
|
47
48
|
return true;
|
|
48
49
|
} catch {
|
|
49
50
|
return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkstack/database",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
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.26",
|
|
52
52
|
"arkormx": "^ 2.4.1",
|
|
53
|
-
"@arkstack/common": "^0.
|
|
54
|
-
"@arkstack/contract": "^0.
|
|
53
|
+
"@arkstack/common": "^0.10.1",
|
|
54
|
+
"@arkstack/contract": "^0.10.1"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "tsdown --config-loader unrun",
|