@growi/sdk-typescript 1.0.0-RC.0 → 1.0.0-RC.1
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.
- package/README.md +1 -1
- package/README_JP.md +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/dist/utils/axios-instance.d.ts +1 -2
- package/dist/utils/axios-instance.d.ts.map +1 -1
- package/dist/utils/axios-instance.js +3 -4
- package/dist/utils/axios-instance.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +1 -5
- package/src/utils/axios-instance.ts +3 -5
package/README.md
CHANGED
package/README_JP.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { DEFAULT_AXIOS_INSTANCE } from './utils/axios-instance.js';
|
|
2
2
|
export type * as Apiv1Types from './apiv1/index.js';
|
|
3
3
|
export type * as Apiv3Types from './apiv3/index.js';
|
|
4
|
-
export { default as apiv1Client } from './apiv1/index.js';
|
|
5
|
-
export { default as apiv3Client } from './apiv3/index.js';
|
|
6
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,YAAY,KAAK,UAAU,MAAM,kBAAkB,CAAC;AACpD,YAAY,KAAK,UAAU,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export { AXIOS_INSTANCE } from './utils/axios-instance.js';
|
|
3
|
-
export { default as apiv1Client } from './apiv1/index.js';
|
|
4
|
-
export { default as apiv3Client } from './apiv3/index.js';
|
|
1
|
+
export { DEFAULT_AXIOS_INSTANCE } from './utils/axios-instance.js';
|
|
5
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type AxiosRequestConfig } from 'axios';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const DEFAULT_AXIOS_INSTANCE: import("axios").AxiosInstance;
|
|
3
3
|
export declare const customInstance: <T>(config: AxiosRequestConfig, options?: AxiosRequestConfig) => Promise<T>;
|
|
4
|
-
export default customInstance;
|
|
5
4
|
//# sourceMappingURL=axios-instance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axios-instance.d.ts","sourceRoot":"","sources":["../../src/utils/axios-instance.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEvD,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"axios-instance.d.ts","sourceRoot":"","sources":["../../src/utils/axios-instance.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEvD,eAAO,MAAM,sBAAsB,+BAEjC,CAAC;AAEH,eAAO,MAAM,cAAc,GAAI,CAAC,EAAE,QAAQ,kBAAkB,EAAE,UAAU,kBAAkB,KAAG,OAAO,CAAC,CAAC,CAcrG,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import Axios from 'axios';
|
|
2
|
-
export const
|
|
3
|
-
baseURL: '', // set baseURL if you need
|
|
2
|
+
export const DEFAULT_AXIOS_INSTANCE = Axios.create({
|
|
3
|
+
baseURL: 'http://localhost', // set baseURL if you need
|
|
4
4
|
});
|
|
5
5
|
export const customInstance = (config, options) => {
|
|
6
6
|
const source = Axios.CancelToken.source();
|
|
7
|
-
const promise =
|
|
7
|
+
const promise = DEFAULT_AXIOS_INSTANCE({
|
|
8
8
|
...config,
|
|
9
9
|
...options,
|
|
10
10
|
cancelToken: source.token,
|
|
@@ -15,5 +15,4 @@ export const customInstance = (config, options) => {
|
|
|
15
15
|
};
|
|
16
16
|
return promise;
|
|
17
17
|
};
|
|
18
|
-
export default customInstance;
|
|
19
18
|
//# sourceMappingURL=axios-instance.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axios-instance.js","sourceRoot":"","sources":["../../src/utils/axios-instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAEvD,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"axios-instance.js","sourceRoot":"","sources":["../../src/utils/axios-instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAEvD,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC,MAAM,CAAC;IACjD,OAAO,EAAE,kBAAkB,EAAE,0BAA0B;CACxD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAI,MAA0B,EAAE,OAA4B,EAAc,EAAE;IACxG,MAAM,MAAM,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;IAC1C,MAAM,OAAO,GAAG,sBAAsB,CAAC;QACrC,GAAG,MAAM;QACT,GAAG,OAAO;QACV,WAAW,EAAE,MAAM,CAAC,KAAK;KAC1B,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;IAE5B,aAAa;IACb,OAAO,CAAC,MAAM,GAAG,GAAG,EAAE;QACpB,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACnC,CAAC,CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@growi/sdk-typescript",
|
|
3
|
-
"version": "1.0.0-RC.
|
|
3
|
+
"version": "1.0.0-RC.1",
|
|
4
4
|
"description": "GROWI SDK for TypeScript, providing utilities and types for building applications that interact with GROWI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"files": ["dist", "src", "README.md", "README_JP.md", "CHANGELOG.md", "LICENSE"],
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
28
|
-
"url": "https://github.com/
|
|
28
|
+
"url": "https://github.com/growilabs/growi-sdk-typescript.git"
|
|
29
29
|
},
|
|
30
|
-
"homepage": "https://github.com/
|
|
30
|
+
"homepage": "https://github.com/growilabs/growi-sdk-typescript",
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": ">=18.0.0"
|
|
33
33
|
},
|
package/src/index.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export { AXIOS_INSTANCE } from './utils/axios-instance.js';
|
|
1
|
+
export { DEFAULT_AXIOS_INSTANCE } from './utils/axios-instance.js';
|
|
3
2
|
|
|
4
3
|
export type * as Apiv1Types from './apiv1/index.js';
|
|
5
4
|
export type * as Apiv3Types from './apiv3/index.js';
|
|
6
|
-
|
|
7
|
-
export { default as apiv1Client } from './apiv1/index.js';
|
|
8
|
-
export { default as apiv3Client } from './apiv3/index.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import Axios, { type AxiosRequestConfig } from 'axios';
|
|
2
2
|
|
|
3
|
-
export const
|
|
4
|
-
baseURL: '', // set baseURL if you need
|
|
3
|
+
export const DEFAULT_AXIOS_INSTANCE = Axios.create({
|
|
4
|
+
baseURL: 'http://localhost', // set baseURL if you need
|
|
5
5
|
});
|
|
6
6
|
|
|
7
7
|
export const customInstance = <T>(config: AxiosRequestConfig, options?: AxiosRequestConfig): Promise<T> => {
|
|
8
8
|
const source = Axios.CancelToken.source();
|
|
9
|
-
const promise =
|
|
9
|
+
const promise = DEFAULT_AXIOS_INSTANCE({
|
|
10
10
|
...config,
|
|
11
11
|
...options,
|
|
12
12
|
cancelToken: source.token,
|
|
@@ -19,5 +19,3 @@ export const customInstance = <T>(config: AxiosRequestConfig, options?: AxiosReq
|
|
|
19
19
|
|
|
20
20
|
return promise;
|
|
21
21
|
};
|
|
22
|
-
|
|
23
|
-
export default customInstance;
|