Skip to content

Commit dcd1e11

Browse files
committed
Base url, eslint rules updated
1 parent e053447 commit dcd1e11

4 files changed

Lines changed: 13 additions & 17 deletions

File tree

.github/workflows/merge-main.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Node.js
1616
uses: actions/setup-node@v4
1717
with:
18-
node-version: 20
18+
node-version: 22
1919

2020
- name: Install dependencies
2121
run: npm ci
@@ -33,7 +33,7 @@ jobs:
3333
- name: Set up Node.js
3434
uses: actions/setup-node@v4
3535
with:
36-
node-version: 20
36+
node-version: 22
3737

3838
- name: Install dependencies
3939
run: npm ci
@@ -53,7 +53,7 @@ jobs:
5353
- name: Set up Node.js
5454
uses: actions/setup-node@v4
5555
with:
56-
node-version: 20
56+
node-version: 22
5757
registry-url: 'https://registry.npmjs.org'
5858

5959
- name: Install dependencies

.github/workflows/pr-main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Node.js
1616
uses: actions/setup-node@v4
1717
with:
18-
node-version: 20
18+
node-version: 22
1919

2020
- name: Install dependencies
2121
run: npm ci
@@ -33,7 +33,7 @@ jobs:
3333
- name: Set up Node.js
3434
uses: actions/setup-node@v4
3535
with:
36-
node-version: 20
36+
node-version: 22
3737

3838
- name: Install dependencies
3939
run: npm ci

eslint.config.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,6 @@ module.exports = defineConfig([
6868
},
6969
],
7070

71-
"object-property-newline": [
72-
"error",
73-
{
74-
allowAllPropertiesOnSameLine: false,
75-
},
76-
],
77-
7871
"implicit-arrow-linebreak": "off",
7972
"no-await-in-loop": "off",
8073
"class-methods-use-this": "off",

src/core/client/build-client.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
import LinkedApi from '@linkedapi/node';
1+
import LinkedApi, { buildLinkedApiHttpClient } from '@linkedapi/node';
22

33
interface TClientTokens {
44
linkedApiToken: string;
55
identificationToken: string;
66
}
77

8+
const DEFAULT_API_BASE_URL = 'https://api.linkedapi.io' as const;
9+
810
export function buildClient(tokens: TClientTokens): LinkedApi {
9-
return new LinkedApi({
10-
...tokens,
11-
client: 'cli'
12-
});
11+
const overrideBaseUrl = process.env.LINKED_API_BASE_URL?.trim();
12+
const baseUrl =
13+
overrideBaseUrl && overrideBaseUrl.length > 0 ? overrideBaseUrl : DEFAULT_API_BASE_URL;
14+
const httpClient = buildLinkedApiHttpClient({ ...tokens, client: 'cli' }, 'cli', baseUrl);
15+
return new LinkedApi(httpClient);
1316
}

0 commit comments

Comments
 (0)