@obb871001/api-integration-sdk 1.0.3 → 1.0.5
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/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@tanstack/react-query");const P=require("react");require("axios");const ee=P.createContext(null),re=()=>{const s=P.useContext(ee);if(!s)throw new Error("useAxios must be used inside <ApiProvider>");return s.client};var v={exports:{}},m={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var I;function te(){if(I)return m;I=1;var s=Symbol.for("react.transitional.element"),E=Symbol.for("react.fragment");function c(i,o,u){var f=null;if(u!==void 0&&(f=""+u),o.key!==void 0&&(f=""+o.key),"key"in o){u={};for(var d in o)d!=="key"&&(u[d]=o[d])}else u=o;return o=u.ref,{$$typeof:s,type:i,key:f,ref:o!==void 0?o:null,props:u}}return m.Fragment=E,m.jsx=c,m.jsxs=c,m}var _={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var F;function ne(){return F||(F=1,process.env.NODE_ENV!=="production"&&(function(){function s(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Z?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case p:return"Fragment";case U:return"Profiler";case W:return"StrictMode";case G:return"Suspense";case X:return"SuspenseList";case H:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case L:return"Portal";case V:return e.displayName||"Context";case J:return(e._context.displayName||"Context")+".Consumer";case z:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B:return r=e.displayName||null,r!==null?r:s(e.type)||"Memo";case T:r=e._payload,e=e._init;try{return s(e(r))}catch{}}return null}function E(e){return""+e}function c(e){try{E(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),E(e)}}function i(e){if(e===p)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===T)return"<...>";try{var r=s(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function o(){var e=k.A;return e===null?null:e.getOwner()}function u(){return Error("react-stack-top-frame")}function f(e){if(j.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function d(e,r){function t(){h||(h=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function M(){var e=s(this.type);return N[e]||(N[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function q(e,r,t,n,R,O){var a=t.ref;return e={$$typeof:g,type:e,key:r,props:t,_owner:n},(a!==void 0?a:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:M}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:R}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:O}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function x(e,r,t,n,R,O){var a=r.children;if(a!==void 0)if(n)if(Q(a)){for(n=0;n<a.length;n++)w(a[n]);Object.freeze&&Object.freeze(a)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else w(a);if(j.call(r,"key")){a=s(e);var l=Object.keys(r).filter(function(K){return K!=="key"});n=0<l.length?"{key: someKey, "+l.join(": ..., ")+": ...}":"{key: someKey}",$[a+n]||(l=0<l.length?"{"+l.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,n,a,
|
|
22
|
+
<%s key={someKey} {...props} />`,n,a,l,a),$[a+n]=!0)}if(a=null,t!==void 0&&(c(t),a=""+t),f(r)&&(c(r.key),a=""+r.key),"key"in r){t={};for(var S in r)S!=="key"&&(t[S]=r[S])}else t=r;return a&&d(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),q(e,a,t,o(),R,O)}function w(e){y(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===T&&(e._payload.status==="fulfilled"?y(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function y(e){return typeof e=="object"&&e!==null&&e.$$typeof===g}var b=P,g=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),V=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),Z=Symbol.for("react.client.reference"),k=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=Object.prototype.hasOwnProperty,Q=Array.isArray,A=console.createTask?console.createTask:function(){return null};b={react_stack_bottom_frame:function(e){return e()}};var h,N={},C=b.react_stack_bottom_frame.bind(b,u)(),Y=A(i(u)),$={};_.Fragment=p,_.jsx=function(e,r,t){var n=1e4>k.recentlyCreatedOwnerStacks++;return x(e,r,t,!1,n?Error("react-stack-top-frame"):C,n?A(i(e)):Y)},_.jsxs=function(e,r,t){var n=1e4>k.recentlyCreatedOwnerStacks++;return x(e,r,t,!0,n?Error("react-stack-top-frame"):C,n?A(i(e)):Y)}})()),_}var D;function ae(){return D||(D=1,process.env.NODE_ENV==="production"?v.exports=te():v.exports=ne()),v.exports}ae();exports.useAxios=re;
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "@tanstack/react-query";
|
|
2
2
|
import K, { createContext as ee, useContext as re } from "react";
|
|
3
|
-
|
|
3
|
+
import "axios";
|
|
4
|
+
const te = ee(null), ce = () => {
|
|
4
5
|
const s = re(te);
|
|
5
6
|
if (!s) throw new Error("useAxios must be used inside <ApiProvider>");
|
|
6
7
|
return s.client;
|
|
7
8
|
};
|
|
8
|
-
var
|
|
9
|
+
var p = { exports: {} }, m = {};
|
|
9
10
|
/**
|
|
10
11
|
* @license React
|
|
11
12
|
* react-jsx-runtime.production.js
|
|
@@ -56,7 +57,7 @@ function ae() {
|
|
|
56
57
|
return e.$$typeof === H ? null : e.displayName || e.name || null;
|
|
57
58
|
if (typeof e == "string") return e;
|
|
58
59
|
switch (e) {
|
|
59
|
-
case
|
|
60
|
+
case v:
|
|
60
61
|
return "Fragment";
|
|
61
62
|
case U:
|
|
62
63
|
return "Profiler";
|
|
@@ -114,7 +115,7 @@ function ae() {
|
|
|
114
115
|
}
|
|
115
116
|
}
|
|
116
117
|
function i(e) {
|
|
117
|
-
if (e ===
|
|
118
|
+
if (e === v) return "<>";
|
|
118
119
|
if (typeof e == "object" && e !== null && e.$$typeof === T)
|
|
119
120
|
return "<...>";
|
|
120
121
|
try {
|
|
@@ -243,7 +244,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
243
244
|
function w(e) {
|
|
244
245
|
return typeof e == "object" && e !== null && e.$$typeof === y;
|
|
245
246
|
}
|
|
246
|
-
var R = K, y = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"),
|
|
247
|
+
var R = K, y = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), W = Symbol.for("react.strict_mode"), U = Symbol.for("react.profiler"), q = Symbol.for("react.consumer"), J = Symbol.for("react.context"), V = Symbol.for("react.forward_ref"), z = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), X = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), H = Symbol.for("react.client.reference"), k = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, g = Object.prototype.hasOwnProperty, Z = Array.isArray, A = console.createTask ? console.createTask : function() {
|
|
247
248
|
return null;
|
|
248
249
|
};
|
|
249
250
|
R = {
|
|
@@ -255,7 +256,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
255
256
|
R,
|
|
256
257
|
u
|
|
257
258
|
)(), C = A(i(u)), Y = {};
|
|
258
|
-
_.Fragment =
|
|
259
|
+
_.Fragment = v, _.jsx = function(e, r, t) {
|
|
259
260
|
var n = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
260
261
|
return P(
|
|
261
262
|
e,
|
|
@@ -280,9 +281,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
280
281
|
}
|
|
281
282
|
var F;
|
|
282
283
|
function oe() {
|
|
283
|
-
return F || (F = 1, process.env.NODE_ENV === "production" ?
|
|
284
|
+
return F || (F = 1, process.env.NODE_ENV === "production" ? p.exports = ne() : p.exports = ae()), p.exports;
|
|
284
285
|
}
|
|
285
286
|
oe();
|
|
286
287
|
export {
|
|
287
|
-
|
|
288
|
+
ce as useAxios
|
|
288
289
|
};
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@obb871001/api-integration-sdk",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.5",
|
|
5
5
|
"description": "集成API",
|
|
6
|
-
"main": "dist/index.
|
|
7
|
-
"module": "
|
|
6
|
+
"main": "dist/index.cjs",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQueries } from "@tanstack/react-query";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import useUserApi from "../services/useUserApi";
|
|
3
|
+
import useUserApi from "../services/useUserApi.jsx";
|
|
4
4
|
|
|
5
5
|
const usePeriodicDataUpdater = () => {
|
|
6
6
|
const { userInfoApi } = useUserApi();
|
package/src/services/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./useCommonApi";
|
|
2
|
-
export * from "./useUserApi";
|
|
1
|
+
export * from "./useCommonApi.jsx";
|
|
2
|
+
export * from "./useUserApi.jsx";
|