Skip to content

Commit

Permalink
New Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicat-dcw committed Jun 11, 2023
1 parent 5a4aae9 commit ae00016
Show file tree
Hide file tree
Showing 711 changed files with 2,688 additions and 901,269 deletions.
4 changes: 0 additions & 4 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-typescript"
],
"plugins": [
"@babel/plugin-transform-modules-commonjs"
]
}
25 changes: 22 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
"use strict";

function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _module = require("module");
var _emitter = _interopRequireDefault(require("@smootie/emitter"));
var _http = _interopRequireDefault(require("http"));
var _https = _interopRequireDefault(require("https"));
var _url = _interopRequireDefault(require("url"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
Expand All @@ -18,14 +19,25 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
var _require = (0, _module.createRequire)(import.meta.url);
var Bralve = /*#__PURE__*/function () {
var Bralve = /*#__PURE__*/function (_KiwiEmitter) {
_inherits(Bralve, _KiwiEmitter);
var _super = _createSuper(Bralve);
function Bralve() {
_classCallCheck(this, Bralve);
return _super.apply(this, arguments);
}
_createClass(Bralve, [{
key: "makeRequest",
value: function makeRequest(config) {
var _this = this;
var _url$parse = _url["default"].parse(config.url),
protocol = _url$parse.protocol,
hostname = _url$parse.hostname,
Expand Down Expand Up @@ -56,10 +68,17 @@ var Bralve = /*#__PURE__*/function () {
statusText: res.statusMessage,
headers: res.headers
};
_this.emit("request", _objectSpread({
type: "succeedRequest"
}, response));
resolve(response);
});
});
req.on('error', function (error) {
_this.emit("request", _objectSpread({
type: "error"
}, error));
_this.emit("error", error);
reject(error);
});
if (config.data) {
Expand Down Expand Up @@ -121,6 +140,6 @@ var Bralve = /*#__PURE__*/function () {
}
}]);
return Bralve;
}();
}(_emitter["default"]);
var _default = Bralve;
exports["default"] = _default;
Empty file removed index.js
Empty file.
1 change: 0 additions & 1 deletion node_modules/.bin/acorn

This file was deleted.

17 changes: 17 additions & 0 deletions node_modules/.bin/acorn

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/babel

This file was deleted.

17 changes: 17 additions & 0 deletions node_modules/.bin/babel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/babel-external-helpers

This file was deleted.

17 changes: 17 additions & 0 deletions node_modules/.bin/babel-external-helpers

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/browserslist

This file was deleted.

17 changes: 17 additions & 0 deletions node_modules/.bin/browserslist

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/jsesc

This file was deleted.

17 changes: 17 additions & 0 deletions node_modules/.bin/jsesc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/json5

This file was deleted.

17 changes: 17 additions & 0 deletions node_modules/.bin/json5

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/parser

This file was deleted.

17 changes: 17 additions & 0 deletions node_modules/.bin/parser

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/regjsparser

This file was deleted.

17 changes: 17 additions & 0 deletions node_modules/.bin/regjsparser

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/resolve

This file was deleted.

17 changes: 17 additions & 0 deletions node_modules/.bin/resolve

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/semver

This file was deleted.

17 changes: 17 additions & 0 deletions node_modules/.bin/semver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/ts-node

This file was deleted.

17 changes: 17 additions & 0 deletions node_modules/.bin/ts-node

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/ts-node-cwd

This file was deleted.

Loading

0 comments on commit ae00016

Please sign in to comment.