@an5/orm 1.0.6 → 1.0.7
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 +6 -0
- package/generator/src/index.ts +10 -1
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -17,10 +17,16 @@ SQL Server ORM. Proxy client. CRUD. Vector search. Middleware. Raw queries. Tran
|
|
|
17
17
|
|
|
18
18
|
### Installation
|
|
19
19
|
|
|
20
|
+
#### TypeScript / Node.js
|
|
20
21
|
```bash
|
|
21
22
|
npm install @an5/orm
|
|
22
23
|
```
|
|
23
24
|
|
|
25
|
+
#### Python
|
|
26
|
+
```bash
|
|
27
|
+
pip install an5-orm
|
|
28
|
+
```
|
|
29
|
+
|
|
24
30
|
### Configuration
|
|
25
31
|
|
|
26
32
|
```bash
|
package/generator/src/index.ts
CHANGED
|
@@ -24,7 +24,7 @@ function clearGeneratedFiles(outputDir: string, extension: string) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
async function main() {
|
|
27
|
-
|
|
27
|
+
let rootDir = process.cwd();
|
|
28
28
|
let config: any = {};
|
|
29
29
|
|
|
30
30
|
try {
|
|
@@ -32,8 +32,17 @@ async function main() {
|
|
|
32
32
|
if (!fs.existsSync(configPath)) {
|
|
33
33
|
configPath = path.join(rootDir, 'an5Orm.config.cjs');
|
|
34
34
|
}
|
|
35
|
+
if (!fs.existsSync(configPath)) {
|
|
36
|
+
configPath = path.join(rootDir, '..', 'an5Orm.config.js');
|
|
37
|
+
}
|
|
38
|
+
if (!fs.existsSync(configPath)) {
|
|
39
|
+
configPath = path.join(rootDir, '..', 'an5Orm.config.cjs');
|
|
40
|
+
}
|
|
35
41
|
if (fs.existsSync(configPath)) {
|
|
36
42
|
config = require(configPath);
|
|
43
|
+
rootDir = path.dirname(configPath);
|
|
44
|
+
} else if (fs.existsSync(path.join(rootDir, '..', 'an5Schema'))) {
|
|
45
|
+
rootDir = path.resolve(rootDir, '..');
|
|
37
46
|
}
|
|
38
47
|
} catch (err) {
|
|
39
48
|
console.warn('⚠️ Could not load an5Orm.config.js/.cjs, using defaults.', err);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@an5/orm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "The lightweight ORM for SQL Server with support for TypeScript, Python, and .NET (C#).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
"generator/src/**/*.ts",
|
|
15
15
|
"README.md"
|
|
16
16
|
],
|
|
17
|
+
"author": "an5ORM",
|
|
18
|
+
"homepage": "https://github.com/an5ORM/an5",
|
|
17
19
|
"repository": {
|
|
18
20
|
"type": "git",
|
|
19
21
|
"url": "https://github.com/an5ORM/an5Orm.git"
|
|
@@ -32,10 +34,10 @@
|
|
|
32
34
|
"release": "node scripts/release.js",
|
|
33
35
|
"test": "node test/smoke.test.js",
|
|
34
36
|
"test:unit": "node test/unit.test.js",
|
|
35
|
-
"test:generator": "node test/generator.test.js"
|
|
37
|
+
"test:generator": "npm run generate && node test/generator.test.js"
|
|
36
38
|
},
|
|
37
39
|
"dependencies": {
|
|
38
|
-
"@an5/adapters": "^0.2.
|
|
40
|
+
"@an5/adapters": "^0.2.3",
|
|
39
41
|
"bcryptjs": "^2.4.3",
|
|
40
42
|
"dotenv": "^16.4.5",
|
|
41
43
|
"mssql": "^12.5.5"
|