Kaynağa Gözat

bump version to 0.3.1

Acathur 4 yıl önce
ebeveyn
işleme
e9f584afcb
4 değiştirilmiş dosya ile 7 ekleme ve 5 silme
  1. 1 0
      dist/request/index.d.ts
  2. 2 2
      dist/request/index.js
  3. 1 1
      package.json
  4. 3 2
      src/request/index.ts

+ 1 - 0
dist/request/index.d.ts

@@ -6,6 +6,7 @@ declare const ProginnRequest: {
         baseURL?: string;
         bridge?: ProginnBridge;
         notifier?: Notifier;
+        withCredentials?: boolean;
     }) => (opts: {
         method: 'GET' | 'POST';
         url: string;

+ 2 - 2
dist/request/index.js

@@ -10,10 +10,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
 import Axios from 'axios';
 import qs from 'querystring';
 const factory = (opts) => {
-    const { baseURL, notifier, bridge } = opts || {};
+    const { baseURL, notifier, bridge, withCredentials = true } = opts || {};
     const axios = Axios.create({
         baseURL,
-        withCredentials: true
+        withCredentials
     });
     return (opts) => __awaiter(void 0, void 0, void 0, function* () {
         const { url, method, query, data, dataType = 'form', headers = {} } = opts;

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "proginn-lib",
-  "version": "0.3.0",
+  "version": "0.3.1",
   "description": "Proginn front-end common library.",
   "main": "dist/index.js",
   "module": "dist/index.js",

+ 3 - 2
src/request/index.ts

@@ -7,11 +7,12 @@ const factory = (opts: {
   baseURL?: string
   bridge?: ProginnBridge
   notifier?: Notifier
+  withCredentials?: boolean
 }) => {
-  const { baseURL, notifier, bridge } = opts || {}
+  const { baseURL, notifier, bridge, withCredentials = true } = opts || {}
   const axios = Axios.create({
     baseURL,
-    withCredentials: true
+    withCredentials
   })
 
   return async (opts: {