Skip to content

Commit 5f41440

Browse files
committed
license
1 parent 1e6a42b commit 5f41440

7 files changed

Lines changed: 130 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
build-test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node-version: [18.x, 20.x]
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
cache: 'npm'
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Build
29+
run: npm run build
30+
31+
- name: Run tests
32+
env:
33+
# Provide dummy env to prevent accidental real calls; tests that hit real services should be conditionally skipped
34+
url: ${{secrets.TEST_URL}}
35+
db: ${{secrets.TEST_DB}}
36+
uid: ${{secrets.TEST_UID}}
37+
api_key: ${{secrets.TEST_API_KEY}}
38+
odx_api_key: ${{secrets.TEST_ODX_API_KEY}}
39+
run: npm test -- --ci --reporters=default --reporters=jest-junit

.github/workflows/publish.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
id-token: write # required for provenance (can be kept even if not used)
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Use Node.js 18
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 18
24+
registry-url: 'https://registry.npmjs.org'
25+
cache: 'npm'
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Run tests
31+
env:
32+
# If your tests require real credentials, consider skipping in CI or mocking network
33+
url: ${{secrets.TEST_URL}}
34+
db: ${{secrets.TEST_DB}}
35+
uid: ${{secrets.TEST_UID}}
36+
api_key: ${{secrets.TEST_API_KEY}}
37+
odx_api_key: ${{secrets.TEST_ODX_API_KEY}}
38+
run: npm test -- --ci
39+
40+
- name: Build
41+
run: npm run build
42+
43+
- name: Check version matches tag
44+
if: startsWith(github.ref, 'refs/tags/')
45+
run: |
46+
PKG_VERSION=$(node -p "require('./package.json').version")
47+
TAG_VERSION=${GITHUB_REF#refs/tags/v}
48+
if [ "$PKG_VERSION" != "$TAG_VERSION" ]; then
49+
echo "Package version ($PKG_VERSION) does not match tag ($TAG_VERSION)" >&2
50+
exit 1
51+
fi
52+
53+
- name: Publish to npm
54+
env:
55+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
56+
run: npm publish --access public

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2025 TERRAKERNEL PTE. LTD.
4+
Author: Julian Richie Wajong
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,4 +241,4 @@ Outputs are placed under `dist/` and are referenced via `exports` in package.jso
241241
This package follows semantic versioning when published to npm. Current version is defined in package.json.
242242

243243
## License
244-
MIT © 2025 TerraKernel. PTE. LTD / ODXProxy Team
244+
MIT © 2025 Julian Richie Wajong

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
},
2020
"keywords": [
2121
"odoo",
22+
"odoo-integration",
2223
"odxproxy",
2324
"api",
2425
"sdk",
2526
"client"
2627
],
27-
"author": "Your Name",
28+
"author": "Julian Richie Wajong <julian.wajong@gmail.com> (https://www.odxproxy.io)",
2829
"license": "MIT",
2930
"devDependencies": {
3031
"@types/jest": "^30.0.0",

src/client.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* MIT License
3+
* Copyright (c) 2025 TERRAKERNEL PTE. LTD.
4+
* Author Julian Richie Wajong
5+
*/
16
import axios, {AxiosInstance} from "axios";
27

38
export interface OdxInstanceInfo{

src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* MIT License
3+
* Copyright (c) 2025 TERRAKERNEL PTE. LTD.
4+
* Author Julian Richie Wajong
5+
*/
16
import {OdxProxyClient, OdxProxyClientInfo, OdxServerResponse, OdxClientRequest, OdxClientKeywordRequest} from "./client";
27
import ulid from "ulid";
38
export const init = (options: OdxProxyClientInfo) => OdxProxyClient.init(options);

0 commit comments

Comments
 (0)