diff --git a/.DS_Store b/.DS_Store
index fa1c81a..811a941 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/caches/deviceStreaming.xml b/.idea/caches/deviceStreaming.xml
new file mode 100644
index 0000000..5c90e4f
--- /dev/null
+++ b/.idea/caches/deviceStreaming.xml
@@ -0,0 +1,921 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/deviceManager.xml b/.idea/deviceManager.xml
new file mode 100644
index 0000000..91f9558
--- /dev/null
+++ b/.idea/deviceManager.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml
new file mode 100644
index 0000000..b6f7c63
--- /dev/null
+++ b/.idea/libraries/Dart_Packages.xml
@@ -0,0 +1,564 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml
new file mode 100644
index 0000000..a5ea984
--- /dev/null
+++ b/.idea/libraries/Dart_SDK.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/mangashelf.iml b/.idea/mangashelf.iml
new file mode 100644
index 0000000..0a8c6c4
--- /dev/null
+++ b/.idea/mangashelf.iml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..639900d
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..17c57c1
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mangashelf-server/.DS_Store b/mangashelf-server/.DS_Store
index ca6143d..0719b9e 100644
Binary files a/mangashelf-server/.DS_Store and b/mangashelf-server/.DS_Store differ
diff --git a/mangashelf-server/.env b/mangashelf-server/.env
index b6bd924..b30c982 100644
--- a/mangashelf-server/.env
+++ b/mangashelf-server/.env
@@ -2,7 +2,7 @@
# Copy this to .env and modify as needed
# Server port
-PORT=3030
+PORT=3000
# JWT Secret - CHANGE THIS TO A RANDOM STRING IN PRODUCTION!
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
diff --git a/mangashelf-server/covers/cover_1760153238830.jpg b/mangashelf-server/covers/cover_1760153238830.jpg
new file mode 100644
index 0000000..f20f58c
Binary files /dev/null and b/mangashelf-server/covers/cover_1760153238830.jpg differ
diff --git a/mangashelf-server/data/mangashelf.db b/mangashelf-server/data/mangashelf.db
index cef8ab5..cb218f6 100644
Binary files a/mangashelf-server/data/mangashelf.db and b/mangashelf-server/data/mangashelf.db differ
diff --git a/mangashelf-server/library/Batman.cbr b/mangashelf-server/library/Batman.cbr
deleted file mode 100644
index 5acd53e..0000000
Binary files a/mangashelf-server/library/Batman.cbr and /dev/null differ
diff --git a/mangashelf-server/node_modules/.DS_Store b/mangashelf-server/node_modules/.DS_Store
new file mode 100644
index 0000000..4667b23
Binary files /dev/null and b/mangashelf-server/node_modules/.DS_Store differ
diff --git a/mangashelf-server/node_modules/.package-lock.json b/mangashelf-server/node_modules/.package-lock.json
index d44f9a5..6caa16e 100644
--- a/mangashelf-server/node_modules/.package-lock.json
+++ b/mangashelf-server/node_modules/.package-lock.json
@@ -11,12 +11,6 @@
"license": "MIT",
"optional": true
},
- "node_modules/@honeo/check": {
- "version": "2.9.0",
- "resolved": "https://registry.npmjs.org/@honeo/check/-/check-2.9.0.tgz",
- "integrity": "sha512-MgThJJkOUkxymRlBAFdhK5+MoBr0AlkJu6dEfXYQfdgg7XCXezZDB8UhksATyS+UTDeza2ILn0WAIsuFkYSoZw==",
- "license": "MIT"
- },
"node_modules/@npmcli/fs": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz",
@@ -763,12 +757,6 @@
"license": "ISC",
"optional": true
},
- "node_modules/console-wrapper": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/console-wrapper/-/console-wrapper-1.1.0.tgz",
- "integrity": "sha512-ZLZSOGpxU2NzKm7qbTMrMgH8w4eRsRVZJJyxli2tn7hH3UiQy0JLfpMUZiyMlzyZOP2kuPTDV9Nfda8nDz32Mw==",
- "license": "MIT"
- },
"node_modules/content-disposition": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
@@ -1198,20 +1186,6 @@
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
"license": "MIT"
},
- "node_modules/fs-extra": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
- "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
- "license": "MIT",
- "dependencies": {
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- },
- "engines": {
- "node": ">=12"
- }
- },
"node_modules/fs-minipass": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
@@ -1236,7 +1210,6 @@
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"dev": true,
"hasInstallScript": true,
- "ideallyInert": true,
"license": "MIT",
"optional": true,
"os": [
@@ -1743,18 +1716,6 @@
"license": "ISC",
"optional": true
},
- "node_modules/jsonfile": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz",
- "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==",
- "license": "MIT",
- "dependencies": {
- "universalify": "^2.0.0"
- },
- "optionalDependencies": {
- "graceful-fs": "^4.1.6"
- }
- },
"node_modules/jsonwebtoken": {
"version": "9.0.2",
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
@@ -2664,15 +2625,6 @@
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"license": "MIT"
},
- "node_modules/sanitize-filename": {
- "version": "1.6.3",
- "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz",
- "integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==",
- "license": "WTFPL OR ISC",
- "dependencies": {
- "truncate-utf8-bytes": "^1.0.0"
- }
- },
"node_modules/semver": {
"version": "7.7.3",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
@@ -3242,15 +3194,6 @@
"node": "*"
}
},
- "node_modules/truncate-utf8-bytes": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
- "integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==",
- "license": "WTFPL",
- "dependencies": {
- "utf8-byte-length": "^1.0.1"
- }
- },
"node_modules/tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
@@ -3309,15 +3252,6 @@
"imurmurhash": "^0.1.4"
}
},
- "node_modules/universalify": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
- "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
- "license": "MIT",
- "engines": {
- "node": ">= 10.0.0"
- }
- },
"node_modules/unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
@@ -3327,19 +3261,6 @@
"node": ">= 0.8"
}
},
- "node_modules/unrar-promise": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/unrar-promise/-/unrar-promise-3.1.0.tgz",
- "integrity": "sha512-pGWfFP8ioIVtDKYOIDQ1Y7ZnVVszAHlk72mc+hFxqHWOa4ZvB5k+iAHJOmpXF1n9a30iZ8iKKkXDFskqMPuSyw==",
- "license": "MIT",
- "dependencies": {
- "@honeo/check": "^2.6.0",
- "console-wrapper": "^1.1.0",
- "fs-extra": "^10.0.0",
- "node-unrar-js": "^2.0.0",
- "sanitize-filename": "^1.6.1"
- }
- },
"node_modules/unzipper": {
"version": "0.10.14",
"resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.14.tgz",
@@ -3358,12 +3279,6 @@
"setimmediate": "~1.0.4"
}
},
- "node_modules/utf8-byte-length": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz",
- "integrity": "sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA==",
- "license": "(WTFPL OR MIT)"
- },
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/_template.mjs b/mangashelf-server/node_modules/@honeo/check/_is/_template.mjs
deleted file mode 100644
index 145e3a4..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/_template.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- comment
-*/
-
-function isHoge(arg){
- return arg;
-}
-
-export default isHoge;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/index.mjs b/mangashelf-server/node_modules/@honeo/check/_is/index.mjs
deleted file mode 100644
index 4238a7a..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/index.mjs
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- 可変長引数ではないis関数詰め合わせモジュール
- 略称版メソッドもなし
-*/
-
-// 型・インスタンス
-import isArray from './is-array.mjs';
-import isBoolean from './is-boolean.mjs';
-import isBuffer from './is-buffer.mjs';
-import isArrayBuffer from './is-array-buffer.mjs';
-import isError from './is-error.mjs';
-import isFunction from './is-function.mjs';
-import isAsyncFunction from './is-async-function.mjs';
-import isAsyncGeneratorFunction from './is-async-generator-function.mjs';
-import isGeneratorFunction from './is-generator-function.mjs';
-import isNumber from './is-number.mjs';
-import isRegExp from './is-reg-exp.mjs';
-import isStats from './is-stats.mjs';
-import isString from './is-string.mjs';
-import isUndefined from './is-undefined.mjs';
-import isNull from './is-null.mjs';
-import isNaN from './is-nan.mjs';
-import isDate from './is-date.mjs';
-import isEvent from './is-event.mjs';
-import isEventTarget from './is-event-target.mjs';
-import isObject from './is-object.mjs';
-import isPromise from './is-promise.mjs';
-import isAbortController from './is-abort-controller.mjs';
-import isAbortSignal from './is-abort-signal.mjs';
-
-// Number系
-import isOdd from './is-odd.mjs';
-import isEven from './is-even.mjs';
-import isMultiple from './is-multiple.mjs';
-
-// String系
-import isLowercase from './is-lowercase.mjs';
-import isUppercase from './is-uppercase.mjs';
-import isIPv4 from './is-ipv4.mjs';
-import isHostname from './is-hostname.mjs';
-
-// DOM
-import isNode from './is-node.mjs';
-import isTextNode from './is-text-node.mjs';
-import isElement from './is-element.mjs';
-import isDocumentFragment from './is-document-fragment.mjs';
-
-
-// 雑多
-import isTrue from './is-true.mjs';
-import isFalse from './is-false.mjs';
-import isTruthy from './is-truthy.mjs';
-import isFalsy from './is-falsy.mjs';
-import isInstance from './is-instance.mjs';
-import isInstanceof from './is-instanceof.mjs';
-import isInstanceOfClassName from './is-instance-of-classname.mjs';
-import isNullish from './is-nullish.mjs';
-import isObjectLiteral from './is-object-literal.mjs';
-import isArrayLike from './is-array-like.mjs';
-import isComparisonOperator from './is-comparison-operator.mjs';
-import isSameDay from './is-same-day.mjs';
-import isSemVer from './is-sem-ver.mjs';
-import isVersion from './is-version.mjs';
-import isEmpty from './is-empty.mjs';
-import isLeapYear from './is-leap-year.mjs';
-import isValidDate from './is-valid-date.mjs';
-
-// 返り値
-const _is = {
- isArray,
- isBoolean,
- isBuffer,
- isArrayBuffer,
- isError,
- isFunction,
- isAsyncFunction,
- isAsyncGeneratorFunction,
- isGeneratorFunction,
- isNumber,
- isRegExp,
- isStats,
- isString,
- isUndefined,
- isNull,
- isNaN,
- isDate,
- isEvent,
- isEventTarget,
- isObject,
- isPromise,
- isAbortController,
- isAbortSignal,
- isOdd,
- isEven,
- isMultiple,
- isLowercase,
- isUppercase,
- isIPv4,
- isHostname,
- isNode,
- isTextNode,
- isElement,
- isDocumentFragment,
- isTrue,
- isFalse,
- isTruthy,
- isFalsy,
- isInstance,
- isInstanceof,
- isInstanceOfClassName,
- isNullish,
- isObjectLiteral,
- isArrayLike,
- isComparisonOperator,
- isSameDay,
- isSemVer,
- isVersion,
- isEmpty,
- isLeapYear,
- isValidDate
-}
-
-export default _is;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-abort-controller.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-abort-controller.mjs
deleted file mode 100644
index a45783d..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-abort-controller.mjs
+++ /dev/null
@@ -1,14 +0,0 @@
-import isObj from './is-object.mjs';
-import isFunc from './is-function.mjs';
-
-/*
- 引数がAbortControllerインスタンスか
- Polyfillでも機能するようにしている。
-*/
-function isAbortController(ac){
- return isObj(ac)
- && isFunc(ac.constructor)
- && ac.constructor.name==='AbortController';
-}
-
-export default isAbortController;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-abort-signal.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-abort-signal.mjs
deleted file mode 100644
index 6fb253f..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-abort-signal.mjs
+++ /dev/null
@@ -1,15 +0,0 @@
-import isObj from './is-object.mjs';
-import isFunc from './is-function.mjs';
-
-/*
- 引数がAbortSignalインスタンスか
- Polyfillでも機能するようにしている。
-*/
-function isAbortSignal(abortSignal){
- // const isETExtend = abortSignal instanceof EventTarget;
- return isObj(abortSignal)
- && isFunc(abortSignal.constructor)
- && abortSignal.constructor.name==='AbortSignal';
-}
-
-export default isAbortSignal;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-array-buffer.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-array-buffer.mjs
deleted file mode 100644
index 4a665b4..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-array-buffer.mjs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Mod
-import isInstance from './is-instance.mjs';
-
-/*
- ArrayBufferインスタンスか
-
- args
- 1: any
- result
- boolean
-*/
-function isArrayBuffer(arg){
- return isInstance(arg, ArrayBuffer);
-}
-
-export default isArrayBuffer;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-array-like.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-array-like.mjs
deleted file mode 100644
index 7a0157f..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-array-like.mjs
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- 定義: truthyで、.lengthで数値を返すもの
-*/
-
-function isArrayLike(arg){
- return !!arg && typeof arg.length==='number';
-}
-
-
-export default isArrayLike;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-array.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-array.mjs
deleted file mode 100644
index 6f0acb9..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-array.mjs
+++ /dev/null
@@ -1,5 +0,0 @@
-function isArray(arg){
- return Array.isArray(arg);
-}
-
-export default isArray;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-async-function.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-async-function.mjs
deleted file mode 100644
index 141f3a9..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-async-function.mjs
+++ /dev/null
@@ -1,14 +0,0 @@
-import isInstanceof from './is-instanceof.mjs';
-
-let AsyncFunction;
-
-function isAsyncFunction(arg){
-
- if( !AsyncFunction ){
- AsyncFunction = (async()=>0).constructor;
- }
-
- return isInstanceof(arg, AsyncFunction);
-}
-
-export default isAsyncFunction;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-async-generator-function.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-async-generator-function.mjs
deleted file mode 100644
index 685bff9..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-async-generator-function.mjs
+++ /dev/null
@@ -1,14 +0,0 @@
-import isInstanceof from './is-instanceof.mjs';
-
-let AsyncGeneratorFunction;
-
-function isAsyncGeneratorFunction(arg){
-
- if( !AsyncGeneratorFunction ){
- AsyncGeneratorFunction = (async function*(){}).constructor;
- }
-
- return isInstanceof(arg, AsyncGeneratorFunction);
-}
-
-export default isAsyncGeneratorFunction;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-boolean.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-boolean.mjs
deleted file mode 100644
index d14088b..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-boolean.mjs
+++ /dev/null
@@ -1,5 +0,0 @@
-function isBoolean(arg){
- return typeof arg==='boolean';
-}
-
-export default isBoolean;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-buffer.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-buffer.mjs
deleted file mode 100644
index b381132..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-buffer.mjs
+++ /dev/null
@@ -1,5 +0,0 @@
-function isBuffer(arg){
- return Buffer.isBuffer(arg);
-}
-
-export default isBuffer;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-comparison-operator.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-comparison-operator.mjs
deleted file mode 100644
index 6453200..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-comparison-operator.mjs
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- 有効な比較演算子の文字列か
- [比較演算子 - JavaScript | MDN](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)
-*/
-
-// 有効な比較演算子のset
-const set_co = new Set([
- '<',
- '>',
- '<=',
- '>=',
- '==',
- '!=',
- '===',
- '!=='
-]);
-
-function isComparisonOperator(arg){
- return typeof arg==='string' && set_co.has(arg);
-}
-
-export default isComparisonOperator;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-date.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-date.mjs
deleted file mode 100644
index b5f545e..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-date.mjs
+++ /dev/null
@@ -1,5 +0,0 @@
-function isDate(arg){
- return arg instanceof Date;
-}
-
-export default isDate;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-document-fragment.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-document-fragment.mjs
deleted file mode 100644
index ab5a067..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-document-fragment.mjs
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- comment
-*/
-import isNode from './is-node.mjs';
-
-function isDocumentFragment(arg){
- return isNode(arg) && arg.nodeType===11;
-}
-
-export default isDocumentFragment;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-element.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-element.mjs
deleted file mode 100644
index 3bca4e3..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-element.mjs
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- comment
-*/
-function isElement(arg){
- return arg instanceof Element;
-}
-
-export default isElement;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-empty.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-empty.mjs
deleted file mode 100644
index 1536482..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-empty.mjs
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- 引数が空か
-
- 判定基準
- 文字列
- 長さが0の場合
- 配列
- 長さが0の場合
- オブジェクト
- keyが存在しない場合
- それ以外
- 常にfalse
-*/
-function isEmpty(arg){
- if(typeof arg==='string'){
- return !arg.length;
- }else if( Array.isArray(arg) ){
- return !arg.length;
- }else if(typeof arg==='object' && arg instanceof Object){
- return !Object.getOwnPropertyNames(arg).length;
- }else{
- return false;
- }
-}
-
-export default isEmpty;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-error.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-error.mjs
deleted file mode 100644
index accc0e9..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-error.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- comment
-*/
-
-function isError(arg){
- return arg instanceof Error;
-}
-
-export default isError;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-even.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-even.mjs
deleted file mode 100644
index 9872b20..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-even.mjs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Mod
-import isNumber from './is-number.mjs';
-
-/*
- 偶数判定(0含む)
-*/
-function isEven(num){
- return isNumber(num) && !(num % 2);
-}
-
-export default isEven;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-event-target.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-event-target.mjs
deleted file mode 100644
index fddc41b..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-event-target.mjs
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- comment
-*/
-function isEventTarget(arg){
- return arg instanceof EventTarget;
-}
-
-export default isEventTarget;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-event.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-event.mjs
deleted file mode 100644
index b6d1d56..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-event.mjs
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- comment
-*/
-function isEvent(arg){
- return arg instanceof Event;
-}
-
-export default isEvent;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-false.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-false.mjs
deleted file mode 100644
index d8f009f..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-false.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- comment
-*/
-
-function isFalse(arg){
- return arg===false;
-}
-
-export default isFalse;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-falsy.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-falsy.mjs
deleted file mode 100644
index 6b85c50..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-falsy.mjs
+++ /dev/null
@@ -1,6 +0,0 @@
-
-function isFalsy(arg){
- return !arg;
-}
-
-export default isFalsy;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-function.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-function.mjs
deleted file mode 100644
index b7558e7..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-function.mjs
+++ /dev/null
@@ -1,5 +0,0 @@
-function isFunction(arg){
- return typeof arg==='function';
-}
-
-export default isFunction;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-generator-function.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-generator-function.mjs
deleted file mode 100644
index 9befada..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-generator-function.mjs
+++ /dev/null
@@ -1,14 +0,0 @@
-import isInstanceof from './is-instanceof.mjs';
-
-let GeneratorFunction;
-
-function isGeneratorFunction(arg){
-
- if( !GeneratorFunction ){
- GeneratorFunction = (function*(){}).constructor;
- }
-
- return isInstanceof(arg, GeneratorFunction);
-}
-
-export default isGeneratorFunction;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-hostname.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-hostname.mjs
deleted file mode 100644
index c3f90d5..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-hostname.mjs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Var
-const re_label = /[a-z0-9][a-z0-9-]*[a-z0-9]/;
-const re_tld = /[a-z]{2,}|[a-z]{2}\.[a-z]{2}/;
-const re_domain = new RegExp(`${re_label.source}\.${re_tld.source}`);
-const re_hostname = new RegExp(`^(${re_label.source}\\.)*${re_domain.source}$`, 'i');
-
-
-/*
- ホスト名文字列か
- 厳密な仕様がよくわからないのでルーズに判定している。
- 大文字・小文字を区別しない。
- 実際には混在しているものがあるため。
- dotで区切られた半角英数&ハイフン(ラベル)。
- 大文字・小文字は区別しない。
- ハイフンは先頭・末尾NG.
- ラベル毎の長さは2-63文字。
- どこかで3文字以上と見たが、実際は二文字もよく振られている。
- ドメイン部分は2文字もある。
- 合計255文字まで。
-
- args
- 1: string
- result
- boolean
-*/
-function isHostname(str){
- const isU256 = str.length <= 255;
- return isU256 && re_hostname.test(str);
-}
-
-
-
-export default isHostname;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-instance-of-classname.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-instance-of-classname.mjs
deleted file mode 100644
index b8fab8a..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-instance-of-classname.mjs
+++ /dev/null
@@ -1,31 +0,0 @@
-// mod
-import isInstance from './is-instance.mjs';
-import isString from './is-string.mjs';
-
-/*
- インスタンスの親クラスが指定した名称か
-
- args
- 1: instance
- 2: string
- 3: op, object
- return
- boolean
-*/
-
-
-function isInstanceOfClassName(instance, str_name, options={debug:false}){
-
- options.debug && console.log('isInstanceOfClassName()', instance, str_name);
-
- if( !isInstance(instance) ){
- throw new TypeError('arg1 not instance');
- }
- if( !isString(str_name) ){
- throw new TypeError('arg2 not string');
- }
-
- return instance.constructor.name===str_name;
-}
-
-export default isInstanceOfClassName;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-instance.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-instance.mjs
deleted file mode 100644
index 6d2ad51..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-instance.mjs
+++ /dev/null
@@ -1,31 +0,0 @@
-// Mod
-import isObject from './is-object.mjs';
-import isFunction from './is-function.mjs';
-
-
-
-
-/*
- args === 2
- 引数なにかのコンストラクタ関数・クラスのインスタンスか
- true条件
- オブジェクト
- .constructorが関数
- .__proto__が上記関数のprototype
-
- args
- 1: any
- result
- boolean
-*/
-function isInstance(any){
- if( isObject(any) ){
- const parent = any.constructor;
- return isFunction(parent) &&
- Object.getPrototypeOf(any)===parent.prototype;
- }else{
- return false;
- }
-}
-
-export default isInstance;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-instanceof.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-instanceof.mjs
deleted file mode 100644
index 2360701..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-instanceof.mjs
+++ /dev/null
@@ -1,19 +0,0 @@
-
-/*
- instanceof
-
- args
- 1: any
- 2: any
- result
- boolean
-*/
-function isInstanceof(arg, arg2){
- try{
- return arg instanceof arg2;
- }catch(e){
- return false;
- }
-}
-
-export default isInstanceof;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-ipv4.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-ipv4.mjs
deleted file mode 100644
index 489dfaf..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-ipv4.mjs
+++ /dev/null
@@ -1,19 +0,0 @@
-
-// Var
-const re_0to255 = /(\d|[1-9]\d|1\d{2}|2(5[0-5]|[0-4]\d))/;
-const re_ipv4 = new RegExp(`^(${re_0to255.source}\\.){3}${re_0to255.source}$`);
-
-/*
- IPv4アドレス文字列か
- dotで区切られた0-255が4つ。
-
- args
- 1: string
- result
- boolean
-*/
-function isIPv4(str){
- return re_ipv4.test(str);
-}
-
-export default isIPv4;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-leap-year.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-leap-year.mjs
deleted file mode 100644
index d2fdc5c..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-leap-year.mjs
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- 閏年判定
-
- 引数
- 1: date or number
- 返り値
- boolean
-
- 参考
- [うるう年とは - はてなキーワード](http://d.hatena.ne.jp/keyword/%A4%A6%A4%EB%A4%A6%C7%AF)
-*/
-import isNumber from './is-number.mjs';
-import isDate from './is-date.mjs';
-
-function isLeapYear(arg){
- if( isNumber(arg) ){
- return isLeapYear_number(arg)
- }else if( isDate(arg) ){
- return isLeapYear_date(arg);
- }else{
- throw new TypeError(`Invalid arguments: ${arg}`);
- }
-}
-
-// dateインスタンス用
-function isLeapYear_date(date){
- const year = date.getFullYear();
- return isLeapYear_number(year);
-}
-
-// 数値(年)用、本体
-function isLeapYear_number(year){
- return year % 4 === 0 && (year % 100!==0 || year % 400===0);
-}
-
-export default isLeapYear;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-lowercase.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-lowercase.mjs
deleted file mode 100644
index 28ba216..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-lowercase.mjs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Mod
-import isString from './is-string.mjs';
-
-/*
- 引数文字列がすべて半角小文字か
-*/
-function isLowercase(arg){
-
- if( !isString(arg) ){
- return false;
- }
-
- return /^[a-z]+$/.test(arg);
-}
-
-export default isLowercase;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-multiple.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-multiple.mjs
deleted file mode 100644
index 6e73de0..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-multiple.mjs
+++ /dev/null
@@ -1,28 +0,0 @@
-// Mod
-import isNumber from './is-number.mjs';
-
-/*
- 倍数判定
- 引数1が引数2の倍数か
-
- args
- 1: number
- 2: number
- result
- boolean
-*/
-
-function isMultiple(arg1, arg2){
-
- // validation
- if( !isNumber(arg1) ){
- throw TypeError('Invalid arguments 1');
- }
- if( !isNumber(arg2) ){
- throw TypeError('Invalid arguments 1');
- }
-
- return !(arg1%arg2);
-}
-
-export default isMultiple;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-nan.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-nan.mjs
deleted file mode 100644
index 116ee20..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-nan.mjs
+++ /dev/null
@@ -1,6 +0,0 @@
-// arg!=argでいい気もするがPolyfill前提のコンセプトのため
-function isNaN(arg){
- return Number.isNaN(arg);
-}
-
-export default isNaN;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-node.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-node.mjs
deleted file mode 100644
index 8c0c1db..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-node.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-// Mod
-import isNumber from './is-number.mjs';
-import isObject from './is-object.mjs';
-
-function isNode(arg){
- return arg instanceof Node;
-}
-
-export default isNode;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-null.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-null.mjs
deleted file mode 100644
index 3fbbcfd..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-null.mjs
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- comment
-*/
-function isNull(arg){
- return arg===null;
-}
-
-export default isNull;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-nullish.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-nullish.mjs
deleted file mode 100644
index 050a2a8..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-nullish.mjs
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- null or undef
-
- args
- 1: any
- result
- boolean
-*/
-function isNullish(arg){
- if( arg===null ){
- return true;
- }else if( arg===undefined ){
- return true;
- }else{
- return false;
- }
-}
-
-export default isNullish;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-number.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-number.mjs
deleted file mode 100644
index 83c35d8..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-number.mjs
+++ /dev/null
@@ -1,6 +0,0 @@
-
-function isNumber(arg){
- return typeof arg==='number';
-}
-
-export default isNumber;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-object-literal.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-object-literal.mjs
deleted file mode 100644
index 7499efd..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-object-literal.mjs
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- const obj = {} みたいなの
- arg.constructor===Object でもよさそう。
-
- 2020.11.08
- Object#__proto__ => Object.getPrototypeOf()
-*/
-function isObjectLiteral(arg){
- return Object.getPrototypeOf(arg)===Object.prototype;
-}
-
-export default isObjectLiteral;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-object.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-object.mjs
deleted file mode 100644
index da3686a..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-object.mjs
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- typeofと違ってnullは弾く
-
- ChangeLog
- 2020.10.25
- 判定をinstanceofから以前の方法に戻した。
- Object.create(null) で作られたものを検出できなかったため。
-*/
-function isObject(arg){
- return !!arg && arg===Object(arg);
-}
-
-export default isObject;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-odd.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-odd.mjs
deleted file mode 100644
index 12106da..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-odd.mjs
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- 奇数判定(0含む)
-*/
-import isNumber from './is-number.mjs';
-
-function isOdd(num){
- return isNumber(num) && !!(num % 2);
-}
-
-export default isOdd;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-promise.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-promise.mjs
deleted file mode 100644
index 791b7eb..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-promise.mjs
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- 引数がPromiseインスタンスか
-*/
-function isPromise(arg){
- return arg instanceof Promise;
-}
-
-export default isPromise;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-reg-exp.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-reg-exp.mjs
deleted file mode 100644
index 32fdfa7..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-reg-exp.mjs
+++ /dev/null
@@ -1,6 +0,0 @@
-
-function isRegExp(arg){
- return arg instanceof RegExp;
-}
-
-export default isRegExp;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-same-day.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-same-day.mjs
deleted file mode 100644
index 91553c8..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-same-day.mjs
+++ /dev/null
@@ -1,32 +0,0 @@
-import isDate from './is-date.mjs';
-
-/*
- 引数のdateインスタンスが同じ日か
-
- args
- 1...: date
- result
- boolean
-*/
-function isSameday(...arr_date){
- let str_baseDateText;
-
- for(let date of arr_date ){
- if( !isDate(date) ){
- throw new TypeError(`Invalid arguments: ${index}`);
- }
-
- if( !str_baseDateText ){
- str_baseDateText = date.toDateString();
- }else{
- const str_dateText = date.toDateString();
- if(str_baseDateText!==str_dateText){
- return false;
- }
- }
- }
-
- return true;
-}
-
-export default isSameday;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-sem-ver.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-sem-ver.mjs
deleted file mode 100644
index 77a0809..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-sem-ver.mjs
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- SemVerな文字列かどうか
- regexpを長々と繋げて頑張ると次弄るときに頭痛くなるから極力分割する
- 参考
- [SemVerのv1.0.0とv2.0.0-rc.1、node-semverを見比べてみた - /var/log/kozy4324](http://kozy4324.github.io/blog/2012/12/19/semver/)
-*/
-
-function isSemVer(arg){
- if( typeof arg!=='string'){
- return false;
- }
-
- if( /^\d\.\d\.\d$/.test(arg) ){
- return true;
- }
-
- if( /^\d\.\d\.\d-[0-9A-Za-z-.]*$/.test(arg) ){
- return true;
- }
-}
-
-export default isSemVer;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-stats.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-stats.mjs
deleted file mode 100644
index 26d4848..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-stats.mjs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Mod
-import fs from 'fs';
-
-function isStats(arg){
- try{
- return arg instanceof fs.Stats;
- }catch(e){
- return false;
- }
-}
-
-export default isStats;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-string.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-string.mjs
deleted file mode 100644
index a2b97d9..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-string.mjs
+++ /dev/null
@@ -1,5 +0,0 @@
-function isString(arg){
- return typeof arg==='string';
-}
-
-export default isString;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-text-node.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-text-node.mjs
deleted file mode 100644
index dfbdab0..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-text-node.mjs
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- comment
-*/
-import isNode from './is-node.mjs';
-
-function isTextNode(arg){
- return isNode(arg) && arg.nodeType===3;
-}
-
-export default isTextNode;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-true.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-true.mjs
deleted file mode 100644
index ab16431..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-true.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- comment
-*/
-
-function isTrue(arg){
- return arg===true;
-}
-
-export default isTrue;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-truthy.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-truthy.mjs
deleted file mode 100644
index b3cf325..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-truthy.mjs
+++ /dev/null
@@ -1,5 +0,0 @@
-function isTruthy(arg){
- return !!arg;
-}
-
-export default isTruthy;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-undefined.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-undefined.mjs
deleted file mode 100644
index 83515eb..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-undefined.mjs
+++ /dev/null
@@ -1,6 +0,0 @@
-
-function isUndefined(arg){
- return arg===undefined;
-}
-
-export default isUndefined;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-uppercase.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-uppercase.mjs
deleted file mode 100644
index 78afc64..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-uppercase.mjs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Mod
-import isString from './is-string.mjs';
-
-/*
- 引数文字列がすべて大文字か
-*/
-function isUppercase(arg){
-
- if( !isString(arg) ){
- return false;
- }
-
- return /^[A-Z]+$/.test(arg);
-}
-
-export default isUppercase;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-valid-date.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-valid-date.mjs
deleted file mode 100644
index 4b46943..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-valid-date.mjs
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- 引数の日時が存在するものかをBooleanで返す
-
- 引数
- 1, 2, 3: number
- 返り値
- boolean
-
- 参考
- [Vanilla JavaScriptで簡単に日付が有効かどうかチェックする方法 | Rriver](https://parashuto.com/rriver/development/validate-date-using-vanilla-js)
-*/
-
-// Mod
-import isNumber from './is-number.mjs';
-
-function isValidDate(year, month, day){
-
- if( !isNumber(year, month, day) ){
- throw new TypeError(`Invalid arguments`);
- }
-
- const date = new Date(year, month-1, day);
- const isSameYear = date.getFullYear()===year;
- const isSameMonth = date.getMonth()===(month-1);
- const isSameDay = date.getDate()===day;
- const result = isSameYear && isSameMonth && isSameDay;
- return result;
-}
-
-export default isValidDate;
diff --git a/mangashelf-server/node_modules/@honeo/check/_is/is-version.mjs b/mangashelf-server/node_modules/@honeo/check/_is/is-version.mjs
deleted file mode 100644
index f7dd7ae..0000000
--- a/mangashelf-server/node_modules/@honeo/check/_is/is-version.mjs
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- versionを表した数字とdotの文字列か
-
- セーフ
- 1
- 1.2
- 1.2.3
- 1.2.3.4
- アウト
- 1.2A
- 其の弐
-*/
-
-function isVersion(arg){
- return typeof arg==='string' && /^\d(|[0-9.]*\d)$/.test(arg);
-}
-
-export default isVersion;
diff --git a/mangashelf-server/node_modules/@honeo/check/any.mjs b/mangashelf-server/node_modules/@honeo/check/any.mjs
deleted file mode 100644
index 9c14f8c..0000000
--- a/mangashelf-server/node_modules/@honeo/check/any.mjs
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- any
- 引数どれか一つでも適正ならtrueを返す
-*/
-
-// Mod
-import _is from './_is/index.mjs'; // 素の判定モジュール詰め合わせ
-import config from './config.mjs'; // 設定
-
-// このモジュール返り値
-const any = Object.create(null);
-
-/*
- _isの関数を元に改名&可変長引数化
- 可変長引数
- 引数があれば判定関数を渡してsome、なければfalseを返す
- config.variadic.ignoreと一致するメソッド名は無視する
- 改名
- config.shortのpropertyと一致する名前のメソッドは略称版を作る
-
-*/
-for(let [key, func] of Object.entries(_is)){
-
-
- // 関数名作り isFooBar => FooBar, foobar [, FB, fb]
- const nameArr = [];
- const name1 = key.slice(2);
- const name2 = name1.toLowerCase();
- nameArr.push(name1, name2);
- // 略称版があれば作る
- if( config.short[key] ){
- const arr_alias = Array.isArray(config.short[key]) ?
- config.short[key]:
- [config.short[key]];
- arr_alias.forEach( (name)=>{
- // console.log('methodName:', name);
- const str_Camel = name.slice(2); // "is"をカット
- const str_lower = str_Camel.toLowerCase(); // "Method" => "method"
- nameArr.push(str_Camel, str_lower);
- });
- }
-
- // 可変長引数化
- const method = (function(){
- const isVariadic = !config.variadic.ignore.includes(key);
- // console.log(`isVariadic: ${key} ${isVariadic}`);
- if( isVariadic ){
- return (...args)=>{
- return args.length ?
- args.some(func):
- false;
- }
- }else{
- return func;
- }
- }());
-
- nameArr.forEach( (name)=>{
- any[name] = method;
- });
-
-}
-
-export default any;
diff --git a/mangashelf-server/node_modules/@honeo/check/config.mjs b/mangashelf-server/node_modules/@honeo/check/config.mjs
deleted file mode 100644
index 969f2b9..0000000
--- a/mangashelf-server/node_modules/@honeo/check/config.mjs
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- 設定オブジェクトを返す
-*/
-const config = {
-
- // 可変長引数に関する設定
- variadic: {
- ignore: [// 無視する関数名(非対応・元から対応などで)
- 'isInstanceof',
- 'isInstanceOfClassName',
- 'isMultiple',
- 'isValidDate',
- 'isSameDay'
- ]
- },
-
- // 別名付けるやつ
- short: {
- isArray: 'isArr',
- isBoolean: 'isBool',
- isBuffer: 'isBuf',
- isArrayBuffer: 'isArrBuf',
- isError: 'isErr',
- isFunction: ['isFunc', 'isFn'],
- isNumber: 'isNum',
- isRegExp: 'isRE',
- isString: 'isStr',
- isObject: 'isObj',
- isUndefined: 'isUndef',
- isElement: 'isElm',
- isDocumentFragment: 'isDF',
- isVersion: 'isVer'
- }
-}
-
-export default config;
diff --git a/mangashelf-server/node_modules/@honeo/check/document.md b/mangashelf-server/node_modules/@honeo/check/document.md
deleted file mode 100644
index 6c7033c..0000000
--- a/mangashelf-server/node_modules/@honeo/check/document.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# document
-という名の制作メモ。
-
-
-## 仕様
-* ESM
-
-
-## Mod
-
-### devDependencies
-* jsdom
- - DOM関連。
-
-
-## dir構成
-
-### ./
-* index.mjs
- - is.mjs, not.mjs, any.mjsをまとめて返すだけ。
-* is.mjs
- - ./\_is/index.mjsを可変長引数化する。
-* not.mjs
- - is.mjsを元にnot関数を作成する。
-* any.mjs
- - ./\_is/index.mjsを元にany関数を作成する。
-* config.mjs
- - 設定オブジェクトを返すモジュール。
-
-### ./\_is.
-素の判定関数詰め合わせモジュールを返すディレクトリ。
-* index.mjs
- - 本体。
-* ^is-[a-z-]+\.mjs$
- - 個別の判定関数を返すモジュール。
-
-### ./test
-* index.mjs
- - npm tで呼び出されるテストスクリプト。
diff --git a/mangashelf-server/node_modules/@honeo/check/index.mjs b/mangashelf-server/node_modules/@honeo/check/index.mjs
deleted file mode 100644
index 7e11cde..0000000
--- a/mangashelf-server/node_modules/@honeo/check/index.mjs
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- まとめるだけ
- もっとスマートな書き方がありそう。
-*/
-
-import _is from './is.mjs';
-import _not from './not.mjs';
-import _any from './any.mjs';
-
-export const is = _is;
-export const not = _not;
-export const any = _any;
-
-export default {
- is, not, any
-}
diff --git a/mangashelf-server/node_modules/@honeo/check/is.mjs b/mangashelf-server/node_modules/@honeo/check/is.mjs
deleted file mode 100644
index 4c538b9..0000000
--- a/mangashelf-server/node_modules/@honeo/check/is.mjs
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- 可変長引数化
-*/
-
-// 素の判定モジュール詰め合わせ
-import _is from './_is/index.mjs';
-
-// 設定
-import config from './config.mjs';
-
-// このモジュール返り値
-const is = Object.create(null);
-
-/*
- _isの関数を元に改名&可変長引数化
- 可変長引数
- 引数があれば判定関数を渡してevery、なければfalseを返す
- config.variadic.ignoreと一致するメソッド名は無視する
- 改名
- config.shortのpropertyと一致する名前のメソッドは略称版を作る
-
-*/
-for(let [key, func] of Object.entries(_is)){
-
-
- // 関数名作り isFooBar => FooBar, foobar [, FB, fb]
- const nameArr = [];
- const name1 = key.slice(2);
- const name2 = name1.toLowerCase();
- nameArr.push(name1, name2);
- // 略称版があれば作る
- if( config.short[key] ){
- const arr_alias = Array.isArray(config.short[key]) ?
- config.short[key]:
- [config.short[key]];
- arr_alias.forEach( (name)=>{
- // console.log('methodName:', name);
- const str_Camel = name.slice(2); // "is"をカット
- const str_lower = str_Camel.toLowerCase(); // "Method" => "method"
- nameArr.push(str_Camel, str_lower);
- });
- }
-
- // 可変長引数化
- const method = (function(){
- const isVariadic = !config.variadic.ignore.includes(key);
- // console.log(`isVariadic: ${key} ${isVariadic}`);
- if( isVariadic ){
- return (...args)=>{
- return args.length ?
- args.every(func):
- false;
- }
- }else{
- return func;
- }
- }());
-
- nameArr.forEach( (name)=>{
- is[name] = method;
- });
-
-}
-
-export default is;
diff --git a/mangashelf-server/node_modules/@honeo/check/not.mjs b/mangashelf-server/node_modules/@honeo/check/not.mjs
deleted file mode 100644
index 8d786b9..0000000
--- a/mangashelf-server/node_modules/@honeo/check/not.mjs
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- isを元にnot作成
-*/
-import is from './is.mjs';
-
-const not = Object.create(null);
-
-for(let [key, func] of Object.entries(is) ){
- not[key] = (...args)=>{
- return !func(...args);
- }
-}
-
-export default not;
diff --git a/mangashelf-server/node_modules/@honeo/check/package.json b/mangashelf-server/node_modules/@honeo/check/package.json
deleted file mode 100644
index 26348a2..0000000
--- a/mangashelf-server/node_modules/@honeo/check/package.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "name": "@honeo/check",
- "version": "2.9.0",
- "description": "型・インスタンスなどの確認",
- "main": "index.mjs",
- "scripts": {
- "test": "node ./test/index.mjs"
- },
- "author": "honeo",
- "license": "MIT",
- "devDependencies": {
- "@azure/abort-controller": "^1.0.4",
- "jsdom": "^16.5.0",
- "node-abort-controller": "^3.0.0"
- },
- "directories": {
- "test": "test"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/honeo/check.git"
- },
- "keywords": [
- "check",
- "type",
- "instance"
- ],
- "bugs": {
- "url": "https://github.com/honeo/check/issues"
- },
- "homepage": "https://github.com/honeo/check#readme"
-}
diff --git a/mangashelf-server/node_modules/@honeo/check/readme.md b/mangashelf-server/node_modules/@honeo/check/readme.md
deleted file mode 100644
index eee2245..0000000
--- a/mangashelf-server/node_modules/@honeo/check/readme.md
+++ /dev/null
@@ -1,271 +0,0 @@
-# check
-* [honeo/check](https://github.com/honeo/check)
-* [@honeo/check](https://www.npmjs.com/package/@honeo/check)
-
-
-## なにこれ
-型・インスタンス等をチェックするやつ。
-
-
-## 使い方
-```bash
-$ npm i @honeo/check
-```
-```js
-import {is, not, any} from '@honeo/check';
-
-is.arr([]); // true
-
-is.arr([], {}); // false
-not.arr([], {}); // false
-any.arr([], {}); // true
-
-
-// single
-import is from '@honeo/check/is.mjs'; // or not.mjs, any.mjs
-
-// default export
-import check from '@honeo/check';
-check.is.foobar();
-```
-```js
-// webpack v4~ webpack.config.js
-{
- node: {
- fs: 'empty'
- }
-}
-```
-
-
-## API
-is, not, any共用。
-
-### Alias
-```js
-is.FooBar===is.foobar; // true
-```
-
-
-### Type, Instance
-```js
-is.array([]); // true
-is.arr([], []); // true
-
-is.boolean(false); // true
-is.bool(true, false); // true
-
-is.buffer(new Buffer('foobar')); // true
-is.arraybuffer( new ArrayBuffer(0)); // true
-
-is.error(new Error('hoge')); // true
-
-is.function(function(){}); // true
-is.func(()=>{}); // true
-is.fn(_=>_); // true
-
-is.asyncfunction(async()=>{}); // true
-is.asyncgeneratorfunction(async function*(){}); // true
-is.generatorfunction(function*(){}); // true
-
-is.number(1); // true
-is.num(0, 1); // true
-
-is.regexp(/hoge/); // true
-is.re(/foo/, /bar/); // true
-
-is.string('hoge'); // true
-is.str('fuga', 'piyo'); // true
-
-is.undefined(undefined); // true
-is.undef(null); // false
-
-is.null(null); // true
-
-is.nan(NaN); // true
-
-is.date(new Date()); // true
-
-is.object({}); // true
-is.obj(null); // false
-
-is.promise(new Promise(_=>_)); // true
-
-is.stats( fs.statSync('./') ); // true
-
-is.abortcontroller(new AbortController() ); // true
-is.abortsignal(new AbortController().signal); // true
-```
-
-| name | type | varargs | description |
-|:---------------------------------------------- |:---- |:-------:|:------------------------------------------------------------------------------------------------------------------- |
-| Array, Arr, array, arr | any | ○ | |
-| Boolean, Bool, boolean, bool | any | ○ | |
-| Buffer, Buf, buffer, buf | any | ○ | |
-| Error, Err, error, err | any | ○ | |
-| Function, Func, Fn, function, func, fn | any | ○ | |
-| AsyncFunction, asyncfunction | any | ○ | |
-| AsyncGeneratorFunction, asyncgeneratorfunction | any | ○ | |
-| GeneratorFunction, generatorfunction | any | ○ | |
-| Number, Num, number, num | any | ○ | |
-| RegExp, RE, regexp, re | any | ○ | |
-| String, Str, string, str | any | ○ | |
-| Undefined, Undef, undefined, undef | any | ○ | |
-| Null, null | any | ○ | |
-| NaN, nan | any | ○ | |
-| Date, date | any | ○ | |
-| Object, Obj, object, obj | any | ○ | |
-| Promise, promise | any | ○ | |
-| Stats, stats | any | ○ | |
-| ArrayBuffer, ArrBuf, arraybuffer, arrbuf | any | ○ | |
-| AbortController, abortcontroller | any | ○ | [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController)インスタンスか(Polyfill対応)。 |
-| AbortSignal, abortsignal | any | ○ | [AbortSignal](https://developer.mozilla.org/ja/docs/Web/API/AbortSignal)インスタンスか(Polyfill対応)。 |
-
-
-
-### Number
-
-```js
-is.even(2); // true
-
-is.odd(3); // true
-
-is.multiple(8080, 80); // true
-```
-
-| name | type | varargs | description |
-|:------------------ |:------ |:-------:|:---------------------- |
-| Odd, odd | number | ○ | 引数がすべて奇数か。 |
-| Even, even | number | ○ | 引数がすべて偶数か。 |
-| Multiple, multiple | number | ✗ | 引数1が引数2の倍数か。 |
-
-### String
-```js
-is.ipv4('192.168.1.1'); // true
-
-is.hostname('www.example.com'); // true
-
-is.lowercase('hoge'); // true
-
-is.uppercase('FOO', 'BAR'); // true
-```
-
-| name | type | varargs | description |
-|:-------------------- |:------ |:-------:|:-------------- |
-| IPv4, ipv4 | string | ○ | |
-| Hostname, hostname | string | ○ | やっつけ実装。 |
-| Lowercase, lowercase | string | ○ | |
-| Uppercase, uppercase | string | ○ | |
-
-### DOM
-
-```js
-is.node(document.body, document.createTextNode('hoge')); // true
-
-is.textnode(document.createTextNode('hoge')); // true
-
-is.element(document.head, document.body); // true
-
-is.df(document.createDocumentFragment()); // true
-
-is.event( new Event("hoge") ); // true
-
-is.eventtarget(document, window); // true
-```
-
-| name | type | varargs | description |
-|:------------------------------------------ |:---- |:-------:|:----------- |
-| Node, node | any | ○ | |
-| TextNode, textnode | any | ○ | |
-| Element, Elm, element, elm | any | ○ | |
-| DocumentFragment, DF, documentfragment, df | any | ○ | |
-| Event, event | any | ○ | |
-| EventTarget, eventtarget | any | ○ | |
-
-
-### その他
-
-```js
-is.true(true, !0); // true
-
-is.false(false !1); // true
-
-is.truthy(true, "hoge", 1, [], {}); // true
-
-is.falsy(null, undefined, "", 0, NaN); // true
-
-is.instance([], {}); // true
-is.instance("hoge"); // false
-
-is.instanceof(new Date(), Date); //true
-
-is.instanceOfClassName([], "Array"); // true
-
-is.objectliteral({}); // true
-not.objectliteral([], new function(){}); // true
-
-is.arraylike([], 'hoge'); // true
-
-is.comparisonoperator('<='); // true
-
-is.sameDay(new Date(), new Date()); // true
-
-is.semver('1.2.3'); // true
-is.semver('1.0.0-foo.bar'); // true
-
-is.version('7.7.4', '2.5.0.1') // true
-is.version('1.2A', 1.0); // false
-
-is.empty('', [], {}) // true
-is.empty(0, null); // false
-
-is.leapyear(2020, new Date('2024'));
-
-is.validdate(2019, 4, 17); // true
-is.validdate(2020, 12, 32); // false
-```
-
-| name | type | varargs | description |
-|:-------------------------------------------- |:------------ |:-------:|:------------------------------------------------- |
-| ArrayLike(), arraylike() | any | ○ | |
-| True(), true() | any | ○ | |
-| False(), false() | any | ○ | |
-| Truthy(), truthy() | any | ○ | |
-| Falsy(), falsy() | any | ○ | |
-| Empty(), empty() | any | ○ | 要素が空か。 |
-| Instance(), instance() | any | ○ | 何らかのインスタンスであるオブジェクトか。 |
-| Instanceof(), instanceof() | any | ✗ | 引数1が引数2のConstructor/Classのインスタンスか。 |
-| InstanceOfClassName(), instanceofclassname() | instance, string | ✗ | 引数1が引数2の名称を持つClassのインスタンスか。 |
-| Nullish(), nullish() | any | ○ | null or undefined |
-| ObjectLiteral(), objectliteral() | any | ○ | 未継承の素のオブジェクトか。 |
-| ComparisonOperator(), comparisonoperator() | any | ○ | 有効な比較演算子の文字列か。 |
-| SameDay(), sameday() | date | ○ | 同じ日か |
-| SemVer(), semver() | any | ○ | 有効なSemVer文字列か。 |
-| Version(), Ver(), versiom(), ver() | any | ○ | 有効な数字, dotのバージョン文字列か。 |
-| LeapYear(), leapyear() | number, date | ○ | 閏年か。 |
-| ValidDate(year, mon, day), validdate() | number | ✗ | 存在する日付か。 |
-
-
-## Breaking Changes
-
-### v2.0.0
-
-#### CommonJS => ES Modules
-```js
-// before CJS
-const {is, not, any} = require('@honeo/check');
-
-
-// after ESM
-import {is, not, any} from '@honeo/check';
-```
-
-
-#### rename: instance() => instanceof()
-```js
-// before
-is.instance([], Array);
-
-// after
-is.instanceof([], Array);
-```
diff --git a/mangashelf-server/node_modules/@honeo/check/test/index.mjs b/mangashelf-server/node_modules/@honeo/check/test/index.mjs
deleted file mode 100644
index d9d9b6b..0000000
--- a/mangashelf-server/node_modules/@honeo/check/test/index.mjs
+++ /dev/null
@@ -1,759 +0,0 @@
-// Mod: core
-import assert from 'assert';
-import fs from 'fs';
-import path from 'path';
-import url from 'url';
-// Mod: npm
-import JSDOM from 'jsdom';
-// Mod: local
-import check from '../index.mjs';
-import {is, not, any} from '../index.mjs';
-import _is from '../is.mjs';
-
-
-// jsdom set
-global.document = JSDOM.jsdom('hogehoge');
-global.head = document.head;
-global.window = document.defaultView;
-global.Node = window.Node;
-global.Element = window.Element;
-global.Event = window.Event;
-
-// Var
-//const {is, not, any} = check;
-const cases = {}
-const __filename = url.fileURLToPath(import.meta.url);
-const __dirname = path.dirname(__filename);
-
-
-// Main
-assert(is===check.is, 'Hybrid export failed')
-
-
-
-console.log('.arraybuffer');
-if( !is.arraybuffer(new ArrayBuffer(0)) ){
- throw new Error('failed');
-}
-if( !not.arrbuf('hoge') ){
- throw new Error('failed');
-}
-
-
-console.log('.abortcontroller');
-{
- const ac = new AbortController();
- if( is.abortcontroller(ac) ){
- }else{
- throw new Error('native: failed');
- }
-}
-{
- const {AbortController} = await import('@azure/abort-controller');
- const ac = new AbortController();
- if( is.abortcontroller(ac) ){
- }else{
- throw new Error('@azure/abort-controller: failed');
- }
-}
-{
- const {AbortController} = await import('node-abort-controller');
- const ac = new AbortController();
- if( is.abortcontroller(ac) ){
- }else{
- throw new Error('node-abort-controller: failed');
- }
-}
-
-console.log('.abortsignal');
-{
- const as = new AbortController().signal;
- if( is.abortsignal(as) ){
- }else{
- throw new Error('native: failed');
- }
-}
-{
- const {AbortController} = await import('@azure/abort-controller');
- const as = new AbortController().signal;
- if( is.abortsignal(as) ){
- }else{
- throw new Error('@azure/abort-controller: failed');
- }
-}
-{
- const {AbortController} = await import('node-abort-controller');
- const as = new AbortController().signal;
- if( is.abortsignal(as) ){
- }else{
- throw new Error('node-abort-controller: failed');
- }
-}
-
-
-console.log('.asyncfunction');
-{
- const asyncFunc = async()=>{}
- const bool = is.asyncfunction(asyncFunc);
- if( !bool ){
- throw new Error('case async: failed');
- }
-}
-{
- const bool = is.asyncfunction(_=>{});
- if( bool ){
- throw new Error('case sync: failed');
- }
-}
-{
- const asyncFunc = async()=>{}
- const bool = is.asyncfunction(asyncFunc, asyncFunc);
- if( !bool ){
- throw new Error('case async2: failed');
- }
-}
-{
- const asyncFunc = async()=>{}
- const bool = is.asyncfunction(asyncFunc, _=>{});
- if( bool ){
- throw new Error('case async, sync: failed');
- }
-}
-
-
-console.log('.asyncgeneratorfunction');
-{
- const asyncGeneFunc = async function*(){}
-
- {
- const bool = is.asyncgeneratorfunction(asyncGeneFunc);
- if( !bool ){
- throw new Error('case asyncGene: failed');
- }
- }
- {
- const bool = is.asyncgeneratorfunction(_=>{});
- if( bool ){
- throw new Error('case sync: failed');
- }
- }
- {
- const bool = is.asyncgeneratorfunction(asyncGeneFunc, asyncGeneFunc);
- if( !bool ){
- throw new Error('case asyncGene2: failed');
- }
- }
- {
- const bool = is.asyncgeneratorfunction(asyncGeneFunc, _=>{});
- if( bool ){
- throw new Error('case asyncGene, sync: failed');
- }
- }
-}
-
-
-console.log('.generatorfunction');
-{
- const geneFunc = function*(){}
- const bool = is.generatorfunction(geneFunc);
- if( !bool ){
- throw new Error('case gene: failed');
- }
-}
-{
- const bool = is.generatorfunction(_=>{});
- if( bool ){
- throw new Error('case func: failed');
- }
-}
-{
- const geneFunc = function*(){}
- const bool = is.generatorfunction(geneFunc, geneFunc);
- if( !bool ){
- throw new Error('case gene2: failed');
- }
-}
-{
- const geneFunc = function*(){}
- const bool = is.generatorfunction(_=>{}, geneFunc);
- if( bool ){
- throw new Error('case func, gene: failed');
- }
-}
-
-
-
-
-console.log('isInstanceOfClassName');
-{
- let bool;
- try{
- is.instanceofclassname();
- bool = false;
- }catch(e){
- bool = true;
- }
- assert(bool, 'case none arg: failed');
-}
-{
- const bool = is.instanceofclassname(new Date(), 'Date');
- assert(bool, 'case success: failed');
-}
-{
- const bool = is.instanceofclassname({}, 'Array');
- assert(!bool, 'case invalid classname: failed');
-}
-{
- let bool;
- try{
- is.instanceofclassname(true, false);
- bool = false;
- }catch(e){
- bool = true;
- }
- assert(bool, 'case invalid arg: failed');
-}
-
-
-console.log('.hostname');
-if(
- !is.hostname('example.com') &&
- !is.hostname('www.example.com') &&
- !is.hostname('foo-bar-2000.example.com') &&
- !is.hostname('hoge-1234.fu.ga.pi.yo') &&
- !is.hostname('Hoge.example.com') &&
- not.hostname('-invalid-hostname.example.com') &&
- not.hostname('very-long-hostnaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaame.example.com')
-){
- throw new Error('failed');
-}
-
-console.log('.ipv4');
-if(
- !is.ipv4('192.168.1.1') &&
- !is.ipv4('0.0.0.0') &&
- !is.ipv4('255.255.255.255') &&
- !not.ipv4('32.64.128.256') &&
- !not.ipv4('123.123.123') &&
- !not.ipv4('123.123.123.123.123')
-){
- throw new Error('failed');
-}
-
-// multiple
-console.log('.multiple');
-{
- assert(is.Multiple(4, 2), 'is 4, 2');
- assert(is.Multiple(8080, 80), 'is 8080, 80');
- assert(not.Multiple(151, 50), 'not 151, 50');
- assert(is.Multiple(0, 5), '0が全ての数の倍数になっていない');
- assert(is.Multiple(0, 0), '0が0の倍数になっていない');
-
- let bool;
- try{
- is.Multiple('multiple!');
- bool = false;
- }catch(e){
- bool = true;
- }
- assert(bool, 'validation failed');
-}
-
-
-
-console.log('.nullish');
-if( !is.nullish(null) ){
- throw new Error('failed');
-}
-if( !is.nullish(undefined) ){
- throw new Error('failed');
-}
-if( !is.nullish(null, undefined) ){
- throw new Error('failed');
-}
-if( !not.nullish(true, "", []) ){
- throw new Error('failed');
-}
-if( not.nullish(null) ){
- throw new Error('failed');
-}
-if( !any.nullish(null, true) ){
- throw new Error('failed');
-}
-
-console.log('.sameday');
-{
- if( !is.sameday(new Date(), new Date()) ){
- throw new Error('failed1');
- }
- const bool2 = is.sameday(
- new Date(),
- new Date('1999')
- );
- if( bool2 ){
- throw new Error('failed2');
- }
-
- const bool3 = is.sameday(
- new Date(),
- new Date(),
- new Date()
- );
- if( !bool3 ){
- throw new Error('failed3');
- }
-}
-
-
-/// type
-
-// array, arr
-cases.array = (arg)=>{
- return !is.Array()
- && is.array([])
- && is.Arr([])
- && is.arr([], [])
- && !is.arr('array!')
- && !is.arr([], true);
-}
-
-// boolean, bool
-cases.boolean = (arg)=>{
- return !is.Boolean()
- && is.boolean(true)
- && is.Bool(false)
- && is.bool(true, false)
- && !is.bool('boolean!')
- && !is.bool(true, 'true');
-}
-
-// error, err
-cases.error = (arg)=>{
- return !is.Error()
- && is.error(new Error())
- && is.Err(new Error())
- && is.err(new Error(), new Error())
- && !is.err('error')
- && !is.err(new Error(), 'error');
-}
-
-// function, func, fn
-cases.function = (arg)=>{
- const f = function(){};
- return !is.Function()
- && is.function(f)
- && is.Func(f)
- && is.func(f, f)
- && is.fn(f)
- && !is.func('function!')
- && !is.func(f, true);
-}
-
-// number, num
-cases.number = (arg)=>{
- return !is.Number()
- && is.number(123)
- && is.Num(45)
- && is.num(22, 80, 443)
- && !is.num('number!')
- && !is.num(1, true);
-}
-
-// regexp, re
-cases.regexp = (arg)=>{
- const r = /hoge/;
- return !is.RegExp()
- && is.regexp(r)
- && is.RE(r)
- && is.re(r, r)
- && !is.re('rexexp!')
- && !is.re(r, true);
-}
-
-// string, str
-cases.string = (arg)=>{
- return !is.String()
- && is.string('hoge')
- && is.Str('fuga')
- && is.str('foo', 'bar')
- && !is.str(123)
- && !is.str('piyo', true);
-}
-
-// undefined
-cases.undefined = (arg)=>{
- return !is.Undefined()
- && is.undefined(undefined)
- && is.undefined(undefined, undefined)
- && !is.undefined(null);
-}
-
-// null
-cases.null = (arg)=>{
- return !is.Null()
- && is.null(null)
- && is.null(null, null)
- && !is.null(undefined);
-}
-
-// NaN
-cases.nan = (arg)=>{
- return !is.NaN()
- && is.nan(NaN)
- && is.nan(NaN, NaN)
- && !is.nan(undefined);
-}
-
-
-
-/// instance
-
-
-// buffer
-cases.buffer = ()=>{
- const buffer = Buffer.from('hoge');
- return is.Buffer(buffer)
- && is.Buf(buffer)
- && is.buffer(buffer)
- && is.buf(buffer)
- && !is.Buffer('hoge')
- && !is.Buffer()
- && !is.Buffer(true)
- && !is.Buffer({});
-}
-
-
-// date
-cases.date = (arg)=>{
- return !is.Date()
- && !is.date({})
- && !is.date('date object')
- && is.date(new Date());
-}
-
-// event
-cases.event = (arg)=>{
- return !is.Event()
- && !is.event({})
- && !is.event('event')
- && is.event( new Event('hoge') );
-}
-
-/// jsdomではEventTargetがfunctionではなくobjectなためinstanceofで判定ができないから省略
-// // eventtarget
-// cases.eventtarget = (arg)=>{
-// return !is.eventtarget()
-// && !is.eventtarget({})
-// && !is.eventtarget('eventtarget')
-// && is.eventtarget(window);
-// }
-
-// eventtarget
-
-// object, obj
-cases.object = (arg)=>{
- return !is.Object()
- && is.object({})
- && is.Obj({})
- && is.obj( Object.create(null) )
- && is.obj({}, {})
- && !is.obj('object!')
- && !is.obj({}, true);
-}
-
-// stats
-cases.stats = (arg)=>{
- const stats_dir = fs.statSync('./');
- const stats_file = fs.statSync(__filename);
- return !is.stats()
- && is.stats(stats_dir)
- && is.stats(stats_dir, stats_file)
- && !is.stats({}, true);
-}
-
-// promise
-cases.promise = (arg)=>{
- const p = new Promise(_=>_);
- return !is.Promise()
- && is.promise(p)
- && is.promise(p, p)
- && !is.promise('promise!')
- && !is.promise(p, true);
-}
-
-
-
-/*
- Number
-*/
-
-// even
-cases.even = (arg)=>{
- return is.Even(0)
- && is.even(2)
- && is.even(4, 6)
- && !is.even(8, 9)
- && !is.even('evennumber!');
-}
-
-// odd
-cases.odd = (arg)=>{
- return is.Odd(1)
- && is.odd(3)
- && is.odd(5, 7)
- && !is.odd(9, 10)
- && !is.odd('oddnumber!');
-}
-
-
-
-
-/*
- String系
- */
-cases.lowercase = (arg)=>{
- return is.Lowercase('hoge')
- && is.lowercase('foo', 'bar')
- && !is.lowercase('Fuga')
- && !is.lowercase(true);
-}
-cases.uppercase = (arg)=>{
- return is.Uppercase('HOGE')
- && is.uppercase('FOO', 'BAR')
- && !is.uppercase('Fuga')
- && !is.uppercase(true);
-}
-
-
-/// DOM
-const textnode = document.createTextNode('');
-const element = document.createElement('div');
-
-// node
-cases.node = (arg)=>{
- return !is.Node()
- && is.node(textnode)
- && is.node(element)
- && is.node(textnode, element)
- && !is.node('node!')
- && !is.node(textnode, true);
-}
-
-// textnode
-cases.textnode = (arg)=>{
- return !is.TextNode()
- && is.textnode(textnode)
- && is.textnode(textnode, textnode)
- && !is.textnode('textnode!')
- && !is.textnode(textnode, true);
-}
-
-// element
-cases.element = (arg)=>{
- return !is.Element()
- && is.Elm(element)
- && is.element(element, element)
- && !is.elm('element!')
- && !is.element(element, true);
-}
-
-// documentfragment, df
-cases.documentfragment = (arg)=>{
- const df = document.createDocumentFragment();
- return !is.DocumentFragment()
- && is.documentfragment(df)
- && is.DF(df)
- && is.df(df, df)
- && !is.df('documentfragment!')
- && !is.df(df, true);
-}
-
-
-
-/*
- Other
-*/
-
-// true
-cases.true = (arg)=>{
- return !is.True()
- && is.true(true)
- && is.true(true, true)
- && !is.true('true!')
- && !is.true(true, false);
-}
-
-// false
-cases.false = (arg)=>{
- return !is.False()
- && is.false(false)
- && is.false(false, false)
- && !is.false('false!')
- && !is.false(false, true);
-}
-
-// truthy
-cases.truthy = (arg)=>{
- return !is.Truthy()
- && is.truthy(true)
- && is.truthy("hoge", 123, [], {})
- && !is.truthy(null, undefined)
- && !is.truthy(true, false);
-}
-
-// falsy
-cases.falsy = (arg)=>{
- return !is.Falsy()
- && is.falsy(false)
- && is.falsy("", 0, null, undefined, NaN)
- && !is.falsy(true, "hoge", 123)
- && !is.falsy(true, false);
-}
-
-
-// isInstanceof
-cases.instanceof = (arg)=>{
- return !is.instanceof()
- && is.instanceof(new Date, Date)
- && !is.instanceof({}, Array)
- && !is.instanceof(true, false);
-}
-
-// objectliteral
-cases.objectliteral = (arg)=>{
- return !is.ObjectLiteral()
- && is.objectliteral({})
- && is.objectliteral({}, new Object({}))
- && !is.objectliteral( new function(){} )
- && !is.objectliteral({}, []);
-}
-
-// arraylike
-cases.arraylike = (arg)=>{
- return !is.ArrayLike()
- && is.arraylike([])
- && is.arraylike('hoge', {length: 0})
- && !is.arraylike(12345)
- && !is.arraylike([], undefined);
-}
-
-// isComparisonOperator
-cases.comparisonoperator = (arg)=>{
- return !is.ComparisonOperator()
- && is.comparisonoperator('<')
- && is.comparisonoperator('!==')
- && !is.comparisonoperator('&&')
- && !is.comparisonoperator(true, '>');
-}
-
-// isSemVer
-cases.semver = (arg)=>{
- return !is.SemVer()
- && is.semver('1.2.3')
- && is.semver('1.0.0-foo.bar', '2.2.2')
- && !is.semver('1.2.3.4')
- && !is.semver(1.0)
- && !is.semver(true, '1.0.0')
-}
-
-// isVersion
-cases.version = (arg)=>{
- return !is.Version()
- && is.Ver('1.2.3')
- && is.version('1.0.0.0', '7.7.7.7.7.7.7')
- && !is.ver('1.2.3.4.')
- && !is.version(1.0)
- && !is.version(true, '1.0.0A')
-}
-
-// isEmpty
-cases.empty = (arg)=>{
- return is.Empty({})
- && is.empty([])
- && is.empty('')
- && !is.empty()
- && !is.empty(null)
- && !is.empty({a: 1})
- && !is.empty([1])
- && !is.empty('0');
-}
-
-// isLeapYear
-cases.leapyear = (arg)=>{
- return is.LeapYear(2020)
- && is.leapyear(new Date('2016'))
- && !is.leapyear(2019)
- && !is.leapyear(new Date('2018'));
-}
-
-// isValidDate
-cases.isvaliddate = (arg)=>{
- return is.ValidDate(2020, 11, 11)
- && is.validdate(2019, 4, 17)
- && !is.validdate(1995, 13, 1)
- && !is.validdate(2010, 4, 32);
-}
-
-// 本体
-for(let [key, method] of Object.entries(cases)){
- if( method() ){
- console.log(`${key}: success`);
- }else{
- throw new Error(`${key}: failed`);
- }
-}
-
-
-/*
- not
- 中身はほぼ一緒だから適当
-*/
-const resultArr = [
- // string
- not.String(),
- !not.string('hoge'),
- !not.Str('fuga'),
- !not.str('foo', 'bar'),
- not.str(123),
- not.str(true, false),
- not.str('piyo', true),
-
- // element
- not.Element(true),
- !not.element(element),
-
- // 読み込みチェック
- (is===_is)
-];
-
-
-resultArr.forEach( (bool, index, arr)=>{
- if( bool ){
- console.log(`not: ${index+1}/${arr.length} success`);
- }else{
- throw new Error(`not: ${index}/${arr.length} failed`);
- }
-});
-
-
-/*
- any
-*/
-const resultArr_any = [
- any.true(false, true),
- any.True(false, true),
- !any.Number('123', true),
- !any.number('123', true),
- !any.Num('123', true),
- !any.num('123', true)
-];
-
-resultArr_any.forEach( (bool, index, arr)=>{
- if( bool ){
- console.log(`any: ${index+1}/${arr.length} success`);
- }else{
- throw new Error(`any: ${index}/${arr.length} failed`);
- }
-});
-
-console.log('test: done');
diff --git a/mangashelf-server/node_modules/console-wrapper/index.js b/mangashelf-server/node_modules/console-wrapper/index.js
deleted file mode 100644
index ab0085b..0000000
--- a/mangashelf-server/node_modules/console-wrapper/index.js
+++ /dev/null
@@ -1,108 +0,0 @@
-// native console
-const _console = console;
-
-// ダミー用
-const dummy = function(){}
-
-// 参考: https://developer.mozilla.org/en-US/docs/Web/API/Console
-const methodNameArr = [
- '_exception',
- 'assert',
- 'count',
- 'debug',
- 'dir',
- 'dirxml',
- 'error',
- 'group',
- 'groupCollapsed',
- 'groupEnd',
- 'info',
- 'log',
- 'profile',
- 'profileEnd',
- 'table',
- 'time',
- 'timeEnd',
- 'timeStamp',
- 'trace',
- 'warn'
-];
-
-// コンストラクタ
-function Console(){
- this.disable();
- this.status = undefined;
-}
-
-// 状態
-Console.prototype.status = undefined;
-
-// 参照用
-Console.prototype._console = _console;
-
-// extで使う引数キャッシュ
-Console.prototype.cache = [];
-
-// 通常モード
-Console.prototype.enable = function(){
- this.status = 'enable';
- methodNameArr.forEach( (name)=>{
- if( _console[name] ){
- this[name] = _console[name].bind(_console);
- }
- });
-}
-
-// ダミーモード、標準設定
-Console.prototype.disable = function(){
- this.status = 'disable';
- methodNameArr.forEach( (name)=>{
- this[name] = dummy;
- });
-}
-
-/*
- 拡張モード
- 行数はわからなくなるが任意の処理を挟めるやつ
- @param {
- cache: boolean,
- calback: function,
- disable: boolean,
- result: boolean
- }
- .callback が関数ならmethod実行時にcallback({...})
- .cache:true なら引数を保存する
- .disable:true ならconsole.method()を実行しない。
- .result:true なら引数を配列にして返す
- @return undefined or [...arg]
-*/
-Console.prototype.ext = function({cache, callback, disable, result}){
- this.status = 'ext';
- methodNameArr.forEach( (name)=>{
- this[name] = (...arg)=>{
- disable===true || _console[name](...arg);
- typeof callback==='function' && callback({
- target: this,
- timestamp: Date.now(),
- type: name,
- arguments: [...arg]
- });
- cache && this.cache.push([...arg]);
- return this.result && [...arg];
- }
- });
-}
-
-/*
- 同調モード
- console.sync.method();
- 既に設定されていればそのまま何もしない。
- 設定されていなければモード切替え。
-*/
-Console.prototype.__defineGetter__('sync', function(){
- return this.status ?
- {ext:dummy, enable:dummy, disable:dummy}:
- this;
-});
-
-module.exports = new Console();
diff --git a/mangashelf-server/node_modules/console-wrapper/package.json b/mangashelf-server/node_modules/console-wrapper/package.json
deleted file mode 100644
index aaa223a..0000000
--- a/mangashelf-server/node_modules/console-wrapper/package.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "name": "console-wrapper",
- "version": "1.1.0",
- "description": "よくあるconsoleのラッパー",
- "main": "index.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/honeo/console-wrapper.git"
- },
- "keywords": [
- "console",
- "wrapper"
- ],
- "author": "honeo",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/honeo/console-wrapper/issues"
- },
- "homepage": "https://github.com/honeo/console-wrapper#readme"
-}
diff --git a/mangashelf-server/node_modules/console-wrapper/readme.md b/mangashelf-server/node_modules/console-wrapper/readme.md
deleted file mode 100644
index d8bcb7f..0000000
--- a/mangashelf-server/node_modules/console-wrapper/readme.md
+++ /dev/null
@@ -1,51 +0,0 @@
-## なにこれ
-よくあるconsoleラッパー。
-require()のキャッシュを利用して同ディレクトリ内モジュールのコンソール動作を一括設定する。
-[honeo/console-wrapper](https://github.com/honeo/console-wrapper)
-[console-wrapper](https://www.npmjs.com/package/console-wrapper)
-
-## 使い方
-```sh
-$ npm i console-wrapper
-```
-```js
-const console = require('console-wrapper');
-
-console.log('hoge'); // no output
-
-console.enable();
-console.log('hoge'); //"hoge"
-```
-Method
------
-### .enable()
-有効化。
-通常のconsoleメソッドを使う。
-### .disable()
-標準。
-無効化、何もしないダミー関数を使う。
-### .extension({...})
-有効化(拡張モード)、行数が表示されなくなる代わりに……。
-.cache: trueならコンソールメソッド実行時に引数を保存する。
-.callback: 関数ならコンソールメソッド実行時に引数を渡して実行する。
-.disable: trueならコンソールメソッドは実行しない。
-.result: trueならコンソールメソッド実行後に引数を配列に入れて返す。
-```js
-// example
-console.ext({
- cache: false,
- callback({type, arguments}){},
- disable: false,
- result: false
-});
-```
-### .sync.method();
-既に動作モードが設定されていればそのまま。
-されていなければ.method()を実行する。
-
-## Properties
-### .cache
-.ext({cache: true}) 時にコンソールメソッド実行時の引数が配列で保存される。
-メモリに注意。
-### ._console
-ネイティブのconsoleオブジェクトへの参照。
diff --git a/mangashelf-server/node_modules/fs-extra/LICENSE b/mangashelf-server/node_modules/fs-extra/LICENSE
deleted file mode 100644
index 93546df..0000000
--- a/mangashelf-server/node_modules/fs-extra/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2011-2017 JP Richardson
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
-(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
- merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
-OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/mangashelf-server/node_modules/fs-extra/README.md b/mangashelf-server/node_modules/fs-extra/README.md
deleted file mode 100644
index 6ed8b6a..0000000
--- a/mangashelf-server/node_modules/fs-extra/README.md
+++ /dev/null
@@ -1,262 +0,0 @@
-Node.js: fs-extra
-=================
-
-`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It also uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to prevent `EMFILE` errors. It should be a drop in replacement for `fs`.
-
-[](https://www.npmjs.org/package/fs-extra)
-[](https://github.com/jprichardson/node-fs-extra/blob/master/LICENSE)
-[](https://github.com/jprichardson/node-fs-extra/actions/workflows/ci.yml?query=branch%3Amaster)
-[](https://www.npmjs.org/package/fs-extra)
-[](https://standardjs.com)
-
-Why?
-----
-
-I got tired of including `mkdirp`, `rimraf`, and `ncp` in most of my projects.
-
-
-
-
-Installation
-------------
-
- npm install fs-extra
-
-
-
-Usage
------
-
-`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed.
-
-You don't ever need to include the original `fs` module again:
-
-```js
-const fs = require('fs') // this is no longer necessary
-```
-
-you can now do this:
-
-```js
-const fs = require('fs-extra')
-```
-
-or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want
-to name your `fs` variable `fse` like so:
-
-```js
-const fse = require('fs-extra')
-```
-
-you can also keep both, but it's redundant:
-
-```js
-const fs = require('fs')
-const fse = require('fs-extra')
-```
-
-Sync vs Async vs Async/Await
--------------
-Most methods are async by default. All async methods will return a promise if the callback isn't passed.
-
-Sync methods on the other hand will throw if an error occurs.
-
-Also Async/Await will throw an error if one occurs.
-
-Example:
-
-```js
-const fs = require('fs-extra')
-
-// Async with promises:
-fs.copy('/tmp/myfile', '/tmp/mynewfile')
- .then(() => console.log('success!'))
- .catch(err => console.error(err))
-
-// Async with callbacks:
-fs.copy('/tmp/myfile', '/tmp/mynewfile', err => {
- if (err) return console.error(err)
- console.log('success!')
-})
-
-// Sync:
-try {
- fs.copySync('/tmp/myfile', '/tmp/mynewfile')
- console.log('success!')
-} catch (err) {
- console.error(err)
-}
-
-// Async/Await:
-async function copyFiles () {
- try {
- await fs.copy('/tmp/myfile', '/tmp/mynewfile')
- console.log('success!')
- } catch (err) {
- console.error(err)
- }
-}
-
-copyFiles()
-```
-
-
-Methods
--------
-
-### Async
-
-- [copy](docs/copy.md)
-- [emptyDir](docs/emptyDir.md)
-- [ensureFile](docs/ensureFile.md)
-- [ensureDir](docs/ensureDir.md)
-- [ensureLink](docs/ensureLink.md)
-- [ensureSymlink](docs/ensureSymlink.md)
-- [mkdirp](docs/ensureDir.md)
-- [mkdirs](docs/ensureDir.md)
-- [move](docs/move.md)
-- [outputFile](docs/outputFile.md)
-- [outputJson](docs/outputJson.md)
-- [pathExists](docs/pathExists.md)
-- [readJson](docs/readJson.md)
-- [remove](docs/remove.md)
-- [writeJson](docs/writeJson.md)
-
-### Sync
-
-- [copySync](docs/copy-sync.md)
-- [emptyDirSync](docs/emptyDir-sync.md)
-- [ensureFileSync](docs/ensureFile-sync.md)
-- [ensureDirSync](docs/ensureDir-sync.md)
-- [ensureLinkSync](docs/ensureLink-sync.md)
-- [ensureSymlinkSync](docs/ensureSymlink-sync.md)
-- [mkdirpSync](docs/ensureDir-sync.md)
-- [mkdirsSync](docs/ensureDir-sync.md)
-- [moveSync](docs/move-sync.md)
-- [outputFileSync](docs/outputFile-sync.md)
-- [outputJsonSync](docs/outputJson-sync.md)
-- [pathExistsSync](docs/pathExists-sync.md)
-- [readJsonSync](docs/readJson-sync.md)
-- [removeSync](docs/remove-sync.md)
-- [writeJsonSync](docs/writeJson-sync.md)
-
-
-**NOTE:** You can still use the native Node.js methods. They are promisified and copied over to `fs-extra`. See [notes on `fs.read()`, `fs.write()`, & `fs.writev()`](docs/fs-read-write-writev.md)
-
-### What happened to `walk()` and `walkSync()`?
-
-They were removed from `fs-extra` in v2.0.0. If you need the functionality, `walk` and `walkSync` are available as separate packages, [`klaw`](https://github.com/jprichardson/node-klaw) and [`klaw-sync`](https://github.com/manidlou/node-klaw-sync).
-
-
-Third Party
------------
-
-### CLI
-
-[fse-cli](https://www.npmjs.com/package/@atao60/fse-cli) allows you to run `fs-extra` from a console or from [npm](https://www.npmjs.com) scripts.
-
-### TypeScript
-
-If you like TypeScript, you can use `fs-extra` with it: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra
-
-
-### File / Directory Watching
-
-If you want to watch for changes to files or directories, then you should use [chokidar](https://github.com/paulmillr/chokidar).
-
-### Obtain Filesystem (Devices, Partitions) Information
-
-[fs-filesystem](https://github.com/arthurintelligence/node-fs-filesystem) allows you to read the state of the filesystem of the host on which it is run. It returns information about both the devices and the partitions (volumes) of the system.
-
-### Misc.
-
-- [fs-extra-debug](https://github.com/jdxcode/fs-extra-debug) - Send your fs-extra calls to [debug](https://npmjs.org/package/debug).
-- [mfs](https://github.com/cadorn/mfs) - Monitor your fs-extra calls.
-
-
-
-Hacking on fs-extra
--------------------
-
-Wanna hack on `fs-extra`? Great! Your help is needed! [fs-extra is one of the most depended upon Node.js packages](http://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true). This project
-uses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you,
-you're gonna have to get over it :) If `standard` is good enough for `npm`, it's good enough for `fs-extra`.
-
-[](https://github.com/feross/standard)
-
-What's needed?
-- First, take a look at existing issues. Those are probably going to be where the priority lies.
-- More tests for edge cases. Specifically on different platforms. There can never be enough tests.
-- Improve test coverage.
-
-Note: If you make any big changes, **you should definitely file an issue for discussion first.**
-
-### Running the Test Suite
-
-fs-extra contains hundreds of tests.
-
-- `npm run lint`: runs the linter ([standard](http://standardjs.com/))
-- `npm run unit`: runs the unit tests
-- `npm test`: runs both the linter and the tests
-
-
-### Windows
-
-If you run the tests on the Windows and receive a lot of symbolic link `EPERM` permission errors, it's
-because on Windows you need elevated privilege to create symbolic links. You can add this to your Windows's
-account by following the instructions here: http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7
-However, I didn't have much luck doing this.
-
-Since I develop on Mac OS X, I use VMWare Fusion for Windows testing. I create a shared folder that I map to a drive on Windows.
-I open the `Node.js command prompt` and run as `Administrator`. I then map the network drive running the following command:
-
- net use z: "\\vmware-host\Shared Folders"
-
-I can then navigate to my `fs-extra` directory and run the tests.
-
-
-Naming
-------
-
-I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here:
-
-* https://github.com/jprichardson/node-fs-extra/issues/2
-* https://github.com/flatiron/utile/issues/11
-* https://github.com/ryanmcgrath/wrench-js/issues/29
-* https://github.com/substack/node-mkdirp/issues/17
-
-First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes.
-
-For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc.
-
-We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`?
-
-My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too.
-
-So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`.
-
-
-Credit
-------
-
-`fs-extra` wouldn't be possible without using the modules from the following authors:
-
-- [Isaac Shlueter](https://github.com/isaacs)
-- [Charlie McConnel](https://github.com/avianflu)
-- [James Halliday](https://github.com/substack)
-- [Andrew Kelley](https://github.com/andrewrk)
-
-
-
-
-License
--------
-
-Licensed under MIT
-
-Copyright (c) 2011-2017 [JP Richardson](https://github.com/jprichardson)
-
-[1]: http://nodejs.org/docs/latest/api/fs.html
-
-
-[jsonfile]: https://github.com/jprichardson/node-jsonfile
diff --git a/mangashelf-server/node_modules/fs-extra/lib/copy/copy-sync.js b/mangashelf-server/node_modules/fs-extra/lib/copy/copy-sync.js
deleted file mode 100644
index 551abe0..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/copy/copy-sync.js
+++ /dev/null
@@ -1,169 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs')
-const path = require('path')
-const mkdirsSync = require('../mkdirs').mkdirsSync
-const utimesMillisSync = require('../util/utimes').utimesMillisSync
-const stat = require('../util/stat')
-
-function copySync (src, dest, opts) {
- if (typeof opts === 'function') {
- opts = { filter: opts }
- }
-
- opts = opts || {}
- opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
- opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
-
- // Warn about using preserveTimestamps on 32-bit node
- if (opts.preserveTimestamps && process.arch === 'ia32') {
- process.emitWarning(
- 'Using the preserveTimestamps option in 32-bit node is not recommended;\n\n' +
- '\tsee https://github.com/jprichardson/node-fs-extra/issues/269',
- 'Warning', 'fs-extra-WARN0002'
- )
- }
-
- const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy', opts)
- stat.checkParentPathsSync(src, srcStat, dest, 'copy')
- return handleFilterAndCopy(destStat, src, dest, opts)
-}
-
-function handleFilterAndCopy (destStat, src, dest, opts) {
- if (opts.filter && !opts.filter(src, dest)) return
- const destParent = path.dirname(dest)
- if (!fs.existsSync(destParent)) mkdirsSync(destParent)
- return getStats(destStat, src, dest, opts)
-}
-
-function startCopy (destStat, src, dest, opts) {
- if (opts.filter && !opts.filter(src, dest)) return
- return getStats(destStat, src, dest, opts)
-}
-
-function getStats (destStat, src, dest, opts) {
- const statSync = opts.dereference ? fs.statSync : fs.lstatSync
- const srcStat = statSync(src)
-
- if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)
- else if (srcStat.isFile() ||
- srcStat.isCharacterDevice() ||
- srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)
- else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)
- else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`)
- else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`)
- throw new Error(`Unknown file: ${src}`)
-}
-
-function onFile (srcStat, destStat, src, dest, opts) {
- if (!destStat) return copyFile(srcStat, src, dest, opts)
- return mayCopyFile(srcStat, src, dest, opts)
-}
-
-function mayCopyFile (srcStat, src, dest, opts) {
- if (opts.overwrite) {
- fs.unlinkSync(dest)
- return copyFile(srcStat, src, dest, opts)
- } else if (opts.errorOnExist) {
- throw new Error(`'${dest}' already exists`)
- }
-}
-
-function copyFile (srcStat, src, dest, opts) {
- fs.copyFileSync(src, dest)
- if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest)
- return setDestMode(dest, srcStat.mode)
-}
-
-function handleTimestamps (srcMode, src, dest) {
- // Make sure the file is writable before setting the timestamp
- // otherwise open fails with EPERM when invoked with 'r+'
- // (through utimes call)
- if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode)
- return setDestTimestamps(src, dest)
-}
-
-function fileIsNotWritable (srcMode) {
- return (srcMode & 0o200) === 0
-}
-
-function makeFileWritable (dest, srcMode) {
- return setDestMode(dest, srcMode | 0o200)
-}
-
-function setDestMode (dest, srcMode) {
- return fs.chmodSync(dest, srcMode)
-}
-
-function setDestTimestamps (src, dest) {
- // The initial srcStat.atime cannot be trusted
- // because it is modified by the read(2) system call
- // (See https://nodejs.org/api/fs.html#fs_stat_time_values)
- const updatedSrcStat = fs.statSync(src)
- return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime)
-}
-
-function onDir (srcStat, destStat, src, dest, opts) {
- if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts)
- return copyDir(src, dest, opts)
-}
-
-function mkDirAndCopy (srcMode, src, dest, opts) {
- fs.mkdirSync(dest)
- copyDir(src, dest, opts)
- return setDestMode(dest, srcMode)
-}
-
-function copyDir (src, dest, opts) {
- fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts))
-}
-
-function copyDirItem (item, src, dest, opts) {
- const srcItem = path.join(src, item)
- const destItem = path.join(dest, item)
- const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy', opts)
- return startCopy(destStat, srcItem, destItem, opts)
-}
-
-function onLink (destStat, src, dest, opts) {
- let resolvedSrc = fs.readlinkSync(src)
- if (opts.dereference) {
- resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
- }
-
- if (!destStat) {
- return fs.symlinkSync(resolvedSrc, dest)
- } else {
- let resolvedDest
- try {
- resolvedDest = fs.readlinkSync(dest)
- } catch (err) {
- // dest exists and is a regular file or directory,
- // Windows may throw UNKNOWN error. If dest already exists,
- // fs throws error anyway, so no need to guard against it here.
- if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest)
- throw err
- }
- if (opts.dereference) {
- resolvedDest = path.resolve(process.cwd(), resolvedDest)
- }
- if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
- throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
- }
-
- // prevent copy if src is a subdir of dest since unlinking
- // dest in this case would result in removing src contents
- // and therefore a broken symlink would be created.
- if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
- throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
- }
- return copyLink(resolvedSrc, dest)
- }
-}
-
-function copyLink (resolvedSrc, dest) {
- fs.unlinkSync(dest)
- return fs.symlinkSync(resolvedSrc, dest)
-}
-
-module.exports = copySync
diff --git a/mangashelf-server/node_modules/fs-extra/lib/copy/copy.js b/mangashelf-server/node_modules/fs-extra/lib/copy/copy.js
deleted file mode 100644
index 09d53df..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/copy/copy.js
+++ /dev/null
@@ -1,235 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs')
-const path = require('path')
-const mkdirs = require('../mkdirs').mkdirs
-const pathExists = require('../path-exists').pathExists
-const utimesMillis = require('../util/utimes').utimesMillis
-const stat = require('../util/stat')
-
-function copy (src, dest, opts, cb) {
- if (typeof opts === 'function' && !cb) {
- cb = opts
- opts = {}
- } else if (typeof opts === 'function') {
- opts = { filter: opts }
- }
-
- cb = cb || function () {}
- opts = opts || {}
-
- opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
- opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
-
- // Warn about using preserveTimestamps on 32-bit node
- if (opts.preserveTimestamps && process.arch === 'ia32') {
- process.emitWarning(
- 'Using the preserveTimestamps option in 32-bit node is not recommended;\n\n' +
- '\tsee https://github.com/jprichardson/node-fs-extra/issues/269',
- 'Warning', 'fs-extra-WARN0001'
- )
- }
-
- stat.checkPaths(src, dest, 'copy', opts, (err, stats) => {
- if (err) return cb(err)
- const { srcStat, destStat } = stats
- stat.checkParentPaths(src, srcStat, dest, 'copy', err => {
- if (err) return cb(err)
- if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb)
- return checkParentDir(destStat, src, dest, opts, cb)
- })
- })
-}
-
-function checkParentDir (destStat, src, dest, opts, cb) {
- const destParent = path.dirname(dest)
- pathExists(destParent, (err, dirExists) => {
- if (err) return cb(err)
- if (dirExists) return getStats(destStat, src, dest, opts, cb)
- mkdirs(destParent, err => {
- if (err) return cb(err)
- return getStats(destStat, src, dest, opts, cb)
- })
- })
-}
-
-function handleFilter (onInclude, destStat, src, dest, opts, cb) {
- Promise.resolve(opts.filter(src, dest)).then(include => {
- if (include) return onInclude(destStat, src, dest, opts, cb)
- return cb()
- }, error => cb(error))
-}
-
-function startCopy (destStat, src, dest, opts, cb) {
- if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb)
- return getStats(destStat, src, dest, opts, cb)
-}
-
-function getStats (destStat, src, dest, opts, cb) {
- const stat = opts.dereference ? fs.stat : fs.lstat
- stat(src, (err, srcStat) => {
- if (err) return cb(err)
-
- if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb)
- else if (srcStat.isFile() ||
- srcStat.isCharacterDevice() ||
- srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb)
- else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb)
- else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`))
- else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`))
- return cb(new Error(`Unknown file: ${src}`))
- })
-}
-
-function onFile (srcStat, destStat, src, dest, opts, cb) {
- if (!destStat) return copyFile(srcStat, src, dest, opts, cb)
- return mayCopyFile(srcStat, src, dest, opts, cb)
-}
-
-function mayCopyFile (srcStat, src, dest, opts, cb) {
- if (opts.overwrite) {
- fs.unlink(dest, err => {
- if (err) return cb(err)
- return copyFile(srcStat, src, dest, opts, cb)
- })
- } else if (opts.errorOnExist) {
- return cb(new Error(`'${dest}' already exists`))
- } else return cb()
-}
-
-function copyFile (srcStat, src, dest, opts, cb) {
- fs.copyFile(src, dest, err => {
- if (err) return cb(err)
- if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb)
- return setDestMode(dest, srcStat.mode, cb)
- })
-}
-
-function handleTimestampsAndMode (srcMode, src, dest, cb) {
- // Make sure the file is writable before setting the timestamp
- // otherwise open fails with EPERM when invoked with 'r+'
- // (through utimes call)
- if (fileIsNotWritable(srcMode)) {
- return makeFileWritable(dest, srcMode, err => {
- if (err) return cb(err)
- return setDestTimestampsAndMode(srcMode, src, dest, cb)
- })
- }
- return setDestTimestampsAndMode(srcMode, src, dest, cb)
-}
-
-function fileIsNotWritable (srcMode) {
- return (srcMode & 0o200) === 0
-}
-
-function makeFileWritable (dest, srcMode, cb) {
- return setDestMode(dest, srcMode | 0o200, cb)
-}
-
-function setDestTimestampsAndMode (srcMode, src, dest, cb) {
- setDestTimestamps(src, dest, err => {
- if (err) return cb(err)
- return setDestMode(dest, srcMode, cb)
- })
-}
-
-function setDestMode (dest, srcMode, cb) {
- return fs.chmod(dest, srcMode, cb)
-}
-
-function setDestTimestamps (src, dest, cb) {
- // The initial srcStat.atime cannot be trusted
- // because it is modified by the read(2) system call
- // (See https://nodejs.org/api/fs.html#fs_stat_time_values)
- fs.stat(src, (err, updatedSrcStat) => {
- if (err) return cb(err)
- return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb)
- })
-}
-
-function onDir (srcStat, destStat, src, dest, opts, cb) {
- if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb)
- return copyDir(src, dest, opts, cb)
-}
-
-function mkDirAndCopy (srcMode, src, dest, opts, cb) {
- fs.mkdir(dest, err => {
- if (err) return cb(err)
- copyDir(src, dest, opts, err => {
- if (err) return cb(err)
- return setDestMode(dest, srcMode, cb)
- })
- })
-}
-
-function copyDir (src, dest, opts, cb) {
- fs.readdir(src, (err, items) => {
- if (err) return cb(err)
- return copyDirItems(items, src, dest, opts, cb)
- })
-}
-
-function copyDirItems (items, src, dest, opts, cb) {
- const item = items.pop()
- if (!item) return cb()
- return copyDirItem(items, item, src, dest, opts, cb)
-}
-
-function copyDirItem (items, item, src, dest, opts, cb) {
- const srcItem = path.join(src, item)
- const destItem = path.join(dest, item)
- stat.checkPaths(srcItem, destItem, 'copy', opts, (err, stats) => {
- if (err) return cb(err)
- const { destStat } = stats
- startCopy(destStat, srcItem, destItem, opts, err => {
- if (err) return cb(err)
- return copyDirItems(items, src, dest, opts, cb)
- })
- })
-}
-
-function onLink (destStat, src, dest, opts, cb) {
- fs.readlink(src, (err, resolvedSrc) => {
- if (err) return cb(err)
- if (opts.dereference) {
- resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
- }
-
- if (!destStat) {
- return fs.symlink(resolvedSrc, dest, cb)
- } else {
- fs.readlink(dest, (err, resolvedDest) => {
- if (err) {
- // dest exists and is a regular file or directory,
- // Windows may throw UNKNOWN error. If dest already exists,
- // fs throws error anyway, so no need to guard against it here.
- if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb)
- return cb(err)
- }
- if (opts.dereference) {
- resolvedDest = path.resolve(process.cwd(), resolvedDest)
- }
- if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
- return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`))
- }
-
- // do not copy if src is a subdir of dest since unlinking
- // dest in this case would result in removing src contents
- // and therefore a broken symlink would be created.
- if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
- return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`))
- }
- return copyLink(resolvedSrc, dest, cb)
- })
- }
- })
-}
-
-function copyLink (resolvedSrc, dest, cb) {
- fs.unlink(dest, err => {
- if (err) return cb(err)
- return fs.symlink(resolvedSrc, dest, cb)
- })
-}
-
-module.exports = copy
diff --git a/mangashelf-server/node_modules/fs-extra/lib/copy/index.js b/mangashelf-server/node_modules/fs-extra/lib/copy/index.js
deleted file mode 100644
index 45c07a2..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/copy/index.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict'
-
-const u = require('universalify').fromCallback
-module.exports = {
- copy: u(require('./copy')),
- copySync: require('./copy-sync')
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/empty/index.js b/mangashelf-server/node_modules/fs-extra/lib/empty/index.js
deleted file mode 100644
index b4a2e82..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/empty/index.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict'
-
-const u = require('universalify').fromPromise
-const fs = require('../fs')
-const path = require('path')
-const mkdir = require('../mkdirs')
-const remove = require('../remove')
-
-const emptyDir = u(async function emptyDir (dir) {
- let items
- try {
- items = await fs.readdir(dir)
- } catch {
- return mkdir.mkdirs(dir)
- }
-
- return Promise.all(items.map(item => remove.remove(path.join(dir, item))))
-})
-
-function emptyDirSync (dir) {
- let items
- try {
- items = fs.readdirSync(dir)
- } catch {
- return mkdir.mkdirsSync(dir)
- }
-
- items.forEach(item => {
- item = path.join(dir, item)
- remove.removeSync(item)
- })
-}
-
-module.exports = {
- emptyDirSync,
- emptydirSync: emptyDirSync,
- emptyDir,
- emptydir: emptyDir
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/ensure/file.js b/mangashelf-server/node_modules/fs-extra/lib/ensure/file.js
deleted file mode 100644
index 15cc473..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/ensure/file.js
+++ /dev/null
@@ -1,69 +0,0 @@
-'use strict'
-
-const u = require('universalify').fromCallback
-const path = require('path')
-const fs = require('graceful-fs')
-const mkdir = require('../mkdirs')
-
-function createFile (file, callback) {
- function makeFile () {
- fs.writeFile(file, '', err => {
- if (err) return callback(err)
- callback()
- })
- }
-
- fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
- if (!err && stats.isFile()) return callback()
- const dir = path.dirname(file)
- fs.stat(dir, (err, stats) => {
- if (err) {
- // if the directory doesn't exist, make it
- if (err.code === 'ENOENT') {
- return mkdir.mkdirs(dir, err => {
- if (err) return callback(err)
- makeFile()
- })
- }
- return callback(err)
- }
-
- if (stats.isDirectory()) makeFile()
- else {
- // parent is not a directory
- // This is just to cause an internal ENOTDIR error to be thrown
- fs.readdir(dir, err => {
- if (err) return callback(err)
- })
- }
- })
- })
-}
-
-function createFileSync (file) {
- let stats
- try {
- stats = fs.statSync(file)
- } catch {}
- if (stats && stats.isFile()) return
-
- const dir = path.dirname(file)
- try {
- if (!fs.statSync(dir).isDirectory()) {
- // parent is not a directory
- // This is just to cause an internal ENOTDIR error to be thrown
- fs.readdirSync(dir)
- }
- } catch (err) {
- // If the stat call above failed because the directory doesn't exist, create it
- if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir)
- else throw err
- }
-
- fs.writeFileSync(file, '')
-}
-
-module.exports = {
- createFile: u(createFile),
- createFileSync
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/ensure/index.js b/mangashelf-server/node_modules/fs-extra/lib/ensure/index.js
deleted file mode 100644
index ecbcdd0..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/ensure/index.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict'
-
-const { createFile, createFileSync } = require('./file')
-const { createLink, createLinkSync } = require('./link')
-const { createSymlink, createSymlinkSync } = require('./symlink')
-
-module.exports = {
- // file
- createFile,
- createFileSync,
- ensureFile: createFile,
- ensureFileSync: createFileSync,
- // link
- createLink,
- createLinkSync,
- ensureLink: createLink,
- ensureLinkSync: createLinkSync,
- // symlink
- createSymlink,
- createSymlinkSync,
- ensureSymlink: createSymlink,
- ensureSymlinkSync: createSymlinkSync
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/ensure/link.js b/mangashelf-server/node_modules/fs-extra/lib/ensure/link.js
deleted file mode 100644
index f6d6748..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/ensure/link.js
+++ /dev/null
@@ -1,64 +0,0 @@
-'use strict'
-
-const u = require('universalify').fromCallback
-const path = require('path')
-const fs = require('graceful-fs')
-const mkdir = require('../mkdirs')
-const pathExists = require('../path-exists').pathExists
-const { areIdentical } = require('../util/stat')
-
-function createLink (srcpath, dstpath, callback) {
- function makeLink (srcpath, dstpath) {
- fs.link(srcpath, dstpath, err => {
- if (err) return callback(err)
- callback(null)
- })
- }
-
- fs.lstat(dstpath, (_, dstStat) => {
- fs.lstat(srcpath, (err, srcStat) => {
- if (err) {
- err.message = err.message.replace('lstat', 'ensureLink')
- return callback(err)
- }
- if (dstStat && areIdentical(srcStat, dstStat)) return callback(null)
-
- const dir = path.dirname(dstpath)
- pathExists(dir, (err, dirExists) => {
- if (err) return callback(err)
- if (dirExists) return makeLink(srcpath, dstpath)
- mkdir.mkdirs(dir, err => {
- if (err) return callback(err)
- makeLink(srcpath, dstpath)
- })
- })
- })
- })
-}
-
-function createLinkSync (srcpath, dstpath) {
- let dstStat
- try {
- dstStat = fs.lstatSync(dstpath)
- } catch {}
-
- try {
- const srcStat = fs.lstatSync(srcpath)
- if (dstStat && areIdentical(srcStat, dstStat)) return
- } catch (err) {
- err.message = err.message.replace('lstat', 'ensureLink')
- throw err
- }
-
- const dir = path.dirname(dstpath)
- const dirExists = fs.existsSync(dir)
- if (dirExists) return fs.linkSync(srcpath, dstpath)
- mkdir.mkdirsSync(dir)
-
- return fs.linkSync(srcpath, dstpath)
-}
-
-module.exports = {
- createLink: u(createLink),
- createLinkSync
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/ensure/symlink-paths.js b/mangashelf-server/node_modules/fs-extra/lib/ensure/symlink-paths.js
deleted file mode 100644
index 33cd760..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/ensure/symlink-paths.js
+++ /dev/null
@@ -1,99 +0,0 @@
-'use strict'
-
-const path = require('path')
-const fs = require('graceful-fs')
-const pathExists = require('../path-exists').pathExists
-
-/**
- * Function that returns two types of paths, one relative to symlink, and one
- * relative to the current working directory. Checks if path is absolute or
- * relative. If the path is relative, this function checks if the path is
- * relative to symlink or relative to current working directory. This is an
- * initiative to find a smarter `srcpath` to supply when building symlinks.
- * This allows you to determine which path to use out of one of three possible
- * types of source paths. The first is an absolute path. This is detected by
- * `path.isAbsolute()`. When an absolute path is provided, it is checked to
- * see if it exists. If it does it's used, if not an error is returned
- * (callback)/ thrown (sync). The other two options for `srcpath` are a
- * relative url. By default Node's `fs.symlink` works by creating a symlink
- * using `dstpath` and expects the `srcpath` to be relative to the newly
- * created symlink. If you provide a `srcpath` that does not exist on the file
- * system it results in a broken symlink. To minimize this, the function
- * checks to see if the 'relative to symlink' source file exists, and if it
- * does it will use it. If it does not, it checks if there's a file that
- * exists that is relative to the current working directory, if does its used.
- * This preserves the expectations of the original fs.symlink spec and adds
- * the ability to pass in `relative to current working direcotry` paths.
- */
-
-function symlinkPaths (srcpath, dstpath, callback) {
- if (path.isAbsolute(srcpath)) {
- return fs.lstat(srcpath, (err) => {
- if (err) {
- err.message = err.message.replace('lstat', 'ensureSymlink')
- return callback(err)
- }
- return callback(null, {
- toCwd: srcpath,
- toDst: srcpath
- })
- })
- } else {
- const dstdir = path.dirname(dstpath)
- const relativeToDst = path.join(dstdir, srcpath)
- return pathExists(relativeToDst, (err, exists) => {
- if (err) return callback(err)
- if (exists) {
- return callback(null, {
- toCwd: relativeToDst,
- toDst: srcpath
- })
- } else {
- return fs.lstat(srcpath, (err) => {
- if (err) {
- err.message = err.message.replace('lstat', 'ensureSymlink')
- return callback(err)
- }
- return callback(null, {
- toCwd: srcpath,
- toDst: path.relative(dstdir, srcpath)
- })
- })
- }
- })
- }
-}
-
-function symlinkPathsSync (srcpath, dstpath) {
- let exists
- if (path.isAbsolute(srcpath)) {
- exists = fs.existsSync(srcpath)
- if (!exists) throw new Error('absolute srcpath does not exist')
- return {
- toCwd: srcpath,
- toDst: srcpath
- }
- } else {
- const dstdir = path.dirname(dstpath)
- const relativeToDst = path.join(dstdir, srcpath)
- exists = fs.existsSync(relativeToDst)
- if (exists) {
- return {
- toCwd: relativeToDst,
- toDst: srcpath
- }
- } else {
- exists = fs.existsSync(srcpath)
- if (!exists) throw new Error('relative srcpath does not exist')
- return {
- toCwd: srcpath,
- toDst: path.relative(dstdir, srcpath)
- }
- }
- }
-}
-
-module.exports = {
- symlinkPaths,
- symlinkPathsSync
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/ensure/symlink-type.js b/mangashelf-server/node_modules/fs-extra/lib/ensure/symlink-type.js
deleted file mode 100644
index 42dc0ce..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/ensure/symlink-type.js
+++ /dev/null
@@ -1,31 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs')
-
-function symlinkType (srcpath, type, callback) {
- callback = (typeof type === 'function') ? type : callback
- type = (typeof type === 'function') ? false : type
- if (type) return callback(null, type)
- fs.lstat(srcpath, (err, stats) => {
- if (err) return callback(null, 'file')
- type = (stats && stats.isDirectory()) ? 'dir' : 'file'
- callback(null, type)
- })
-}
-
-function symlinkTypeSync (srcpath, type) {
- let stats
-
- if (type) return type
- try {
- stats = fs.lstatSync(srcpath)
- } catch {
- return 'file'
- }
- return (stats && stats.isDirectory()) ? 'dir' : 'file'
-}
-
-module.exports = {
- symlinkType,
- symlinkTypeSync
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/ensure/symlink.js b/mangashelf-server/node_modules/fs-extra/lib/ensure/symlink.js
deleted file mode 100644
index 2b93052..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/ensure/symlink.js
+++ /dev/null
@@ -1,82 +0,0 @@
-'use strict'
-
-const u = require('universalify').fromCallback
-const path = require('path')
-const fs = require('../fs')
-const _mkdirs = require('../mkdirs')
-const mkdirs = _mkdirs.mkdirs
-const mkdirsSync = _mkdirs.mkdirsSync
-
-const _symlinkPaths = require('./symlink-paths')
-const symlinkPaths = _symlinkPaths.symlinkPaths
-const symlinkPathsSync = _symlinkPaths.symlinkPathsSync
-
-const _symlinkType = require('./symlink-type')
-const symlinkType = _symlinkType.symlinkType
-const symlinkTypeSync = _symlinkType.symlinkTypeSync
-
-const pathExists = require('../path-exists').pathExists
-
-const { areIdentical } = require('../util/stat')
-
-function createSymlink (srcpath, dstpath, type, callback) {
- callback = (typeof type === 'function') ? type : callback
- type = (typeof type === 'function') ? false : type
-
- fs.lstat(dstpath, (err, stats) => {
- if (!err && stats.isSymbolicLink()) {
- Promise.all([
- fs.stat(srcpath),
- fs.stat(dstpath)
- ]).then(([srcStat, dstStat]) => {
- if (areIdentical(srcStat, dstStat)) return callback(null)
- _createSymlink(srcpath, dstpath, type, callback)
- })
- } else _createSymlink(srcpath, dstpath, type, callback)
- })
-}
-
-function _createSymlink (srcpath, dstpath, type, callback) {
- symlinkPaths(srcpath, dstpath, (err, relative) => {
- if (err) return callback(err)
- srcpath = relative.toDst
- symlinkType(relative.toCwd, type, (err, type) => {
- if (err) return callback(err)
- const dir = path.dirname(dstpath)
- pathExists(dir, (err, dirExists) => {
- if (err) return callback(err)
- if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
- mkdirs(dir, err => {
- if (err) return callback(err)
- fs.symlink(srcpath, dstpath, type, callback)
- })
- })
- })
- })
-}
-
-function createSymlinkSync (srcpath, dstpath, type) {
- let stats
- try {
- stats = fs.lstatSync(dstpath)
- } catch {}
- if (stats && stats.isSymbolicLink()) {
- const srcStat = fs.statSync(srcpath)
- const dstStat = fs.statSync(dstpath)
- if (areIdentical(srcStat, dstStat)) return
- }
-
- const relative = symlinkPathsSync(srcpath, dstpath)
- srcpath = relative.toDst
- type = symlinkTypeSync(relative.toCwd, type)
- const dir = path.dirname(dstpath)
- const exists = fs.existsSync(dir)
- if (exists) return fs.symlinkSync(srcpath, dstpath, type)
- mkdirsSync(dir)
- return fs.symlinkSync(srcpath, dstpath, type)
-}
-
-module.exports = {
- createSymlink: u(createSymlink),
- createSymlinkSync
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/fs/index.js b/mangashelf-server/node_modules/fs-extra/lib/fs/index.js
deleted file mode 100644
index 7b025e2..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/fs/index.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict'
-// This is adapted from https://github.com/normalize/mz
-// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
-const u = require('universalify').fromCallback
-const fs = require('graceful-fs')
-
-const api = [
- 'access',
- 'appendFile',
- 'chmod',
- 'chown',
- 'close',
- 'copyFile',
- 'fchmod',
- 'fchown',
- 'fdatasync',
- 'fstat',
- 'fsync',
- 'ftruncate',
- 'futimes',
- 'lchmod',
- 'lchown',
- 'link',
- 'lstat',
- 'mkdir',
- 'mkdtemp',
- 'open',
- 'opendir',
- 'readdir',
- 'readFile',
- 'readlink',
- 'realpath',
- 'rename',
- 'rm',
- 'rmdir',
- 'stat',
- 'symlink',
- 'truncate',
- 'unlink',
- 'utimes',
- 'writeFile'
-].filter(key => {
- // Some commands are not available on some systems. Ex:
- // fs.opendir was added in Node.js v12.12.0
- // fs.rm was added in Node.js v14.14.0
- // fs.lchown is not available on at least some Linux
- return typeof fs[key] === 'function'
-})
-
-// Export cloned fs:
-Object.assign(exports, fs)
-
-// Universalify async methods:
-api.forEach(method => {
- exports[method] = u(fs[method])
-})
-
-// We differ from mz/fs in that we still ship the old, broken, fs.exists()
-// since we are a drop-in replacement for the native module
-exports.exists = function (filename, callback) {
- if (typeof callback === 'function') {
- return fs.exists(filename, callback)
- }
- return new Promise(resolve => {
- return fs.exists(filename, resolve)
- })
-}
-
-// fs.read(), fs.write(), & fs.writev() need special treatment due to multiple callback args
-
-exports.read = function (fd, buffer, offset, length, position, callback) {
- if (typeof callback === 'function') {
- return fs.read(fd, buffer, offset, length, position, callback)
- }
- return new Promise((resolve, reject) => {
- fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
- if (err) return reject(err)
- resolve({ bytesRead, buffer })
- })
- })
-}
-
-// Function signature can be
-// fs.write(fd, buffer[, offset[, length[, position]]], callback)
-// OR
-// fs.write(fd, string[, position[, encoding]], callback)
-// We need to handle both cases, so we use ...args
-exports.write = function (fd, buffer, ...args) {
- if (typeof args[args.length - 1] === 'function') {
- return fs.write(fd, buffer, ...args)
- }
-
- return new Promise((resolve, reject) => {
- fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {
- if (err) return reject(err)
- resolve({ bytesWritten, buffer })
- })
- })
-}
-
-// fs.writev only available in Node v12.9.0+
-if (typeof fs.writev === 'function') {
- // Function signature is
- // s.writev(fd, buffers[, position], callback)
- // We need to handle the optional arg, so we use ...args
- exports.writev = function (fd, buffers, ...args) {
- if (typeof args[args.length - 1] === 'function') {
- return fs.writev(fd, buffers, ...args)
- }
-
- return new Promise((resolve, reject) => {
- fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers) => {
- if (err) return reject(err)
- resolve({ bytesWritten, buffers })
- })
- })
- }
-}
-
-// fs.realpath.native sometimes not available if fs is monkey-patched
-if (typeof fs.realpath.native === 'function') {
- exports.realpath.native = u(fs.realpath.native)
-} else {
- process.emitWarning(
- 'fs.realpath.native is not a function. Is fs being monkey-patched?',
- 'Warning', 'fs-extra-WARN0003'
- )
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/index.js b/mangashelf-server/node_modules/fs-extra/lib/index.js
deleted file mode 100644
index da6711a..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/index.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict'
-
-module.exports = {
- // Export promiseified graceful-fs:
- ...require('./fs'),
- // Export extra methods:
- ...require('./copy'),
- ...require('./empty'),
- ...require('./ensure'),
- ...require('./json'),
- ...require('./mkdirs'),
- ...require('./move'),
- ...require('./output-file'),
- ...require('./path-exists'),
- ...require('./remove')
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/json/index.js b/mangashelf-server/node_modules/fs-extra/lib/json/index.js
deleted file mode 100644
index 900126a..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/json/index.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict'
-
-const u = require('universalify').fromPromise
-const jsonFile = require('./jsonfile')
-
-jsonFile.outputJson = u(require('./output-json'))
-jsonFile.outputJsonSync = require('./output-json-sync')
-// aliases
-jsonFile.outputJSON = jsonFile.outputJson
-jsonFile.outputJSONSync = jsonFile.outputJsonSync
-jsonFile.writeJSON = jsonFile.writeJson
-jsonFile.writeJSONSync = jsonFile.writeJsonSync
-jsonFile.readJSON = jsonFile.readJson
-jsonFile.readJSONSync = jsonFile.readJsonSync
-
-module.exports = jsonFile
diff --git a/mangashelf-server/node_modules/fs-extra/lib/json/jsonfile.js b/mangashelf-server/node_modules/fs-extra/lib/json/jsonfile.js
deleted file mode 100644
index f11d34d..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/json/jsonfile.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict'
-
-const jsonFile = require('jsonfile')
-
-module.exports = {
- // jsonfile exports
- readJson: jsonFile.readFile,
- readJsonSync: jsonFile.readFileSync,
- writeJson: jsonFile.writeFile,
- writeJsonSync: jsonFile.writeFileSync
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/json/output-json-sync.js b/mangashelf-server/node_modules/fs-extra/lib/json/output-json-sync.js
deleted file mode 100644
index d4e564f..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/json/output-json-sync.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict'
-
-const { stringify } = require('jsonfile/utils')
-const { outputFileSync } = require('../output-file')
-
-function outputJsonSync (file, data, options) {
- const str = stringify(data, options)
-
- outputFileSync(file, str, options)
-}
-
-module.exports = outputJsonSync
diff --git a/mangashelf-server/node_modules/fs-extra/lib/json/output-json.js b/mangashelf-server/node_modules/fs-extra/lib/json/output-json.js
deleted file mode 100644
index 0afdeb6..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/json/output-json.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict'
-
-const { stringify } = require('jsonfile/utils')
-const { outputFile } = require('../output-file')
-
-async function outputJson (file, data, options = {}) {
- const str = stringify(data, options)
-
- await outputFile(file, str, options)
-}
-
-module.exports = outputJson
diff --git a/mangashelf-server/node_modules/fs-extra/lib/mkdirs/index.js b/mangashelf-server/node_modules/fs-extra/lib/mkdirs/index.js
deleted file mode 100644
index 9edecee..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/mkdirs/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict'
-const u = require('universalify').fromPromise
-const { makeDir: _makeDir, makeDirSync } = require('./make-dir')
-const makeDir = u(_makeDir)
-
-module.exports = {
- mkdirs: makeDir,
- mkdirsSync: makeDirSync,
- // alias
- mkdirp: makeDir,
- mkdirpSync: makeDirSync,
- ensureDir: makeDir,
- ensureDirSync: makeDirSync
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/mkdirs/make-dir.js b/mangashelf-server/node_modules/fs-extra/lib/mkdirs/make-dir.js
deleted file mode 100644
index 45ece64..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/mkdirs/make-dir.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict'
-const fs = require('../fs')
-const { checkPath } = require('./utils')
-
-const getMode = options => {
- const defaults = { mode: 0o777 }
- if (typeof options === 'number') return options
- return ({ ...defaults, ...options }).mode
-}
-
-module.exports.makeDir = async (dir, options) => {
- checkPath(dir)
-
- return fs.mkdir(dir, {
- mode: getMode(options),
- recursive: true
- })
-}
-
-module.exports.makeDirSync = (dir, options) => {
- checkPath(dir)
-
- return fs.mkdirSync(dir, {
- mode: getMode(options),
- recursive: true
- })
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/mkdirs/utils.js b/mangashelf-server/node_modules/fs-extra/lib/mkdirs/utils.js
deleted file mode 100644
index a4059ad..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/mkdirs/utils.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// Adapted from https://github.com/sindresorhus/make-dir
-// Copyright (c) Sindre Sorhus (sindresorhus.com)
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-'use strict'
-const path = require('path')
-
-// https://github.com/nodejs/node/issues/8987
-// https://github.com/libuv/libuv/pull/1088
-module.exports.checkPath = function checkPath (pth) {
- if (process.platform === 'win32') {
- const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''))
-
- if (pathHasInvalidWinCharacters) {
- const error = new Error(`Path contains invalid characters: ${pth}`)
- error.code = 'EINVAL'
- throw error
- }
- }
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/move/index.js b/mangashelf-server/node_modules/fs-extra/lib/move/index.js
deleted file mode 100644
index fcee73c..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/move/index.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict'
-
-const u = require('universalify').fromCallback
-module.exports = {
- move: u(require('./move')),
- moveSync: require('./move-sync')
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/move/move-sync.js b/mangashelf-server/node_modules/fs-extra/lib/move/move-sync.js
deleted file mode 100644
index 8453366..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/move/move-sync.js
+++ /dev/null
@@ -1,54 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs')
-const path = require('path')
-const copySync = require('../copy').copySync
-const removeSync = require('../remove').removeSync
-const mkdirpSync = require('../mkdirs').mkdirpSync
-const stat = require('../util/stat')
-
-function moveSync (src, dest, opts) {
- opts = opts || {}
- const overwrite = opts.overwrite || opts.clobber || false
-
- const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, 'move', opts)
- stat.checkParentPathsSync(src, srcStat, dest, 'move')
- if (!isParentRoot(dest)) mkdirpSync(path.dirname(dest))
- return doRename(src, dest, overwrite, isChangingCase)
-}
-
-function isParentRoot (dest) {
- const parent = path.dirname(dest)
- const parsedPath = path.parse(parent)
- return parsedPath.root === parent
-}
-
-function doRename (src, dest, overwrite, isChangingCase) {
- if (isChangingCase) return rename(src, dest, overwrite)
- if (overwrite) {
- removeSync(dest)
- return rename(src, dest, overwrite)
- }
- if (fs.existsSync(dest)) throw new Error('dest already exists.')
- return rename(src, dest, overwrite)
-}
-
-function rename (src, dest, overwrite) {
- try {
- fs.renameSync(src, dest)
- } catch (err) {
- if (err.code !== 'EXDEV') throw err
- return moveAcrossDevice(src, dest, overwrite)
- }
-}
-
-function moveAcrossDevice (src, dest, overwrite) {
- const opts = {
- overwrite,
- errorOnExist: true
- }
- copySync(src, dest, opts)
- return removeSync(src)
-}
-
-module.exports = moveSync
diff --git a/mangashelf-server/node_modules/fs-extra/lib/move/move.js b/mangashelf-server/node_modules/fs-extra/lib/move/move.js
deleted file mode 100644
index 7dc6ecd..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/move/move.js
+++ /dev/null
@@ -1,75 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs')
-const path = require('path')
-const copy = require('../copy').copy
-const remove = require('../remove').remove
-const mkdirp = require('../mkdirs').mkdirp
-const pathExists = require('../path-exists').pathExists
-const stat = require('../util/stat')
-
-function move (src, dest, opts, cb) {
- if (typeof opts === 'function') {
- cb = opts
- opts = {}
- }
-
- opts = opts || {}
-
- const overwrite = opts.overwrite || opts.clobber || false
-
- stat.checkPaths(src, dest, 'move', opts, (err, stats) => {
- if (err) return cb(err)
- const { srcStat, isChangingCase = false } = stats
- stat.checkParentPaths(src, srcStat, dest, 'move', err => {
- if (err) return cb(err)
- if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb)
- mkdirp(path.dirname(dest), err => {
- if (err) return cb(err)
- return doRename(src, dest, overwrite, isChangingCase, cb)
- })
- })
- })
-}
-
-function isParentRoot (dest) {
- const parent = path.dirname(dest)
- const parsedPath = path.parse(parent)
- return parsedPath.root === parent
-}
-
-function doRename (src, dest, overwrite, isChangingCase, cb) {
- if (isChangingCase) return rename(src, dest, overwrite, cb)
- if (overwrite) {
- return remove(dest, err => {
- if (err) return cb(err)
- return rename(src, dest, overwrite, cb)
- })
- }
- pathExists(dest, (err, destExists) => {
- if (err) return cb(err)
- if (destExists) return cb(new Error('dest already exists.'))
- return rename(src, dest, overwrite, cb)
- })
-}
-
-function rename (src, dest, overwrite, cb) {
- fs.rename(src, dest, err => {
- if (!err) return cb()
- if (err.code !== 'EXDEV') return cb(err)
- return moveAcrossDevice(src, dest, overwrite, cb)
- })
-}
-
-function moveAcrossDevice (src, dest, overwrite, cb) {
- const opts = {
- overwrite,
- errorOnExist: true
- }
- copy(src, dest, opts, err => {
- if (err) return cb(err)
- return remove(src, cb)
- })
-}
-
-module.exports = move
diff --git a/mangashelf-server/node_modules/fs-extra/lib/output-file/index.js b/mangashelf-server/node_modules/fs-extra/lib/output-file/index.js
deleted file mode 100644
index 92297ca..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/output-file/index.js
+++ /dev/null
@@ -1,40 +0,0 @@
-'use strict'
-
-const u = require('universalify').fromCallback
-const fs = require('graceful-fs')
-const path = require('path')
-const mkdir = require('../mkdirs')
-const pathExists = require('../path-exists').pathExists
-
-function outputFile (file, data, encoding, callback) {
- if (typeof encoding === 'function') {
- callback = encoding
- encoding = 'utf8'
- }
-
- const dir = path.dirname(file)
- pathExists(dir, (err, itDoes) => {
- if (err) return callback(err)
- if (itDoes) return fs.writeFile(file, data, encoding, callback)
-
- mkdir.mkdirs(dir, err => {
- if (err) return callback(err)
-
- fs.writeFile(file, data, encoding, callback)
- })
- })
-}
-
-function outputFileSync (file, ...args) {
- const dir = path.dirname(file)
- if (fs.existsSync(dir)) {
- return fs.writeFileSync(file, ...args)
- }
- mkdir.mkdirsSync(dir)
- fs.writeFileSync(file, ...args)
-}
-
-module.exports = {
- outputFile: u(outputFile),
- outputFileSync
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/path-exists/index.js b/mangashelf-server/node_modules/fs-extra/lib/path-exists/index.js
deleted file mode 100644
index ddd9bc7..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/path-exists/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict'
-const u = require('universalify').fromPromise
-const fs = require('../fs')
-
-function pathExists (path) {
- return fs.access(path).then(() => true).catch(() => false)
-}
-
-module.exports = {
- pathExists: u(pathExists),
- pathExistsSync: fs.existsSync
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/remove/index.js b/mangashelf-server/node_modules/fs-extra/lib/remove/index.js
deleted file mode 100644
index 4428e59..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/remove/index.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs')
-const u = require('universalify').fromCallback
-const rimraf = require('./rimraf')
-
-function remove (path, callback) {
- // Node 14.14.0+
- if (fs.rm) return fs.rm(path, { recursive: true, force: true }, callback)
- rimraf(path, callback)
-}
-
-function removeSync (path) {
- // Node 14.14.0+
- if (fs.rmSync) return fs.rmSync(path, { recursive: true, force: true })
- rimraf.sync(path)
-}
-
-module.exports = {
- remove: u(remove),
- removeSync
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/remove/rimraf.js b/mangashelf-server/node_modules/fs-extra/lib/remove/rimraf.js
deleted file mode 100644
index 2c77102..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/remove/rimraf.js
+++ /dev/null
@@ -1,302 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs')
-const path = require('path')
-const assert = require('assert')
-
-const isWindows = (process.platform === 'win32')
-
-function defaults (options) {
- const methods = [
- 'unlink',
- 'chmod',
- 'stat',
- 'lstat',
- 'rmdir',
- 'readdir'
- ]
- methods.forEach(m => {
- options[m] = options[m] || fs[m]
- m = m + 'Sync'
- options[m] = options[m] || fs[m]
- })
-
- options.maxBusyTries = options.maxBusyTries || 3
-}
-
-function rimraf (p, options, cb) {
- let busyTries = 0
-
- if (typeof options === 'function') {
- cb = options
- options = {}
- }
-
- assert(p, 'rimraf: missing path')
- assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
- assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required')
- assert(options, 'rimraf: invalid options argument provided')
- assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
-
- defaults(options)
-
- rimraf_(p, options, function CB (er) {
- if (er) {
- if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') &&
- busyTries < options.maxBusyTries) {
- busyTries++
- const time = busyTries * 100
- // try again, with the same exact callback as this one.
- return setTimeout(() => rimraf_(p, options, CB), time)
- }
-
- // already gone
- if (er.code === 'ENOENT') er = null
- }
-
- cb(er)
- })
-}
-
-// Two possible strategies.
-// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR
-// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR
-//
-// Both result in an extra syscall when you guess wrong. However, there
-// are likely far more normal files in the world than directories. This
-// is based on the assumption that a the average number of files per
-// directory is >= 1.
-//
-// If anyone ever complains about this, then I guess the strategy could
-// be made configurable somehow. But until then, YAGNI.
-function rimraf_ (p, options, cb) {
- assert(p)
- assert(options)
- assert(typeof cb === 'function')
-
- // sunos lets the root user unlink directories, which is... weird.
- // so we have to lstat here and make sure it's not a dir.
- options.lstat(p, (er, st) => {
- if (er && er.code === 'ENOENT') {
- return cb(null)
- }
-
- // Windows can EPERM on stat. Life is suffering.
- if (er && er.code === 'EPERM' && isWindows) {
- return fixWinEPERM(p, options, er, cb)
- }
-
- if (st && st.isDirectory()) {
- return rmdir(p, options, er, cb)
- }
-
- options.unlink(p, er => {
- if (er) {
- if (er.code === 'ENOENT') {
- return cb(null)
- }
- if (er.code === 'EPERM') {
- return (isWindows)
- ? fixWinEPERM(p, options, er, cb)
- : rmdir(p, options, er, cb)
- }
- if (er.code === 'EISDIR') {
- return rmdir(p, options, er, cb)
- }
- }
- return cb(er)
- })
- })
-}
-
-function fixWinEPERM (p, options, er, cb) {
- assert(p)
- assert(options)
- assert(typeof cb === 'function')
-
- options.chmod(p, 0o666, er2 => {
- if (er2) {
- cb(er2.code === 'ENOENT' ? null : er)
- } else {
- options.stat(p, (er3, stats) => {
- if (er3) {
- cb(er3.code === 'ENOENT' ? null : er)
- } else if (stats.isDirectory()) {
- rmdir(p, options, er, cb)
- } else {
- options.unlink(p, cb)
- }
- })
- }
- })
-}
-
-function fixWinEPERMSync (p, options, er) {
- let stats
-
- assert(p)
- assert(options)
-
- try {
- options.chmodSync(p, 0o666)
- } catch (er2) {
- if (er2.code === 'ENOENT') {
- return
- } else {
- throw er
- }
- }
-
- try {
- stats = options.statSync(p)
- } catch (er3) {
- if (er3.code === 'ENOENT') {
- return
- } else {
- throw er
- }
- }
-
- if (stats.isDirectory()) {
- rmdirSync(p, options, er)
- } else {
- options.unlinkSync(p)
- }
-}
-
-function rmdir (p, options, originalEr, cb) {
- assert(p)
- assert(options)
- assert(typeof cb === 'function')
-
- // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
- // if we guessed wrong, and it's not a directory, then
- // raise the original error.
- options.rmdir(p, er => {
- if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) {
- rmkids(p, options, cb)
- } else if (er && er.code === 'ENOTDIR') {
- cb(originalEr)
- } else {
- cb(er)
- }
- })
-}
-
-function rmkids (p, options, cb) {
- assert(p)
- assert(options)
- assert(typeof cb === 'function')
-
- options.readdir(p, (er, files) => {
- if (er) return cb(er)
-
- let n = files.length
- let errState
-
- if (n === 0) return options.rmdir(p, cb)
-
- files.forEach(f => {
- rimraf(path.join(p, f), options, er => {
- if (errState) {
- return
- }
- if (er) return cb(errState = er)
- if (--n === 0) {
- options.rmdir(p, cb)
- }
- })
- })
- })
-}
-
-// this looks simpler, and is strictly *faster*, but will
-// tie up the JavaScript thread and fail on excessively
-// deep directory trees.
-function rimrafSync (p, options) {
- let st
-
- options = options || {}
- defaults(options)
-
- assert(p, 'rimraf: missing path')
- assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
- assert(options, 'rimraf: missing options')
- assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
-
- try {
- st = options.lstatSync(p)
- } catch (er) {
- if (er.code === 'ENOENT') {
- return
- }
-
- // Windows can EPERM on stat. Life is suffering.
- if (er.code === 'EPERM' && isWindows) {
- fixWinEPERMSync(p, options, er)
- }
- }
-
- try {
- // sunos lets the root user unlink directories, which is... weird.
- if (st && st.isDirectory()) {
- rmdirSync(p, options, null)
- } else {
- options.unlinkSync(p)
- }
- } catch (er) {
- if (er.code === 'ENOENT') {
- return
- } else if (er.code === 'EPERM') {
- return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
- } else if (er.code !== 'EISDIR') {
- throw er
- }
- rmdirSync(p, options, er)
- }
-}
-
-function rmdirSync (p, options, originalEr) {
- assert(p)
- assert(options)
-
- try {
- options.rmdirSync(p)
- } catch (er) {
- if (er.code === 'ENOTDIR') {
- throw originalEr
- } else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') {
- rmkidsSync(p, options)
- } else if (er.code !== 'ENOENT') {
- throw er
- }
- }
-}
-
-function rmkidsSync (p, options) {
- assert(p)
- assert(options)
- options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options))
-
- if (isWindows) {
- // We only end up here once we got ENOTEMPTY at least once, and
- // at this point, we are guaranteed to have removed all the kids.
- // So, we know that it won't be ENOENT or ENOTDIR or anything else.
- // try really hard to delete stuff on windows, because it has a
- // PROFOUNDLY annoying habit of not closing handles promptly when
- // files are deleted, resulting in spurious ENOTEMPTY errors.
- const startTime = Date.now()
- do {
- try {
- const ret = options.rmdirSync(p, options)
- return ret
- } catch {}
- } while (Date.now() - startTime < 500) // give up after 500ms
- } else {
- const ret = options.rmdirSync(p, options)
- return ret
- }
-}
-
-module.exports = rimraf
-rimraf.sync = rimrafSync
diff --git a/mangashelf-server/node_modules/fs-extra/lib/util/stat.js b/mangashelf-server/node_modules/fs-extra/lib/util/stat.js
deleted file mode 100644
index 0ed5aec..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/util/stat.js
+++ /dev/null
@@ -1,154 +0,0 @@
-'use strict'
-
-const fs = require('../fs')
-const path = require('path')
-const util = require('util')
-
-function getStats (src, dest, opts) {
- const statFunc = opts.dereference
- ? (file) => fs.stat(file, { bigint: true })
- : (file) => fs.lstat(file, { bigint: true })
- return Promise.all([
- statFunc(src),
- statFunc(dest).catch(err => {
- if (err.code === 'ENOENT') return null
- throw err
- })
- ]).then(([srcStat, destStat]) => ({ srcStat, destStat }))
-}
-
-function getStatsSync (src, dest, opts) {
- let destStat
- const statFunc = opts.dereference
- ? (file) => fs.statSync(file, { bigint: true })
- : (file) => fs.lstatSync(file, { bigint: true })
- const srcStat = statFunc(src)
- try {
- destStat = statFunc(dest)
- } catch (err) {
- if (err.code === 'ENOENT') return { srcStat, destStat: null }
- throw err
- }
- return { srcStat, destStat }
-}
-
-function checkPaths (src, dest, funcName, opts, cb) {
- util.callbackify(getStats)(src, dest, opts, (err, stats) => {
- if (err) return cb(err)
- const { srcStat, destStat } = stats
-
- if (destStat) {
- if (areIdentical(srcStat, destStat)) {
- const srcBaseName = path.basename(src)
- const destBaseName = path.basename(dest)
- if (funcName === 'move' &&
- srcBaseName !== destBaseName &&
- srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
- return cb(null, { srcStat, destStat, isChangingCase: true })
- }
- return cb(new Error('Source and destination must not be the same.'))
- }
- if (srcStat.isDirectory() && !destStat.isDirectory()) {
- return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`))
- }
- if (!srcStat.isDirectory() && destStat.isDirectory()) {
- return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`))
- }
- }
-
- if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
- return cb(new Error(errMsg(src, dest, funcName)))
- }
- return cb(null, { srcStat, destStat })
- })
-}
-
-function checkPathsSync (src, dest, funcName, opts) {
- const { srcStat, destStat } = getStatsSync(src, dest, opts)
-
- if (destStat) {
- if (areIdentical(srcStat, destStat)) {
- const srcBaseName = path.basename(src)
- const destBaseName = path.basename(dest)
- if (funcName === 'move' &&
- srcBaseName !== destBaseName &&
- srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
- return { srcStat, destStat, isChangingCase: true }
- }
- throw new Error('Source and destination must not be the same.')
- }
- if (srcStat.isDirectory() && !destStat.isDirectory()) {
- throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)
- }
- if (!srcStat.isDirectory() && destStat.isDirectory()) {
- throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)
- }
- }
-
- if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
- throw new Error(errMsg(src, dest, funcName))
- }
- return { srcStat, destStat }
-}
-
-// recursively check if dest parent is a subdirectory of src.
-// It works for all file types including symlinks since it
-// checks the src and dest inodes. It starts from the deepest
-// parent and stops once it reaches the src parent or the root path.
-function checkParentPaths (src, srcStat, dest, funcName, cb) {
- const srcParent = path.resolve(path.dirname(src))
- const destParent = path.resolve(path.dirname(dest))
- if (destParent === srcParent || destParent === path.parse(destParent).root) return cb()
- fs.stat(destParent, { bigint: true }, (err, destStat) => {
- if (err) {
- if (err.code === 'ENOENT') return cb()
- return cb(err)
- }
- if (areIdentical(srcStat, destStat)) {
- return cb(new Error(errMsg(src, dest, funcName)))
- }
- return checkParentPaths(src, srcStat, destParent, funcName, cb)
- })
-}
-
-function checkParentPathsSync (src, srcStat, dest, funcName) {
- const srcParent = path.resolve(path.dirname(src))
- const destParent = path.resolve(path.dirname(dest))
- if (destParent === srcParent || destParent === path.parse(destParent).root) return
- let destStat
- try {
- destStat = fs.statSync(destParent, { bigint: true })
- } catch (err) {
- if (err.code === 'ENOENT') return
- throw err
- }
- if (areIdentical(srcStat, destStat)) {
- throw new Error(errMsg(src, dest, funcName))
- }
- return checkParentPathsSync(src, srcStat, destParent, funcName)
-}
-
-function areIdentical (srcStat, destStat) {
- return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev
-}
-
-// return true if dest is a subdir of src, otherwise false.
-// It only checks the path strings.
-function isSrcSubdir (src, dest) {
- const srcArr = path.resolve(src).split(path.sep).filter(i => i)
- const destArr = path.resolve(dest).split(path.sep).filter(i => i)
- return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true)
-}
-
-function errMsg (src, dest, funcName) {
- return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`
-}
-
-module.exports = {
- checkPaths,
- checkPathsSync,
- checkParentPaths,
- checkParentPathsSync,
- isSrcSubdir,
- areIdentical
-}
diff --git a/mangashelf-server/node_modules/fs-extra/lib/util/utimes.js b/mangashelf-server/node_modules/fs-extra/lib/util/utimes.js
deleted file mode 100644
index 75395de..0000000
--- a/mangashelf-server/node_modules/fs-extra/lib/util/utimes.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs')
-
-function utimesMillis (path, atime, mtime, callback) {
- // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
- fs.open(path, 'r+', (err, fd) => {
- if (err) return callback(err)
- fs.futimes(fd, atime, mtime, futimesErr => {
- fs.close(fd, closeErr => {
- if (callback) callback(futimesErr || closeErr)
- })
- })
- })
-}
-
-function utimesMillisSync (path, atime, mtime) {
- const fd = fs.openSync(path, 'r+')
- fs.futimesSync(fd, atime, mtime)
- return fs.closeSync(fd)
-}
-
-module.exports = {
- utimesMillis,
- utimesMillisSync
-}
diff --git a/mangashelf-server/node_modules/fs-extra/package.json b/mangashelf-server/node_modules/fs-extra/package.json
deleted file mode 100644
index 059000e..0000000
--- a/mangashelf-server/node_modules/fs-extra/package.json
+++ /dev/null
@@ -1,67 +0,0 @@
-{
- "name": "fs-extra",
- "version": "10.1.0",
- "description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.",
- "engines": {
- "node": ">=12"
- },
- "homepage": "https://github.com/jprichardson/node-fs-extra",
- "repository": {
- "type": "git",
- "url": "https://github.com/jprichardson/node-fs-extra"
- },
- "keywords": [
- "fs",
- "file",
- "file system",
- "copy",
- "directory",
- "extra",
- "mkdirp",
- "mkdir",
- "mkdirs",
- "recursive",
- "json",
- "read",
- "write",
- "extra",
- "delete",
- "remove",
- "touch",
- "create",
- "text",
- "output",
- "move",
- "promise"
- ],
- "author": "JP Richardson ",
- "license": "MIT",
- "dependencies": {
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- },
- "devDependencies": {
- "at-least-node": "^1.0.0",
- "klaw": "^2.1.1",
- "klaw-sync": "^3.0.2",
- "minimist": "^1.1.1",
- "mocha": "^5.0.5",
- "nyc": "^15.0.0",
- "proxyquire": "^2.0.1",
- "read-dir-files": "^0.1.1",
- "standard": "^16.0.3"
- },
- "main": "./lib/index.js",
- "files": [
- "lib/",
- "!lib/**/__tests__/"
- ],
- "scripts": {
- "lint": "standard",
- "test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha",
- "test": "npm run lint && npm run unit",
- "unit": "nyc node test.js"
- },
- "sideEffects": false
-}
diff --git a/mangashelf-server/node_modules/fsevents/LICENSE b/mangashelf-server/node_modules/fsevents/LICENSE
new file mode 100644
index 0000000..5d70441
--- /dev/null
+++ b/mangashelf-server/node_modules/fsevents/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+-----------
+
+Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/mangashelf-server/node_modules/fsevents/README.md b/mangashelf-server/node_modules/fsevents/README.md
new file mode 100644
index 0000000..50373a0
--- /dev/null
+++ b/mangashelf-server/node_modules/fsevents/README.md
@@ -0,0 +1,89 @@
+# fsevents
+
+Native access to MacOS FSEvents in [Node.js](https://nodejs.org/)
+
+The FSEvents API in MacOS allows applications to register for notifications of
+changes to a given directory tree. It is a very fast and lightweight alternative
+to kqueue.
+
+This is a low-level library. For a cross-platform file watching module that
+uses fsevents, check out [Chokidar](https://github.com/paulmillr/chokidar).
+
+## Usage
+
+```sh
+npm install fsevents
+```
+
+Supports only **Node.js v8.16 and higher**.
+
+```js
+const fsevents = require('fsevents');
+
+// To start observation
+const stop = fsevents.watch(__dirname, (path, flags, id) => {
+ const info = fsevents.getInfo(path, flags);
+});
+
+// To end observation
+stop();
+```
+
+> **Important note:** The API behaviour is slightly different from typical JS APIs. The `stop` function **must** be
+> retrieved and stored somewhere, even if you don't plan to stop the watcher. If you forget it, the garbage collector
+> will eventually kick in, the watcher will be unregistered, and your callbacks won't be called anymore.
+
+The callback passed as the second parameter to `.watch` get's called whenever the operating system detects a
+a change in the file system. It takes three arguments:
+
+###### `fsevents.watch(dirname: string, (path: string, flags: number, id: string) => void): () => Promise`
+
+ * `path: string` - the item in the filesystem that have been changed
+ * `flags: number` - a numeric value describing what the change was
+ * `id: string` - an unique-id identifying this specific event
+
+ Returns closer callback which when called returns a Promise resolving when the watcher process has been shut down.
+
+###### `fsevents.getInfo(path: string, flags: number, id: string): FsEventInfo`
+
+The `getInfo` function takes the `path`, `flags` and `id` arguments and converts those parameters into a structure
+that is easier to digest to determine what the change was.
+
+The `FsEventsInfo` has the following shape:
+
+```js
+/**
+ * @typedef {'created'|'modified'|'deleted'|'moved'|'root-changed'|'cloned'|'unknown'} FsEventsEvent
+ * @typedef {'file'|'directory'|'symlink'} FsEventsType
+ */
+{
+ "event": "created", // {FsEventsEvent}
+ "path": "file.txt",
+ "type": "file", // {FsEventsType}
+ "changes": {
+ "inode": true, // Had iNode Meta-Information changed
+ "finder": false, // Had Finder Meta-Data changed
+ "access": false, // Had access permissions changed
+ "xattrs": false // Had xAttributes changed
+ },
+ "flags": 0x100000000
+}
+```
+
+## Changelog
+
+- v2.3 supports Apple Silicon ARM CPUs
+- v2 supports node 8.16+ and reduces package size massively
+- v1.2.8 supports node 6+
+- v1.2.7 supports node 4+
+
+## Troubleshooting
+
+- I'm getting `EBADPLATFORM` `Unsupported platform for fsevents` error.
+- It's fine, nothing is broken. fsevents is macos-only. Other platforms are skipped. If you want to hide this warning, report a bug to NPM bugtracker asking them to hide ebadplatform warnings by default.
+
+## License
+
+The MIT License Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller — see LICENSE file.
+
+Visit our [GitHub page](https://github.com/fsevents/fsevents) and [NPM Page](https://npmjs.org/package/fsevents)
diff --git a/mangashelf-server/node_modules/fsevents/fsevents.d.ts b/mangashelf-server/node_modules/fsevents/fsevents.d.ts
new file mode 100644
index 0000000..2723c04
--- /dev/null
+++ b/mangashelf-server/node_modules/fsevents/fsevents.d.ts
@@ -0,0 +1,46 @@
+declare type Event = "created" | "cloned" | "modified" | "deleted" | "moved" | "root-changed" | "unknown";
+declare type Type = "file" | "directory" | "symlink";
+declare type FileChanges = {
+ inode: boolean;
+ finder: boolean;
+ access: boolean;
+ xattrs: boolean;
+};
+declare type Info = {
+ event: Event;
+ path: string;
+ type: Type;
+ changes: FileChanges;
+ flags: number;
+};
+declare type WatchHandler = (path: string, flags: number, id: string) => void;
+export declare function watch(path: string, handler: WatchHandler): () => Promise;
+export declare function watch(path: string, since: number, handler: WatchHandler): () => Promise;
+export declare function getInfo(path: string, flags: number): Info;
+export declare const constants: {
+ None: 0x00000000;
+ MustScanSubDirs: 0x00000001;
+ UserDropped: 0x00000002;
+ KernelDropped: 0x00000004;
+ EventIdsWrapped: 0x00000008;
+ HistoryDone: 0x00000010;
+ RootChanged: 0x00000020;
+ Mount: 0x00000040;
+ Unmount: 0x00000080;
+ ItemCreated: 0x00000100;
+ ItemRemoved: 0x00000200;
+ ItemInodeMetaMod: 0x00000400;
+ ItemRenamed: 0x00000800;
+ ItemModified: 0x00001000;
+ ItemFinderInfoMod: 0x00002000;
+ ItemChangeOwner: 0x00004000;
+ ItemXattrMod: 0x00008000;
+ ItemIsFile: 0x00010000;
+ ItemIsDir: 0x00020000;
+ ItemIsSymlink: 0x00040000;
+ ItemIsHardlink: 0x00100000;
+ ItemIsLastHardlink: 0x00200000;
+ OwnEvent: 0x00080000;
+ ItemCloned: 0x00400000;
+};
+export {};
diff --git a/mangashelf-server/node_modules/fsevents/fsevents.js b/mangashelf-server/node_modules/fsevents/fsevents.js
new file mode 100644
index 0000000..198da98
--- /dev/null
+++ b/mangashelf-server/node_modules/fsevents/fsevents.js
@@ -0,0 +1,83 @@
+/*
+ ** © 2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller
+ ** Licensed under MIT License.
+ */
+
+/* jshint node:true */
+"use strict";
+
+if (process.platform !== "darwin") {
+ throw new Error(`Module 'fsevents' is not compatible with platform '${process.platform}'`);
+}
+
+const Native = require("./fsevents.node");
+const events = Native.constants;
+
+function watch(path, since, handler) {
+ if (typeof path !== "string") {
+ throw new TypeError(`fsevents argument 1 must be a string and not a ${typeof path}`);
+ }
+ if ("function" === typeof since && "undefined" === typeof handler) {
+ handler = since;
+ since = Native.flags.SinceNow;
+ }
+ if (typeof since !== "number") {
+ throw new TypeError(`fsevents argument 2 must be a number and not a ${typeof since}`);
+ }
+ if (typeof handler !== "function") {
+ throw new TypeError(`fsevents argument 3 must be a function and not a ${typeof handler}`);
+ }
+
+ let instance = Native.start(Native.global, path, since, handler);
+ if (!instance) throw new Error(`could not watch: ${path}`);
+ return () => {
+ const result = instance ? Promise.resolve(instance).then(Native.stop) : Promise.resolve(undefined);
+ instance = undefined;
+ return result;
+ };
+}
+
+function getInfo(path, flags) {
+ return {
+ path,
+ flags,
+ event: getEventType(flags),
+ type: getFileType(flags),
+ changes: getFileChanges(flags),
+ };
+}
+
+function getFileType(flags) {
+ if (events.ItemIsFile & flags) return "file";
+ if (events.ItemIsDir & flags) return "directory";
+ if (events.MustScanSubDirs & flags) return "directory";
+ if (events.ItemIsSymlink & flags) return "symlink";
+}
+function anyIsTrue(obj) {
+ for (let key in obj) {
+ if (obj[key]) return true;
+ }
+ return false;
+}
+function getEventType(flags) {
+ if (events.ItemRemoved & flags) return "deleted";
+ if (events.ItemRenamed & flags) return "moved";
+ if (events.ItemCreated & flags) return "created";
+ if (events.ItemModified & flags) return "modified";
+ if (events.RootChanged & flags) return "root-changed";
+ if (events.ItemCloned & flags) return "cloned";
+ if (anyIsTrue(flags)) return "modified";
+ return "unknown";
+}
+function getFileChanges(flags) {
+ return {
+ inode: !!(events.ItemInodeMetaMod & flags),
+ finder: !!(events.ItemFinderInfoMod & flags),
+ access: !!(events.ItemChangeOwner & flags),
+ xattrs: !!(events.ItemXattrMod & flags),
+ };
+}
+
+exports.watch = watch;
+exports.getInfo = getInfo;
+exports.constants = events;
diff --git a/mangashelf-server/node_modules/fsevents/fsevents.node b/mangashelf-server/node_modules/fsevents/fsevents.node
new file mode 100755
index 0000000..1cc3345
Binary files /dev/null and b/mangashelf-server/node_modules/fsevents/fsevents.node differ
diff --git a/mangashelf-server/node_modules/fsevents/package.json b/mangashelf-server/node_modules/fsevents/package.json
new file mode 100644
index 0000000..5d0ee15
--- /dev/null
+++ b/mangashelf-server/node_modules/fsevents/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "fsevents",
+ "version": "2.3.3",
+ "description": "Native Access to MacOS FSEvents",
+ "main": "fsevents.js",
+ "types": "fsevents.d.ts",
+ "os": [
+ "darwin"
+ ],
+ "files": [
+ "fsevents.d.ts",
+ "fsevents.js",
+ "fsevents.node"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ },
+ "scripts": {
+ "clean": "node-gyp clean && rm -f fsevents.node",
+ "build": "node-gyp clean && rm -f fsevents.node && node-gyp rebuild && node-gyp clean",
+ "test": "/bin/bash ./test.sh 2>/dev/null",
+ "prepublishOnly": "npm run build"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/fsevents/fsevents.git"
+ },
+ "keywords": [
+ "fsevents",
+ "mac"
+ ],
+ "contributors": [
+ {
+ "name": "Philipp Dunkel",
+ "email": "pip@pipobscure.com"
+ },
+ {
+ "name": "Ben Noordhuis",
+ "email": "info@bnoordhuis.nl"
+ },
+ {
+ "name": "Elan Shankar",
+ "email": "elan.shanker@gmail.com"
+ },
+ {
+ "name": "Miroslav Bajtoš",
+ "email": "mbajtoss@gmail.com"
+ },
+ {
+ "name": "Paul Miller",
+ "url": "https://paulmillr.com"
+ }
+ ],
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/fsevents/fsevents/issues"
+ },
+ "homepage": "https://github.com/fsevents/fsevents",
+ "devDependencies": {
+ "node-gyp": "^9.4.0"
+ }
+}
diff --git a/mangashelf-server/node_modules/jsonfile/LICENSE b/mangashelf-server/node_modules/jsonfile/LICENSE
deleted file mode 100644
index cb7e807..0000000
--- a/mangashelf-server/node_modules/jsonfile/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2012-2015, JP Richardson
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
-(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
- merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
-OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/mangashelf-server/node_modules/jsonfile/README.md b/mangashelf-server/node_modules/jsonfile/README.md
deleted file mode 100644
index 215dc09..0000000
--- a/mangashelf-server/node_modules/jsonfile/README.md
+++ /dev/null
@@ -1,230 +0,0 @@
-Node.js - jsonfile
-================
-
-Easily read/write JSON files in Node.js. _Note: this module cannot be used in the browser._
-
-[](https://www.npmjs.org/package/jsonfile)
-[](https://github.com/jprichardson/node-jsonfile/actions?query=branch%3Amaster)
-[](https://ci.appveyor.com/project/jprichardson/node-jsonfile/branch/master)
-
-
-
-Why?
-----
-
-Writing `JSON.stringify()` and then `fs.writeFile()` and `JSON.parse()` with `fs.readFile()` enclosed in `try/catch` blocks became annoying.
-
-
-
-Installation
-------------
-
- npm install --save jsonfile
-
-
-
-API
----
-
-* [`readFile(filename, [options], callback)`](#readfilefilename-options-callback)
-* [`readFileSync(filename, [options])`](#readfilesyncfilename-options)
-* [`writeFile(filename, obj, [options], callback)`](#writefilefilename-obj-options-callback)
-* [`writeFileSync(filename, obj, [options])`](#writefilesyncfilename-obj-options)
-
-----
-
-### readFile(filename, [options], callback)
-
-`options` (`object`, default `undefined`): Pass in any [`fs.readFile`](https://nodejs.org/api/fs.html#fs_fs_readfile_path_options_callback) options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
- - `throws` (`boolean`, default: `true`). If `JSON.parse` throws an error, pass this error to the callback.
- If `false`, returns `null` for the object.
-
-
-```js
-const jsonfile = require('jsonfile')
-const file = '/tmp/data.json'
-jsonfile.readFile(file, function (err, obj) {
- if (err) console.error(err)
- console.dir(obj)
-})
-```
-
-You can also use this method with promises. The `readFile` method will return a promise if you do not pass a callback function.
-
-```js
-const jsonfile = require('jsonfile')
-const file = '/tmp/data.json'
-jsonfile.readFile(file)
- .then(obj => console.dir(obj))
- .catch(error => console.error(error))
-```
-
-----
-
-### readFileSync(filename, [options])
-
-`options` (`object`, default `undefined`): Pass in any [`fs.readFileSync`](https://nodejs.org/api/fs.html#fs_fs_readfilesync_path_options) options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
-- `throws` (`boolean`, default: `true`). If an error is encountered reading or parsing the file, throw the error. If `false`, returns `null` for the object.
-
-```js
-const jsonfile = require('jsonfile')
-const file = '/tmp/data.json'
-
-console.dir(jsonfile.readFileSync(file))
-```
-
-----
-
-### writeFile(filename, obj, [options], callback)
-
-`options`: Pass in any [`fs.writeFile`](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces`, or override `EOL` string or set `finalEOL` flag as `false` to not save the file with `EOL` at the end.
-
-
-```js
-const jsonfile = require('jsonfile')
-
-const file = '/tmp/data.json'
-const obj = { name: 'JP' }
-
-jsonfile.writeFile(file, obj, function (err) {
- if (err) console.error(err)
-})
-```
-Or use with promises as follows:
-
-```js
-const jsonfile = require('jsonfile')
-
-const file = '/tmp/data.json'
-const obj = { name: 'JP' }
-
-jsonfile.writeFile(file, obj)
- .then(res => {
- console.log('Write complete')
- })
- .catch(error => console.error(error))
-```
-
-
-**formatting with spaces:**
-
-```js
-const jsonfile = require('jsonfile')
-
-const file = '/tmp/data.json'
-const obj = { name: 'JP' }
-
-jsonfile.writeFile(file, obj, { spaces: 2 }, function (err) {
- if (err) console.error(err)
-})
-```
-
-**overriding EOL:**
-
-```js
-const jsonfile = require('jsonfile')
-
-const file = '/tmp/data.json'
-const obj = { name: 'JP' }
-
-jsonfile.writeFile(file, obj, { spaces: 2, EOL: '\r\n' }, function (err) {
- if (err) console.error(err)
-})
-```
-
-
-**disabling the EOL at the end of file:**
-
-```js
-const jsonfile = require('jsonfile')
-
-const file = '/tmp/data.json'
-const obj = { name: 'JP' }
-
-jsonfile.writeFile(file, obj, { spaces: 2, finalEOL: false }, function (err) {
- if (err) console.log(err)
-})
-```
-
-**appending to an existing JSON file:**
-
-You can use `fs.writeFile` option `{ flag: 'a' }` to achieve this.
-
-```js
-const jsonfile = require('jsonfile')
-
-const file = '/tmp/mayAlreadyExistedData.json'
-const obj = { name: 'JP' }
-
-jsonfile.writeFile(file, obj, { flag: 'a' }, function (err) {
- if (err) console.error(err)
-})
-```
-
-----
-
-### writeFileSync(filename, obj, [options])
-
-`options`: Pass in any [`fs.writeFileSync`](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces`, or override `EOL` string or set `finalEOL` flag as `false` to not save the file with `EOL` at the end.
-
-```js
-const jsonfile = require('jsonfile')
-
-const file = '/tmp/data.json'
-const obj = { name: 'JP' }
-
-jsonfile.writeFileSync(file, obj)
-```
-
-**formatting with spaces:**
-
-```js
-const jsonfile = require('jsonfile')
-
-const file = '/tmp/data.json'
-const obj = { name: 'JP' }
-
-jsonfile.writeFileSync(file, obj, { spaces: 2 })
-```
-
-**overriding EOL:**
-
-```js
-const jsonfile = require('jsonfile')
-
-const file = '/tmp/data.json'
-const obj = { name: 'JP' }
-
-jsonfile.writeFileSync(file, obj, { spaces: 2, EOL: '\r\n' })
-```
-
-**disabling the EOL at the end of file:**
-
-```js
-const jsonfile = require('jsonfile')
-
-const file = '/tmp/data.json'
-const obj = { name: 'JP' }
-
-jsonfile.writeFileSync(file, obj, { spaces: 2, finalEOL: false })
-```
-
-**appending to an existing JSON file:**
-
-You can use `fs.writeFileSync` option `{ flag: 'a' }` to achieve this.
-
-```js
-const jsonfile = require('jsonfile')
-
-const file = '/tmp/mayAlreadyExistedData.json'
-const obj = { name: 'JP' }
-
-jsonfile.writeFileSync(file, obj, { flag: 'a' })
-```
-
-License
--------
-
-(MIT License)
-
-Copyright 2012-2016, JP Richardson
diff --git a/mangashelf-server/node_modules/jsonfile/index.js b/mangashelf-server/node_modules/jsonfile/index.js
deleted file mode 100644
index acd0af2..0000000
--- a/mangashelf-server/node_modules/jsonfile/index.js
+++ /dev/null
@@ -1,88 +0,0 @@
-let _fs
-try {
- _fs = require('graceful-fs')
-} catch (_) {
- _fs = require('fs')
-}
-const universalify = require('universalify')
-const { stringify, stripBom } = require('./utils')
-
-async function _readFile (file, options = {}) {
- if (typeof options === 'string') {
- options = { encoding: options }
- }
-
- const fs = options.fs || _fs
-
- const shouldThrow = 'throws' in options ? options.throws : true
-
- let data = await universalify.fromCallback(fs.readFile)(file, options)
-
- data = stripBom(data)
-
- let obj
- try {
- obj = JSON.parse(data, options ? options.reviver : null)
- } catch (err) {
- if (shouldThrow) {
- err.message = `${file}: ${err.message}`
- throw err
- } else {
- return null
- }
- }
-
- return obj
-}
-
-const readFile = universalify.fromPromise(_readFile)
-
-function readFileSync (file, options = {}) {
- if (typeof options === 'string') {
- options = { encoding: options }
- }
-
- const fs = options.fs || _fs
-
- const shouldThrow = 'throws' in options ? options.throws : true
-
- try {
- let content = fs.readFileSync(file, options)
- content = stripBom(content)
- return JSON.parse(content, options.reviver)
- } catch (err) {
- if (shouldThrow) {
- err.message = `${file}: ${err.message}`
- throw err
- } else {
- return null
- }
- }
-}
-
-async function _writeFile (file, obj, options = {}) {
- const fs = options.fs || _fs
-
- const str = stringify(obj, options)
-
- await universalify.fromCallback(fs.writeFile)(file, str, options)
-}
-
-const writeFile = universalify.fromPromise(_writeFile)
-
-function writeFileSync (file, obj, options = {}) {
- const fs = options.fs || _fs
-
- const str = stringify(obj, options)
- // not sure if fs.writeFileSync returns anything, but just in case
- return fs.writeFileSync(file, str, options)
-}
-
-// NOTE: do not change this export format; required for ESM compat
-// see https://github.com/jprichardson/node-jsonfile/pull/162 for details
-module.exports = {
- readFile,
- readFileSync,
- writeFile,
- writeFileSync
-}
diff --git a/mangashelf-server/node_modules/jsonfile/package.json b/mangashelf-server/node_modules/jsonfile/package.json
deleted file mode 100644
index 0ff96cc..0000000
--- a/mangashelf-server/node_modules/jsonfile/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "jsonfile",
- "version": "6.2.0",
- "description": "Easily read/write JSON files.",
- "repository": {
- "type": "git",
- "url": "git@github.com:jprichardson/node-jsonfile.git"
- },
- "keywords": [
- "read",
- "write",
- "file",
- "json",
- "fs",
- "fs-extra"
- ],
- "author": "JP Richardson ",
- "license": "MIT",
- "dependencies": {
- "universalify": "^2.0.0"
- },
- "optionalDependencies": {
- "graceful-fs": "^4.1.6"
- },
- "devDependencies": {
- "mocha": "^8.2.0",
- "rimraf": "^2.4.0",
- "standard": "^16.0.1"
- },
- "main": "index.js",
- "files": [
- "index.js",
- "utils.js"
- ],
- "scripts": {
- "lint": "standard",
- "test": "npm run lint && npm run unit",
- "unit": "mocha"
- }
-}
diff --git a/mangashelf-server/node_modules/jsonfile/utils.js b/mangashelf-server/node_modules/jsonfile/utils.js
deleted file mode 100644
index b5ff48e..0000000
--- a/mangashelf-server/node_modules/jsonfile/utils.js
+++ /dev/null
@@ -1,14 +0,0 @@
-function stringify (obj, { EOL = '\n', finalEOL = true, replacer = null, spaces } = {}) {
- const EOF = finalEOL ? EOL : ''
- const str = JSON.stringify(obj, replacer, spaces)
-
- return str.replace(/\n/g, EOL) + EOF
-}
-
-function stripBom (content) {
- // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified
- if (Buffer.isBuffer(content)) content = content.toString('utf8')
- return content.replace(/^\uFEFF/, '')
-}
-
-module.exports = { stringify, stripBom }
diff --git a/mangashelf-server/node_modules/sanitize-filename/.airtap.yml b/mangashelf-server/node_modules/sanitize-filename/.airtap.yml
deleted file mode 100644
index eeb4e05..0000000
--- a/mangashelf-server/node_modules/sanitize-filename/.airtap.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-loopback: airtap.local
-browsers:
- - name: chrome
- version: latest
- - name: firefox
- version: latest
- - name: ie
- version: latest
- - name: microsoftedge
- version: latest
- - name: safari
- version: latest
- - name: iphone
- version: latest
- - name: android
- version: latest
diff --git a/mangashelf-server/node_modules/sanitize-filename/.gitmodules b/mangashelf-server/node_modules/sanitize-filename/.gitmodules
deleted file mode 100644
index 23195b0..0000000
--- a/mangashelf-server/node_modules/sanitize-filename/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "big-list-of-naughty-strings"]
- path = vendor/big-list-of-naughty-strings
- url = https://github.com/minimaxir/big-list-of-naughty-strings.git
diff --git a/mangashelf-server/node_modules/sanitize-filename/.travis.yml b/mangashelf-server/node_modules/sanitize-filename/.travis.yml
deleted file mode 100644
index 0c1df19..0000000
--- a/mangashelf-server/node_modules/sanitize-filename/.travis.yml
+++ /dev/null
@@ -1,55 +0,0 @@
-language: node_js
-node_js: node
-
-matrix:
- include:
- # Node versions
- - node_js: 0.10
- - node_js: 0.12
- - node_js: 1
- - node_js: 2
- - node_js: 3
- - node_js: 4
- - node_js: 5
- - node_js: 6
- - node_js: 7
- - node_js: 8
- - node_js: 9
- - node_js: 10
- - node_js: 12
- - node_js: node
-
- # Browser testing
- - env:
- - AIRTAP_TEST=1
- - SAUCE_USERNAME: parshap
- addons:
- sauce_connect: true
- jwt:
- - secure: C7rEgVrfIFovn763aFbXwZrEvTapI1MDDSk8nmU/nseC8Zb++6wCHNbKeGPLaY1kgRNOJbIo9SoHWUoLhGjjHXiNamQfoRPgeD3MXe1qhUskwxOeqpXOFfZv6KEyi3YNjPrjVTgLqK/mfmH2HxHr2HIldP15z40cc5+SLxKS2Fk=
- hosts:
- - airtap.local
-
- # Include all possible file systems
- # Normal builds use AUFS
- # See http://docs.travis-ci.com/user/ci-environment/
- # HFS+
- - os: osx
- # ext4
- - sudo: required
- dist: trusty
- # SIMFS
- - sudo: required
- # NTFS
- - os: windows
-
-script: |
- if [ -n "$AIRTAP_TEST" ]
- then
- # Work around this logic that doesn't work when using jwt by setting
- # TRAVIS_SECURE_ENV_VARS=true.
- # https://github.com/airtap/airtap/blob/00cfae3f38b59f5ff4001cb5e131964e72ab6f24/bin/airtap.js#L6
- TRAVIS_SECURE_ENV_VARS=true npm run test-browser-sauce
- else
- npm test
- fi
diff --git a/mangashelf-server/node_modules/sanitize-filename/AUTHORS b/mangashelf-server/node_modules/sanitize-filename/AUTHORS
deleted file mode 100644
index 6b8abe4..0000000
--- a/mangashelf-server/node_modules/sanitize-filename/AUTHORS
+++ /dev/null
@@ -1,2 +0,0 @@
-Parsha Pourkhomami
-Joel Mukuthu
diff --git a/mangashelf-server/node_modules/sanitize-filename/Changelog.md b/mangashelf-server/node_modules/sanitize-filename/Changelog.md
deleted file mode 100644
index 03624c8..0000000
--- a/mangashelf-server/node_modules/sanitize-filename/Changelog.md
+++ /dev/null
@@ -1,6 +0,0 @@
-## 1.2.0
-
-Check for reserved Windows filenames (`CON`, `PRN`, `AUX`, `NUL`,
-`COM1`, `LPT1`, etc). See [1].
-
-[1] https://github.com/parshap/node-sanitize-filename/issues/9
diff --git a/mangashelf-server/node_modules/sanitize-filename/LICENSE.md b/mangashelf-server/node_modules/sanitize-filename/LICENSE.md
deleted file mode 100644
index f9c323a..0000000
--- a/mangashelf-server/node_modules/sanitize-filename/LICENSE.md
+++ /dev/null
@@ -1,34 +0,0 @@
-This project is licensed under the [WTFPL][] and [ISC][] licenses.
-
-[WTFPL]: https://en.wikipedia.org/wiki/WTFPL
-[ISC]: https://opensource.org/licenses/ISC
-
-## WTFPL
-
-DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
-Version 2, December 2004
-
-Copyright (C) 2004 Sam Hocevar \
-
-Everyone is permitted to copy and distribute verbatim or modified copies
-of this license document, and changing it is allowed as long as the name
-is changed.
-
-DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR
-COPYING, DISTRIBUTION AND MODIFICATION
-
-0. You just DO WHAT THE FUCK YOU WANT TO.
-
-## ISC
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/mangashelf-server/node_modules/sanitize-filename/README.md b/mangashelf-server/node_modules/sanitize-filename/README.md
deleted file mode 100644
index 1287d30..0000000
--- a/mangashelf-server/node_modules/sanitize-filename/README.md
+++ /dev/null
@@ -1,103 +0,0 @@
-# sanitize-filename [](http://travis-ci.org/parshap/node-sanitize-filename)
-
-Sanitize a string to be safe for use as a filename by removing directory
-paths and invalid characters.
-
-## Install
-
-[npm: *sanitize-filename*](https://www.npmjs.com/package/sanitize-filename)
-
-```
-npm install sanitize-filename
-```
-
-## Example
-
-```js
-var sanitize = require("sanitize-filename");
-
-// Some string that may be unsafe or invalid as a filename
-var UNSAFE_USER_INPUT = "~/.\u0000ssh/authorized_keys";
-
-// Sanitize the string to be safe for use as a filename.
-var filename = sanitize(UNSAFE_USER_INPUT);
-// -> "~.sshauthorized_keys"
-```
-
-## Details
-
-*sanitize-filename* removes the following:
-
- * [Control characters][] (`0x00`–`0x1f` and `0x80`–`0x9f`)
- * [Reserved characters][] (`/`, `?`, `<`, `>`, `\`, `:`, `*`, `|`, and
- `"`)
- * Unix reserved filenames (`.` and `..`)
- * Trailing periods and spaces ([for Windows][windows trailing])
- * Windows reserved filenames (`CON`, `PRN`, `AUX`, `NUL`, `COM1`,
- `COM2`, `COM3`, `COM4`, `COM5`, `COM6`, `COM7`, `COM8`, `COM9`,
- `LPT1`, `LPT2`, `LPT3`, `LPT4`, `LPT5`, `LPT6`, `LPT7`, `LPT8`, and
- `LPT9`)
-
-[control characters]: https://en.wikipedia.org/wiki/C0_and_C1_control_codes
-[reserved characters]: https://kb.acronis.com/content/39790
-[windows trailing]: https://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx#Naming_Conventions
-
-The resulting string is truncated to [255 bytes in length][255]. The
-string will not contain any directory paths and will be safe to use as a
-filename.
-
-[255]: http://unix.stackexchange.com/questions/32795/what-is-the-maximum-allowed-filename-and-folder-size-with-ecryptfs
-
-### Empty String `""` Result
-
-An empty string `""` can be returned. For example:
-
-```js
-var sanitize = require("sanitize-filename");
-sanitize("..")
-// -> ""
-
-```
-
-### Non-unique Filenames
-
-Two different inputs can return the same value. For example:
-
-```js
-var sanitize = require("sanitize-filename");
-sanitize("file?")
-// -> "file"
-sanitize ("*file*")
-// -> "file"
-```
-
-### File Systems
-
-Sanitized filenames will be safe for use on modern Windows, OS X, and
-Unix file systems (`NTFS`, `ext`, etc.).
-
-[`FAT` 8.3 filenames][8.3] are not supported.
-
-[8.3]: https://en.wikipedia.org/wiki/8.3_filename
-
-#### Test Your File System
-
-The test program will use various strings (including the [Big List of
-Naughty Strings][blns]) to create files in the working directory. Run
-`npm test` to run tests against your file system.
-
-[blns]: https://github.com/minimaxir/big-list-of-naughty-strings
-
-## API
-
-### `sanitize(inputString, [options])`
-
-Sanitize `inputString` by removing or replacing invalid characters.
-
-Options:
-
- * `options.replacement`: *optional, string/function, default: `""`*. If passed
- as a string, it's used as the replacement for invalid characters. If passed as
- a function, the function will be called with the invalid characters and it's
- return value will be used as the replacement. See [`String.prototype.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)
- for more info.
diff --git a/mangashelf-server/node_modules/sanitize-filename/index.d.ts b/mangashelf-server/node_modules/sanitize-filename/index.d.ts
deleted file mode 100644
index fedab92..0000000
--- a/mangashelf-server/node_modules/sanitize-filename/index.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-declare function sanitize(
- input: string,
- options?: {
- replacement?: string | ((substring: string) => string);
- }
-): string;
-
-export = sanitize;
diff --git a/mangashelf-server/node_modules/sanitize-filename/index.js b/mangashelf-server/node_modules/sanitize-filename/index.js
deleted file mode 100644
index db3f020..0000000
--- a/mangashelf-server/node_modules/sanitize-filename/index.js
+++ /dev/null
@@ -1,59 +0,0 @@
-/*jshint node:true*/
-'use strict';
-
-/**
- * Replaces characters in strings that are illegal/unsafe for filenames.
- * Unsafe characters are either removed or replaced by a substitute set
- * in the optional `options` object.
- *
- * Illegal Characters on Various Operating Systems
- * / ? < > \ : * | "
- * https://kb.acronis.com/content/39790
- *
- * Unicode Control codes
- * C0 0x00-0x1f & C1 (0x80-0x9f)
- * http://en.wikipedia.org/wiki/C0_and_C1_control_codes
- *
- * Reserved filenames on Unix-based systems (".", "..")
- * Reserved filenames in Windows ("CON", "PRN", "AUX", "NUL", "COM1",
- * "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9",
- * "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", and
- * "LPT9") case-insesitively and with or without filename extensions.
- *
- * Capped at 255 characters in length.
- * http://unix.stackexchange.com/questions/32795/what-is-the-maximum-allowed-filename-and-folder-size-with-ecryptfs
- *
- * @param {String} input Original filename
- * @param {Object} options {replacement: String | Function }
- * @return {String} Sanitized filename
- */
-
-var truncate = require("truncate-utf8-bytes");
-
-var illegalRe = /[\/\?<>\\:\*\|"]/g;
-var controlRe = /[\x00-\x1f\x80-\x9f]/g;
-var reservedRe = /^\.+$/;
-var windowsReservedRe = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i;
-var windowsTrailingRe = /[\. ]+$/;
-
-function sanitize(input, replacement) {
- if (typeof input !== 'string') {
- throw new Error('Input must be string');
- }
- var sanitized = input
- .replace(illegalRe, replacement)
- .replace(controlRe, replacement)
- .replace(reservedRe, replacement)
- .replace(windowsReservedRe, replacement)
- .replace(windowsTrailingRe, replacement);
- return truncate(sanitized, 255);
-}
-
-module.exports = function (input, options) {
- var replacement = (options && options.replacement) || '';
- var output = sanitize(input, replacement);
- if (replacement === '') {
- return output;
- }
- return sanitize(output, '');
-};
diff --git a/mangashelf-server/node_modules/sanitize-filename/package.json b/mangashelf-server/node_modules/sanitize-filename/package.json
deleted file mode 100644
index ef49025..0000000
--- a/mangashelf-server/node_modules/sanitize-filename/package.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "name": "sanitize-filename",
- "version": "1.6.3",
- "description": "Sanitize a string for use as a filename",
- "keywords": [
- "file",
- "name",
- "filename",
- "sanitize",
- "validate",
- "escape"
- ],
- "license": "WTFPL OR ISC",
- "author": "Parsha Pourkhomami",
- "main": "index.js",
- "types": "index.d.ts",
- "repository": {
- "type": "git",
- "url": "git@github.com:parshap/node-sanitize-filename.git"
- },
- "scripts": {
- "test": "tape test.js",
- "test-browser": "airtap --local --open -- test.js",
- "test-browser-sauce": "airtap -- test.js"
- },
- "dependencies": {
- "truncate-utf8-bytes": "^1.0.0"
- },
- "devDependencies": {
- "airtap": "^2.0.3",
- "browserify": "^14.0.0",
- "concat-stream": "^1.5.1",
- "mktemp": "^0.4.0",
- "tape": "^4.2.2"
- }
-}
diff --git a/mangashelf-server/node_modules/sanitize-filename/test.js b/mangashelf-server/node_modules/sanitize-filename/test.js
deleted file mode 100644
index 62acc64..0000000
--- a/mangashelf-server/node_modules/sanitize-filename/test.js
+++ /dev/null
@@ -1,305 +0,0 @@
-"use strict";
-
-var test = require("tape"),
- sanitize = require("./");
-
-function repeat(string, times) {
- return new Array(times + 1).join(string);
-}
-
-var REPLACEMENT_OPTS = {
- replacement: "_",
-};
-
-test("valid names", function(t) {
- ["the quick brown fox jumped over the lazy dog.mp3",
- "résumé"].forEach(function(name) {
- t.equal(sanitize(name), name);
- });
- t.end();
-});
-
-test("valid names", function(t) {
- ["valid name.mp3", "résumé"].forEach(function(name) {
- t.equal(sanitize(name, REPLACEMENT_OPTS), name);
- });
- t.end();
-});
-
-test("null character", function(t) {
- t.equal(sanitize("hello\u0000world"), "helloworld");
- t.end();
-});
-
-test("null character", function(t) {
- t.equal(sanitize("hello\u0000world", REPLACEMENT_OPTS), "hello_world");
- t.end();
-});
-
-test("control characters", function(t) {
- t.equal(sanitize("hello\nworld"), "helloworld");
- t.end();
-});
-
-test("control characters", function(t) {
- t.equal(sanitize("hello\nworld", REPLACEMENT_OPTS), "hello_world");
- t.end();
-});
-
-test("restricted codes", function(t) {
- ["h?w", "h/w", "h*w"].forEach(function(name) {
- t.equal(sanitize(name), "hw");
- });
- t.end();
-});
-
-test("restricted codes", function(t) {
- ["h?w", "h/w", "h*w"].forEach(function(name) {
- t.equal(sanitize(name, REPLACEMENT_OPTS), "h_w");
- });
- t.end();
-});
-
-// https://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx
-test("restricted suffixes", function(t) {
- ["mr.", "mr..", "mr ", "mr "].forEach(function(name) {
- t.equal(sanitize(name), "mr");
- });
- t.end();
-});
-
-test("relative paths", function(t) {
- [".", "..", "./", "../", "/..", "/../", "*.|."].forEach(function(name) {
- t.equal(sanitize(name), "");
- });
- t.end();
-});
-
-test("relative path with replacement", function(t) {
- t.equal(sanitize("..", REPLACEMENT_OPTS), "_");
- t.end();
-});
-
-test("reserved filename in Windows", function(t) {
- t.equal(sanitize("con"), "");
- t.equal(sanitize("COM1"), "");
- t.equal(sanitize("PRN."), "");
- t.equal(sanitize("aux.txt"), "");
- t.equal(sanitize("LPT9.asdfasdf"), "");
- t.equal(sanitize("LPT10.txt"), "LPT10.txt");
- t.end();
-});
-
-test("reserved filename in Windows with replacement", function(t) {
- t.equal(sanitize("con", REPLACEMENT_OPTS), "_");
- t.equal(sanitize("COM1", REPLACEMENT_OPTS), "_");
- t.equal(sanitize("PRN.", REPLACEMENT_OPTS), "_");
- t.equal(sanitize("aux.txt", REPLACEMENT_OPTS), "_");
- t.equal(sanitize("LPT9.asdfasdf", REPLACEMENT_OPTS), "_");
- t.equal(sanitize("LPT10.txt", REPLACEMENT_OPTS), "LPT10.txt");
- t.end();
-});
-
-test("invalid replacement", function (t) {
- t.equal(sanitize(".", { replacement: "."}), "");
- t.equal(sanitize("foo?.txt", { replacement: ">"}), "foo.txt");
- t.equal(sanitize("con.txt", { replacement: "aux"}), "");
- t.equal(sanitize("valid.txt", { replacement: "\/:*?\"<>|"}), "valid.txt");
- t.end();
-});
-
-test("255 characters max", function(t) {
- var string = repeat("a", 300);
- t.ok(string.length > 255);
- t.ok(sanitize(string).length <= 255);
- t.end();
-});
-
-// Test the handling of non-BMP chars in UTF-8
-//
-
-test("non-bmp SADDLES the limit", function(t){
- var str25x = repeat("a", 252),
- name = str25x + '\uD800\uDC00';
- t.equal(sanitize(name), str25x);
-
- t.end();
-});
-
-test("non-bmp JUST WITHIN the limit", function(t){
- var str25x = repeat('a', 251),
- name = str25x + '\uD800\uDC00';
- t.equal(sanitize(name), name);
-
- t.end();
-});
-
-test("non-bmp JUST OUTSIDE the limit", function(t){
- var str25x = repeat('a', 253),
- name = str25x + '\uD800\uDC00';
- t.equal(sanitize(name), str25x);
-
- t.end();
-});
-
-// Test invalid input
-//
-
-test("invalid input", function(t) {
- t.throws(function() {
- sanitize();
- }, null, 'no arguments');
-
- [
- undefined,
- null,
- false,
- true,
- {},
- {
- replace: function() {
- return "foo";
- },
- toString: function() {
- return "bar";
- },
- },
- [],
- new Buffer('asdf'),
- ].forEach(function(input) {
- t.throws(function() {
- sanitize(input);
- }, null, JSON.stringify(input));
- });
-
- t.end();
-});
-
-function testStringUsingFS(str, t) {
- var sanitized = sanitize(str) || "default";
- var filepath = path.join(tempdir, sanitized);
-
- // Should not contain any directories or relative paths
- t.equal(path.dirname(path.resolve("/abs/path", sanitized)), path.resolve("/abs/path"));
-
- // Should be max 255 bytes
- t.assert(Buffer.byteLength(sanitized) <= 255, "max 255 bytes");
-
- // Should write and read file to disk
- t.equal(path.dirname(path.normalize(filepath)), tempdir);
- fs.writeFile(filepath, "foobar", function(err) {
- t.ifError(err, "no error writing file");
- fs.readFile(filepath, function(err, data) {
- t.ifError(err, "no error reading file");
- t.equal(data.toString(), "foobar", "file contents equals");
- fs.unlink(filepath, function(err) {
- t.ifError(err, "no error unlinking file");
- t.end();
- });
- });
- });
-}
-
-// Don't run these tests in browser environments
-if ( ! process.browser) {
- // ## Browserify Build
- //
- // Make sure Buffer is not used when building using browserify.
- //
-
- var browserify = require("browserify");
- var concat = require("concat-stream");
-
- test("browserify build", function(t) {
- var bundle = browserify(__dirname).bundle();
- bundle.on("error", t.ifError);
- bundle.pipe(concat(function(data) {
- var source = data.toString();
- t.ok(source.indexOf("Buffer") === -1);
- t.end();
- }));
- });
-
- // ## Filesystem Tests
- //
- // Test writing files to the local filesystem.
- //
-
- var fs = require("fs");
- var path = require("path");
- var mktemp = require("mktemp");
- var tempdir = mktemp.createDirSync("sanitize-filename-test-XXXXXX");
-
- try {
- var blns = require("./vendor/big-list-of-naughty-strings/blns.json");
- }
- catch (err) {
- console.error("Error: Cannot load file './vendor/big-list-of-naughty-strings/blns.json'");
- console.error();
- console.error("Make sure you've initialized git submodules by running");
- console.error();
- console.error(" git submodule update --init");
- console.error();
- process.exit(1);
- }
-
- [].concat(
- [
- repeat("a", 300),
- "the quick brown fox jumped over the lazy dog",
- "résumé",
- "hello\u0000world",
- "hello\nworld",
- "semi;colon.js",
- ";leading-semi.js",
- "slash\\.js",
- "slash/.js",
- "col:on.js",
- "star*.js",
- "question?.js",
- "quote\".js",
- "singlequote'.js",
- "brackts.js",
- "p|pes.js",
- "plus+.js",
- "'five and six
-Parsha Pourkhomami
diff --git a/mangashelf-server/node_modules/truncate-utf8-bytes/README.md b/mangashelf-server/node_modules/truncate-utf8-bytes/README.md
deleted file mode 100644
index 098819e..0000000
--- a/mangashelf-server/node_modules/truncate-utf8-bytes/README.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# truncate-utf8-bytes [](http://travis-ci.org/parshap/truncate-utf8-bytes)
-
-Truncate a string to the given length in bytes. Correctly handles
-multi-byte characters and surrogate pairs.
-
-A browser implementation that doesn't use `Buffer.byteLength` is
-provided to minimize build size.
-
-## Example
-
-```js
-var truncate = require("truncate-utf8-bytes")
-var str = "a☃" // a = 1 byte, ☃ = 3 bytes
-console.log(truncate(str, 2))
-// -> "a"
-```
-
-## API
-
-### `var truncate = require("truncate-utf8-bytes")`
-
-*When using browserify or webpack*, this automatically resolves to an
-implementation that does not use `Buffer.byteLength`.
-
-### `truncate(string, length)`
-
-Returns `string` truncated to at most `length` bytes in length.
diff --git a/mangashelf-server/node_modules/truncate-utf8-bytes/browser.js b/mangashelf-server/node_modules/truncate-utf8-bytes/browser.js
deleted file mode 100644
index f0cfe50..0000000
--- a/mangashelf-server/node_modules/truncate-utf8-bytes/browser.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var truncate = require("./lib/truncate");
-var getLength = require("utf8-byte-length/browser");
-module.exports = truncate.bind(null, getLength);
diff --git a/mangashelf-server/node_modules/truncate-utf8-bytes/index.js b/mangashelf-server/node_modules/truncate-utf8-bytes/index.js
deleted file mode 100644
index 39e899c..0000000
--- a/mangashelf-server/node_modules/truncate-utf8-bytes/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-var truncate = require("./lib/truncate");
-var getLength = Buffer.byteLength.bind(Buffer);
-module.exports = truncate.bind(null, getLength);
diff --git a/mangashelf-server/node_modules/truncate-utf8-bytes/lib/truncate.js b/mangashelf-server/node_modules/truncate-utf8-bytes/lib/truncate.js
deleted file mode 100644
index 3fed3b6..0000000
--- a/mangashelf-server/node_modules/truncate-utf8-bytes/lib/truncate.js
+++ /dev/null
@@ -1,43 +0,0 @@
-'use strict';
-
-function isHighSurrogate(codePoint) {
- return codePoint >= 0xd800 && codePoint <= 0xdbff;
-}
-
-function isLowSurrogate(codePoint) {
- return codePoint >= 0xdc00 && codePoint <= 0xdfff;
-}
-
-// Truncate string by size in bytes
-module.exports = function truncate(getLength, string, byteLength) {
- if (typeof string !== "string") {
- throw new Error("Input must be string");
- }
-
- var charLength = string.length;
- var curByteLength = 0;
- var codePoint;
- var segment;
-
- for (var i = 0; i < charLength; i += 1) {
- codePoint = string.charCodeAt(i);
- segment = string[i];
-
- if (isHighSurrogate(codePoint) && isLowSurrogate(string.charCodeAt(i + 1))) {
- i += 1;
- segment += string[i];
- }
-
- curByteLength += getLength(segment);
-
- if (curByteLength === byteLength) {
- return string.slice(0, i + 1);
- }
- else if (curByteLength > byteLength) {
- return string.slice(0, i - segment.length + 1);
- }
- }
-
- return string;
-};
-
diff --git a/mangashelf-server/node_modules/truncate-utf8-bytes/package.json b/mangashelf-server/node_modules/truncate-utf8-bytes/package.json
deleted file mode 100644
index e0ab984..0000000
--- a/mangashelf-server/node_modules/truncate-utf8-bytes/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "truncate-utf8-bytes",
- "version": "1.0.2",
- "description": "Truncate string to given length in bytes",
- "main": "index.js",
- "browser": "browser.js",
- "scripts": {
- "test": "tape test.js"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/parshap/truncate-utf8-bytes.git"
- },
- "keywords": [
- "truncate",
- "utf8"
- ],
- "author": "Carl Xiong ",
- "license": "WTFPL",
- "bugs": {
- "url": "https://github.com/parshap/truncate-utf8-bytes/issues"
- },
- "homepage": "https://github.com/parshap/truncate-utf8-bytes#readme",
- "devDependencies": {
- "tape": "^4.2.2"
- },
- "dependencies": {
- "utf8-byte-length": "^1.0.1"
- }
-}
diff --git a/mangashelf-server/node_modules/truncate-utf8-bytes/test.js b/mangashelf-server/node_modules/truncate-utf8-bytes/test.js
deleted file mode 100644
index bde24f4..0000000
--- a/mangashelf-server/node_modules/truncate-utf8-bytes/test.js
+++ /dev/null
@@ -1,75 +0,0 @@
-"use strict";
-
-var test = require("tape");
-var truncate = require("./");
-var browserTruncate = require("./browser");
-
-function isHighSurrogate(codePoint) {
- return codePoint >= 0xd800 && codePoint <= 0xdbff;
-}
-
-function repeat(string, times) {
- return new Array(times + 1).join(string);
-}
-
-function assertLengths(t, string, charLength, byteLength) {
- t.equal(string.length, charLength);
- t.equal(Buffer.byteLength(string), byteLength);
-}
-
-// Test writing files to the fs
-//
-
-try {
- var blns = require("./vendor/big-list-of-naughty-strings/blns.json");
-}
-catch (err) {
- console.error("Error: Cannot load file './vendor/big-list-of-naughty-strings/blns.json'");
- console.error();
- console.error("Make sure you've initialized git submodules by running");
- console.error();
- console.error(" git submodule update --init");
- console.error();
- process.exit(1);
-}
-
-// Run tests against both implementations
-[truncate, browserTruncate].forEach(function(truncate) {
- test("strings", function(t) {
- assertLengths(t, truncate("a☃", 2), 1, 1);
- assertLengths(t, truncate(repeat("a", 250) + '\uD800\uDC00', 255), 252, 254);
- assertLengths(t, truncate(repeat("a", 251) + '\uD800\uDC00', 255), 253, 255);
- assertLengths(t, truncate(repeat("a", 252) + '\uD800\uDC00', 255), 252, 252);
- assertLengths(t, truncate(repeat("a", 253) + '\uD800\uDC00', 255), 253, 253);
- assertLengths(t, truncate(repeat("a", 254) + '\uD800\uDC00', 255), 254, 254);
- assertLengths(t, truncate(repeat("a", 255) + '\uD800\uDC00', 255), 255, 255);
- t.end();
- });
-
- // Truncate various strings
- [].concat(
- [
- repeat("a", 300),
- repeat("a", 252) + '\uD800\uDC00',
- repeat("a", 251) + '\uD800\uDC00',
- repeat("a", 253) + '\uD800\uDC00',
- ],
- blns
- ).forEach(function(str) {
- test(JSON.stringify(str), function(t) {
- var i = 0;
- t.equals(truncate(str, 0), "");
- // Truncate string one byte at a time
- while (true) {
- var truncated = truncate(str, i);
- t.ok(Buffer.byteLength(truncated) <= i);
- t.ok( ! isHighSurrogate(truncated[truncated.length - 1]));
- if (truncated === str) {
- break;
- }
- i += 1;
- }
- t.end();
- });
- });
-});
diff --git a/mangashelf-server/node_modules/universalify/LICENSE b/mangashelf-server/node_modules/universalify/LICENSE
deleted file mode 100644
index 514e84e..0000000
--- a/mangashelf-server/node_modules/universalify/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2017, Ryan Zimmerman
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the 'Software'), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/mangashelf-server/node_modules/universalify/README.md b/mangashelf-server/node_modules/universalify/README.md
deleted file mode 100644
index 1184939..0000000
--- a/mangashelf-server/node_modules/universalify/README.md
+++ /dev/null
@@ -1,76 +0,0 @@
-# universalify
-
-
-
-
-
-
-Make a callback- or promise-based function support both promises and callbacks.
-
-Uses the native promise implementation.
-
-## Installation
-
-```bash
-npm install universalify
-```
-
-## API
-
-### `universalify.fromCallback(fn)`
-
-Takes a callback-based function to universalify, and returns the universalified function.
-
-Function must take a callback as the last parameter that will be called with the signature `(error, result)`. `universalify` does not support calling the callback with three or more arguments, and does not ensure that the callback is only called once.
-
-```js
-function callbackFn (n, cb) {
- setTimeout(() => cb(null, n), 15)
-}
-
-const fn = universalify.fromCallback(callbackFn)
-
-// Works with Promises:
-fn('Hello World!')
-.then(result => console.log(result)) // -> Hello World!
-.catch(error => console.error(error))
-
-// Works with Callbacks:
-fn('Hi!', (error, result) => {
- if (error) return console.error(error)
- console.log(result)
- // -> Hi!
-})
-```
-
-### `universalify.fromPromise(fn)`
-
-Takes a promise-based function to universalify, and returns the universalified function.
-
-Function must return a valid JS promise. `universalify` does not ensure that a valid promise is returned.
-
-```js
-function promiseFn (n) {
- return new Promise(resolve => {
- setTimeout(() => resolve(n), 15)
- })
-}
-
-const fn = universalify.fromPromise(promiseFn)
-
-// Works with Promises:
-fn('Hello World!')
-.then(result => console.log(result)) // -> Hello World!
-.catch(error => console.error(error))
-
-// Works with Callbacks:
-fn('Hi!', (error, result) => {
- if (error) return console.error(error)
- console.log(result)
- // -> Hi!
-})
-```
-
-## License
-
-MIT
diff --git a/mangashelf-server/node_modules/universalify/index.js b/mangashelf-server/node_modules/universalify/index.js
deleted file mode 100644
index 233beac..0000000
--- a/mangashelf-server/node_modules/universalify/index.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict'
-
-exports.fromCallback = function (fn) {
- return Object.defineProperty(function (...args) {
- if (typeof args[args.length - 1] === 'function') fn.apply(this, args)
- else {
- return new Promise((resolve, reject) => {
- args.push((err, res) => (err != null) ? reject(err) : resolve(res))
- fn.apply(this, args)
- })
- }
- }, 'name', { value: fn.name })
-}
-
-exports.fromPromise = function (fn) {
- return Object.defineProperty(function (...args) {
- const cb = args[args.length - 1]
- if (typeof cb !== 'function') return fn.apply(this, args)
- else {
- args.pop()
- fn.apply(this, args).then(r => cb(null, r), cb)
- }
- }, 'name', { value: fn.name })
-}
diff --git a/mangashelf-server/node_modules/universalify/package.json b/mangashelf-server/node_modules/universalify/package.json
deleted file mode 100644
index d60fccb..0000000
--- a/mangashelf-server/node_modules/universalify/package.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "universalify",
- "version": "2.0.1",
- "description": "Make a callback- or promise-based function support both promises and callbacks.",
- "keywords": [
- "callback",
- "native",
- "promise"
- ],
- "homepage": "https://github.com/RyanZim/universalify#readme",
- "bugs": "https://github.com/RyanZim/universalify/issues",
- "license": "MIT",
- "author": "Ryan Zimmerman ",
- "files": [
- "index.js"
- ],
- "repository": {
- "type": "git",
- "url": "git+https://github.com/RyanZim/universalify.git"
- },
- "scripts": {
- "test": "standard && nyc --reporter text --reporter lcovonly tape test/*.js | colortape"
- },
- "devDependencies": {
- "colortape": "^0.1.2",
- "coveralls": "^3.0.1",
- "nyc": "^15.0.0",
- "standard": "^14.3.1",
- "tape": "^5.0.1"
- },
- "engines": {
- "node": ">= 10.0.0"
- }
-}
diff --git a/mangashelf-server/node_modules/unrar-promise/document.md b/mangashelf-server/node_modules/unrar-promise/document.md
deleted file mode 100644
index 8ea8bad..0000000
--- a/mangashelf-server/node_modules/unrar-promise/document.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# document
-いわゆる製作メモ。
-
-## TODO
-* 分割ファイル読み込み
- - 対応unrarモジュール待ち。
-* 内部でStream
- - 同上。
-
-
-## testディレクトリ
-- index.mjs
- - テストで実行するモジュール。
-- contents/
- - テストに使う書庫ファイル置き場。
- - example.rar
- - example-encrypted.rar
- - パスワードはそのままpassword.
- - CP932.rar
- - WinRARv5.31で作った日本語名のディレクトリ・ファイルを含む書庫。
- - 現在はUTF-8にパスが変換された上で圧縮されるため、実際にはCP932ではない。
-
-## Mod
-
-### dependencies
-* @honeo/check
- - 型チェックなど。
-* console-wrapper
- - コンソール一括ON/OFF
-* fs-extra
- - fs機能拡張版。
-* node-unrar-js
- - unrar.
-* sanitize-filename
- - 出力ファイルパス正規化。
-
-
-### devDependencies
-* @honeo/test
- * テスト。
-
-
-## 参考
-* [RAR - Wikipedia](https://ja.wikipedia.org/wiki/RAR)
diff --git a/mangashelf-server/node_modules/unrar-promise/index.mjs b/mangashelf-server/node_modules/unrar-promise/index.mjs
deleted file mode 100644
index 091b35c..0000000
--- a/mangashelf-server/node_modules/unrar-promise/index.mjs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Mod
-import _unrar from './lib/unrar.mjs';
-import _list from './lib/list.mjs';
-
-
-export const unrar = _unrar;
-export const list = _list;
-
-export default {
- unrar,
- list
-}
diff --git a/mangashelf-server/node_modules/unrar-promise/lib/list.mjs b/mangashelf-server/node_modules/unrar-promise/lib/list.mjs
deleted file mode 100644
index d9ace87..0000000
--- a/mangashelf-server/node_modules/unrar-promise/lib/list.mjs
+++ /dev/null
@@ -1,82 +0,0 @@
-// Mod
-import console from 'console-wrapper';
-import fse from "fs-extra";
-import path from 'path';
-import sanitize from 'sanitize-filename';
-import Unrar from 'node-unrar-js';
-import {is, not, any} from '@honeo/check';
-
-// Var
-const obj_defaultOp = {}
-
-/*
- コンテンツ一覧を配列で返す。
-
- 引数
- 1: string
- 入力する.rarファイルのパス
- 返り値
- array
-*/
-async function list(input, _options={}){
- console.group('list()');
- console.log(input);
- console.log(_options);
-
- // validation
- if( is.false(
- is.str(input),
- is.arrbuf(input)
- ) ){
- throw new TypeError(`Invalid arguments 1: not string of arraybuffer`);
- }
- if( not.obj(_options) ){
- throw new TypeError(`Invalid arguments 2: not object`);
- }
-
- // var
- const options = {...obj_defaultOp, ..._options}
- const arrbuf = await (async function(){
- if( is.str(input) ){
- console.log('input: path');
- return Uint8Array.from(
- await fse.readFile(input)
- ).buffer;
- }else{
- console.log('input: arraybuffer');
- return input;
- }
- }());
- const extractor = await Unrar.createExtractorFromData({
- data: arrbuf,
- password: options.password
- });
-
- const {arcHeader, fileHeaders} = extractor.getFileList();
- const arr_contents = [];
- let count = 0;
- for(let fileHeader of fileHeaders){
- // 正規化
- const {dir, base} = path.parse(fileHeader.name);
- const base_sanitized = sanitize(base);
- const str_contentPath = path.normalize(
- path.join(dir, base_sanitized)
- );
- const str_contentType = fileHeader.flags.directory ?
- 'directory':
- 'file';
- const obj_content = {
- path: str_contentPath,
- size: fileHeader.packSize,
- type: str_contentType
- }
- console.log(++count, obj_content);
- arr_contents.push(obj_content);
- }
- arr_contents.reverse(); // 直感的にする
- console.log('result', arr_contents);
- console.groupEnd();
- return arr_contents;
-}
-
-export default list;
diff --git a/mangashelf-server/node_modules/unrar-promise/lib/unrar.mjs b/mangashelf-server/node_modules/unrar-promise/lib/unrar.mjs
deleted file mode 100644
index bc40c15..0000000
--- a/mangashelf-server/node_modules/unrar-promise/lib/unrar.mjs
+++ /dev/null
@@ -1,130 +0,0 @@
-// Mod: npm
-import console from 'console-wrapper';
-import fse from "fs-extra";
-import path from 'path';
-import sanitize from 'sanitize-filename';
-import Unrar from 'node-unrar-js';
-import {is, not, any} from '@honeo/check';
-// Local
-import list from './list.mjs';
-
-// Var
-const obj_defaultOp = {
- filter: null,
- overwrite: false,
- sanitize: true
-}
-
-
-/*
- コンテンツを指定して展開する
-
- 引数
- 1: string
- 入力する.rar書庫のパス。
- 2: string
- 出力するディレクトリのパス。
- 返り値
- promise
- 出力先ディレクトリのパス文字列を引数に解決する。
-*/
-async function unrar(input, _output, _options={}){
- console.group('unrar()');
- console.log(_output);
- console.log(_options);
-
- // validation
- if( is.false(
- is.str(input),
- is.arrbuf(input)
- ) ){
- throw new TypeError(`Invalid arguments 1: not string of arraybuffer`);
- }
- if( not.str(_output) ){
- throw new TypeError(`Invalid arguments 2: not string`);
- }
- if( not.obj(_options) ){
- throw new TypeError(`Invalid arguments 3: not object`);
- }
-
- // var
- const output = path.resolve(_output); // 出力先Dirのフルパス化
- const options = {...obj_defaultOp, ..._options}
- const arrbuf = await (async function(){
- if( is.str(input) ){
- console.log('input: path');
- return Uint8Array.from(
- await fse.readFile(input)
- ).buffer;
- }else{
- console.log('input: arraybuffer');
- return input;
- }
- }());
- const isFilter = is.func(options.filter);
-
- const extractor = await Unrar.createExtractorFromData({
- data: arrbuf,
- password: options.password
- });
- const {arcHeader, files} = extractor.extract({});
-
- let count = 0;
- for(let {fileHeader, extraction} of files){
- const isDir = fileHeader.flags.directory;
- console.log(++count, `${isDir?'directory':'file'}: ${fileHeader.name}`);
- // 正規化
- if( options.sanitize ){
- const {dir, base} = path.parse(fileHeader.name);
- const base_sanitized = sanitize(base);
- fileHeader.name = path.normalize(path.join(
- dir,
- base_sanitized
- ));
- }
- const str_outputContentFullpath = path.join(output, fileHeader.name);
-
- // options.filter
- if( isFilter ){
- const type = isDir ?
- 'directory': 'file';
- const str_contentPath = fileHeader.name;
- const isSkip = options.filter({
- type,
- path: str_contentPath,
- size: fileHeader.packSize
- })===false;
- console.log('options.filster:', isSkip);
- if( isSkip ){
- continue;
- }
- }else{
- console.log('options.filter: not function');
- }
-
- // dirなら作成
- if( isDir ){
- console.log(`ensure: ${str_outputContentFullpath}`);
- await fse.ensureDir(str_outputContentFullpath);
- }else{
- // ファイルなら存在確認、あれば上書き許可を確認
- const isAlreadyExists = await fse.existsSync(str_outputContentFullpath);
- if( !options.overwrite && isAlreadyExists ){
- console.log(`skip: ${str_outputContentFullpath}`);
- continue;
- }else if( isAlreadyExists && options.overwrite ){
- console.log(`overwrite: ${str_outputContentFullpath}`);
- }else{
- console.log(`write: ${str_outputContentFullpath}`);
- }
- await fse.outputFile(str_outputContentFullpath, extraction);
- }
- }
-
- console.log(`result: ${output}`);
- console.groupEnd();
- return output;
-}
-
-
-export default unrar;
diff --git a/mangashelf-server/node_modules/unrar-promise/package.json b/mangashelf-server/node_modules/unrar-promise/package.json
deleted file mode 100644
index 909d08c..0000000
--- a/mangashelf-server/node_modules/unrar-promise/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "unrar-promise",
- "version": "3.1.0",
- "description": "かんたん.rar展開モジュール",
- "main": "index.mjs",
- "scripts": {
- "test": "node ./test/index.mjs"
- },
- "author": "honeo",
- "license": "MIT",
- "dependencies": {
- "@honeo/check": "^2.6.0",
- "console-wrapper": "^1.1.0",
- "fs-extra": "^10.0.0",
- "node-unrar-js": "^2.0.0",
- "sanitize-filename": "^1.6.1"
- },
- "devDependencies": {
- "@honeo/test": "^3.3.0"
- },
- "directories": {
- "lib": "lib",
- "test": "test"
- },
- "keywords": [
- "rar",
- "unrar",
- "promise"
- ]
-}
diff --git a/mangashelf-server/node_modules/unrar-promise/readme.md b/mangashelf-server/node_modules/unrar-promise/readme.md
deleted file mode 100644
index aadd51c..0000000
--- a/mangashelf-server/node_modules/unrar-promise/readme.md
+++ /dev/null
@@ -1,98 +0,0 @@
-# unrar-promise
-* [honeo/unrar-promise](https://github.com/honeo/unrar-promise)
-* [unrar-promise](https://www.npmjs.com/package/unrar-promise)
-
-## なにこれ
-かんたん.rar展開モジュール。
-
-## 使い方
-```sh
-$ npm i unrar-promise
-```
-```js
-import {unrar, list} from 'unrar-promise';
-
-await unrar('archive.rar', './output');
-```
-
-## API
-* 出力先について
- - ファイルが既にあればスキップする。
- - ディレクトリがなければ作成する。
-
-### options
-| key | type | default | description |
-|:--------- |:-------- | ------- | --------------------------------------------------------------------- |
-| filter | function | | 出力するコンテンツ毎にobjectを引数に実行され、falseが返ればskipする。 |
-| overwrite | boolean | false | 上書きを許可するか。 |
-| password | string | | 書庫のパスワード。 |
-| sanitize | boolean | true | ファイル名を[node-sanitize-filename](https://github.com/parshap/node-sanitize-filename)で正規化するか。 |
-
-
-### unrar(input, outputDir [, options])
-引数1パスの.rar書庫を引数2のディレクトリへ展開する。
-展開先ディレクトリのパスを引数に解決するpromiseを返す。
-```js
-// .rar path => "output"
-const dirPath = await unrar('hoge.rar', 'output');
-
-// or Buffer<.rar>
-const dirPath = await unrar(arraybuffer, 'output');
-
-// options
-const dirPath = await unrar('hoge.rar', 'output', {
- filter({path, type, size}){
- return type==='file' && /\.txt$/.test(path); // *.txt file only
- },
- overwrite: true,
- password: '123456'
-});
-```
-
-
-### list(input [, options])
-引数1パスの.rar書庫が持つコンテンツ一覧をpromise<[...object]>で取得する。
-```js
-const arr = await list('foobar.rar');
-
-// or Buffer<.rar>
-const arr = await list(arraybuffer);
-
-// example result
-[{
- path: 'foo',
- size: 0,
- type: 'directory'
-}, {
- path: 'foo/bar.txt',
- size: 8,
- type: 'file',
-}]
-
-// options
-const arr = await list('foobar.rar', {
- password: 'qwerty'
-});
-```
-
-
-
-## Breaking Changes
-
-### v2 => v3
-* CJS => ESM.
-* unrar()
- - options.filterに渡されるobject.typeが全て小文字になった。
- - "File" => "file"
- - options.filterに渡されるobject.pathが末尾に"/"を含まなくなった。
- - "foo/" => "foo"
-* list()
- - 返り値を[...string]から[...object]に変更。
- - 返り値のpathが末尾に"/"を含まなくなった。
- - "foo/" => "foo"
-
-### v1 => v2
-* .extract(), extractAll()
- - 廃止して.unrar()に統合。
-* .list()
- - 引数2をstringからobjectに変更。
diff --git a/mangashelf-server/node_modules/unrar-promise/test/contents/CP932.rar b/mangashelf-server/node_modules/unrar-promise/test/contents/CP932.rar
deleted file mode 100644
index a7f9dba..0000000
Binary files a/mangashelf-server/node_modules/unrar-promise/test/contents/CP932.rar and /dev/null differ
diff --git a/mangashelf-server/node_modules/unrar-promise/test/contents/example-encrypted.rar b/mangashelf-server/node_modules/unrar-promise/test/contents/example-encrypted.rar
deleted file mode 100644
index 7a80450..0000000
Binary files a/mangashelf-server/node_modules/unrar-promise/test/contents/example-encrypted.rar and /dev/null differ
diff --git a/mangashelf-server/node_modules/unrar-promise/test/contents/example.rar b/mangashelf-server/node_modules/unrar-promise/test/contents/example.rar
deleted file mode 100644
index 4b66b4e..0000000
Binary files a/mangashelf-server/node_modules/unrar-promise/test/contents/example.rar and /dev/null differ
diff --git a/mangashelf-server/node_modules/unrar-promise/test/index.mjs b/mangashelf-server/node_modules/unrar-promise/test/index.mjs
deleted file mode 100644
index 646d459..0000000
--- a/mangashelf-server/node_modules/unrar-promise/test/index.mjs
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- Test
- テスト用の書庫ファイル ./example.rar をコピーして使う。
- example-encrypted.rarは暗号化されているだけで中身は同じ。
-
- example.rar [
- example [
- hoge.txt,
- foo [
- bar.txt
- ],
- empty []
- ]
- ]
-
-*/
-
-
-// Modules
-// import console from 'console-wrapper';
-import Test from '@honeo/test';
-import {unrar, list} from '../index.mjs';
-import path from 'path';
-import fse from 'fs-extra';
-import {is, not, any} from '@honeo/check';
-
-// Var
-const obj_options = {
- chtmpdir: true,
- console: true,
- exit: true,
- tmpdirOrigin: './test/contents'
-}
-
-// console.enable();
-
-
-Test([
-
- async function(){
- console.log('unrar(rar, cwd)');
- const dirPath = await unrar('example.rar', './');
-
- return is.true(
- dirPath===process.cwd(),
- await fse.exists('example'),
- await fse.exists('example/hoge.txt')
- );
- },
-
- async function(){
- console.log('unrar(buf, cwd)');
- const arraybuffer = Uint8Array.from(
- await fse.readFile('example.rar')
- ).buffer;
- const dirPath = await unrar(arraybuffer, './');
- return is.true(
- dirPath===process.cwd(),
- await fse.exists('example'),
- await fse.exists('example/hoge.txt')
- );
- },
-
- async function(){
- console.log('unrar(rar, NotExistDir)');
- const dirPath = await unrar('example.rar', 'output');
- console.log(
- );
- return is.true(
- dirPath===path.join(process.cwd(), 'output'),
- await fse.exists('./output/example/hoge.txt')
- );
- },
-
- async function(){
- console.log('unrar(rar, cwd) - case overwrite skip');
- await unrar('example.rar', './');
- const stats_before = await fse.stat('example/hoge.txt');
- await unrar('example.rar', './');
- const stats_after = await fse.stat('example/hoge.txt');
- return stats_before.atimeMs===stats_after.atimeMs;
- },
-
- // Atom内臓Node.js(v14)だと何故かコケる
- async function(){
- console.log('unrar(rar, cwd, {overwrite: true})');
- await unrar('example.rar', './');
- const stats_before = await fse.stat('example/hoge.txt');
- await unrar('example.rar', './', {overwrite: true});
- const stats_after = await fse.stat('example/hoge.txt');
- return stats_before.atimeMs!==stats_after.atimeMs;
- },
-
-
- async function(){
- console.log('unrar(rar, cwd, {filter(){}}) - through');
- let count = 0;
- await unrar('example.rar', './', {
- filter({path, type}){
- count++;
- if( !is.str(path, type) ){
- throw new Error('filter');
- }
- }
- });
- return count===5
- },
-
-
- async function(){
- console.log('unrar(rar, cwd, {filter(){}}) - dir only');
- await unrar('example.rar', './', {
- filter({path, type}){
- return type==='directory';
- }
- });
- return is.false(
- await fse.exists('example/foo/bar.txt'),
- await fse.exists('example/hoge.txt')
- );
- },
-
- async function(){
- console.log('unrar(rar-encrypted, cwd, {password})');
- const dirPath = await unrar(
- 'example-encrypted.rar',
- './',
- {password: 'password'}
- );
- return is.true(
- dirPath===process.cwd(),
- await fse.exists('example-encrypted/hoge.txt'),
- await fse.exists('example-encrypted/foo/bar.txt'),
- await fse.exists('example-encrypted/empty')
- );
- },
-
-
- async function(){
- console.log('list(rar)');
- const arr = await list('example.rar');
- return arr.length===5;
- },
-
- async function(){
- console.log('list(buf)');
- const arraybuffer = Uint8Array.from(
- await fse.readFile('example.rar')
- ).buffer;
- const arr = await list(arraybuffer);
- return arr.length===5;
- },
-
- async function(){
- console.log('list(rar-encrypted, {password}');
- const arr = await list(
- 'example-encrypted.rar',
- {password: 'password'}
- );
- return arr.length===5;
- },
-
-
- async function(){
- console.log('list(rar) - 日本語パスを含む書庫');
- const arr = await list('CP932.rar');
- return is.true(
- is.arr(arr),
- arr.length===2,
- arr[0].path==='ディレクトリ',
- arr[1].path===path.normalize('ディレクトリ/テキストファイル.txt')
- );
- }
-
-], obj_options);
diff --git a/mangashelf-server/node_modules/utf8-byte-length/.gitmodules b/mangashelf-server/node_modules/utf8-byte-length/.gitmodules
deleted file mode 100644
index d496220..0000000
--- a/mangashelf-server/node_modules/utf8-byte-length/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "vendor/big-list-of-naughty-strings"]
- path = vendor/big-list-of-naughty-strings
- url = https://github.com/minimaxir/big-list-of-naughty-strings.git
diff --git a/mangashelf-server/node_modules/utf8-byte-length/.travis.yml b/mangashelf-server/node_modules/utf8-byte-length/.travis.yml
deleted file mode 100644
index fab5d8d..0000000
--- a/mangashelf-server/node_modules/utf8-byte-length/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-language: node_js
-node_js:
- - "6"
- - "7"
- - "8"
- - "9"
- - "10"
- - "11"
- - "node"
diff --git a/mangashelf-server/node_modules/utf8-byte-length/AUTHORS b/mangashelf-server/node_modules/utf8-byte-length/AUTHORS
deleted file mode 100644
index 6212900..0000000
--- a/mangashelf-server/node_modules/utf8-byte-length/AUTHORS
+++ /dev/null
@@ -1,2 +0,0 @@
-Carl Xiong
-Parsha Pourkhomami
diff --git a/mangashelf-server/node_modules/utf8-byte-length/LICENSE.MIT.txt b/mangashelf-server/node_modules/utf8-byte-length/LICENSE.MIT.txt
deleted file mode 100644
index d508675..0000000
--- a/mangashelf-server/node_modules/utf8-byte-length/LICENSE.MIT.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Copyright 2023 Carl Xiong & Parsha Pourkhomami
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/mangashelf-server/node_modules/utf8-byte-length/LICENSE.WTFPL.txt b/mangashelf-server/node_modules/utf8-byte-length/LICENSE.WTFPL.txt
deleted file mode 100644
index 5875b20..0000000
--- a/mangashelf-server/node_modules/utf8-byte-length/LICENSE.WTFPL.txt
+++ /dev/null
@@ -1,13 +0,0 @@
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- Version 2, December 2004
-
- Copyright (C) 2004 Sam Hocevar
-
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
-
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. You just DO WHAT THE FUCK YOU WANT TO.
diff --git a/mangashelf-server/node_modules/utf8-byte-length/README.md b/mangashelf-server/node_modules/utf8-byte-length/README.md
deleted file mode 100644
index a232c12..0000000
--- a/mangashelf-server/node_modules/utf8-byte-length/README.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# utf8-byte-length [](http://travis-ci.org/parshap/utf8-byte-length)
-
-Get the utf8 byte length of a string, taking into account multi-byte
-characters and surrogate pairs.
-
-By default, this module defers to `Buffer.byteLength`. A browser
-implementation is also provided that doesn't use `Buffer.byteLength`
-minimize build size.
-
-## Example
-
-```js
-var getLength = require("utf8-byte-length")
-console.log(truncate("a☃", 2)) // a = 1 byte, ☃ = 3 bytes
-// -> 4
-```
-
-## API
-
-### `var getLength = require("utf8-byte-length")`
-
-*When using browserify or webpack*, this automatically resolves to an
-implementation that does not use `Buffer.byteLength`.
-
-### `getLength(string)`
-
-Returns the byte length of `string`. Throws an error if `string` is not
-a string.
diff --git a/mangashelf-server/node_modules/utf8-byte-length/browser.js b/mangashelf-server/node_modules/utf8-byte-length/browser.js
deleted file mode 100644
index a093731..0000000
--- a/mangashelf-server/node_modules/utf8-byte-length/browser.js
+++ /dev/null
@@ -1,47 +0,0 @@
-'use strict';
-
-function isHighSurrogate(codePoint) {
- return codePoint >= 0xd800 && codePoint <= 0xdbff;
-}
-
-function isLowSurrogate(codePoint) {
- return codePoint >= 0xdc00 && codePoint <= 0xdfff;
-}
-
-// Truncate string by size in bytes
-module.exports = function getByteLength(string) {
- if (typeof string !== "string") {
- throw new Error("Input must be string");
- }
-
- var charLength = string.length;
- var byteLength = 0;
- var codePoint = null;
- var prevCodePoint = null;
- for (var i = 0; i < charLength; i++) {
- codePoint = string.charCodeAt(i);
- // handle 4-byte non-BMP chars
- // low surrogate
- if (isLowSurrogate(codePoint)) {
- // when parsing previous hi-surrogate, 3 is added to byteLength
- if (prevCodePoint != null && isHighSurrogate(prevCodePoint)) {
- byteLength += 1;
- }
- else {
- byteLength += 3;
- }
- }
- else if (codePoint <= 0x7f ) {
- byteLength += 1;
- }
- else if (codePoint >= 0x80 && codePoint <= 0x7ff) {
- byteLength += 2;
- }
- else if (codePoint >= 0x800 && codePoint <= 0xffff) {
- byteLength += 3;
- }
- prevCodePoint = codePoint;
- }
-
- return byteLength;
-};
diff --git a/mangashelf-server/node_modules/utf8-byte-length/index.js b/mangashelf-server/node_modules/utf8-byte-length/index.js
deleted file mode 100644
index 921ea6a..0000000
--- a/mangashelf-server/node_modules/utf8-byte-length/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-"use strict";
-
-module.exports = function getByteLength(string) {
- if (typeof string !== "string") {
- throw new Error("Input must be string");
- }
- return Buffer.byteLength(string, "utf8");
-};
diff --git a/mangashelf-server/node_modules/utf8-byte-length/package.json b/mangashelf-server/node_modules/utf8-byte-length/package.json
deleted file mode 100644
index 0824946..0000000
--- a/mangashelf-server/node_modules/utf8-byte-length/package.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "name": "utf8-byte-length",
- "version": "1.0.5",
- "description": "Get utf8 byte length of string",
- "main": "index.js",
- "browser": "browser.js",
- "scripts": {
- "test": "tape test.js"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/parshap/utf8-byte-length.git"
- },
- "keywords": [
- "utf8"
- ],
- "author": "Carl Xiong ",
- "license": "(WTFPL OR MIT)",
- "bugs": {
- "url": "https://github.com/parshap/utf8-byte-length/issues"
- },
- "homepage": "https://github.com/parshap/utf8-byte-length#readme",
- "devDependencies": {
- "tape": "^4.2.2"
- }
-}
diff --git a/mangashelf-server/node_modules/utf8-byte-length/test.js b/mangashelf-server/node_modules/utf8-byte-length/test.js
deleted file mode 100644
index 4f3cdbc..0000000
--- a/mangashelf-server/node_modules/utf8-byte-length/test.js
+++ /dev/null
@@ -1,67 +0,0 @@
-"use strict";
-
-var test = require("tape");
-var getLength = require("./index");
-var browserGetLength = require("./browser");
-
-function repeat(string, times) {
- return new Array(times + 1).join(string);
-}
-
-// Test writing files to the fs
-//
-
-try {
- var blns = require("./vendor/big-list-of-naughty-strings/blns.json");
-}
-catch (err) {
- console.error("Error: Cannot load file './vendor/big-list-of-naughty-strings/blns.json'");
- console.error();
- console.error("Make sure you've initialized git submodules by running");
- console.error();
- console.error(" git submodule update --init");
- console.error();
- process.exit(1);
-}
-
-
-// 8-byte, 4-character string
-var THUMB = "👍🏽";
-
-// Tests run against both implementations
-[getLength, browserGetLength].forEach(function(getLength) {
- // Strings with known lengths
- [
- ["", 0],
- ["a", 1],
- ["☃", 3],
- ["a☃", 4],
- [repeat("a", 250) + '\uD800\uDC00', 254],
- [repeat("a", 251) + '\uD800\uDC00', 255],
- [repeat("a", 252) + '\uD800\uDC00', 256],
- [THUMB, 8],
- [THUMB[0], 3],
- [THUMB[1], 3],
- [THUMB[2], 3],
- [THUMB[3], 3],
- [THUMB.slice(0, 2), 4],
- [THUMB.slice(2, 4), 4],
- [THUMB.slice(1, 3), 6],
- ].forEach(function(desc) {
- var string = desc[0];
- var length = desc[1];
- test(JSON.stringify(string) + "=" + length, function(t) {
- t.equal(getLength(string), length);
- t.end();
- });
- });
-
- // Make sure result matches Buffer.byteLength for various strings
- blns.forEach(function(str) {
- test(JSON.stringify(str), function(t) {
- t.equal(getLength(str), Buffer.byteLength(str));
- t.end();
- });
- });
-});
-
diff --git a/mangashelf-server/package-lock.json b/mangashelf-server/package-lock.json
index 79c60ce..2956936 100644
--- a/mangashelf-server/package-lock.json
+++ b/mangashelf-server/package-lock.json
@@ -15,9 +15,9 @@
"express-rate-limit": "^7.1.5",
"jsonwebtoken": "^9.0.2",
"multer": "^1.4.5-lts.1",
+ "node-unrar-js": "^2.0.2",
"sharp": "^0.32.6",
"sqlite3": "^5.1.6",
- "unrar-promise": "^3.1.0",
"unzipper": "^0.10.14"
},
"devDependencies": {
@@ -31,12 +31,6 @@
"license": "MIT",
"optional": true
},
- "node_modules/@honeo/check": {
- "version": "2.9.0",
- "resolved": "https://registry.npmjs.org/@honeo/check/-/check-2.9.0.tgz",
- "integrity": "sha512-MgThJJkOUkxymRlBAFdhK5+MoBr0AlkJu6dEfXYQfdgg7XCXezZDB8UhksATyS+UTDeza2ILn0WAIsuFkYSoZw==",
- "license": "MIT"
- },
"node_modules/@npmcli/fs": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz",
@@ -783,12 +777,6 @@
"license": "ISC",
"optional": true
},
- "node_modules/console-wrapper": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/console-wrapper/-/console-wrapper-1.1.0.tgz",
- "integrity": "sha512-ZLZSOGpxU2NzKm7qbTMrMgH8w4eRsRVZJJyxli2tn7hH3UiQy0JLfpMUZiyMlzyZOP2kuPTDV9Nfda8nDz32Mw==",
- "license": "MIT"
- },
"node_modules/content-disposition": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
@@ -1218,20 +1206,6 @@
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
"license": "MIT"
},
- "node_modules/fs-extra": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
- "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
- "license": "MIT",
- "dependencies": {
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- },
- "engines": {
- "node": ">=12"
- }
- },
"node_modules/fs-minipass": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
@@ -1762,18 +1736,6 @@
"license": "ISC",
"optional": true
},
- "node_modules/jsonfile": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz",
- "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==",
- "license": "MIT",
- "dependencies": {
- "universalify": "^2.0.0"
- },
- "optionalDependencies": {
- "graceful-fs": "^4.1.6"
- }
- },
"node_modules/jsonwebtoken": {
"version": "9.0.2",
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
@@ -2683,15 +2645,6 @@
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"license": "MIT"
},
- "node_modules/sanitize-filename": {
- "version": "1.6.3",
- "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz",
- "integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==",
- "license": "WTFPL OR ISC",
- "dependencies": {
- "truncate-utf8-bytes": "^1.0.0"
- }
- },
"node_modules/semver": {
"version": "7.7.3",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
@@ -3261,15 +3214,6 @@
"node": "*"
}
},
- "node_modules/truncate-utf8-bytes": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
- "integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==",
- "license": "WTFPL",
- "dependencies": {
- "utf8-byte-length": "^1.0.1"
- }
- },
"node_modules/tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
@@ -3328,15 +3272,6 @@
"imurmurhash": "^0.1.4"
}
},
- "node_modules/universalify": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
- "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
- "license": "MIT",
- "engines": {
- "node": ">= 10.0.0"
- }
- },
"node_modules/unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
@@ -3346,19 +3281,6 @@
"node": ">= 0.8"
}
},
- "node_modules/unrar-promise": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/unrar-promise/-/unrar-promise-3.1.0.tgz",
- "integrity": "sha512-pGWfFP8ioIVtDKYOIDQ1Y7ZnVVszAHlk72mc+hFxqHWOa4ZvB5k+iAHJOmpXF1n9a30iZ8iKKkXDFskqMPuSyw==",
- "license": "MIT",
- "dependencies": {
- "@honeo/check": "^2.6.0",
- "console-wrapper": "^1.1.0",
- "fs-extra": "^10.0.0",
- "node-unrar-js": "^2.0.0",
- "sanitize-filename": "^1.6.1"
- }
- },
"node_modules/unzipper": {
"version": "0.10.14",
"resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.14.tgz",
@@ -3377,12 +3299,6 @@
"setimmediate": "~1.0.4"
}
},
- "node_modules/utf8-byte-length": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz",
- "integrity": "sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA==",
- "license": "(WTFPL OR MIT)"
- },
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
diff --git a/mangashelf-server/package.json b/mangashelf-server/package.json
index d51ef91..48194a2 100644
--- a/mangashelf-server/package.json
+++ b/mangashelf-server/package.json
@@ -15,9 +15,9 @@
"express-rate-limit": "^7.1.5",
"jsonwebtoken": "^9.0.2",
"multer": "^1.4.5-lts.1",
+ "node-unrar-js": "^2.0.2",
"sharp": "^0.32.6",
"sqlite3": "^5.1.6",
- "unrar-promise": "^3.1.0",
"unzipper": "^0.10.14"
},
"devDependencies": {
diff --git a/mangashelf-server/server.js b/mangashelf-server/server.js
index fadaead..8997035 100644
--- a/mangashelf-server/server.js
+++ b/mangashelf-server/server.js
@@ -13,7 +13,7 @@ const bcrypt = require('bcryptjs');
const jwt = require('jsonwebtoken');
const multer = require('multer');
const unzipper = require('unzipper');
-const Unrar = require('unrar-promise');
+const unrar = require('node-unrar-js');
const sharp = require('sharp');
const rateLimit = require('express-rate-limit');
require('dotenv').config();
@@ -330,7 +330,7 @@ const upload = multer({
const allowedTypes = /cbz|zip|cbr|rar/;
const extname = allowedTypes.test(path.extname(file.originalname).toLowerCase());
if (extname) {
- cb(null, true); // Must call cb with null and a boolean
+ cb(null, true);
} else {
cb(new Error('Only CBZ, CBR, ZIP files are allowed'), false);
}
@@ -352,7 +352,7 @@ app.post('/api/upload', authenticateToken, upload.single('comic'), async (req, r
try {
// Create directory for this manga
const mangaDir = path.join('library', `manga_${Date.now()}`);
- await fs.mkdir(mangaDir, { recursive: true });
+ await mkdir(mangaDir, { recursive: true });
// Extract comic file
await extractComic(filePath, mangaDir);
@@ -376,7 +376,7 @@ app.post('/api/upload', authenticateToken, upload.single('comic'), async (req, r
await scanChapters(mangaId, mangaDir);
// Clean up uploaded file
- await fs.unlink(filePath);
+ await unlink(filePath);
res.json({
message: 'Manga uploaded successfully',
@@ -394,60 +394,149 @@ app.post('/api/upload', authenticateToken, upload.single('comic'), async (req, r
async function extractComic(filePath, destDir) {
const fileExt = path.extname(filePath).toLowerCase();
+
+ console.log('Extracting file:', filePath, 'Extension:', fileExt);
if (fileExt === '.cbz' || fileExt === '.zip') {
// Use unzipper for .cbz and .zip files
return new Promise((resolve, reject) => {
- const readStream = fs.createReadStream(filePath);
- const extractStream = unzipper.Extract({ path: destDir });
-
- extractStream.on('entry', (entry) => {
- if (entry.path.includes('../') || entry.path.includes('..\\')) {
- entry.autodrain();
- } else {
- entry.pipe(extractStream);
- }
- });
-
- readStream
- .pipe(extractStream)
- .on('close', resolve)
+ fs.createReadStream(filePath)
+ .pipe(unzipper.Extract({ path: destDir }))
+ .on('close', () => {
+ console.log('ZIP extraction complete');
+ resolve();
+ })
.on('error', reject);
});
} else if (fileExt === '.cbr' || fileExt === '.rar') {
- // Use unrar-promise for .cbr and .rar files
- // This library might need to be used differently
- const unrar = new Unrar(filePath, {
- strip: 0 // Don't strip any path components
- });
-
- return new Promise((resolve, reject) => {
- unrar.extract({
- path: destDir,
- }, (err) => {
- if (err) {
- reject(new Error('Failed to extract RAR archive: ' + err.message));
- } else {
- resolve();
- }
+ // Use node-unrar-js for .cbr and .rar files
+ try {
+ console.log('Reading RAR file...');
+ const buf = fs.readFileSync(filePath);
+
+ // Create extractor
+ const extractor = await unrar.createExtractorFromData({
+ data: buf
});
- });
+
+ console.log('Extracting RAR contents...');
+
+ // Extract all files
+ const extracted = extractor.extractAll();
+
+ // Get the list of extracted files
+ const extractedFiles = [...extracted.files];
+
+ for (const file of extractedFiles) {
+ const { extraction, fileHeader } = file;
+
+ // Skip directories
+ if (fileHeader.flags.directory) continue;
+
+ const destPath = path.join(destDir, fileHeader.name);
+
+ // Create directory if needed
+ const dirPath = path.dirname(destPath);
+ if (!fs.existsSync(dirPath)) {
+ await mkdir(dirPath, { recursive: true });
+ }
+
+ // Write file
+ if (extraction) {
+ fs.writeFileSync(destPath, extraction);
+ }
+ }
+
+ console.log('RAR extraction complete');
+ } catch (err) {
+ console.error('RAR extraction error:', err);
+
+ // Fallback: try using the command line unrar if available
+ try {
+ console.log('Trying fallback RAR extraction...');
+ await extractRarFallback(filePath, destDir);
+ } catch (fallbackError) {
+ console.error('Fallback RAR extraction also failed:', fallbackError);
+ throw new Error('Failed to extract RAR file: ' + err.message);
+ }
+ }
} else {
throw new Error('Unsupported file type: ' + fileExt);
}
}
+// Fallback RAR extraction using command line
+async function extractRarFallback(filePath, destDir) {
+ return new Promise((resolve, reject) => {
+ const { spawn } = require('child_process');
+
+ // Try different unrar command names
+ const commands = ['unrar', 'rar', 'unrar-free'];
+
+ const tryExtract = (index) => {
+ if (index >= commands.length) {
+ reject(new Error('No RAR extraction command found. Please install unrar.'));
+ return;
+ }
+
+ const command = commands[index];
+ const args = ['x', '-o+', filePath, destDir + '/'];
+
+ console.log(`Trying command: ${command} ${args.join(' ')}`);
+
+ const process = spawn(command, args);
+
+ process.on('close', (code) => {
+ if (code === 0) {
+ console.log('Fallback RAR extraction successful');
+ resolve();
+ } else {
+ console.log(`Command ${command} failed with code ${code}, trying next...`);
+ tryExtract(index + 1);
+ }
+ });
+
+ process.on('error', (err) => {
+ console.log(`Command ${command} not found: ${err.message}`);
+ tryExtract(index + 1);
+ });
+ };
+
+ tryExtract(0);
+ });
+}
+
async function generateCover(mangaDir) {
try {
- const files = await readdir(mangaDir);
- const imageFile = files.find(f => /\.(jpg|jpeg|png|webp)$/i.test(f));
+ // Recursively find image files
+ const findImageFiles = async (dir) => {
+ const items = await readdir(dir);
+ const imageFiles = [];
+
+ for (const item of items) {
+ const itemPath = path.join(dir, item);
+ const stats = await stat(itemPath);
+
+ if (stats.isDirectory()) {
+ const subImages = await findImageFiles(itemPath);
+ imageFiles.push(...subImages);
+ } else if (/\.(jpg|jpeg|png|webp)$/i.test(item)) {
+ imageFiles.push(itemPath);
+ }
+ }
+
+ return imageFiles.sort();
+ };
- if (imageFile) {
+ const imageFiles = await findImageFiles(mangaDir);
+
+ if (imageFiles.length > 0) {
+ const firstImage = imageFiles[0];
const coverName = `cover_${Date.now()}.jpg`;
const coverPath = path.join('covers', coverName);
// Resize and optimize cover image
- await sharp(path.join(mangaDir, imageFile))
+ await sharp(firstImage)
.resize(300, 450, { fit: 'cover' })
.jpeg({ quality: 80 })
.toFile(coverPath);
@@ -529,4 +618,4 @@ const startServer = async () => {
});
};
-startServer();
+startServer();
\ No newline at end of file
diff --git a/mangashelf-server/uploads/.DS_Store b/mangashelf-server/uploads/.DS_Store
new file mode 100644
index 0000000..5008ddf
Binary files /dev/null and b/mangashelf-server/uploads/.DS_Store differ
diff --git a/mangashelf-server/uploads/1760128218222-Batman - The Killing Joke.cbr b/mangashelf-server/uploads/1760128218222-Batman - The Killing Joke.cbr
deleted file mode 100644
index 5acd53e..0000000
Binary files a/mangashelf-server/uploads/1760128218222-Batman - The Killing Joke.cbr and /dev/null differ
diff --git a/mangashelf-server/uploads/1760128347543-Batman - The Killing Joke.cbr b/mangashelf-server/uploads/1760128347543-Batman - The Killing Joke.cbr
deleted file mode 100644
index 5acd53e..0000000
Binary files a/mangashelf-server/uploads/1760128347543-Batman - The Killing Joke.cbr and /dev/null differ
diff --git a/mangashelf-server/uploads/1760128402741-Batman - The Killing Joke.cbr b/mangashelf-server/uploads/1760128402741-Batman - The Killing Joke.cbr
deleted file mode 100644
index 5acd53e..0000000
Binary files a/mangashelf-server/uploads/1760128402741-Batman - The Killing Joke.cbr and /dev/null differ
diff --git a/mangashelf-server/uploads/1760128436222-Batman - The Killing Joke.cbr b/mangashelf-server/uploads/1760128436222-Batman - The Killing Joke.cbr
deleted file mode 100644
index 5acd53e..0000000
Binary files a/mangashelf-server/uploads/1760128436222-Batman - The Killing Joke.cbr and /dev/null differ
diff --git a/mangashelf-server/uploads/1760128528973-Batman - The Killing Joke.cbr b/mangashelf-server/uploads/1760128528973-Batman - The Killing Joke.cbr
deleted file mode 100644
index 5acd53e..0000000
Binary files a/mangashelf-server/uploads/1760128528973-Batman - The Killing Joke.cbr and /dev/null differ
diff --git a/mangashelf-server/uploads/1760128564020-Batman - The Killing Joke.cbr b/mangashelf-server/uploads/1760128564020-Batman - The Killing Joke.cbr
deleted file mode 100644
index 5acd53e..0000000
Binary files a/mangashelf-server/uploads/1760128564020-Batman - The Killing Joke.cbr and /dev/null differ
diff --git a/mangashelf-server/uploads/1760130448229-test.cbz b/mangashelf-server/uploads/1760130448229-test.cbz
deleted file mode 100644
index 268b4c8..0000000
Binary files a/mangashelf-server/uploads/1760130448229-test.cbz and /dev/null differ
diff --git a/mangashelf-server/uploads/1760130490063-test.cbz b/mangashelf-server/uploads/1760130490063-test.cbz
deleted file mode 100644
index 268b4c8..0000000
Binary files a/mangashelf-server/uploads/1760130490063-test.cbz and /dev/null differ
diff --git a/mangashelf-server/uploads/1760131627376-test_comic.zip b/mangashelf-server/uploads/1760131627376-test_comic.zip
deleted file mode 100644
index 712d1b7..0000000
Binary files a/mangashelf-server/uploads/1760131627376-test_comic.zip and /dev/null differ
diff --git a/mangashelf-server/uploads/1760132088497-test_comic.zip b/mangashelf-server/uploads/1760132088497-test_comic.zip
deleted file mode 100644
index 712d1b7..0000000
Binary files a/mangashelf-server/uploads/1760132088497-test_comic.zip and /dev/null differ
diff --git a/mangashelf-server/uploads/1760132163976-test_comic.zip b/mangashelf-server/uploads/1760132163976-test_comic.zip
deleted file mode 100644
index 712d1b7..0000000
Binary files a/mangashelf-server/uploads/1760132163976-test_comic.zip and /dev/null differ
diff --git a/mangashelf-server/uploads/1760133440634-test_comic.zip b/mangashelf-server/uploads/1760133440634-test_comic.zip
deleted file mode 100644
index 712d1b7..0000000
Binary files a/mangashelf-server/uploads/1760133440634-test_comic.zip and /dev/null differ
diff --git a/mangashelf-server/uploads/1760133472792-test_comic.zip b/mangashelf-server/uploads/1760133472792-test_comic.zip
deleted file mode 100644
index 712d1b7..0000000
Binary files a/mangashelf-server/uploads/1760133472792-test_comic.zip and /dev/null differ
diff --git a/mangashelf_app/lib/main.dart b/mangashelf_app/lib/main.dart
index 229dc68..9fbab35 100644
--- a/mangashelf_app/lib/main.dart
+++ b/mangashelf_app/lib/main.dart
@@ -11,7 +11,7 @@ import 'package:http_parser/http_parser.dart';
// IMPORTANT: Change this to your computer's IP address for testing on real device
// For emulator, you can use 'http://10.0.2.2:3030' (Android) or 'http://localhost:3030' (iOS)
-const String SERVER_URL = 'http://localhost:3030';
+const String SERVER_URL = 'http://localhost:3000';
void main() {
runApp(MangaShelfApp());
@@ -260,6 +260,7 @@ class HomeScreen extends StatefulWidget {
}
class _HomeScreenState extends State {
+ String status = 'No file selected';
List _mangaList = [];
bool _isLoading = true;
@@ -307,27 +308,38 @@ class _HomeScreenState extends State {
);
}
- Future _uploadManga() async {
- FilePickerResult? result = await FilePicker.platform.pickFiles(
- type: FileType.custom,
- allowedExtensions: ['cbz', 'cbr', 'zip', 'rar'],
- allowMultiple: false,
- );
+Future _uploadManga() async {
+ FilePickerResult? result = await FilePicker.platform.pickFiles(
+ type: FileType.custom,
+ allowedExtensions: ['cbz', 'cbr', 'zip', 'rar'],
+ );
- if (result != null) {
- String filePath = result.files.single.path!;
- PlatformFile file = result.files.single;
-
- // Show upload dialog
+ if (result != null) {
+ // For web, use bytes instead of path
+ final bytes = result.files.single.bytes;
+ final fileName = result.files.single.name;
+
+ if (bytes != null) {
showDialog(
context: context,
- builder: (BuildContext context) {
- return UploadDialog(filePath: filePath, fileName: file.name);
- },
+ builder: (context) => UploadDialogWeb(
+ fileBytes: bytes,
+ fileName: fileName,
+ ),
+ ).then((_) {
+ loadLibrary();
+ });
+ } else {
+ ScaffoldMessenger.of(context).showSnackBar(
+ SnackBar(content: Text('Error reading file')),
);
}
+ } else {
+ ScaffoldMessenger.of(context).showSnackBar(
+ SnackBar(content: Text('No file selected')),
+ );
}
-
+}
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -577,6 +589,132 @@ class _UploadDialogState extends State {
}
}
+// ==================== UPLOAD DIALOG FOR WEB ====================
+class UploadDialogWeb extends StatefulWidget {
+ final Uint8List fileBytes;
+ final String fileName;
+
+ UploadDialogWeb({required this.fileBytes, required this.fileName});
+
+ @override
+ _UploadDialogWebState createState() => _UploadDialogWebState();
+}
+
+class _UploadDialogWebState extends State {
+ final _formKey = GlobalKey();
+ final _titleController = TextEditingController();
+ final _authorController = TextEditingController();
+ final _descriptionController = TextEditingController();
+ bool _isUploading = false;
+
+ @override
+ void initState() {
+ super.initState();
+ String fileNameWithoutExt = widget.fileName.split('.').first;
+ _titleController.text = fileNameWithoutExt;
+ }
+
+ Future _uploadManga() async {
+ if (_formKey.currentState!.validate()) {
+ setState(() => _isUploading = true);
+
+ try {
+ final prefs = await SharedPreferences.getInstance();
+ final token = prefs.getString('auth_token');
+
+ var request = http.MultipartRequest('POST', Uri.parse('$SERVER_URL/api/upload'));
+ request.headers['Authorization'] = 'Bearer $token';
+
+ var multipartFile = http.MultipartFile.fromBytes(
+ 'comic',
+ widget.fileBytes,
+ filename: widget.fileName,
+ contentType: MediaType('application', 'octet-stream'),
+ );
+
+ request.files.add(multipartFile);
+ request.fields['title'] = _titleController.text;
+ request.fields['author'] = _authorController.text;
+ request.fields['description'] = _descriptionController.text;
+
+ var response = await request.send();
+ var responseBody = await response.stream.bytesToString();
+ var result = json.decode(responseBody);
+
+ if (response.statusCode == 200) {
+ ScaffoldMessenger.of(context).showSnackBar(
+ SnackBar(content: Text('Upload successful!')),
+ );
+ Navigator.of(context).pop();
+ } else {
+ throw Exception(result['error'] ?? 'Upload failed');
+ }
+ } catch (e) {
+ ScaffoldMessenger.of(context).showSnackBar(
+ SnackBar(content: Text('Upload failed: $e')),
+ );
+ } finally {
+ setState(() => _isUploading = false);
+ }
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return AlertDialog(
+ title: Text('Upload Comic'),
+ content: Container(
+ width: double.maxFinite,
+ child: Form(
+ key: _formKey,
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ TextFormField(
+ controller: _titleController,
+ decoration: InputDecoration(
+ labelText: 'Title',
+ border: OutlineInputBorder(borderRadius: BorderRadius.circular(8)),
+ ),
+ validator: (value) => value?.isEmpty ?? true ? 'Please enter a title' : null,
+ ),
+ SizedBox(height: 12),
+ TextFormField(
+ controller: _authorController,
+ decoration: InputDecoration(
+ labelText: 'Author',
+ border: OutlineInputBorder(borderRadius: BorderRadius.circular(8)),
+ ),
+ ),
+ SizedBox(height: 12),
+ TextFormField(
+ controller: _descriptionController,
+ maxLines: 3,
+ decoration: InputDecoration(
+ labelText: 'Description',
+ alignLabelWithHint: true,
+ border: OutlineInputBorder(borderRadius: BorderRadius.circular(8)),
+ ),
+ ),
+ SizedBox(height: 16),
+ Text('File: ${widget.fileName}', style: TextStyle(fontSize: 12, color: Colors.grey)),
+ ],
+ ),
+ ),
+ ),
+ actions: [
+ TextButton(onPressed: () => Navigator.of(context).pop(), child: Text('Cancel')),
+ ElevatedButton(
+ onPressed: _isUploading ? null : _uploadManga,
+ style: ElevatedButton.styleFrom(backgroundColor: Colors.purple),
+ child: _isUploading
+ ? SizedBox(width: 20, height: 20, child: CircularProgressIndicator(strokeWidth: 2, valueColor: AlwaysStoppedAnimation(Colors.white)))
+ : Text('Upload'),
+ ),
+ ],
+ );
+ }
+}
// ==================== MANGA CARD WIDGET ====================
class MangaCard extends StatelessWidget {
final Map manga;
diff --git a/test_comics/page1.jpg b/test_comics/page1.jpg
deleted file mode 100644
index e69de29..0000000
diff --git a/test_comics/page2.jpg b/test_comics/page2.jpg
deleted file mode 100644
index e69de29..0000000
diff --git a/test_comics/page3.jpg b/test_comics/page3.jpg
deleted file mode 100644
index e69de29..0000000
diff --git a/test_comics/test.cbz b/test_comics/test.cbz
deleted file mode 100644
index 268b4c8..0000000
Binary files a/test_comics/test.cbz and /dev/null differ
diff --git a/test_comics/test.txt b/test_comics/test.txt
deleted file mode 100644
index 1d4352a..0000000
--- a/test_comics/test.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test comic file