utils-lib-js 1.3.1 → 1.3.3

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.
@@ -14,6 +14,7 @@ declare abstract class RequestBase extends Interceptors implements IRequestBase
14
14
  abstract fetch(url: any, opts: any): Promise<void>;
15
15
  abstract http(url: any, opts: any): Promise<void>;
16
16
  chackUrl: (url: string) => boolean;
17
+ checkIsHttps: (url: string) => boolean;
17
18
  fixOrigin: (fixStr: string) => string;
18
19
  envDesc: () => "Window" | "Node";
19
20
  errorFn: (reject: any) => (err: any) => any;
@@ -40,7 +41,7 @@ declare abstract class RequestInit extends RequestBase implements IRequestInit {
40
41
  headers?: {};
41
42
  body?: any;
42
43
  timeout?: number;
43
- controller?: AbortController;
44
+ controller?: any;
44
45
  type?: string;
45
46
  }) => {
46
47
  url: string;
@@ -48,8 +49,8 @@ declare abstract class RequestInit extends RequestBase implements IRequestInit {
48
49
  headers: {};
49
50
  body: string;
50
51
  timeout: number;
51
- signal: AbortSignal;
52
- controller: AbortController;
52
+ signal: any;
53
+ controller: any;
53
54
  type: string;
54
55
  timer: any;
55
56
  };
@@ -39,10 +39,18 @@ var __rest = this && this.__rest || function (s, e) {
39
39
  Object.defineProperty(exports, "__esModule", { value: true });
40
40
  exports.Request = void 0;
41
41
  var index_js_1 = require("./index.js");
42
- var request, parse;
42
+ var httpRequest, httpsRequest, parse, CustomAbortController;
43
43
  if (typeof require !== "undefined") {
44
- request = require("http").request;
44
+ CustomAbortController = require("abort-controller");
45
+ httpRequest = require("http").request;
46
+ httpsRequest = require("https").request;
45
47
  parse = require("url").parse;
48
+ } else if (typeof AbortController !== "undefined") {
49
+ CustomAbortController = AbortController;
50
+ } else {
51
+ CustomAbortController = function () {
52
+ throw new Error('AbortController is not defined');
53
+ };
46
54
  }
47
55
  var Interceptors = function () {
48
56
  function Interceptors() {}
@@ -90,6 +98,9 @@ var RequestBase = function (_super) {
90
98
  _this.chackUrl = function (url) {
91
99
  return url.startsWith('/');
92
100
  };
101
+ _this.checkIsHttps = function (url) {
102
+ return url.startsWith('https');
103
+ };
93
104
  _this.fixOrigin = function (fixStr) {
94
105
  if (_this.chackUrl(fixStr)) return _this.origin + fixStr;
95
106
  return fixStr;
@@ -177,7 +188,7 @@ var RequestInit = function (_super) {
177
188
  _f = _a.timeout,
178
189
  timeout = _f === void 0 ? 30 * 1000 : _f,
179
190
  _g = _a.controller,
180
- controller = _g === void 0 ? new AbortController() : _g,
191
+ controller = _g === void 0 ? new CustomAbortController() : _g,
181
192
  _h = _a.type,
182
193
  type = _h === void 0 ? "json" : _h,
183
194
  others = __rest(_a, ["method", "query", "headers", "body", "timeout", "controller", "type"]);
@@ -233,10 +244,12 @@ var Request = function (_super) {
233
244
  resolve = _a.resolve,
234
245
  reject = _a.reject;
235
246
  var params = _this.initHttpParams(_url, _opts);
236
- var signal = params.signal;
247
+ var signal = params.signal,
248
+ url = params.url;
237
249
  promise.finally(function () {
238
250
  return _this.clearTimer(params);
239
251
  });
252
+ var request = _this.checkIsHttps(url) ? httpsRequest : httpRequest;
240
253
  var req = request(params, function (response) {
241
254
  if ((response === null || response === void 0 ? void 0 : response.statusCode) >= 200 && (response === null || response === void 0 ? void 0 : response.statusCode) < 300) {
242
255
  var data_1 = "";
@@ -14,6 +14,7 @@ declare abstract class RequestBase extends Interceptors implements IRequestBase
14
14
  abstract fetch(url: any, opts: any): Promise<void>;
15
15
  abstract http(url: any, opts: any): Promise<void>;
16
16
  chackUrl: (url: string) => boolean;
17
+ checkIsHttps: (url: string) => boolean;
17
18
  fixOrigin: (fixStr: string) => string;
18
19
  envDesc: () => "Window" | "Node";
19
20
  errorFn: (reject: any) => (err: any) => any;
@@ -40,7 +41,7 @@ declare abstract class RequestInit extends RequestBase implements IRequestInit {
40
41
  headers?: {};
41
42
  body?: any;
42
43
  timeout?: number;
43
- controller?: AbortController;
44
+ controller?: any;
44
45
  type?: string;
45
46
  }) => {
46
47
  url: string;
@@ -48,8 +49,8 @@ declare abstract class RequestInit extends RequestBase implements IRequestInit {
48
49
  headers: {};
49
50
  body: string;
50
51
  timeout: number;
51
- signal: AbortSignal;
52
- controller: AbortController;
52
+ signal: any;
53
+ controller: any;
53
54
  type: string;
54
55
  timer: any;
55
56
  };
@@ -35,10 +35,18 @@ var __rest = this && this.__rest || function (s, e) {
35
35
  return t;
36
36
  };
37
37
  import { urlJoin, defer, jsonToString, stringToJson } from "./index.js";
38
- var request, parse;
38
+ var httpRequest, httpsRequest, parse, CustomAbortController;
39
39
  if (typeof require !== "undefined") {
40
- request = require("http").request;
40
+ CustomAbortController = require("abort-controller");
41
+ httpRequest = require("http").request;
42
+ httpsRequest = require("https").request;
41
43
  parse = require("url").parse;
44
+ } else if (typeof AbortController !== "undefined") {
45
+ CustomAbortController = AbortController;
46
+ } else {
47
+ CustomAbortController = function () {
48
+ throw new Error('AbortController is not defined');
49
+ };
42
50
  }
43
51
  var Interceptors = function () {
44
52
  function Interceptors() {}
@@ -86,6 +94,9 @@ var RequestBase = function (_super) {
86
94
  _this.chackUrl = function (url) {
87
95
  return url.startsWith('/');
88
96
  };
97
+ _this.checkIsHttps = function (url) {
98
+ return url.startsWith('https');
99
+ };
89
100
  _this.fixOrigin = function (fixStr) {
90
101
  if (_this.chackUrl(fixStr)) return _this.origin + fixStr;
91
102
  return fixStr;
@@ -173,7 +184,7 @@ var RequestInit = function (_super) {
173
184
  _f = _a.timeout,
174
185
  timeout = _f === void 0 ? 30 * 1000 : _f,
175
186
  _g = _a.controller,
176
- controller = _g === void 0 ? new AbortController() : _g,
187
+ controller = _g === void 0 ? new CustomAbortController() : _g,
177
188
  _h = _a.type,
178
189
  type = _h === void 0 ? "json" : _h,
179
190
  others = __rest(_a, ["method", "query", "headers", "body", "timeout", "controller", "type"]);
@@ -229,10 +240,12 @@ var Request = function (_super) {
229
240
  resolve = _a.resolve,
230
241
  reject = _a.reject;
231
242
  var params = _this.initHttpParams(_url, _opts);
232
- var signal = params.signal;
243
+ var signal = params.signal,
244
+ url = params.url;
233
245
  promise.finally(function () {
234
246
  return _this.clearTimer(params);
235
247
  });
248
+ var request = _this.checkIsHttps(url) ? httpsRequest : httpRequest;
236
249
  var req = request(params, function (response) {
237
250
  if ((response === null || response === void 0 ? void 0 : response.statusCode) >= 200 && (response === null || response === void 0 ? void 0 : response.statusCode) < 300) {
238
251
  var data_1 = "";
package/package.json CHANGED
@@ -1,40 +1,43 @@
1
- {
2
- "name": "utils-lib-js",
3
- "version": "1.3.1",
4
- "description": "JavaScript工具函数,封装的一些常用的js函数",
5
- "main": "./dist/common/index.js",
6
- "types": "./dist/common/index.d.ts",
7
- "module": "./dist/esm/index.js",
8
- "exports": {
9
- "import": "./dist/esm/index.js",
10
- "require": "./dist/common/index.js"
11
- },
12
- "scripts": {
13
- "debug:esm": "start cmd /k pnpm run build:hot:esm",
14
- "debug:node": "start cmd /k pnpm run build:hot:node & pnpm run node:hot",
15
- "node:hot": "nodemon ./example/server.js",
16
- "build:hot:esm": "tsc -p tsconfig.es.json -w",
17
- "build:hot:node": "tsc -p tsconfig.json -w",
18
- "build": "pnpm run tsc:build && pnpm run babel:mjs && pnpm run babel:cjs",
19
- "tsc:build": "rm -fr dist && tsc -p tsconfig.json && tsc -p tsconfig.es.json",
20
- "publish": "pnpm run build && pnpm publish",
21
- "babel:mjs": "babel dist/esm --out-dir dist/esm",
22
- "babel:cjs": "babel dist/common --out-dir dist/common",
23
- "test": "echo \"Error: no test specified\" && exit 1"
24
- },
25
- "repository": {
26
- "type": "git",
27
- "url": "https://gitee.com/DieHunter/utils-lib-js.git"
28
- },
29
- "keywords": [
30
- "utils",
31
- "tools",
32
- "lib"
33
- ],
34
- "author": "",
35
- "license": "ISC",
36
- "devDependencies": {
37
- "@types/node": "^18.7.15",
38
- "babel-cli": "^6.26.0"
39
- }
1
+ {
2
+ "name": "utils-lib-js",
3
+ "version": "1.3.3",
4
+ "description": "JavaScript工具函数,封装的一些常用的js函数",
5
+ "main": "./dist/common/index.js",
6
+ "types": "./dist/common/index.d.ts",
7
+ "module": "./dist/esm/index.js",
8
+ "exports": {
9
+ "import": "./dist/esm/index.js",
10
+ "require": "./dist/common/index.js"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://gitee.com/DieHunter/utils-lib-js.git"
15
+ },
16
+ "keywords": [
17
+ "utils",
18
+ "tools",
19
+ "lib"
20
+ ],
21
+ "author": "",
22
+ "license": "ISC",
23
+ "devDependencies": {
24
+ "@types/node": "^18.7.15",
25
+ "babel-cli": "^6.26.0"
26
+ },
27
+ "dependencies": {
28
+ "abort-controller": "^3.0.0"
29
+ },
30
+ "scripts": {
31
+ "debug:esm": "start cmd /k pnpm run build:hot:esm",
32
+ "debug:node": "start cmd /k pnpm run build:hot:node & pnpm run node:hot",
33
+ "node:hot": "nodemon server.js",
34
+ "build:hot:esm": "tsc -p tsconfig.es.json -w",
35
+ "build:hot:node": "tsc -p tsconfig.json -w",
36
+ "build": "pnpm run tsc:build && pnpm run babel:mjs && pnpm run babel:cjs",
37
+ "tsc:build": "rm -fr dist && tsc -p tsconfig.json && tsc -p tsconfig.es.json",
38
+ "babel:mjs": "babel dist/esm --out-dir dist/esm",
39
+ "babel:cjs": "babel dist/common --out-dir dist/common",
40
+ "test": "echo \"Error: no test specified\" && exit 1"
41
+ },
42
+ "readme": "# utils-lib-js\r\n\r\n#### 介绍\r\nJavaScript工具函数,封装的一些常用的js函数\r\n\r\n#### 软件架构\r\n软件架构说明\r\n\r\n\r\n#### 安装教程\r\n\r\n1. pnpm i\r\n2. pnpm build\r\n\r\n#### 使用说明\r\n\r\n1. pnpm build(构建)\r\n2. pnpm debug(调试源码)\r\n\r\n#### 参与贡献\r\n\r\n1. Fork 本仓库\r\n2. 新建 Feat_xxx 分支\r\n3. 提交代码\r\n4. 新建 Pull Request\r\n\r\n#### 功能\r\n接口:\r\n\r\nexport type IKey = string | symbol | number\r\n\r\n##### 对象类型\r\n\r\nexport interface IObject<T> {\r\n [key: IKey]: T | IObject<any>\r\n}\r\n\r\nexport interface IPromise extends IObject<any> {\r\n promise: Promise<void>\r\n resolve: (res: any) => unknown\r\n reject: (err: any) => unknown\r\n}\r\n\r\nexport type IInstance<T> = {\r\n _instance: Function\r\n} & T\r\n\r\nexport type IDemoteArray<T> = Array<IDemoteArray<T> | T>\r\n\r\n##### base\r\n\r\n/**产生区间随机数\r\n* @param {number} min 最小区间\r\n* @param {number} max 最大区间\r\n* @param {boolean} bool 包含最大值\r\n* @return {number} 随机数\r\n**/\r\n\r\nexport type IRandomNum = (min: number, max: number, bool?: boolean) => number\r\n\r\n/**获取url的参数\r\n* @param {string} url 待截取的地址\r\n* @return {object} 参数对象\r\n**/\r\n\r\nexport type IUrlSplit = (url: string) => IObject<any>\r\n\r\n/**添加url的参数\r\n* @param {string} url 待添加参数的地址\r\n* @param {object} query 待添加的参数\r\n* @return {string} 添加参数后的url\r\n**/\r\n\r\nexport type IUrlJoin = (url: string, query: object) => string\r\n\r\n/**获取数据类型\r\n* @param {any} data 待检测数据\r\n* @return {string} 数据类型\r\n**/\r\n\r\nexport type IGetType<T> = (data: any) => typeof data | T[keyof T] | \"null\";\r\n\r\n/**批量判断数据类型\r\n* @param {any} data 待检测数据\r\n* @param {any} whiteList 数据类型名单\r\n* @return {boolean} 是否在白名单中\r\n**/\r\n\r\nexport type IGetTypeByList = (data: any, whiteList: string[]) => boolean;\r\n\r\n\r\n##### object\r\n\r\n/**lodash中的 _.get(),获取对象某级属性\r\n* @param {IObject} object 目标对象\r\n* @param {string} key 对象层级\r\n* @param {any} defaultValue 未取得时默认值\r\n* @return {IObject[IKey]} 对象某个属性\r\n**/\r\n\r\nexport type IGetValue = <T, U = IObject<T> | IObject<T>[IKey]>(object: U, key: string, defaultValue?: any) => U\r\n\r\n/**lodash中的 _.set(),赋值对象某级属性\r\n* @param {IObject} object 目标对象\r\n* @param {string} key 对象层级\r\n* @param {any} value 需要赋的值\r\n* @return {IObject} 目标对象\r\n**/\r\n\r\nexport type ISetValue = <T>(object: IObject<T>, key: string, value?: any) => IObject<T>\r\n\r\n/**对象混入\r\n* @param {IObject} target 目标对象\r\n* @param {string} source 需要混入的对象集合\r\n* @param {boolean} overwrite 是否重写覆盖原有属性\r\n* @return {IObject} 目标对象\r\n**/\r\n\r\nexport type IMixIn = <U extends IObject<any>>(target?: U, source?: IObject<any>, overwrite?: boolean) => U\r\n\r\n/**枚举值反向映射\r\n* @param {IObject<string>} target 目标对象\r\n* @return {IObject<string>} 目标对象\r\n**/\r\n\r\nexport type IEnumInversion = (target: IObject<string>) => IObject<string>\r\n\r\n/**对象复制\r\n* @param {IObject<any>} target 目标对象\r\n* @return {IObject} 目标对象\r\n**/\r\n\r\nexport type ICloneDeep = (target?: any) => any\r\n\r\n/**生成 对象 类型的初始值\r\n* @param {string} type 数据类型\r\n* @param {any} __init 初始值\r\n* @return {any} 目标对象\r\n**/\r\n\r\nexport type ICreateObjectVariable = (type: string, source?: any) => any\r\n\r\n/**Object.create 根据源对象产出新对象\r\n* @param {Function|Object} source 源对象\r\n* @return {Function|Object} 对象产物\r\n**/\r\n\r\nexport type ICreateObject = <T, U extends T>(source: T) => U\r\n\r\n/**类的继承\r\n* @param {Function} source 源对象\r\n* @return {Function} 继承产物\r\n**/\r\n\r\nexport type IInherit = <T extends Function>(source: T, target?: Function) => Function\r\n\r\n/**生成类的实例单例\r\n* @param {Function} classProto 类\r\n* @param {Boolean} overwrite 是否覆盖已有单例\r\n* @param {any[]} params 构造函数的参数\r\n* @return {IObject} 实例化的单例\r\n**/\r\n\r\nexport type IGetInstance = (classProto: IInstance<FunctionConstructor>, overwrite?: boolean, ...params: any[]) => Function\r\n\r\n/**通过装饰器将属性混入类中\r\n* @param {IObject<any>} params 混入的属性\r\n* @return {ClassDecorator} 装饰器钩子函数\r\n**/\r\n\r\nexport type IClassDecorator = (params: IObject<any>) => <TFunction extends Function>(target: TFunction) => void\r\n\r\n/**JSON.parse封装\r\n* @param {string} target 字符串\r\n* @return {IObject<any>} 对象\r\n**/\r\n\r\nexport type IStringToJson = (target: string) => IObject<any>\r\n\r\n/**JSON.stringify封装\r\n* @param {IObject<any>} target 对象\r\n* @return {string} 字符串\r\n**/\r\n\r\nexport type IJsonToString = (target: IObject<any>) => string\r\n\r\n##### function\r\n\r\n/**节流(throttle):高频事件触发,但在 n 秒内只会执行一次\r\n* @param {Function} fn 节流处理的函数\r\n* @param {number} time 执行间隔/毫秒\r\n* @return {Function} 处理后的函数\r\n**/\r\n\r\nexport type IThrottle = (fn: Function, time: number) => (...args: any[]) => void\r\n\r\n/**防抖(debounce):触发高频事件后 n 秒内函数只会执行一次\r\n* @param {Function} fn 防抖处理的函数\r\n* @param {number} time 允许运行函数间隔/毫秒\r\n* @return {Function} 处理后的函数\r\n**/\r\n\r\nexport type IDebounce = (fn: Function, time: number) => (...args: any[]) => void\r\n\r\n/**\r\n * Promise扁平化,避免Promise嵌套\r\n * @returns {Promise,resolve,reject} \r\n */\r\n\r\nexport type IDefer = () => IPromise\r\n\r\n/**await与try catch 捕获异常处理方法\r\n * @param {Promise<any>} defer 延迟函数\r\n * @returns {Promise<any>} [error, result]\r\n */\r\n\r\nexport type ICatchAwait<T extends Promise<any>> = (defer: T) => T\r\n\r\n##### array\r\n\r\n/**数组乱序\r\n * @param {Array<any>} arr 目标数组\r\n * @returns {Array<any>} 乱序后的数组\r\n */\r\n \r\nexport type IArrayRandom<T extends any[]> = (arr: T) => T\r\n\r\n/**数组数组去重\r\n * @param {Array<any>} arr 目标数组\r\n * @returns {Array<any>} 去重后的数组\r\n */\r\n\r\nexport type IArrayUniq<T extends any[]> = (arr: T) => T\r\n\r\n/**数组扁平化\r\n * @param {Array<any>} arr 目标数组\r\n * @returns {Array<any>} 扁平化的数组\r\n */\r\n\r\nexport type IArrayDemote<T extends IDemoteArray<any>> = (arr: T, result?: T) => T\r\n\r\n##### element\r\n\r\n/**IElementParams\r\n * @param {string} ele 标签类型\r\n * @param {CSSStyleDeclaration} style 样式\r\n * @param {Attr} attr 属性\r\n * @param {object} parent 父元素\r\n */\r\n\r\ninterface IElementParams<T> {\r\n ele: T | string\r\n style: CSSStyleDeclaration\r\n attr: Attr\r\n parent: T\r\n}\r\n\r\n/**新增标签,设置属性及样式\r\n * @param {IElementParams} params 配置\r\n * @return {ElementObject} 生成的标签\r\n */\r\n\r\nexport type ICreateElement<T = HTMLElement> = (params: IElementParams<T>) => T\r\n\r\n##### event\r\n\r\n/**浏览器事件\r\n * @param {Document} ele 标签\r\n * @param {string} type 事件类型\r\n * @param {(e: Event) => void} handler 事件回调\r\n * @return {void}\r\n */\r\n\r\nexport type IAddHandler = <T extends Document>(ele: T, type: string, handler: (e: Event) => void) => void\r\n\r\n/**取消事件冒泡\r\n * @param {Event} e 浏览器事件对象\r\n * @return {void}\r\n */\r\n\r\nexport type IStopBubble = (e: Event) => void\r\n\r\n/**取消默认事件\r\n * @param {Event} e 浏览器事件对象\r\n * @return {void}\r\n */\r\n\r\nexport type IStopDefault = (e: Event) => void\r\n\r\n/**取消浏览器事件\r\n * @param {Document} ele 标签\r\n * @param {string} type 事件类型\r\n * @param {(e: Event) => void} handler 事件回调\r\n * @return {void}\r\n */\r\n\r\nexport type IRemoveHandler = <T extends Document>(ele: T, type: string, handler: (e: Event) => void) => void\r\n\r\n/**取消默认事件\r\n * @param {Event} e 浏览器事件对象\r\n * @return {void}\r\n */\r\n\r\nexport type IDispatchEvent = <T extends Document>(ele: T, data: any) => void\r\n\r\n##### request\r\n\r\nexport type IRequestParams<T> = T | IObject<any> | null\r\n\r\n// 请求路径\r\n\r\nexport type IUrl = string\r\n\r\n// 环境判断\r\n\r\nexport type IEnv = 'Window' | 'Node'\r\n\r\n// fetch返回取值方式\r\n\r\nexport type IDataType = \"text\" | \"json\" | \"blob\" | \"formData\" | \"arrayBuffer\"\r\n\r\n// 请求方式\r\n\r\nexport type IRequestMethods = \"GET\" | \"POST\" | \"DELETE\" | \"PUT\" | \"OPTION\"\r\n\r\n// body结构\r\n\r\nexport type IRequestBody = IRequestParams<BodyInit>\r\n\r\n// heads结构\r\n\r\nexport type IRequestHeaders = IRequestParams<HeadersInit>\r\n\r\n// 请求基础函数\r\n\r\nexport type IRequestBaseFn = (url: IUrl, opts: IRequestOptions) => Promise<any>\r\n\r\n// 请求函数体\r\n\r\nexport type IRequestFn = (url?: IUrl, query?: IObject<any>, body?: IRequestBody, opts?: IRequestOptions) => Promise<any>\r\n\r\n// 请求参数\r\n\r\nexport type IRequestOptions = {\r\n method?: IRequestMethods\r\n query?: IRequestParams<IObject<any>>\r\n body?: IRequestBody\r\n headers?: IRequestHeaders\r\n controller?: AbortController\r\n timeout?: number\r\n timer?: number | unknown | null\r\n [key: string]: any\r\n}\r\n\r\n// 拦截器\r\n\r\nexport type IInterceptors = {\r\n use(type: \"request\" | \"response\" | \"error\", fn: Function): void\r\n get reqFn(): Function\r\n get resFn(): Function\r\n get errFn(): Function\r\n}\r\n\r\n// 公共函数\r\n\r\nexport type IRequestBase = {\r\n readonly origin: string\r\n chackUrl: (url: IUrl) => boolean\r\n envDesc: () => IEnv\r\n errorFn: <Err = any, R = Function>(reject: R) => (err: Err) => R\r\n clearTimer: (opts: IRequestOptions) => void\r\n initAbort: <T = IRequestOptions>(opts: T) => T\r\n requestType: () => IRequestBaseFn\r\n fixOrigin: (fixStr: string) => string\r\n fetch: IRequestBaseFn\r\n http: IRequestBaseFn\r\n getDataByType: (type: IDataType, response: Response) => Promise<any>\r\n}\r\n\r\n// 初始化参数\r\n\r\nexport type IRequestInit = {\r\n initDefaultParams: (url: IUrl, opts: IRequestOptions) => any\r\n initFetchParams: (url: IUrl, opts: IRequestOptions) => any\r\n initHttpParams: (url: IUrl, opts: IRequestOptions) => any\r\n}\r\n\r\n// 请求主体类\r\n\r\nexport type IRequest = {\r\n GET: IRequestFn\r\n POST: IRequestFn\r\n DELETE: IRequestFn\r\n PUT: IRequestFn\r\n OPTIONS: IRequestFn\r\n HEAD: IRequestFn\r\n PATCH: IRequestFn\r\n} & IRequestBase\r\n"
40
43
  }
package/pnpm-lock.yaml CHANGED
@@ -2,8 +2,12 @@ lockfileVersion: 5.3
2
2
 
3
3
  specifiers:
4
4
  '@types/node': ^18.7.15
5
+ abort-controller: ^3.0.0
5
6
  babel-cli: ^6.26.0
6
7
 
8
+ dependencies:
9
+ abort-controller: 3.0.0
10
+
7
11
  devDependencies:
8
12
  '@types/node': 18.11.9
9
13
  babel-cli: 6.26.0
@@ -14,6 +18,13 @@ packages:
14
18
  resolution: {integrity: sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==}
15
19
  dev: true
16
20
 
21
+ /abort-controller/3.0.0:
22
+ resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==}
23
+ engines: {node: '>=6.5'}
24
+ dependencies:
25
+ event-target-shim: 5.0.1
26
+ dev: false
27
+
17
28
  /ansi-regex/2.1.1:
18
29
  resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==}
19
30
  engines: {node: '>=0.10.0'}
@@ -341,7 +352,7 @@ packages:
341
352
  dev: true
342
353
 
343
354
  /chokidar/1.7.0:
344
- resolution: {integrity: sha512-mk8fAWcRUOxY7btlLtitj3A45jOwSAxH4tOFOoEGbVsl6cL6pPMWUy7dwZ/canfj3QEdP6FHSnf/l1c6/WkzVg==}
355
+ resolution: {integrity: sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=}
345
356
  deprecated: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
346
357
  requiresBuild: true
347
358
  dependencies:
@@ -475,6 +486,11 @@ packages:
475
486
  engines: {node: '>=0.10.0'}
476
487
  dev: true
477
488
 
489
+ /event-target-shim/5.0.1:
490
+ resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==}
491
+ engines: {node: '>=6'}
492
+ dev: false
493
+
478
494
  /expand-brackets/0.1.5:
479
495
  resolution: {integrity: sha512-hxx03P2dJxss6ceIeri9cmYOT4SRs3Zk3afZwWpOsRqLqprhTR8u++SlC+sFGsQr7WGFPdMF7Gjc1njDLDK6UA==}
480
496
  engines: {node: '>=0.10.0'}
@@ -615,7 +631,7 @@ packages:
615
631
  dev: true
616
632
 
617
633
  /fsevents/1.2.13:
618
- resolution: {integrity: sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==}
634
+ resolution: {integrity: sha1-8yXLBFVZJCi88Rs4M3DvcOO/zDg=}
619
635
  engines: {node: '>= 4.0'}
620
636
  os: [darwin]
621
637
  deprecated: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.