Comparing version 1.13.3 to 1.14.0
@@ -7,2 +7,3 @@ "use strict"; | ||
const createDocComment_1 = __importDefault(require("./createDocComment")); | ||
const createHash_1 = require("./createHash"); | ||
const createMethodsString_1 = __importDefault(require("./createMethodsString")); | ||
@@ -18,4 +19,5 @@ const valNameRegExpStr = '^_[a-zA-Z][a-zA-Z0-9_]*'; | ||
const getMethodsString = (filepath, methods, indent, newPrefix, newUrl) => { | ||
const importName = `Methods${imports.length}`; | ||
imports.push(`import type { Methods as ${importName} } from '${filepath.replace(/'/g, "\\'")}';`); | ||
const path = filepath.replace(/'/g, "\\'"); | ||
const importName = `Methods_${(0, createHash_1.createHash)(path)}`; | ||
imports.push(`import type { Methods as ${importName} } from '${path}';`); | ||
let newPath = `'${decodeURIComponent(newUrl)}${trailingSlash ? '/' : ''}'`; | ||
@@ -22,0 +24,0 @@ if (newPath.length > 2) { |
import createDocComment from './createDocComment'; | ||
import { createHash } from './createHash'; | ||
import createMethods from './createMethodsString'; | ||
@@ -12,4 +13,5 @@ const valNameRegExpStr = '^_[a-zA-Z][a-zA-Z0-9_]*'; | ||
const getMethodsString = (filepath, methods, indent, newPrefix, newUrl) => { | ||
const importName = `Methods${imports.length}`; | ||
imports.push(`import type { Methods as ${importName} } from '${filepath.replace(/'/g, "\\'")}';`); | ||
const path = filepath.replace(/'/g, "\\'"); | ||
const importName = `Methods_${createHash(path)}`; | ||
imports.push(`import type { Methods as ${importName} } from '${path}';`); | ||
let newPath = `'${decodeURIComponent(newUrl)}${trailingSlash ? '/' : ''}'`; | ||
@@ -16,0 +18,0 @@ if (newPath.length > 2) { |
{ | ||
"name": "aspida", | ||
"version": "1.13.3", | ||
"version": "1.14.0", | ||
"description": "TypeScript friendly HTTP client wrapper for the browser and node.js", | ||
@@ -5,0 +5,0 @@ "author": "Solufa <solufa2020@gmail.com>", |
@@ -46,3 +46,3 @@ # aspida | ||
```sh | ||
$ npm install @aspida/axios axios | ||
$ npm install aspida @aspida/axios axios | ||
``` | ||
@@ -53,3 +53,3 @@ | ||
```sh | ||
$ yarn add @aspida/axios axios | ||
$ yarn add aspida @aspida/axios axios | ||
``` | ||
@@ -56,0 +56,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
194760
108
1848