@pdg/api 1.0.25 → 1.0.27

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/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
  /********************************************************************************************************************
@@ -8,6 +8,7 @@ declare class Api<T = any, D extends ApiRequestData = {}> {
8
8
  constructor(option: ApiOption<T>);
9
9
  get(path: string, data?: D, option?: ApiRequestOption): Promise<T>;
10
10
  post(path: string, data?: D, option?: ApiRequestOption): Promise<T>;
11
+ put(path: string, data?: D, option?: ApiRequestOption): Promise<T>;
11
12
  patch(path: string, data?: D, option?: ApiRequestOption): Promise<T>;
12
13
  delete(path: string, data?: D, option?: ApiRequestOption): Promise<T>;
13
14
  /********************************************************************************************************************
@@ -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
@@ -135,6 +135,9 @@ class Api {
135
135
  post(path, data, option) {
136
136
  return this.run('post', path, data, option);
137
137
  }
138
+ put(path, data, option) {
139
+ return this.run('put', path, data, option);
140
+ }
138
141
  patch(path, data, option) {
139
142
  return this.run('patch', path, data, option);
140
143
  }
package/dist/index.js CHANGED
@@ -135,6 +135,9 @@ class Api {
135
135
  post(path, data, option) {
136
136
  return this.run('post', path, data, option);
137
137
  }
138
+ put(path, data, option) {
139
+ return this.run('put', path, data, option);
140
+ }
138
141
  patch(path, data, option) {
139
142
  return this.run('patch', path, data, option);
140
143
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@pdg/api",
3
3
  "title": "Typescript API Module",
4
4
  "description": "Typescript API Module",
5
- "version": "1.0.25",
5
+ "version": "1.0.27",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
8
8
  "module": "./dist/index.esm.js",
@@ -30,14 +30,15 @@
30
30
  "scripts": {
31
31
  "dev": "cd examples && npm run dev",
32
32
  "watchman:del": "watchman watch-del \"${PWD}\" ; watchman watch-project \"${PWD}\"",
33
- "build": "npm run watchman:del && npm run test && npm run lint && rollup -c --bundleConfigAsCjs",
33
+ "build": "npm run watchman:del && npm run test && rollup -c --bundleConfigAsCjs",
34
34
  "git:commit": "node .git-commit.cjs",
35
35
  "git:push": "git push",
36
36
  "git:commit:push": "npm run git:commit && npm run git:push",
37
37
  "git:merge:mirror": "node .git-merge.cjs mirror main",
38
38
  "reset:gitignore": "git rm -r --cached . && git add .",
39
- "pub": "npm i && npm run build && npm publish --access=public && rm ./.git/hooks/pre-commit",
39
+ "pub": "npm i && npm run build && npm publish --access=public && [ -f ./.git/hooks/pre-commit ] && rm ./.git/hooks/pre-commit || true",
40
40
  "lint": "eslint './src/**/*.ts'",
41
+ "tsc": "tsc --noEmit",
41
42
  "reinstall": "npm run reinstall:module",
42
43
  "reinstall:module": "rm -rf node_modules && rm -f package-lock.json && npm i",
43
44
  "test": "jest"
@@ -56,6 +57,7 @@
56
57
  "devDependencies": {
57
58
  "@eslint/js": "9.39.1",
58
59
  "@rollup/plugin-commonjs": "29.0.0",
60
+ "@rollup/plugin-eslint": "^9.2.0",
59
61
  "@rollup/plugin-node-resolve": "16.0.3",
60
62
  "@types/jest": "29.5.14",
61
63
  "@types/node": "22.19.2",