@flow-conductor/adapter-axios 1.0.0 → 1.0.1

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/build/index.d.ts CHANGED
@@ -36,4 +36,4 @@ declare class AxiosRequestAdapter extends RequestAdapter<AxiosResponse, AxiosReq
36
36
  createRequest(requestConfig: AxiosRequestConfigType): Promise<AxiosResponse>;
37
37
  }
38
38
 
39
- export { type AxiosRequestConfigType, AxiosRequestAdapter as default };
39
+ export { AxiosRequestAdapter, type AxiosRequestConfigType };
package/build/index.js CHANGED
@@ -30,6 +30,6 @@ var AxiosRequestAdapter = class extends RequestAdapter {
30
30
  }
31
31
  };
32
32
 
33
- export { AxiosRequestAdapter as default };
33
+ export { AxiosRequestAdapter };
34
34
  //# sourceMappingURL=index.js.map
35
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/axios-request-adapter.ts"],"names":[],"mappings":";;;;AA2BA,IAAqB,mBAAA,GAArB,cAAiD,cAAA,CAG/C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,YAAY,oBAAA,EAA6C;AACvD,IAAA,KAAA,CAAM,oBAAoB,CAAA;AAAA,EAC5B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAa,cACX,aAAA,EACwB;AACxB,IAAA,MAAM,EAAE,GAAA,EAAK,MAAA,EAAQ,IAAA,EAAM,GAAG,MAAK,GAAI,aAAA;AAEvC,IAAA,MAAM,WAAA,GAAkC;AAAA,MACtC,GAAA;AAAA,MACA,MAAA,EAAQ,OAAO,WAAA,EAAY;AAAA,MAC3B,IAAA;AAAA,MACA,GAAG;AAAA,KACL;AAEA,IAAA,OAAO,MAAM,WAAW,CAAA;AAAA,EAC1B;AACF","file":"index.js","sourcesContent":["import { RequestAdapter } from \"@flow-conductor/core\";\nimport type {\n IRequestConfig,\n UrlValidationOptions,\n} from \"@flow-conductor/core\";\nimport axios, { type AxiosRequestConfig, type AxiosResponse } from \"axios\";\n\n/**\n * Extended request configuration type that combines IRequestConfig with Axios-specific options.\n * Allows using all Axios configuration options while maintaining compatibility with flow-conductor.\n */\nexport type AxiosRequestConfigType = IRequestConfig &\n Partial<AxiosRequestConfig>;\n\n/**\n * Request adapter implementation using Axios as the underlying HTTP client.\n * Provides seamless integration between flow-conductor and Axios.\n *\n * @example\n * ```typescript\n * const adapter = new AxiosRequestAdapter();\n * const chain = begin(\n * { config: { url: 'https://api.example.com/users', method: 'GET' } },\n * adapter\n * );\n * ```\n */\nexport default class AxiosRequestAdapter extends RequestAdapter<\n AxiosResponse,\n AxiosRequestConfigType\n> {\n /**\n * Creates a new AxiosRequestAdapter instance.\n *\n * @param urlValidationOptions - Optional URL validation options to prevent SSRF attacks\n */\n constructor(urlValidationOptions?: UrlValidationOptions) {\n super(urlValidationOptions);\n }\n\n /**\n * Creates and executes an HTTP request using Axios.\n * Converts flow-conductor request configuration to Axios format.\n *\n * @param requestConfig - The request configuration object\n * @returns A promise that resolves to an AxiosResponse\n */\n public async createRequest(\n requestConfig: AxiosRequestConfigType\n ): Promise<AxiosResponse> {\n const { url, method, data, ...rest } = requestConfig;\n\n const axiosConfig: AxiosRequestConfig = {\n url,\n method: method.toLowerCase() as AxiosRequestConfig[\"method\"],\n data,\n ...rest,\n };\n\n return axios(axiosConfig);\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/axios-request-adapter.ts"],"names":[],"mappings":";;;;AA2BO,IAAM,mBAAA,GAAN,cAAkC,cAAA,CAGvC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,YAAY,oBAAA,EAA6C;AACvD,IAAA,KAAA,CAAM,oBAAoB,CAAA;AAAA,EAC5B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAa,cACX,aAAA,EACwB;AACxB,IAAA,MAAM,EAAE,GAAA,EAAK,MAAA,EAAQ,IAAA,EAAM,GAAG,MAAK,GAAI,aAAA;AAEvC,IAAA,MAAM,WAAA,GAAkC;AAAA,MACtC,GAAA;AAAA,MACA,MAAA,EAAQ,OAAO,WAAA,EAAY;AAAA,MAC3B,IAAA;AAAA,MACA,GAAG;AAAA,KACL;AAEA,IAAA,OAAO,MAAM,WAAW,CAAA;AAAA,EAC1B;AACF","file":"index.js","sourcesContent":["import { RequestAdapter } from \"@flow-conductor/core\";\nimport type {\n IRequestConfig,\n UrlValidationOptions,\n} from \"@flow-conductor/core\";\nimport axios, { type AxiosRequestConfig, type AxiosResponse } from \"axios\";\n\n/**\n * Extended request configuration type that combines IRequestConfig with Axios-specific options.\n * Allows using all Axios configuration options while maintaining compatibility with flow-conductor.\n */\nexport type AxiosRequestConfigType = IRequestConfig &\n Partial<AxiosRequestConfig>;\n\n/**\n * Request adapter implementation using Axios as the underlying HTTP client.\n * Provides seamless integration between flow-conductor and Axios.\n *\n * @example\n * ```typescript\n * const adapter = new AxiosRequestAdapter();\n * const chain = begin(\n * { config: { url: 'https://api.example.com/users', method: 'GET' } },\n * adapter\n * );\n * ```\n */\nexport class AxiosRequestAdapter extends RequestAdapter<\n AxiosResponse,\n AxiosRequestConfigType\n> {\n /**\n * Creates a new AxiosRequestAdapter instance.\n *\n * @param urlValidationOptions - Optional URL validation options to prevent SSRF attacks\n */\n constructor(urlValidationOptions?: UrlValidationOptions) {\n super(urlValidationOptions);\n }\n\n /**\n * Creates and executes an HTTP request using Axios.\n * Converts flow-conductor request configuration to Axios format.\n *\n * @param requestConfig - The request configuration object\n * @returns A promise that resolves to an AxiosResponse\n */\n public async createRequest(\n requestConfig: AxiosRequestConfigType\n ): Promise<AxiosResponse> {\n const { url, method, data, ...rest } = requestConfig;\n\n const axiosConfig: AxiosRequestConfig = {\n url,\n method: method.toLowerCase() as AxiosRequestConfig[\"method\"],\n data,\n ...rest,\n };\n\n return axios(axiosConfig);\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flow-conductor/adapter-axios",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "description": "Axios adapter for flow-conductor",
6
6
  "main": "./build/index.js",