stabilize-orm 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/.eslintrc.json +10 -0
- package/.github/workflows/ci-cd.yml +73 -0
- package/bun.lock +600 -0
- package/cli/stabilize-cli.ts +594 -0
- package/lib/LICENSE +21 -0
- package/lib/cache.ts +110 -0
- package/lib/client.ts +258 -0
- package/lib/decorators.ts +99 -0
- package/lib/index.ts +143 -0
- package/lib/logger.ts +126 -0
- package/lib/migrations.ts +81 -0
- package/lib/query-builder.ts +96 -0
- package/lib/repository.ts +565 -0
- package/lib/types.ts +76 -0
- package/package.json +3 -15
- package/tests/migrations.test.ts +141 -0
- package/tsconfig.json +32 -0
- package/dist/stabilize-cli.exe +0 -0
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
name: CI/CD Pipeline for Stabilize ORM
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
tags:
|
|
8
|
+
- "v*.*.*"
|
|
9
|
+
pull_request:
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
services:
|
|
17
|
+
redis:
|
|
18
|
+
image: redis:latest
|
|
19
|
+
ports:
|
|
20
|
+
- 6379:6379
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout code
|
|
23
|
+
uses: actions/checkout@v4
|
|
24
|
+
- name: Setup Bun
|
|
25
|
+
uses: oven-sh/setup-bun@v2
|
|
26
|
+
with:
|
|
27
|
+
bun-version: "latest"
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: bun install
|
|
30
|
+
- name: Check formatting
|
|
31
|
+
run: bunx prettier --check .
|
|
32
|
+
- name: Lint code
|
|
33
|
+
run: bun run lint
|
|
34
|
+
- name: Run tests
|
|
35
|
+
run: bun run test
|
|
36
|
+
env:
|
|
37
|
+
REDIS_URL: redis://localhost:6379
|
|
38
|
+
- name: Build project
|
|
39
|
+
run: bun run build
|
|
40
|
+
- name: Test CLI
|
|
41
|
+
run: |
|
|
42
|
+
bun run dist/cli/stabilize-cli.js generate model TestModel
|
|
43
|
+
bun run dist/cli/stabilize-cli.js generate seed TestSeed
|
|
44
|
+
bun run dist/cli/stabilize-cli.js seed -c examples/config/database.ts
|
|
45
|
+
- name: Upload coverage
|
|
46
|
+
uses: codecov/codecov-action@v4
|
|
47
|
+
with:
|
|
48
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
49
|
+
|
|
50
|
+
publish:
|
|
51
|
+
needs: test
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
54
|
+
steps:
|
|
55
|
+
- name: Checkout code
|
|
56
|
+
uses: actions/checkout@v4
|
|
57
|
+
- name: Setup Bun
|
|
58
|
+
uses: oven-sh/setup-bun@v2
|
|
59
|
+
with:
|
|
60
|
+
bun-version: "latest"
|
|
61
|
+
- name: Install dependencies
|
|
62
|
+
run: bun install
|
|
63
|
+
- name: Build project
|
|
64
|
+
run: bun run build
|
|
65
|
+
- name: Setup Node.js
|
|
66
|
+
uses: actions/setup-node@v4
|
|
67
|
+
with:
|
|
68
|
+
node-version: "20"
|
|
69
|
+
registry-url: "https://registry.npmjs.org"
|
|
70
|
+
- name: Publish to npm
|
|
71
|
+
run: npm publish --access public
|
|
72
|
+
env:
|
|
73
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|