zova-module-a-fetch 5.1.20 → 5.1.23
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.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/service/composer.ts","../src/bean/bean.fetch.ts","../src/bean/bean.interceptorBase.ts","../src/config/config.ts","../src/monkey.ts","../src/.metadata/index.ts","../src/lib/const.ts","../src/lib/interceptor.ts"],"sourcesContent":["import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';\n\nimport { BeanBase, cast, deepExtend, SymbolErrorInstanceInfo, Use } from 'zova';\nimport { IOnionItem, IOnionSlice, SysOnion, TypeComposer } from 'zova-module-a-bean';\nimport { Service } from 'zova-module-a-bean';\n\nimport type { BeanFetch } from '../bean/bean.fetch.js';\nimport type {\n IDecoratorInterceptorOptions,\n IInterceptorRecord,\n IInterceptorRequest,\n IInterceptorRequestError,\n IInterceptorResponse,\n IInterceptorResponseError,\n} from '../types/interceptor.js';\n\n@Service()\nexport class ServiceComposer extends BeanBase {\n protected $beanFetch: BeanFetch;\n @Use()\n $$sysOnion: SysOnion;\n\n private _composerRequest: TypeComposer;\n private _composerRequestError: TypeComposer;\n private _composerResponse: TypeComposer;\n private _composerResponseError: TypeComposer;\n\n protected async __init__(\n beanFetch: BeanFetch,\n onionItems?:\n | IOnionItem<IDecoratorInterceptorOptions, keyof IInterceptorRecord>\n | IOnionItem<IDecoratorInterceptorOptions, keyof IInterceptorRecord>[],\n ) {\n this.$beanFetch = beanFetch;\n await this._createComposer(onionItems);\n }\n\n public executeRequest(config: AxiosRequestConfig) {\n return this._composerRequest(config);\n }\n\n public executeRequestError(error: AxiosError) {\n return this._composerRequestError(error);\n }\n\n public executeResponse(response: AxiosResponse) {\n return this._composerResponse(response);\n }\n\n public async executeResponseError(error: AxiosError) {\n error = await this._composerResponseError(error);\n if (error instanceof Error) {\n error[SymbolErrorInstanceInfo] = {\n instance: this.ctx.instance,\n info: 'executeResponseError',\n };\n }\n return error;\n }\n\n private async _createComposer(\n onionItems?:\n | IOnionItem<IDecoratorInterceptorOptions, keyof IInterceptorRecord>\n | IOnionItem<IDecoratorInterceptorOptions, keyof IInterceptorRecord>[],\n ) {\n // onionSlices\n let onionSlices: IOnionSlice<IDecoratorInterceptorOptions, keyof IInterceptorRecord>[];\n if (onionItems) {\n onionSlices = await this.$$sysOnion.interceptor.loadOnions(onionItems);\n } else {\n onionSlices = await this.$$sysOnion.interceptor.loadOnionsFromPackage();\n }\n // create interceptors\n for (const onionSlice of onionSlices) {\n onionSlice.beanInstance = await this.bean._newBean(\n onionSlice.beanFullName as any,\n true,\n this.$beanFetch,\n onionSlice.options,\n );\n }\n // compose\n this._composerRequest = this.$$sysOnion.interceptor.compose(\n onionSlices,\n (onionSlice, config: AxiosRequestConfig, next) => {\n // options\n const options = this._combineOnionOptions(onionSlice, config);\n // enable match ignore\n if (!this.$$sysOnion.checkOnionOptionsEnabled(options, config.url)) {\n return next(config);\n }\n // execute\n const beanInstance = cast<IInterceptorRequest>(onionSlice.beanInstance);\n if (!beanInstance.onRequest) return next(config);\n return beanInstance.onRequest(config, options, next as any);\n },\n );\n this._composerRequestError = this.$$sysOnion.interceptor.compose(\n onionSlices,\n (onionSlice, error: AxiosError, next) => {\n const config = error.config;\n // options\n const options = this._combineOnionOptions(onionSlice, config);\n // enable match ignore\n if (!this.$$sysOnion.checkOnionOptionsEnabled(options, config?.url)) {\n return next(error);\n }\n // execute\n const beanInstance = cast<IInterceptorRequestError>(onionSlice.beanInstance);\n if (!beanInstance.onRequestError) return next(error);\n return beanInstance.onRequestError(error, options, next as any);\n },\n );\n this._composerResponse = this.$$sysOnion.interceptor.compose(\n onionSlices,\n (onionSlice, response: AxiosResponse, next) => {\n const config = response.config;\n // options\n const options = this._combineOnionOptions(onionSlice, config);\n // enable match ignore\n if (!this.$$sysOnion.checkOnionOptionsEnabled(options, config?.url)) {\n return next(response);\n }\n // execute\n const beanInstance = cast<IInterceptorResponse>(onionSlice.beanInstance);\n if (!beanInstance.onResponse) return next(response);\n return beanInstance.onResponse(response, options, next as any);\n },\n );\n this._composerResponseError = this.$$sysOnion.interceptor.compose(\n onionSlices,\n (onionSlice, error: AxiosError, next) => {\n const config = error.config;\n // options\n const options = this._combineOnionOptions(onionSlice, config);\n // enable match ignore\n if (!this.$$sysOnion.checkOnionOptionsEnabled(options, config?.url)) {\n return next(error);\n }\n // execute\n const beanInstance = cast<IInterceptorResponseError>(onionSlice.beanInstance);\n if (!beanInstance.onResponseError) return next(error);\n return beanInstance.onResponseError(error, options, next as any);\n },\n );\n }\n\n private _combineOnionOptions(\n item: IOnionSlice<IDecoratorInterceptorOptions, keyof IInterceptorRecord>,\n config?: AxiosRequestConfig,\n ) {\n // options: dynamic\n let optionsDynamic;\n if (config?.interceptors) {\n optionsDynamic = config?.interceptors[item.name];\n }\n // final options\n const options = optionsDynamic ? deepExtend({}, item.options, optionsDynamic) : item.options;\n // ok\n return options;\n }\n}\n","import type { AxiosInstance } from 'axios';\n\nimport axios, { Axios } from 'axios';\nimport { markRaw } from 'vue';\nimport { BeanBase, deepExtend } from 'zova';\nimport { Bean } from 'zova-module-a-bean';\n\nimport type { IBeanFetchOptions } from '../types/interceptor.js';\n\nimport { ServiceComposer } from '../service/composer.js';\n\nconst SymbolFetch = Symbol('SymbolFetch');\n\nexport interface BeanFetch extends AxiosInstance {}\n\n@Bean()\nexport class BeanFetch extends BeanBase {\n private _composer: ServiceComposer;\n\n protected [SymbolFetch]: AxiosInstance;\n\n protected async __init__(options?: IBeanFetchOptions) {\n patchAxios(Axios);\n // axiosConfig\n const axiosConfig = deepExtend(\n {},\n { baseURL: this.sys.util.getApiBaseURL() },\n this.scope.config.axios.config,\n options?.axiosConfig,\n );\n // composer\n this._composer = await this.bean._newBean(ServiceComposer, true, this, options?.onionItems);\n // axios\n this[SymbolFetch] = markRaw(axios.create(axiosConfig));\n this._addInterceptors(this[SymbolFetch]);\n }\n\n protected __get__(prop: string) {\n return this[SymbolFetch] && this[SymbolFetch][prop];\n }\n\n private _addInterceptors(api: AxiosInstance) {\n // request\n api.interceptors.request.use(\n async config => {\n return await this._composer.executeRequest(config);\n },\n async (_error: any) => {\n if (!(_error instanceof Error)) return Promise.reject(_error);\n const error = await this._composer.executeRequestError(_error as any);\n return Promise.reject(error);\n },\n );\n // response\n api.interceptors.response.use(\n async response => {\n return await this._composer.executeResponse(response);\n },\n async (_error: any) => {\n if (!(_error instanceof Error)) return Promise.reject(_error);\n const error = await this._composer.executeResponseError(_error as any);\n return Promise.reject(error);\n },\n );\n }\n}\n\nfunction patchAxios(_Axios: any) {\n if (_Axios.__requestPatched) return;\n _Axios.__requestPatched = true;\n const requestPrev: Function = _Axios.prototype.request;\n _Axios.prototype.request = async function (...args: any[]) {\n try {\n return await requestPrev.call(this, ...args);\n } catch (err) {\n if (err instanceof Error) throw err;\n return err;\n }\n };\n}\n","import { BeanBase, Virtual } from 'zova';\nimport { Bean } from 'zova-module-a-bean';\n\nimport type { IDecoratorInterceptorOptions } from '../types/interceptor.js';\nimport type { BeanFetch } from './bean.fetch.js';\n\n@Bean()\n@Virtual()\nexport class BeanInterceptorBase<\n T extends IDecoratorInterceptorOptions = IDecoratorInterceptorOptions,\n> extends BeanBase {\n protected $beanFetch: BeanFetch;\n protected $options: T;\n\n constructor(beanFetch: BeanFetch, options: T) {\n super();\n this.$beanFetch = beanFetch;\n this.$options = options;\n }\n}\n","import type { CreateAxiosDefaults } from 'axios';\nimport type { ZovaSys } from 'zova';\n\nexport const config = (_sys: ZovaSys) => {\n return {\n axios: {\n config: {} as CreateAxiosDefaults,\n },\n };\n};\n","import type { BeanBase, BeanContainer, IMonkeyAppInitialize, IMonkeyBeanInit } from 'zova';\n\nimport { BeanSimple } from 'zova';\n\nimport { BeanFetch } from './bean/bean.fetch.js';\n\nexport class Monkey extends BeanSimple implements IMonkeyAppInitialize, IMonkeyBeanInit {\n async appInitialize() {\n // $fetch: should in appInitialize, because should init many interceptors\n this.app.meta.$fetch = await this.bean._getBean(BeanFetch, false);\n }\n\n async beanInit(bean: BeanContainer, beanInstance: BeanBase) {\n const self = this;\n // $fetch\n bean.defineProperty(beanInstance, '$fetch', {\n enumerable: false,\n configurable: true,\n get() {\n return self.app.meta.$fetch;\n },\n });\n }\n}\n","// eslint-disable\n/** bean: begin */\nexport * from '../bean/bean.fetch.js';\nexport * from '../bean/bean.interceptorBase.js';\n\nimport 'zova';\ndeclare module 'zova' {\n \n \n}\ndeclare module 'zova-module-a-fetch' {\n \n export interface BeanFetch {\n /** @internal */\n get scope(): ScopeModuleAFetch;\n }\n\n export interface BeanFetch {\n get $beanFullName(): 'a-fetch.bean.fetch';\n get $onionName(): 'a-fetch:fetch';\n \n } \n}\n/** bean: end */\n/** bean: begin */\nimport { BeanFetch } from '../bean/bean.fetch.js';\nimport { BeanInterceptorBase } from '../bean/bean.interceptorBase.js';\nimport 'zova';\ndeclare module 'zova' {\n export interface IBeanRecordGeneral {\n 'a-fetch.bean.fetch': BeanFetch;\n'a-fetch.bean.interceptorBase': BeanInterceptorBase;\n }\n}\n/** bean: end */\n/** service: begin */\nexport * from '../service/composer.js';\n\nimport 'zova-module-a-bean';\ndeclare module 'zova-module-a-bean' {\n \n export interface IServiceRecord {\n 'a-fetch:composer': never;\n }\n\n \n}\ndeclare module 'zova-module-a-fetch' {\n \n export interface ServiceComposer {\n /** @internal */\n get scope(): ScopeModuleAFetch;\n }\n\n export interface ServiceComposer {\n get $beanFullName(): 'a-fetch.service.composer';\n get $onionName(): 'a-fetch:composer';\n \n } \n}\n/** service: end */\n/** service: begin */\nimport { ServiceComposer } from '../service/composer.js';\nimport 'zova';\ndeclare module 'zova' {\n export interface IBeanRecordGeneral {\n 'a-fetch.service.composer': ServiceComposer;\n }\n}\n/** service: end */\n/** config: begin */\nexport * from '../config/config.js';\nimport { config } from '../config/config.js';\n/** config: end */\n/** monkey: begin */\nexport * from '../monkey.js';\n/** monkey: end */\n/** scope: begin */\nimport { BeanScopeBase, type BeanScopeUtil, TypeModuleConfig } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\n\n@Scope()\nexport class ScopeModuleAFetch extends BeanScopeBase {}\n\nexport interface ScopeModuleAFetch {\n util: BeanScopeUtil;\nconfig: TypeModuleConfig<typeof config>;\n}\n\nimport 'zova';\ndeclare module 'zova' {\n export interface IBeanScopeRecord {\n 'a-fetch': ScopeModuleAFetch;\n }\n \n export interface IBeanScopeConfig {\n 'a-fetch': ReturnType<typeof config>;\n }\n\n \n\n \n}\n \n/** scope: end */\n","export const SymbolInterceptorBodyResponseFlag = Symbol('SymbolInterceptorBodyResponseFlag');\n","import { createBeanDecorator } from 'zova';\n\nimport type { IDecoratorInterceptorOptions } from '../types/interceptor.js';\n\nexport function Interceptor<T extends IDecoratorInterceptorOptions>(options?: T): ClassDecorator {\n return createBeanDecorator('interceptor', 'new', true, options);\n}\n"],"mappings":";;;;;AAAA,IAAA,QAAO,SAAO,SAAU,SAAE,UAAA,SAAoB;;;;;;;;;AAE9C,SAAS,0BAA0B,GAAE,GAAA,GAAA,GAAA,GAAA;CAAA,IAAA,IAAuB,CAAC;CAAC,OAAM,OAAU,KAAC,CAAA,EAAA,QAAA,SAAA,GAAA;EAAA,EAAA,KAAA,EAAA;CAAA,CAAA,GAAA,EAAA,aAAA,CAAA,CAAA,EAAA,YAAA,EAAA,eAAA,CAAA,CAAA,EAAA,eAAA,WAAA,KAAA,EAAA,iBAAA,EAAA,WAAA,CAAA,IAAA,IAAA,EAAA,MAAA,EAAA,QAAA,EAAA,OAAA,SAAA,GAAA,GAAA;EAAA,OAAA,EAAA,GAAA,GAAA,CAAA,KAAA;CAAA,GAAA,CAAA,GAAA,KAAA,KAAA,MAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,cAAA,EAAA,YAAA,KAAA,CAAA,IAAA,KAAA,GAAA,EAAA,cAAA,KAAA,IAAA,K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AAU,OAAmB,MAAA,GAAA,QAAA,SAAA,EACpC,QAAK,UACP,CAAC,GAAE,KAAM,SAAK,MAAA,SAAkB,MAAA,0BAAmB,cAAA,CAAA,CAAA,KAAA,MAAA,KAAA;;;;AC/BnD,IAAa,oCAAoC,OAAO,mCAAmC;;;;CCE3F,OAAO,oBAAO,eAA8B,OAAO,MAAG,OAAM"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/service/composer.ts","../src/bean/bean.fetch.ts","../src/bean/bean.interceptorBase.ts","../src/config/config.ts","../src/monkey.ts","../src/.metadata/index.ts","../src/lib/const.ts","../src/lib/interceptor.ts"],"sourcesContent":["var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanBase, cast, deepExtend, SymbolErrorInstanceInfo, Use } from 'zova';\nimport { Service } from 'zova-module-a-bean';\nexport let ServiceComposer = (_dec = Service(), _dec2 = __z_BeanInfo({\n module: \"a-fetch\"\n}), _dec3 = Use(\"a-bean.sys.onion\"), _dec4 = Reflect.metadata(\"design:type\", typeof SysOnion === \"undefined\" ? Object : SysOnion), _dec(_class = _dec2(_class = (_class2 = class ServiceComposer extends BeanBase {\n constructor(...args) {\n super(...args);\n this.$beanFetch = void 0;\n _initializerDefineProperty(this, \"$$sysOnion\", _descriptor, this);\n this._composerRequest = void 0;\n this._composerRequestError = void 0;\n this._composerResponse = void 0;\n this._composerResponseError = void 0;\n }\n async __init__(beanFetch, onionItems) {\n this.$beanFetch = beanFetch;\n await this._createComposer(onionItems);\n }\n executeRequest(config) {\n return this._composerRequest(config);\n }\n executeRequestError(error) {\n return this._composerRequestError(error);\n }\n executeResponse(response) {\n return this._composerResponse(response);\n }\n async executeResponseError(error) {\n error = await this._composerResponseError(error);\n if (error instanceof Error) {\n error[SymbolErrorInstanceInfo] = {\n instance: this.ctx.instance,\n info: 'executeResponseError'\n };\n }\n return error;\n }\n async _createComposer(onionItems) {\n // onionSlices\n let onionSlices;\n if (onionItems) {\n onionSlices = await this.$$sysOnion.interceptor.loadOnions(onionItems);\n } else {\n onionSlices = await this.$$sysOnion.interceptor.loadOnionsFromPackage();\n }\n // create interceptors\n for (const onionSlice of onionSlices) {\n onionSlice.beanInstance = await this.bean._newBean(onionSlice.beanFullName, true, this.$beanFetch, onionSlice.options);\n }\n // compose\n this._composerRequest = this.$$sysOnion.interceptor.compose(onionSlices, (onionSlice, config, next) => {\n // options\n const options = this._combineOnionOptions(onionSlice, config);\n // enable match ignore\n if (!this.$$sysOnion.checkOnionOptionsEnabled(options, config.url)) {\n return next(config);\n }\n // execute\n const beanInstance = cast(onionSlice.beanInstance);\n if (!beanInstance.onRequest) return next(config);\n return beanInstance.onRequest(config, options, next);\n });\n this._composerRequestError = this.$$sysOnion.interceptor.compose(onionSlices, (onionSlice, error, next) => {\n const config = error.config;\n // options\n const options = this._combineOnionOptions(onionSlice, config);\n // enable match ignore\n if (!this.$$sysOnion.checkOnionOptionsEnabled(options, config?.url)) {\n return next(error);\n }\n // execute\n const beanInstance = cast(onionSlice.beanInstance);\n if (!beanInstance.onRequestError) return next(error);\n return beanInstance.onRequestError(error, options, next);\n });\n this._composerResponse = this.$$sysOnion.interceptor.compose(onionSlices, (onionSlice, response, next) => {\n const config = response.config;\n // options\n const options = this._combineOnionOptions(onionSlice, config);\n // enable match ignore\n if (!this.$$sysOnion.checkOnionOptionsEnabled(options, config?.url)) {\n return next(response);\n }\n // execute\n const beanInstance = cast(onionSlice.beanInstance);\n if (!beanInstance.onResponse) return next(response);\n return beanInstance.onResponse(response, options, next);\n });\n this._composerResponseError = this.$$sysOnion.interceptor.compose(onionSlices, (onionSlice, error, next) => {\n const config = error.config;\n // options\n const options = this._combineOnionOptions(onionSlice, config);\n // enable match ignore\n if (!this.$$sysOnion.checkOnionOptionsEnabled(options, config?.url)) {\n return next(error);\n }\n // execute\n const beanInstance = cast(onionSlice.beanInstance);\n if (!beanInstance.onResponseError) return next(error);\n return beanInstance.onResponseError(error, options, next);\n });\n }\n _combineOnionOptions(item, config) {\n // options: dynamic\n let optionsDynamic;\n if (config?.interceptors) {\n optionsDynamic = config?.interceptors[item.name];\n }\n // final options\n const options = optionsDynamic ? deepExtend({}, item.options, optionsDynamic) : item.options;\n // ok\n return options;\n }\n}, _descriptor = _applyDecoratedDescriptor(_class2.prototype, \"$$sysOnion\", [_dec3, _dec4], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n}), _class2)) || _class) || _class);","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport axios, { Axios } from 'axios';\nimport { markRaw } from 'vue';\nimport { BeanBase, deepExtend } from 'zova';\nimport { Bean } from 'zova-module-a-bean';\nimport { ServiceComposer } from '../service/composer.js';\nconst SymbolFetch = Symbol('SymbolFetch');\nexport let BeanFetch = (_dec = Bean(), _dec2 = __z_BeanInfo({\n module: \"a-fetch\"\n}), _dec(_class = _dec2(_class = class BeanFetch extends BeanBase {\n constructor(...args) {\n super(...args);\n this._composer = void 0;\n this[SymbolFetch] = void 0;\n }\n async __init__(options) {\n patchAxios(Axios);\n // axiosConfig\n const axiosConfig = deepExtend({}, {\n baseURL: this.sys.util.getApiBaseURL()\n }, this.scope.config.axios.config, options?.axiosConfig);\n // composer\n this._composer = await this.bean._newBean(ServiceComposer, true, this, options?.onionItems);\n // axios\n this[SymbolFetch] = markRaw(axios.create(axiosConfig));\n this._addInterceptors(this[SymbolFetch]);\n }\n __get__(prop) {\n return this[SymbolFetch] && this[SymbolFetch][prop];\n }\n _addInterceptors(api) {\n // request\n api.interceptors.request.use(async config => {\n return await this._composer.executeRequest(config);\n }, async _error => {\n if (!(_error instanceof Error)) return Promise.reject(_error);\n const error = await this._composer.executeRequestError(_error);\n return Promise.reject(error);\n });\n // response\n api.interceptors.response.use(async response => {\n return await this._composer.executeResponse(response);\n }, async _error => {\n if (!(_error instanceof Error)) return Promise.reject(_error);\n const error = await this._composer.executeResponseError(_error);\n return Promise.reject(error);\n });\n }\n}) || _class) || _class);\nfunction patchAxios(_Axios) {\n if (_Axios.__requestPatched) return;\n _Axios.__requestPatched = true;\n const requestPrev = _Axios.prototype.request;\n _Axios.prototype.request = async function (...args) {\n try {\n return await requestPrev.call(this, ...args);\n } catch (err) {\n if (err instanceof Error) throw err;\n return err;\n }\n };\n}","var _dec, _dec2, _dec3, _dec4, _dec5, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanBase, Virtual } from 'zova';\nimport { Bean } from 'zova-module-a-bean';\nexport let BeanInterceptorBase = (_dec = Bean(), _dec2 = Virtual(), _dec3 = __z_BeanInfo({\n module: \"a-fetch\"\n}), _dec4 = Reflect.metadata(\"design:type\", Function), _dec5 = Reflect.metadata(\"design:paramtypes\", [typeof BeanFetch === \"undefined\" ? Object : BeanFetch, typeof T === \"undefined\" ? Object : T]), _dec(_class = _dec2(_class = _dec3(_class = _dec4(_class = _dec5(_class = class BeanInterceptorBase extends BeanBase {\n constructor(beanFetch, options) {\n super();\n this.$beanFetch = void 0;\n this.$options = void 0;\n this.$beanFetch = beanFetch;\n this.$options = options;\n }\n}) || _class) || _class) || _class) || _class) || _class);","export const config = _sys => {\n return {\n axios: {\n config: {}\n }\n };\n};","import { BeanSimple } from 'zova';\nimport { BeanFetch } from './bean/bean.fetch.js';\nexport class Monkey extends BeanSimple {\n async appInitialize() {\n // $fetch: should in appInitialize, because should init many interceptors\n this.app.meta.$fetch = await this.bean._getBean(BeanFetch, false);\n }\n async beanInit(bean, beanInstance) {\n const self = this;\n // $fetch\n bean.defineProperty(beanInstance, '$fetch', {\n enumerable: false,\n configurable: true,\n get() {\n return self.app.meta.$fetch;\n }\n });\n }\n}","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\n// eslint-disable\n/** bean: begin */\nexport * from '../bean/bean.fetch.js';\nexport * from '../bean/bean.interceptorBase.js';\nimport 'zova';\n/** bean: end */\n/** bean: begin */\nimport { BeanFetch } from '../bean/bean.fetch.js';\nimport 'zova';\n/** bean: end */\n/** service: begin */\nexport * from '../service/composer.js';\nimport 'zova-module-a-bean';\n/** service: end */\n/** service: begin */\nimport { ServiceComposer } from '../service/composer.js';\nimport 'zova';\n/** service: end */\n/** config: begin */\nexport * from '../config/config.js';\n/** config: end */\n/** monkey: begin */\nexport * from '../monkey.js';\n/** monkey: end */\n/** scope: begin */\nimport { BeanScopeBase } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\nexport let ScopeModuleAFetch = (_dec = Scope(), _dec2 = __z_BeanInfo({\n module: \"a-fetch\"\n}), _dec(_class = _dec2(_class = class ScopeModuleAFetch extends BeanScopeBase {}) || _class) || _class);\nimport 'zova';\n\n/** scope: end */","export const SymbolInterceptorBodyResponseFlag = Symbol('SymbolInterceptorBodyResponseFlag');","import { createBeanDecorator } from 'zova';\nexport function Interceptor(options) {\n return createBeanDecorator('interceptor', 'new', true, options);\n}"],"mappings":";;;;;AAAA,IAAI,QAAM,SAAO,SAAO,SAAO,UAAQ,SAAS;AAChD,SAAS,2BAA2B,GAAG,GAAG,GAAG,GAAG;CAAE,KAAK,OAAO,eAAe,GAAG,GAAG;E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F,CAAC;CACH;AACF;;;;;AClBA,IAAI,MAAM,OAAO;AA6BjB,IAAW,qBAAqB,OAAO,MAAM,GAAG,QAAQ,SAAa,EACnE,QAAQ,UACV,CAAC,GAAG,KAAK,SAAS,MAAM,SAAS,MAAM,0BAA0B,cAAc,CAAC,CAAC,KAAK,MAAM,KAAK;;;;AC/BjG,IAAa,oCAAoC,OAAO,mCAAmC;;;ACC3F,SAAgB,YAAY,SAAS;CACnC,OAAO,oBAAoB,eAAe,OAAO,MAAM,OAAO;AAChE"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-module-a-fetch",
|
|
3
|
-
"version": "5.1.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "5.1.23",
|
|
4
|
+
"gitHead": "1a39e8008e1b48001cfeff475ddd53a2a0d867c4",
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"Zova Module"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"tsc:publish": "npm run clean && node ../../../../../packages-cli/cli/src/bin/zova.ts :bin:buildModule --sourcemap && tsc -p tsconfig.build.json",
|
|
29
29
|
"prepublishOnly": "npm run tsc:publish",
|
|
30
30
|
"prepack": "clean-package",
|
|
31
|
-
"postpack": "clean-package restore
|
|
31
|
+
"postpack": "clean-package restore"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"axios": "^1.16.1"
|