@metarisc/metarisc-js 0.0.1-alpha.2 → 0.0.1-alpha.3

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.
@@ -0,0 +1,29 @@
1
+ name: "CI"
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+
7
+ jobs:
8
+
9
+ build:
10
+
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+
15
+ - uses: actions/checkout@v3
16
+
17
+ - uses: actions/setup-node@v3
18
+ with:
19
+ registry-url: 'https://registry.npmjs.org'
20
+
21
+ - run: npm install
22
+
23
+ - run: npm run compile
24
+
25
+ - run: npm run lint
26
+
27
+ - run: npm publish --access=public
28
+ env:
29
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/lib/metarisc.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { AxiosResponse } from "axios";
2
2
  interface RequestConfig {
3
3
  body?: any;
4
- headers?: string | {
4
+ headers?: {
5
5
  [name: string]: string | string[];
6
6
  };
7
7
  params?: {
package/lib/metarisc.js CHANGED
@@ -13,7 +13,8 @@ class Metarisc {
13
13
  method: config.method || 'GET',
14
14
  url: config.endpoint || '/',
15
15
  params: config.params,
16
- data: config.body
16
+ data: config.body,
17
+ headers: config.headers
17
18
  });
18
19
  }
19
20
  async *autoPagingIterator(config) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@metarisc/metarisc-js",
3
3
  "main": "lib/index.js",
4
4
  "types": "lib/index.d.ts",
5
- "version": "0.0.1-alpha.2",
5
+ "version": "0.0.1-alpha.3",
6
6
  "scripts": {
7
7
  "lint": "eslint . --ext .ts",
8
8
  "compile": "tsc"