@loopstack/core 0.15.1 → 0.15.2
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/.github/workflows/ci-test.yml +31 -0
- package/.github/workflows/pr-main.yaml +16 -0
- package/.github/workflows/publish-npm.yml +86 -0
- package/.github/workflows/push-main.yaml +16 -0
- package/package.json +8 -3
- package/dist/persistence/services/__backup__/document.service.d.ts +0 -0
- package/dist/persistence/services/__backup__/document.service.js +0 -1
- package/dist/persistence/services/__backup__/document.service.js.map +0 -1
- package/dist/persistence/services/__backup__/dynamic-repository.service.d.ts +0 -0
- package/dist/persistence/services/__backup__/dynamic-repository.service.js +0 -1
- package/dist/persistence/services/__backup__/dynamic-repository.service.js.map +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: "CI Test Workflow"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
inputs:
|
|
6
|
+
node-version:
|
|
7
|
+
required: false
|
|
8
|
+
type: string
|
|
9
|
+
default: '20'
|
|
10
|
+
description: "Node.js version to use"
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
name: "Install & Test"
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
timeout-minutes: 15
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout Code
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Setup Node.js ${{ inputs.node-version }}
|
|
22
|
+
uses: actions/setup-node@v4
|
|
23
|
+
with:
|
|
24
|
+
node-version: ${{ inputs.node-version }}
|
|
25
|
+
cache: 'npm'
|
|
26
|
+
|
|
27
|
+
- name: Install Dependencies
|
|
28
|
+
run: npm ci
|
|
29
|
+
|
|
30
|
+
- name: Run Tests
|
|
31
|
+
run: npm test
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: "PR Main Workflow"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [ "main" ]
|
|
6
|
+
|
|
7
|
+
concurrency:
|
|
8
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
9
|
+
cancel-in-progress: true
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
call-test-workflow:
|
|
13
|
+
name: "Run CI"
|
|
14
|
+
uses: ./.github/workflows/ci-test.yml
|
|
15
|
+
with:
|
|
16
|
+
node-version: '20'
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
name: 'Publish to NPM Workflow'
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*.*.*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
name: 'Build & Publish to NPM'
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
timeout-minutes: 15
|
|
13
|
+
permissions:
|
|
14
|
+
contents: write
|
|
15
|
+
id-token: write
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout Code
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
|
|
22
|
+
- name: Check if tag is on main branch
|
|
23
|
+
run: |
|
|
24
|
+
git fetch origin main
|
|
25
|
+
if ! git branch -r --contains ${{ github.ref }} | grep -q 'origin/main'; then
|
|
26
|
+
echo "❌ Tag is not on main branch"
|
|
27
|
+
exit 1
|
|
28
|
+
fi
|
|
29
|
+
echo "✅ Tag is on main branch"
|
|
30
|
+
|
|
31
|
+
- name: Setup Node.js
|
|
32
|
+
uses: actions/setup-node@v4
|
|
33
|
+
with:
|
|
34
|
+
node-version: '20'
|
|
35
|
+
cache: 'npm'
|
|
36
|
+
registry-url: 'https://registry.npmjs.org'
|
|
37
|
+
|
|
38
|
+
- name: Extract Package Version
|
|
39
|
+
id: package
|
|
40
|
+
run: |
|
|
41
|
+
echo "name=$(node -p "require('./package.json').name")" >> $GITHUB_OUTPUT
|
|
42
|
+
echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
|
43
|
+
|
|
44
|
+
- name: Validate Version Matches Tag
|
|
45
|
+
run: |
|
|
46
|
+
TAG_VERSION=${GITHUB_REF#refs/tags/v}
|
|
47
|
+
PKG_VERSION=${{ steps.package.outputs.version }}
|
|
48
|
+
if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
|
|
49
|
+
echo "❌ Tag version ($TAG_VERSION) does not match package.json version ($PKG_VERSION)"
|
|
50
|
+
exit 1
|
|
51
|
+
fi
|
|
52
|
+
echo "✅ Versions match"
|
|
53
|
+
|
|
54
|
+
- name: Install Dependencies
|
|
55
|
+
run: npm ci
|
|
56
|
+
|
|
57
|
+
- name: Run Tests
|
|
58
|
+
run: npm test
|
|
59
|
+
|
|
60
|
+
- name: Build Package
|
|
61
|
+
run: npm run build --if-present
|
|
62
|
+
|
|
63
|
+
- name: Publish to NPM
|
|
64
|
+
run: npm publish --access public
|
|
65
|
+
env:
|
|
66
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
67
|
+
|
|
68
|
+
- name: Create GitHub Release
|
|
69
|
+
uses: softprops/action-gh-release@v2
|
|
70
|
+
if: success()
|
|
71
|
+
with:
|
|
72
|
+
tag_name: ${{ github.ref_name }}
|
|
73
|
+
body: |
|
|
74
|
+
## 📦 NPM Package
|
|
75
|
+
|
|
76
|
+
**Package:** [${{ steps.package.outputs.name }}](https://www.npmjs.com/package/${{ steps.package.outputs.name }}/v/${{ steps.package.outputs.version }})
|
|
77
|
+
**Version:** ${{ steps.package.outputs.version }}
|
|
78
|
+
|
|
79
|
+
Install with:
|
|
80
|
+
```bash
|
|
81
|
+
npm install ${{ steps.package.outputs.name }}@${{ steps.package.outputs.version }}
|
|
82
|
+
```
|
|
83
|
+
draft: false
|
|
84
|
+
prerelease: false
|
|
85
|
+
env:
|
|
86
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: 'Push Main Workflow'
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ['main']
|
|
6
|
+
|
|
7
|
+
concurrency:
|
|
8
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
9
|
+
cancel-in-progress: true
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
call-test-workflow:
|
|
13
|
+
name: 'Run CI'
|
|
14
|
+
uses: ./.github/workflows/ci-test.yml
|
|
15
|
+
with:
|
|
16
|
+
node-version: '20'
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@loopstack/core",
|
|
3
3
|
"displayName": "Loopstack Core Module",
|
|
4
4
|
"description": "The core module of the loopstack automation framework",
|
|
5
|
-
"version": "0.15.
|
|
5
|
+
"version": "0.15.2",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Jakob Klippel",
|
|
8
8
|
"url": "https://www.linkedin.com/in/jakob-klippel//"
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
"license": "BSL",
|
|
11
11
|
"main": "dist/index.js",
|
|
12
12
|
"types": "dist/index.d.ts",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/loopstack-ai/core"
|
|
16
|
+
},
|
|
13
17
|
"scripts": {
|
|
14
18
|
"build": "nest build",
|
|
15
19
|
"watch": "nest build --watch",
|
|
@@ -17,7 +21,7 @@
|
|
|
17
21
|
"compile": "tsc --noEmit",
|
|
18
22
|
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
19
23
|
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
|
20
|
-
"test": "jest",
|
|
24
|
+
"test": "jest --passWithNoTests",
|
|
21
25
|
"test:watch": "jest --watch",
|
|
22
26
|
"test:cov": "jest --coverage",
|
|
23
27
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
@@ -50,7 +54,8 @@
|
|
|
50
54
|
"lodash": "^4.17.21",
|
|
51
55
|
"openai": "^4.86.2",
|
|
52
56
|
"yaml": "^2.8.1",
|
|
53
|
-
"zod": "^3.25.76"
|
|
57
|
+
"zod": "^3.25.76",
|
|
58
|
+
"zod-to-json-schema": "^3.25.0"
|
|
54
59
|
},
|
|
55
60
|
"devDependencies": {
|
|
56
61
|
"@eslint/eslintrc": "^3.2.0",
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=document.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document.service.js","sourceRoot":"","sources":["../../../../src/persistence/services/__backup__/document.service.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=dynamic-repository.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-repository.service.js","sourceRoot":"","sources":["../../../../src/persistence/services/__backup__/dynamic-repository.service.ts"],"names":[],"mappings":""}
|