@pdg/api 1.0.24 → 1.0.26

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @pdg/api
2
2
 
3
- 타입스크립트 API 모듈
3
+ Typescript API Module
4
4
 
5
5
  ## 설치
6
6
  ```
package/dist/Api/Api.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Method } from 'axios';
2
- import { ApiRequestData, ApiOption, ApiRequestOption } from './Api.types';
1
+ import { type Method } from 'axios';
2
+ import { type ApiRequestData, type ApiOption, type ApiRequestOption } from './Api.types';
3
3
  declare class Api<T = any, D extends ApiRequestData = {}> {
4
4
  option: ApiOption;
5
5
  /********************************************************************************************************************
@@ -1,4 +1,4 @@
1
- import { AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig, ResponseType } from 'axios';
1
+ import { type AxiosRequestConfig, type AxiosResponse, type InternalAxiosRequestConfig, type ResponseType } from 'axios';
2
2
  /********************************************************************************************************************
3
3
  * ApiRequestData, ApiRequestOption, ApiRequestConfig
4
4
  * ******************************************************************************************************************/
package/dist/index.esm.js CHANGED
@@ -105,7 +105,8 @@ class Api {
105
105
  .then((res) => {
106
106
  const { data: resData } = res;
107
107
  if (this.option.onResponse) {
108
- this.option.onResponse(res, requestConfig, this.option.baseUrl, path, data, option)
108
+ this.option
109
+ .onResponse(res, requestConfig, this.option.baseUrl, path, data, option)
109
110
  .then((finalResData) => {
110
111
  resolve(finalResData);
111
112
  })
package/dist/index.js CHANGED
@@ -105,7 +105,8 @@ class Api {
105
105
  .then((res) => {
106
106
  const { data: resData } = res;
107
107
  if (this.option.onResponse) {
108
- this.option.onResponse(res, requestConfig, this.option.baseUrl, path, data, option)
108
+ this.option
109
+ .onResponse(res, requestConfig, this.option.baseUrl, path, data, option)
109
110
  .then((finalResData) => {
110
111
  resolve(finalResData);
111
112
  })
package/package.json CHANGED
@@ -1,12 +1,19 @@
1
1
  {
2
2
  "name": "@pdg/api",
3
- "title": "API Module",
4
- "version": "1.0.24",
5
- "description": "API Module",
3
+ "title": "Typescript API Module",
4
+ "description": "Typescript API Module",
5
+ "version": "1.0.26",
6
6
  "type": "module",
7
- "types": "dist/index.d.ts",
8
- "main": "dist/index.js",
9
- "module": "dist/index.esm.js",
7
+ "main": "./dist/index.js",
8
+ "module": "./dist/index.esm.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.esm.js",
14
+ "require": "./dist/index.js"
15
+ }
16
+ },
10
17
  "repository": {
11
18
  "type": "git",
12
19
  "url": "git+https://github.com/parkdigy/api.git",
@@ -21,22 +28,26 @@
21
28
  "README.md"
22
29
  ],
23
30
  "scripts": {
24
- "test:get": "cd examples && npm run test:get",
25
- "build": "rollup -c --bundleConfigAsCjs",
26
- "pub": "npm i && npm run build && npm publish --access=public && rm ./.git/hooks/pre-commit",
31
+ "dev": "cd examples && npm run dev",
32
+ "watchman:del": "watchman watch-del \"${PWD}\" ; watchman watch-project \"${PWD}\"",
33
+ "build": "npm run watchman:del && npm run test && rollup -c --bundleConfigAsCjs",
27
34
  "git:commit": "node .git-commit.cjs",
28
35
  "git:push": "git push",
29
36
  "git:commit:push": "npm run git:commit && npm run git:push",
37
+ "git:merge:mirror": "node .git-merge.cjs mirror main",
30
38
  "reset:gitignore": "git rm -r --cached . && git add .",
39
+ "pub": "npm i && npm run build && npm publish --access=public && [ -f ./.git/hooks/pre-commit ] && rm ./.git/hooks/pre-commit || true",
40
+ "lint": "eslint './src/**/*.ts'",
41
+ "tsc": "tsc --noEmit",
31
42
  "reinstall": "npm run reinstall:module",
32
43
  "reinstall:module": "rm -rf node_modules && rm -f package-lock.json && npm i",
33
- "lint": "eslint './src/**/*.ts'"
44
+ "test": "jest"
34
45
  },
35
46
  "author": "YOUNG CHUL PARK",
36
47
  "license": "MIT",
37
48
  "readmeFilename": "README.md",
38
49
  "keywords": [
39
- "api",
50
+ "util",
40
51
  "typescript",
41
52
  "javascript"
42
53
  ],
@@ -44,24 +55,25 @@
44
55
  "axios": "^1.13.2"
45
56
  },
46
57
  "devDependencies": {
47
- "@eslint/js": "^9.28.0",
48
- "@rollup/plugin-commonjs": "^28.0.3",
49
- "@rollup/plugin-node-resolve": "^16.0.1",
50
- "@types/jest": "^29.5.14",
51
- "@types/node": "^22.15.29",
52
- "@typescript-eslint/parser": "^8.33.0",
53
- "eslint": "9.28.0",
54
- "eslint-config-prettier": "^10.1.5",
55
- "eslint-plugin-prettier": "^5.4.1",
56
- "jest": "^29.7.0",
57
- "prettier": "^3.5.3",
58
- "rollup": "^4.41.1",
59
- "rollup-plugin-delete": "^2.2.0",
60
- "rollup-plugin-peer-deps-external": "^2.2.4",
61
- "rollup-plugin-typescript2": "^0.36.0",
62
- "ts-jest": "^29.3.4",
63
- "ts-node": "^10.9.2",
64
- "typescript": "^5.8.3",
65
- "typescript-eslint": "^8.33.0"
58
+ "@eslint/js": "9.39.1",
59
+ "@rollup/plugin-commonjs": "29.0.0",
60
+ "@rollup/plugin-eslint": "^9.2.0",
61
+ "@rollup/plugin-node-resolve": "16.0.3",
62
+ "@types/jest": "29.5.14",
63
+ "@types/node": "22.19.2",
64
+ "@typescript-eslint/parser": "8.49.0",
65
+ "eslint": "9.39.1",
66
+ "eslint-config-prettier": "10.1.8",
67
+ "eslint-plugin-prettier": "5.5.4",
68
+ "jest": "29.7.0",
69
+ "prettier": "3.7.4",
70
+ "rollup": "4.53.3",
71
+ "rollup-plugin-delete": "2.2.0",
72
+ "rollup-plugin-peer-deps-external": "2.2.4",
73
+ "rollup-plugin-typescript2": "0.36.0",
74
+ "ts-jest": "29.4.6",
75
+ "ts-node": "10.9.2",
76
+ "typescript": "5.9.3",
77
+ "typescript-eslint": "8.49.0"
66
78
  }
67
79
  }