Skip to content

Commit

Permalink
#51: support alternative base url paths (#52)
Browse files Browse the repository at this point in the history
* #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]>
  • Loading branch information
ThePlenkov and MrRefactoring authored Jun 1, 2023
1 parent 20a5505 commit dd62238
Show file tree
Hide file tree
Showing 96 changed files with 1,444 additions and 980 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: CI

on: [push]
name: ci
on: push

jobs:
build:
Expand All @@ -15,7 +14,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm ci --force
- name: Create .env file
run: |
touch .env
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci
run: npm ci --force
- name: Create .env file
run: |
touch .env
Expand Down
11 changes: 8 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"plugins": [
"prettier-plugin-jsdoc"
]
"arrowParens": "avoid",
"endOfLine": "lf",
"plugins": ["prettier-plugin-jsdoc"],
"printWidth": 120,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### 1.7.0

- `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.

### 1.6.3

- `atlas_doc_format` added to some models. Thanks to [Andrew McClenaghan](https://github.com/andymac4182) for pull request.
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Usability, consistency, and performance are key focuses of confluence.js, and it
- [JWT](#jwt)
- [Personal access token](#personal-access-token)
- [Your first request and using algorithm](#your-first-request-and-using-algorithm)
- [`apiPrefix` config parameter](#apiprefix-config-parameter)
- [Decreasing Webpack bundle size](#decreasing-webpack-bundle-size)
- [Take a look at our other products](#take-a-look-at-our-other-products)
- [License](#license)
Expand Down Expand Up @@ -271,6 +272,21 @@ The name of the methods is the name of the endpoint in the group without spaces

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

#### `apiPrefix` config parameter

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.

Example of use:

```typescript
import { ConfluenceClient } from 'confluence.js';

const client = new ConfluenceClient({
host: 'https://your-domain.atlassian.net',
apiPrefix: '/api',
});
```

## Decreasing Webpack bundle size

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

0 comments on commit dd62238

Please sign in to comment.