@simplism/core
Advanced tools
Comparing version 6.0.32 to 6.0.33
@@ -1,560 +0,2 @@ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
if(typeof exports === 'object' && typeof module === 'object') | ||
module.exports = factory(); | ||
else if(typeof define === 'function' && define.amd) | ||
define([], factory); | ||
else { | ||
var a = factory(); | ||
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; | ||
} | ||
})(global, function() { | ||
return /******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
/******/ | ||
/******/ // object to store loaded and loading wasm modules | ||
/******/ var installedWasmModules = {}; | ||
/******/ | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ | ||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) { | ||
/******/ return installedModules[moduleId].exports; | ||
/******/ } | ||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = installedModules[moduleId] = { | ||
/******/ i: moduleId, | ||
/******/ l: false, | ||
/******/ exports: {} | ||
/******/ }; | ||
/******/ | ||
/******/ // Execute the module function | ||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | ||
/******/ | ||
/******/ // Flag the module as loaded | ||
/******/ module.l = true; | ||
/******/ | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
/******/ | ||
/******/ | ||
/******/ // expose the modules object (__webpack_modules__) | ||
/******/ __webpack_require__.m = modules; | ||
/******/ | ||
/******/ // expose the module cache | ||
/******/ __webpack_require__.c = installedModules; | ||
/******/ | ||
/******/ // define getter function for harmony exports | ||
/******/ __webpack_require__.d = function(exports, name, getter) { | ||
/******/ if(!__webpack_require__.o(exports, name)) { | ||
/******/ Object.defineProperty(exports, name, { | ||
/******/ configurable: false, | ||
/******/ enumerable: true, | ||
/******/ get: getter | ||
/******/ }); | ||
/******/ } | ||
/******/ }; | ||
/******/ | ||
/******/ // define __esModule on exports | ||
/******/ __webpack_require__.r = function(exports) { | ||
/******/ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/******/ }; | ||
/******/ | ||
/******/ // getDefaultExport function for compatibility with non-harmony modules | ||
/******/ __webpack_require__.n = function(module) { | ||
/******/ var getter = module && module.__esModule ? | ||
/******/ function getDefault() { return module['default']; } : | ||
/******/ function getModuleExports() { return module; }; | ||
/******/ __webpack_require__.d(getter, 'a', getter); | ||
/******/ return getter; | ||
/******/ }; | ||
/******/ | ||
/******/ // Object.prototype.hasOwnProperty.call | ||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; | ||
/******/ | ||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = ""; | ||
/******/ | ||
/******/ // object with all compiled WebAssembly.Modules | ||
/******/ __webpack_require__.w = {}; | ||
/******/ | ||
/******/ | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = "./packages/core/src/index.ts"); | ||
/******/ }) | ||
/************************************************************************/ | ||
/******/ ({ | ||
/***/ "./packages/core/src/exceptions/ArgumentsException.ts": | ||
/*!************************************************************!*\ | ||
!*** ./packages/core/src/exceptions/ArgumentsException.ts ***! | ||
\************************************************************/ | ||
/*! no static exports found */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var Exception_1 = __webpack_require__(/*! ./Exception */ "./packages/core/src/exceptions/Exception.ts"); | ||
var ArgumentsException = (function (_super) { | ||
__extends(ArgumentsException, _super); | ||
function ArgumentsException(args) { | ||
var _this = _super.call(this, "\uC785\uB825\uAC12\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. " + JSON.stringify(args)) || this; | ||
_this.arguments = args; | ||
return _this; | ||
} | ||
return ArgumentsException; | ||
}(Exception_1.Exception)); | ||
exports.ArgumentsException = ArgumentsException; | ||
/***/ }), | ||
/***/ "./packages/core/src/exceptions/Exception.ts": | ||
/*!***************************************************!*\ | ||
!*** ./packages/core/src/exceptions/Exception.ts ***! | ||
\***************************************************/ | ||
/*! no static exports found */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var Exception = (function (_super) { | ||
__extends(Exception, _super); | ||
function Exception(message, constructorOpt) { | ||
var _newTarget = this.constructor; | ||
var _this = _super.call(this, message) || this; | ||
Object.setPrototypeOf(_this, _newTarget.prototype); | ||
_this.name = _newTarget.name; | ||
_this.message = message; | ||
Error.captureStackTrace(_this, constructorOpt || _newTarget); | ||
return _this; | ||
} | ||
return Exception; | ||
}(Error)); | ||
exports.Exception = Exception; | ||
/***/ }), | ||
/***/ "./packages/core/src/exceptions/NotImplementedException.ts": | ||
/*!*****************************************************************!*\ | ||
!*** ./packages/core/src/exceptions/NotImplementedException.ts ***! | ||
\*****************************************************************/ | ||
/*! no static exports found */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var Exception_1 = __webpack_require__(/*! ./Exception */ "./packages/core/src/exceptions/Exception.ts"); | ||
var NotImplementedException = (function (_super) { | ||
__extends(NotImplementedException, _super); | ||
function NotImplementedException(message) { | ||
return _super.call(this, "\uC544\uC9C1 \uAD6C\uD604\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. [" + message + "]") || this; | ||
} | ||
return NotImplementedException; | ||
}(Exception_1.Exception)); | ||
exports.NotImplementedException = NotImplementedException; | ||
/***/ }), | ||
/***/ "./packages/core/src/extensions/ArrayExtensions.ts": | ||
/*!*********************************************************!*\ | ||
!*** ./packages/core/src/extensions/ArrayExtensions.ts ***! | ||
\*********************************************************/ | ||
/*! no static exports found */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Array.prototype.mapMany = function (predicate) { | ||
return this.length > 0 ? this.map(predicate).reduce(function (p, n) { return p.concat(n); }) : []; | ||
}; | ||
/***/ }), | ||
/***/ "./packages/core/src/index.ts": | ||
/*!************************************!*\ | ||
!*** ./packages/core/src/index.ts ***! | ||
\************************************/ | ||
/*! no static exports found */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__webpack_require__(/*! ./extensions/ArrayExtensions */ "./packages/core/src/extensions/ArrayExtensions.ts"); | ||
__export(__webpack_require__(/*! ./exceptions/ArgumentsException */ "./packages/core/src/exceptions/ArgumentsException.ts")); | ||
__export(__webpack_require__(/*! ./exceptions/Exception */ "./packages/core/src/exceptions/Exception.ts")); | ||
__export(__webpack_require__(/*! ./exceptions/NotImplementedException */ "./packages/core/src/exceptions/NotImplementedException.ts")); | ||
__export(__webpack_require__(/*! ./types/DateTime */ "./packages/core/src/types/DateTime.ts")); | ||
__export(__webpack_require__(/*! ./types/Type */ "./packages/core/src/types/Type.ts")); | ||
__export(__webpack_require__(/*! ./utils/Logger */ "./packages/core/src/utils/Logger.ts")); | ||
/***/ }), | ||
/***/ "./packages/core/src/types/DateTime.ts": | ||
/*!*********************************************!*\ | ||
!*** ./packages/core/src/types/DateTime.ts ***! | ||
\*********************************************/ | ||
/*! no static exports found */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var ArgumentsException_1 = __webpack_require__(/*! ../exceptions/ArgumentsException */ "./packages/core/src/exceptions/ArgumentsException.ts"); | ||
var DateTime = (function () { | ||
function DateTime() { | ||
var args = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
args[_i] = arguments[_i]; | ||
} | ||
if (args.length === 0) | ||
this._date = new Date(); | ||
else if (args.length === 1) | ||
this._date = new Date(args[0]); | ||
else if (args.length === 2) | ||
this._date = new Date(args[0], args[1]); | ||
else if (args.length === 3) | ||
this._date = new Date(args[0], args[1], args[2]); | ||
else if (args.length === 4) | ||
this._date = new Date(args[0], args[1], args[2], args[3]); | ||
else if (args.length === 5) | ||
this._date = new Date(args[0], args[1], args[2], args[3], args[4]); | ||
else if (args.length === 6) | ||
this._date = new Date(args[0], args[1], args[2], args[3], args[4], args[5]); | ||
else if (args.length === 7) | ||
this._date = new Date(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); | ||
else | ||
throw new ArgumentsException_1.ArgumentsException({ args: args }); | ||
} | ||
DateTime.prototype.getFullYear = function () { | ||
return this._date.getFullYear(); | ||
}; | ||
DateTime.prototype.getMonth = function () { | ||
return this._date.getMonth(); | ||
}; | ||
DateTime.prototype.getDate = function () { | ||
return this._date.getDate(); | ||
}; | ||
DateTime.prototype.getHours = function () { | ||
return this._date.getHours(); | ||
}; | ||
DateTime.prototype.getMinutes = function () { | ||
return this._date.getMinutes(); | ||
}; | ||
DateTime.prototype.getSeconds = function () { | ||
return this._date.getSeconds(); | ||
}; | ||
DateTime.prototype.getMilliseconds = function () { | ||
return this._date.getMilliseconds(); | ||
}; | ||
DateTime.prototype.getTimezoneOffset = function () { | ||
return this._date.getTimezoneOffset(); | ||
}; | ||
DateTime.prototype.getDay = function () { | ||
return this._date.getDay(); | ||
}; | ||
DateTime.prototype.toFormatString = function (format) { | ||
var year = this.getFullYear(); | ||
var month = this.getMonth() + 1; | ||
var day = this.getDate(); | ||
var hour = this.getHours(); | ||
var minute = this.getMinutes(); | ||
var second = this.getSeconds(); | ||
var milliSecond = this.getMilliseconds(); | ||
var offsetHour = -Math.floor(this.getTimezoneOffset() / 60); | ||
var offsetMinute = -this.getTimezoneOffset() % 60; | ||
var weekString = this.getDay() === 0 ? "일" : | ||
this.getDay() === 1 ? "월" : | ||
this.getDay() === 2 ? "화" : | ||
this.getDay() === 3 ? "수" : | ||
this.getDay() === 4 ? "목" : | ||
this.getDay() === 5 ? "금" : | ||
this.getDay() === 6 ? "토" : | ||
""; | ||
var result = format; | ||
result = result.replace(/yyyy/g, year.toString()); | ||
result = result.replace(/yyy/g, year.toString().substr(1, 3)); | ||
result = result.replace(/yy/g, year.toString().substr(2, 2)); | ||
result = result.replace(/y/g, year.toString().substr(3, 1)); | ||
result = result.replace(/MM/g, month.toString().padStart(2, "0")); | ||
result = result.replace(/M/g, month.toString()); | ||
result = result.replace(/dddd/g, weekString + "\uC694\uC77C"); | ||
result = result.replace(/ddd/g, weekString); | ||
result = result.replace(/dd/g, day.toString().padStart(2, "0")); | ||
result = result.replace(/d/g, day.toString()); | ||
result = result.replace(/tt/g, hour < 12 ? "오전" : "오후"); | ||
result = result.replace(/hh/g, (hour % 12).toString().padStart(2, "0")); | ||
result = result.replace(/h/g, (hour % 12).toString()); | ||
result = result.replace(/HH/g, hour.toString().padStart(2, "0")); | ||
result = result.replace(/H/g, hour.toString()); | ||
result = result.replace(/mm/g, minute.toString().padStart(2, "0")); | ||
result = result.replace(/m/g, minute.toString()); | ||
result = result.replace(/ss/g, second.toString().padStart(2, "0")); | ||
result = result.replace(/s/g, second.toString()); | ||
result = result.replace(/fff/g, milliSecond.toString().padStart(3, "0")); | ||
result = result.replace(/ff/g, milliSecond.toString().padStart(3, "0").substr(0, 2)); | ||
result = result.replace(/f/g, milliSecond.toString().padStart(3, "0").substr(0, 1)); | ||
result = result.replace(/zzz/g, "" + (offsetHour > 0 ? "+" : "-") + Math.abs(offsetHour).toString().padStart(2, "0") + ":" + Math.abs(offsetMinute).toString().padStart(2, "0")); | ||
result = result.replace(/zz/g, (offsetHour > 0 ? "+" : "-") + Math.abs(offsetHour).toString().padStart(2, "0")); | ||
result = result.replace(/z/g, (offsetHour > 0 ? "+" : "-") + Math.abs(offsetHour).toString()); | ||
return result; | ||
}; | ||
return DateTime; | ||
}()); | ||
exports.DateTime = DateTime; | ||
/***/ }), | ||
/***/ "./packages/core/src/types/Type.ts": | ||
/*!*****************************************!*\ | ||
!*** ./packages/core/src/types/Type.ts ***! | ||
\*****************************************/ | ||
/*! no static exports found */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/***/ }), | ||
/***/ "./packages/core/src/utils/Logger.ts": | ||
/*!*******************************************!*\ | ||
!*** ./packages/core/src/utils/Logger.ts ***! | ||
\*******************************************/ | ||
/*! no static exports found */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var fs = __webpack_require__(/*! fs-extra */ "fs-extra"); | ||
var path = __webpack_require__(/*! path */ "path"); | ||
var DateTime_1 = __webpack_require__(/*! ../types/DateTime */ "./packages/core/src/types/DateTime.ts"); | ||
var Logger = (function () { | ||
function Logger(groupName, name) { | ||
this._groupName = groupName; | ||
this._name = typeof name === "string" ? name : name.constructor.name; | ||
Logger._lastId++; | ||
this._id = Logger._lastId; | ||
} | ||
Logger.setGroupConfig = function (groupName, config) { | ||
this._groupMap.set(groupName, __assign({ consoleLogTypes: ["log", "info", "warn", "error"], fileLogTypes: [], outputPath: undefined, historySize: 30 }, config)); | ||
}; | ||
Logger.prototype.log = function () { | ||
var logs = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
logs[_i] = arguments[_i]; | ||
} | ||
this._write("log", logs); | ||
}; | ||
Logger.prototype.info = function () { | ||
var logs = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
logs[_i] = arguments[_i]; | ||
} | ||
this._write("info", logs); | ||
}; | ||
Logger.prototype.warn = function () { | ||
var logs = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
logs[_i] = arguments[_i]; | ||
} | ||
this._write("warn", logs); | ||
}; | ||
Logger.prototype.error = function () { | ||
var logs = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
logs[_i] = arguments[_i]; | ||
} | ||
this._write("error", logs); | ||
}; | ||
Logger.prototype._write = function (type, logs) { | ||
var now = new DateTime_1.DateTime(); | ||
var config = (this._groupName && Logger._groupMap.get(this._groupName)) || { | ||
consoleLogTypes: ["log", "info", "warn", "error"], | ||
fileLogTypes: [], | ||
outputPath: undefined, | ||
historySize: 30 | ||
}; | ||
Logger.history.push({ | ||
groupName: this._groupName, | ||
loggerName: this._name, | ||
loggerId: this._id, | ||
logType: type, | ||
logs: logs, | ||
loggedAtDateTime: now | ||
}); | ||
Logger.history = Logger.history.slice(0, config.historySize); | ||
var convertedLogs = logs.map(function (log) { | ||
if (typeof log === "string") { | ||
return log.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, ""); | ||
} | ||
else if (log instanceof Error) { | ||
return log.stack; | ||
} | ||
return log; | ||
}); | ||
if (config.consoleLogTypes.includes(type)) { | ||
var text = "[%c" + now.toFormatString("yyMMdd HH:mm:ss.fff") + "%c] "; | ||
text += "[%c" + this._id.toString().padStart(4, "0") + "%c] "; | ||
text += "[%c" + this._groupName + "%c] "; | ||
text += "[%c" + this._name + "%c] %c%s%c"; | ||
if (process.versions.node) { | ||
var colors = { | ||
log: 0, | ||
info: 36, | ||
warn: 33, | ||
error: 31 | ||
}; | ||
console.log.apply(console, [ | ||
text.replace(/%c/g, "%s"), | ||
"\u001B[90m", | ||
"\u001B[0m", | ||
"\u001B[90m", | ||
"\u001B[0m", | ||
"\u001B[0m", | ||
"\u001B[0m", | ||
"\u001B[" + colors.warn + "m", | ||
"\u001B[0m", | ||
"\u001B[" + colors[type] + "m", | ||
convertedLogs[0], | ||
"\x1b[0m" | ||
].concat(convertedLogs.slice(1))); | ||
} | ||
else { | ||
var colors = { | ||
log: "black", | ||
info: "#2196F3", | ||
warn: "#FF9800", | ||
error: "#F44336" | ||
}; | ||
console.log.apply(console, [ | ||
text, | ||
"color: grey;", | ||
"color: black;", | ||
"color: grey;", | ||
"color: black;", | ||
"color: black;", | ||
"color: black;", | ||
"\u001B[" + colors.warn + "m", | ||
"\u001B[0m", | ||
"color: " + colors[type] + ";", | ||
convertedLogs[0], | ||
"color: black;" | ||
].concat(convertedLogs.slice(1))); | ||
} | ||
} | ||
if (config.fileLogTypes.includes(type)) { | ||
if (!process.versions.node) { | ||
throw new Error("웹에서는 파일 로그를 사용할 수 없습니다."); | ||
} | ||
config.outputPath = config.outputPath || path.resolve(process.cwd(), "logs"); | ||
var text = "[" + type.toUpperCase().padEnd(5, " ") + "] "; | ||
text += "[" + now.toFormatString("yyMMdd HH:mm:ss.fff") + "] "; | ||
text += "[" + this._id.toString().padStart(4, "0") + "] "; | ||
text += "[" + this._groupName + ": " + this._name + "] " + convertedLogs.join("\n"); | ||
try { | ||
fs.mkdirsSync(config.outputPath); | ||
var filePath = path.resolve(config.outputPath, "logs-" + new DateTime_1.DateTime().toFormatString("yyyyMMdd") + ".log"); | ||
if (fs.existsSync(filePath)) { | ||
fs.appendFileSync(filePath, text + "\r\n", "utf8"); | ||
} | ||
else { | ||
fs.writeFileSync(filePath, text + "\r\n", "utf8"); | ||
} | ||
} | ||
catch (e) { | ||
console.error(e); | ||
throw e; | ||
} | ||
} | ||
}; | ||
Logger.history = []; | ||
Logger._groupMap = new Map(); | ||
Logger._lastId = 0; | ||
return Logger; | ||
}()); | ||
exports.Logger = Logger; | ||
/***/ }), | ||
/***/ "fs-extra": | ||
/*!***************************!*\ | ||
!*** external "fs-extra" ***! | ||
\***************************/ | ||
/*! no static exports found */ | ||
/***/ (function(module, exports) { | ||
module.exports = require("fs-extra"); | ||
/***/ }), | ||
/***/ "path": | ||
/*!***********************!*\ | ||
!*** external "path" ***! | ||
\***********************/ | ||
/*! no static exports found */ | ||
/***/ (function(module, exports) { | ||
module.exports = require("path"); | ||
/***/ }) | ||
/******/ }); | ||
}); | ||
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var o in r)("object"==typeof exports?exports:t)[o]=r[o]}}(global,function(){return function(t){var e={};function r(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r.w={},r(r.s=9)}([function(t,e,r){"use strict";var o,n=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e,r){var o=this.constructor,n=t.call(this,e)||this;return Object.setPrototypeOf(n,o.prototype),n.name=o.name,n.message=e,Error.captureStackTrace(n,r||o),n}return n(e,t),e}(Error);e.Exception=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=r(2),n=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)this._date=new Date;else if(1===t.length)this._date=new Date(t[0]);else if(2===t.length)this._date=new Date(t[0],t[1]);else if(3===t.length)this._date=new Date(t[0],t[1],t[2]);else if(4===t.length)this._date=new Date(t[0],t[1],t[2],t[3]);else if(5===t.length)this._date=new Date(t[0],t[1],t[2],t[3],t[4]);else if(6===t.length)this._date=new Date(t[0],t[1],t[2],t[3],t[4],t[5]);else{if(7!==t.length)throw new o.ArgumentsException({args:t});this._date=new Date(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}}return t.prototype.getFullYear=function(){return this._date.getFullYear()},t.prototype.getMonth=function(){return this._date.getMonth()},t.prototype.getDate=function(){return this._date.getDate()},t.prototype.getHours=function(){return this._date.getHours()},t.prototype.getMinutes=function(){return this._date.getMinutes()},t.prototype.getSeconds=function(){return this._date.getSeconds()},t.prototype.getMilliseconds=function(){return this._date.getMilliseconds()},t.prototype.getTimezoneOffset=function(){return this._date.getTimezoneOffset()},t.prototype.getDay=function(){return this._date.getDay()},t.prototype.toFormatString=function(t){var e=this.getFullYear(),r=this.getMonth()+1,o=this.getDate(),n=this.getHours(),i=this.getMinutes(),s=this.getSeconds(),a=this.getMilliseconds(),c=-Math.floor(this.getTimezoneOffset()/60),p=-this.getTimezoneOffset()%60,u=0===this.getDay()?"일":1===this.getDay()?"월":2===this.getDay()?"화":3===this.getDay()?"수":4===this.getDay()?"목":5===this.getDay()?"금":6===this.getDay()?"토":"",l=t;return l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=l.replace(/yyyy/g,e.toString())).replace(/yyy/g,e.toString().substr(1,3))).replace(/yy/g,e.toString().substr(2,2))).replace(/y/g,e.toString().substr(3,1))).replace(/MM/g,r.toString().padStart(2,"0"))).replace(/M/g,r.toString())).replace(/dddd/g,u+"요일")).replace(/ddd/g,u)).replace(/dd/g,o.toString().padStart(2,"0"))).replace(/d/g,o.toString())).replace(/tt/g,n<12?"오전":"오후")).replace(/hh/g,(n%12).toString().padStart(2,"0"))).replace(/h/g,(n%12).toString())).replace(/HH/g,n.toString().padStart(2,"0"))).replace(/H/g,n.toString())).replace(/mm/g,i.toString().padStart(2,"0"))).replace(/m/g,i.toString())).replace(/ss/g,s.toString().padStart(2,"0"))).replace(/s/g,s.toString())).replace(/fff/g,a.toString().padStart(3,"0"))).replace(/ff/g,a.toString().padStart(3,"0").substr(0,2))).replace(/f/g,a.toString().padStart(3,"0").substr(0,1))).replace(/zzz/g,(c>0?"+":"-")+Math.abs(c).toString().padStart(2,"0")+":"+Math.abs(p).toString().padStart(2,"0"))).replace(/zz/g,(c>0?"+":"-")+Math.abs(c).toString().padStart(2,"0"))).replace(/z/g,(c>0?"+":"-")+Math.abs(c).toString())},t}();e.DateTime=n},function(t,e,r){"use strict";var o,n=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e){var r=t.call(this,"입력값이 잘못되었습니다. "+JSON.stringify(e))||this;return r.arguments=e,r}return n(e,t),e}(r(0).Exception);e.ArgumentsException=i},function(t,e){t.exports=require("path")},function(t,e){t.exports=require("fs-extra")},function(t,e,r){"use strict";var o=this&&this.__assign||Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t};Object.defineProperty(e,"__esModule",{value:!0});var n=r(4),i=r(3),s=r(1),a=function(){function t(e,r){this._groupName=e,this._name="string"==typeof r?r:r.constructor.name,t._lastId++,this._id=t._lastId}return t.setGroupConfig=function(t,e){this._groupMap.set(t,o({consoleLogTypes:["log","info","warn","error"],fileLogTypes:[],outputPath:void 0,historySize:30},e))},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._write("log",t)},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._write("info",t)},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._write("warn",t)},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._write("error",t)},t.prototype._write=function(e,r){var o=new s.DateTime,a=this._groupName&&t._groupMap.get(this._groupName)||{consoleLogTypes:["log","info","warn","error"],fileLogTypes:[],outputPath:void 0,historySize:30};t.history.push({groupName:this._groupName,loggerName:this._name,loggerId:this._id,logType:e,logs:r,loggedAtDateTime:o}),t.history=t.history.slice(0,a.historySize);var c=r.map(function(t){return"string"==typeof t?t.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""):t instanceof Error?t.stack:t});if(a.consoleLogTypes.includes(e)){var p="[%c"+o.toFormatString("yyMMdd HH:mm:ss.fff")+"%c] ";if(p+="[%c"+this._id.toString().padStart(4,"0")+"%c] ",p+="[%c"+this._groupName+"%c] ",p+="[%c"+this._name+"%c] %c%s%c",process.versions.node){var u={log:0,info:36,warn:33,error:31};console.log.apply(console,[p.replace(/%c/g,"%s"),"[90m","[0m","[90m","[0m","[0m","[0m","["+u.warn+"m","[0m","["+u[e]+"m",c[0],"[0m"].concat(c.slice(1)))}else{u={log:"black",info:"#2196F3",warn:"#FF9800",error:"#F44336"};console.log.apply(console,[p,"color: grey;","color: black;","color: grey;","color: black;","color: black;","color: black;","["+u.warn+"m","[0m","color: "+u[e]+";",c[0],"color: black;"].concat(c.slice(1)))}}if(a.fileLogTypes.includes(e)){if(!process.versions.node)throw new Error("웹에서는 파일 로그를 사용할 수 없습니다.");a.outputPath=a.outputPath||i.resolve(process.cwd(),"logs");p="["+e.toUpperCase().padEnd(5," ")+"] ";p+="["+o.toFormatString("yyMMdd HH:mm:ss.fff")+"] ",p+="["+this._id.toString().padStart(4,"0")+"] ",p+="["+this._groupName+": "+this._name+"] "+c.join("\n");try{n.mkdirsSync(a.outputPath);var l=i.resolve(a.outputPath,"logs-"+(new s.DateTime).toFormatString("yyyyMMdd")+".log");n.existsSync(l)?n.appendFileSync(l,p+"\r\n","utf8"):n.writeFileSync(l,p+"\r\n","utf8")}catch(t){throw console.error(t),t}}},t.history=[],t._groupMap=new Map,t._lastId=0,t}();e.Logger=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,r){"use strict";var o,n=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e){return t.call(this,"아직 구현되지 않았습니다. ["+e+"]")||this}return n(e,t),e}(r(0).Exception);e.NotImplementedException=i},function(t,e,r){"use strict";Array.prototype.mapMany=function(t){return this.length>0?this.map(t).reduce(function(t,e){return t.concat(e)}):[]}},function(t,e,r){"use strict";function o(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}Object.defineProperty(e,"__esModule",{value:!0}),r(8),o(r(2)),o(r(0)),o(r(7)),o(r(1)),o(r(6)),o(r(5))}])}); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@simplism/core", | ||
"version": "6.0.32", | ||
"version": "6.0.33", | ||
"description": "Simplism Core Package", | ||
@@ -5,0 +5,0 @@ "repository": "github:kslhunter/simplism6", |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
51014
418
2