Skip to content

Commit dd62238

Browse files
#51: support alternative base url paths (#52)
* #51: support alternative base url paths * code improvements * 1.7.0 version added * README.md updated * temporary --force flag for `npm i`, `npm ci` --------- Co-authored-by: Vladislav Tupikin <[email protected]>
1 parent 20a5505 commit dd62238

File tree

96 files changed

+1444
-980
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+1444
-980
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
name: CI
2-
3-
on: [push]
1+
name: ci
2+
on: push
43

54
jobs:
65
build:
@@ -15,7 +14,7 @@ jobs:
1514
uses: actions/setup-node@v1
1615
with:
1716
node-version: ${{ matrix.node-version }}
18-
- run: npm ci
17+
- run: npm ci --force
1918
- name: Create .env file
2019
run: |
2120
touch .env

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
node-version: 16
1414
registry-url: https://registry.npmjs.org/
1515
- name: Install dependencies
16-
run: npm ci
16+
run: npm ci --force
1717
- name: Create .env file
1818
run: |
1919
touch .env

.prettierrc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
2-
"plugins": [
3-
"prettier-plugin-jsdoc"
4-
]
2+
"arrowParens": "avoid",
3+
"endOfLine": "lf",
4+
"plugins": ["prettier-plugin-jsdoc"],
5+
"printWidth": 120,
6+
"singleQuote": true,
7+
"tabWidth": 2,
8+
"trailingComma": "all",
9+
"useTabs": false
510
}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
### 1.7.0
4+
5+
- `apiPrefix` added to code for allowing to use custom API prefix for all clients. Thanks to [Petr Plenkov](https://github.com/ThePlenkov) for pull request.
6+
37
### 1.6.3
48

59
- `atlas_doc_format` added to some models. Thanks to [Andrew McClenaghan](https://github.com/andymac4182) for pull request.

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Usability, consistency, and performance are key focuses of confluence.js, and it
2525
- [JWT](#jwt)
2626
- [Personal access token](#personal-access-token)
2727
- [Your first request and using algorithm](#your-first-request-and-using-algorithm)
28+
- [`apiPrefix` config parameter](#apiprefix-config-parameter)
2829
- [Decreasing Webpack bundle size](#decreasing-webpack-bundle-size)
2930
- [Take a look at our other products](#take-a-look-at-our-other-products)
3031
- [License](#license)
@@ -271,6 +272,21 @@ The name of the methods is the name of the endpoint in the group without spaces
271272

272273
The parameters depend on the specific endpoint. For more information, [see here](https://mrrefactoring.github.io/confluence.js/).
273274

275+
#### `apiPrefix` config parameter
276+
277+
The `apiPrefix` parameter is used to specify the prefix for the API. For example, if you use the custom domain `https://mydomain.atlassian.net/api` for API.
278+
279+
Example of use:
280+
281+
```typescript
282+
import { ConfluenceClient } from 'confluence.js';
283+
284+
const client = new ConfluenceClient({
285+
host: 'https://your-domain.atlassian.net',
286+
apiPrefix: '/api',
287+
});
288+
```
289+
274290
## Decreasing Webpack bundle size
275291

276292
If you use Webpack and need to reduce the size of the assembly, you can create your client with only the groups you use.

0 commit comments

Comments
 (0)