🐳 Dockerizing this service
This commit is contained in:
6
.dockerignore
Normal file
6
.dockerignore
Normal file
@@ -0,0 +1,6 @@
|
||||
node_modules
|
||||
npm-debug.log
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
.git
|
||||
.gitignore
|
||||
39
Dockerfile
Normal file
39
Dockerfile
Normal file
@@ -0,0 +1,39 @@
|
||||
FROM node:buster-slim
|
||||
|
||||
# Show all node logs
|
||||
ENV NPM_CONFIG_LOGLEVEL warn
|
||||
ENV MONGO_URI=mongodb://localhost:27017/threetwo
|
||||
|
||||
RUN mkdir /threetwo-import-service
|
||||
WORKDIR /threetwo-import-service
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get install -y \
|
||||
bash git openssh-server \
|
||||
ca-certificates \
|
||||
gcc \
|
||||
libgl1-mesa-glx \
|
||||
python3 python3-pip \
|
||||
qtbase5-dev \
|
||||
wget \
|
||||
xdg-utils \
|
||||
xz-utils \
|
||||
libvips-dev build-essential
|
||||
|
||||
RUN wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin install_dir=/opt isolated=y && \
|
||||
rm -rf /tmp/calibre-installer-cache
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
COPY moleculer.config.ts ./
|
||||
COPY tsconfig.json ./
|
||||
|
||||
RUN npm cache verify
|
||||
# Install Dependncies
|
||||
RUN npm install -g typescript ts-node
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 3000
|
||||
CMD npm run dev
|
||||
44
README.md
44
README.md
@@ -1,40 +1,14 @@
|
||||
[](https://moleculer.services)
|
||||
|
||||
# threetwo-import-service
|
||||
This is a [Moleculer](https://moleculer.services/)-based microservices project. Generated with the [Moleculer CLI](https://moleculer.services/docs/0.14/moleculer-cli.html).
|
||||
|
||||
## Usage
|
||||
Start the project with `npm run dev` command.
|
||||
After starting, open the http://localhost:3000/ URL in your browser.
|
||||
On the welcome page you can test the generated services via API Gateway and check the nodes & services.
|
||||
This microservice houses endpoints for the following functions:
|
||||
|
||||
In the terminal, try the following commands:
|
||||
- `nodes` - List all connected nodes.
|
||||
- `actions` - List all registered service actions.
|
||||
- `call greeter.hello` - Call the `greeter.hello` action.
|
||||
- `call greeter.welcome --name John` - Call the `greeter.welcome` action with the `name` parameter.
|
||||
- `call products.list` - List the products (call the `products.list` action).
|
||||
1. Local import of a comic library into mongo (currently supports `cbr` and `cbz` files)
|
||||
2. Metadata extraction from file, `comicinfo.xml`
|
||||
3. Mongo comic object orchestration
|
||||
4. CRUD operations on `Comic` model
|
||||
5. Helper utils to help with image metadata extraction, file operations and more.
|
||||
|
||||
## Docker Instructions
|
||||
|
||||
## Services
|
||||
- **api**: API Gateway services
|
||||
- **greeter**: Sample service with `hello` and `welcome` actions.
|
||||
- **products**: Sample DB service. To use with MongoDB, set `MONGO_URI` environment variables and install MongoDB adapter with `npm i moleculer-db-adapter-mongo`.
|
||||
|
||||
## Mixins
|
||||
- **db.mixin**: Database access mixin for services. Based on [moleculer-db](https://github.com/moleculerjs/moleculer-db#readme)
|
||||
|
||||
|
||||
## Useful links
|
||||
|
||||
* Moleculer website: https://moleculer.services/
|
||||
* Moleculer Documentation: https://moleculer.services/docs/0.14/
|
||||
|
||||
## NPM scripts
|
||||
|
||||
- `npm run dev`: Start development mode (load all services locally with hot-reload & REPL)
|
||||
- `npm run start`: Start production mode (set `SERVICES` env variable to load certain services)
|
||||
- `npm run cli`: Start a CLI and connect to production. Don't forget to set production namespace with `--ns` argument in script
|
||||
- `npm run lint`: Run ESLint
|
||||
- `npm run ci`: Run continuous test mode with watching
|
||||
- `npm test`: Run tests & generate coverage report
|
||||
1. Build the image using `docker build . -t frishi/threetwo-import-service`. Give it a hot minute.
|
||||
2. Run it using `docker run -it frishi/threetwo-import-service`
|
||||
@@ -1,58 +0,0 @@
|
||||
export interface IFolderResponse {
|
||||
data: Array<IFolderData>;
|
||||
}
|
||||
|
||||
export interface IExtractionOptions {
|
||||
extractTarget: string;
|
||||
sourceFolder: string;
|
||||
targetExtractionFolder: string;
|
||||
paginationOptions: IPaginationOptions;
|
||||
extractionMode: string;
|
||||
}
|
||||
|
||||
export interface IPaginationOptions {
|
||||
pageLimit: number;
|
||||
page: number;
|
||||
}
|
||||
export interface IComicVineSearchMatch {
|
||||
description: string;
|
||||
id: number;
|
||||
volumes: string;
|
||||
}
|
||||
export interface IFolderData {
|
||||
name: string;
|
||||
extension: string;
|
||||
containedIn: string;
|
||||
isFile: boolean;
|
||||
isLink: boolean;
|
||||
}
|
||||
|
||||
export interface IExplodedPathResponse {
|
||||
exploded: Array<string>;
|
||||
fileName: string;
|
||||
}
|
||||
|
||||
export interface IComicBookCoverMetadata {
|
||||
name: string;
|
||||
path: string;
|
||||
containedIn: string;
|
||||
fileSize: string;
|
||||
imageHash: string;
|
||||
dimensions: {
|
||||
width: string;
|
||||
height: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IExtractedComicBookCoverFile {
|
||||
name: string;
|
||||
path: string;
|
||||
fileSize: number;
|
||||
}
|
||||
|
||||
export interface IExtractComicBookCoverErrorResponse {
|
||||
message: string;
|
||||
errorCode: string;
|
||||
data: string;
|
||||
}
|
||||
|
||||
154
package-lock.json
generated
154
package-lock.json
generated
@@ -34,7 +34,6 @@
|
||||
"socket.io": "^4.1.1",
|
||||
"socket.io-stream": "^0.5.3",
|
||||
"typescript": "^3.8.3",
|
||||
"unrar": "github:cnboker/node-unrar",
|
||||
"xml2js": "^0.4.23"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -48,7 +47,7 @@
|
||||
"jest": "^25.1.0",
|
||||
"jest-cli": "^25.1.0",
|
||||
"moleculer-repl": "^0.6.2",
|
||||
"threetwo-ui-typings": "^1.0.2-0",
|
||||
"threetwo-ui-typings": "^1.0.3",
|
||||
"ts-jest": "^25.3.0",
|
||||
"ts-node": "^8.8.1"
|
||||
},
|
||||
@@ -1248,6 +1247,21 @@
|
||||
"resolved": "https://registry.npmjs.org/@root/walk/-/walk-1.1.0.tgz",
|
||||
"integrity": "sha512-FfXPAta9u2dBuaXhPRawBcijNC9rmKVApmbi6lIZyg36VR/7L02ytxoY5K/14PJlHqiBUoYII73cTlekdKTUOw=="
|
||||
},
|
||||
"node_modules/@seald-io/binary-search-tree": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@seald-io/binary-search-tree/-/binary-search-tree-1.0.2.tgz",
|
||||
"integrity": "sha512-+pYGvPFAk7wUR+ONMOlc6A+LUN4kOCFwyPLjyaeS7wVibADPHWYJNYsNtyIAwjF1AXQkuaXElnIc4XjKt55QZA=="
|
||||
},
|
||||
"node_modules/@seald-io/nedb": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@seald-io/nedb/-/nedb-2.0.4.tgz",
|
||||
"integrity": "sha512-QMSMJemcCIVhbcwVg/oASV74Qudl6ex6c1U8IwckxIvFub1TwRQcchMva30qBUIrNGrLgKXM3c+lgwfdlGa55w==",
|
||||
"dependencies": {
|
||||
"@seald-io/binary-search-tree": "^1.0.2",
|
||||
"async": "0.2.10",
|
||||
"localforage": "^1.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@sinonjs/commons": {
|
||||
"version": "1.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz",
|
||||
@@ -2218,14 +2232,6 @@
|
||||
"tweetnacl": "^0.14.3"
|
||||
}
|
||||
},
|
||||
"node_modules/binary-search-tree": {
|
||||
"version": "0.2.5",
|
||||
"resolved": "https://registry.npmjs.org/binary-search-tree/-/binary-search-tree-0.2.5.tgz",
|
||||
"integrity": "sha1-fbs7IQ/coIJFDa0jNMMErzm9x4Q=",
|
||||
"dependencies": {
|
||||
"underscore": "~1.4.4"
|
||||
}
|
||||
},
|
||||
"node_modules/bl": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz",
|
||||
@@ -7402,9 +7408,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/localforage": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/localforage/-/localforage-1.9.0.tgz",
|
||||
"integrity": "sha512-rR1oyNrKulpe+VM9cYmcFn6tsHuokyVHFaCM3+osEmxaHTbEk8oQu6eGDfS6DQLWi/N67XRmB8ECG37OES368g==",
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz",
|
||||
"integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==",
|
||||
"dependencies": {
|
||||
"lie": "3.1.1"
|
||||
}
|
||||
@@ -7816,6 +7822,7 @@
|
||||
"version": "0.5.5",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
|
||||
"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"minimist": "^1.2.5"
|
||||
},
|
||||
@@ -7949,14 +7956,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/moleculer-db": {
|
||||
"version": "0.8.14",
|
||||
"resolved": "https://registry.npmjs.org/moleculer-db/-/moleculer-db-0.8.14.tgz",
|
||||
"integrity": "sha512-nsODdYa/UwQ2weFbFsbfHvLuyqDCUWaVwDf7WOYYs/m4VhwC6g5sPiLBWjqIDJjLQA+Ftkbxh+4zditmherneQ==",
|
||||
"version": "0.8.15",
|
||||
"resolved": "https://registry.npmjs.org/moleculer-db/-/moleculer-db-0.8.15.tgz",
|
||||
"integrity": "sha512-OYc0yts6jPdemzZ/lvIZENDL1MhboRDGTZe8d/Vj8r9bEE7M0rFC3ZDei+F2Qremb8xvUUBixWJeVC+tpjsfOA==",
|
||||
"dependencies": {
|
||||
"@seald-io/nedb": "^2.0.3",
|
||||
"bluebird": "^3.7.2",
|
||||
"flat": "^5.0.2",
|
||||
"lodash": "^4.17.21",
|
||||
"nedb": "^1.8.0"
|
||||
"lodash": "^4.17.21"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.x.x"
|
||||
@@ -8269,18 +8276,6 @@
|
||||
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/nedb": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/nedb/-/nedb-1.8.0.tgz",
|
||||
"integrity": "sha1-DjUCzYLABNU1WkPJ5VV3vXvZHYg=",
|
||||
"dependencies": {
|
||||
"async": "0.2.10",
|
||||
"binary-search-tree": "0.2.5",
|
||||
"localforage": "^1.3.0",
|
||||
"mkdirp": "~0.5.1",
|
||||
"underscore": "~1.4.4"
|
||||
}
|
||||
},
|
||||
"node_modules/negotiator": {
|
||||
"version": "0.6.2",
|
||||
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
|
||||
@@ -8954,9 +8949,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/path-parse": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
|
||||
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
||||
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/path-to-regexp": {
|
||||
@@ -9888,6 +9883,7 @@
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/sane/-/sane-4.1.0.tgz",
|
||||
"integrity": "sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==",
|
||||
"deprecated": "some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@cnakazawa/watch": "^1.0.3",
|
||||
@@ -11291,9 +11287,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/threetwo-ui-typings": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/threetwo-ui-typings/-/threetwo-ui-typings-1.0.2.tgz",
|
||||
"integrity": "sha512-sK5cb/fApFKseQNgcnGmAnPNxDDXT+dQ/Blei1N4q0mduO3kZfJTnlMYaXjO4FDXLP+jkiwsv0bf7PXm0DgF7g==",
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/threetwo-ui-typings/-/threetwo-ui-typings-1.0.3.tgz",
|
||||
"integrity": "sha512-whyTLLMsgDIR6jkrJrz58qiMG8mYXF5V8akBI0okCmsE2djsnVPaihvXcL8bZWH4/HktqC86iJs9F9oYaG/4Ig==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"typescript": "^4.3.2"
|
||||
@@ -11687,11 +11683,6 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/underscore": {
|
||||
"version": "1.4.4",
|
||||
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz",
|
||||
"integrity": "sha1-YaajIBBiKvoHljvzJSA88SI51gQ="
|
||||
},
|
||||
"node_modules/union-value": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
|
||||
@@ -11732,14 +11723,6 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/unrar": {
|
||||
"version": "0.1.7",
|
||||
"resolved": "git+ssh://git@github.com/cnboker/node-unrar.git#5f07cf1672bea8ee23cf01d7c9a5f3451d687c09",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10.21"
|
||||
}
|
||||
},
|
||||
"node_modules/unset-value": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
|
||||
@@ -13238,6 +13221,21 @@
|
||||
"resolved": "https://registry.npmjs.org/@root/walk/-/walk-1.1.0.tgz",
|
||||
"integrity": "sha512-FfXPAta9u2dBuaXhPRawBcijNC9rmKVApmbi6lIZyg36VR/7L02ytxoY5K/14PJlHqiBUoYII73cTlekdKTUOw=="
|
||||
},
|
||||
"@seald-io/binary-search-tree": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@seald-io/binary-search-tree/-/binary-search-tree-1.0.2.tgz",
|
||||
"integrity": "sha512-+pYGvPFAk7wUR+ONMOlc6A+LUN4kOCFwyPLjyaeS7wVibADPHWYJNYsNtyIAwjF1AXQkuaXElnIc4XjKt55QZA=="
|
||||
},
|
||||
"@seald-io/nedb": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@seald-io/nedb/-/nedb-2.0.4.tgz",
|
||||
"integrity": "sha512-QMSMJemcCIVhbcwVg/oASV74Qudl6ex6c1U8IwckxIvFub1TwRQcchMva30qBUIrNGrLgKXM3c+lgwfdlGa55w==",
|
||||
"requires": {
|
||||
"@seald-io/binary-search-tree": "^1.0.2",
|
||||
"async": "0.2.10",
|
||||
"localforage": "^1.9.0"
|
||||
}
|
||||
},
|
||||
"@sinonjs/commons": {
|
||||
"version": "1.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz",
|
||||
@@ -14003,14 +14001,6 @@
|
||||
"tweetnacl": "^0.14.3"
|
||||
}
|
||||
},
|
||||
"binary-search-tree": {
|
||||
"version": "0.2.5",
|
||||
"resolved": "https://registry.npmjs.org/binary-search-tree/-/binary-search-tree-0.2.5.tgz",
|
||||
"integrity": "sha1-fbs7IQ/coIJFDa0jNMMErzm9x4Q=",
|
||||
"requires": {
|
||||
"underscore": "~1.4.4"
|
||||
}
|
||||
},
|
||||
"bl": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz",
|
||||
@@ -18066,9 +18056,9 @@
|
||||
}
|
||||
},
|
||||
"localforage": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/localforage/-/localforage-1.9.0.tgz",
|
||||
"integrity": "sha512-rR1oyNrKulpe+VM9cYmcFn6tsHuokyVHFaCM3+osEmxaHTbEk8oQu6eGDfS6DQLWi/N67XRmB8ECG37OES368g==",
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz",
|
||||
"integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==",
|
||||
"requires": {
|
||||
"lie": "3.1.1"
|
||||
}
|
||||
@@ -18399,6 +18389,7 @@
|
||||
"version": "0.5.5",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
|
||||
"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "^1.2.5"
|
||||
}
|
||||
@@ -18428,14 +18419,14 @@
|
||||
}
|
||||
},
|
||||
"moleculer-db": {
|
||||
"version": "0.8.14",
|
||||
"resolved": "https://registry.npmjs.org/moleculer-db/-/moleculer-db-0.8.14.tgz",
|
||||
"integrity": "sha512-nsODdYa/UwQ2weFbFsbfHvLuyqDCUWaVwDf7WOYYs/m4VhwC6g5sPiLBWjqIDJjLQA+Ftkbxh+4zditmherneQ==",
|
||||
"version": "0.8.15",
|
||||
"resolved": "https://registry.npmjs.org/moleculer-db/-/moleculer-db-0.8.15.tgz",
|
||||
"integrity": "sha512-OYc0yts6jPdemzZ/lvIZENDL1MhboRDGTZe8d/Vj8r9bEE7M0rFC3ZDei+F2Qremb8xvUUBixWJeVC+tpjsfOA==",
|
||||
"requires": {
|
||||
"@seald-io/nedb": "^2.0.3",
|
||||
"bluebird": "^3.7.2",
|
||||
"flat": "^5.0.2",
|
||||
"lodash": "^4.17.21",
|
||||
"nedb": "^1.8.0"
|
||||
"lodash": "^4.17.21"
|
||||
}
|
||||
},
|
||||
"moleculer-db-adapter-mongo": {
|
||||
@@ -18650,18 +18641,6 @@
|
||||
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
|
||||
"dev": true
|
||||
},
|
||||
"nedb": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/nedb/-/nedb-1.8.0.tgz",
|
||||
"integrity": "sha1-DjUCzYLABNU1WkPJ5VV3vXvZHYg=",
|
||||
"requires": {
|
||||
"async": "0.2.10",
|
||||
"binary-search-tree": "0.2.5",
|
||||
"localforage": "^1.3.0",
|
||||
"mkdirp": "~0.5.1",
|
||||
"underscore": "~1.4.4"
|
||||
}
|
||||
},
|
||||
"negotiator": {
|
||||
"version": "0.6.2",
|
||||
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
|
||||
@@ -19186,9 +19165,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"path-parse": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
|
||||
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
||||
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
|
||||
"dev": true
|
||||
},
|
||||
"path-to-regexp": {
|
||||
@@ -21059,9 +21038,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"threetwo-ui-typings": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/threetwo-ui-typings/-/threetwo-ui-typings-1.0.2.tgz",
|
||||
"integrity": "sha512-sK5cb/fApFKseQNgcnGmAnPNxDDXT+dQ/Blei1N4q0mduO3kZfJTnlMYaXjO4FDXLP+jkiwsv0bf7PXm0DgF7g==",
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/threetwo-ui-typings/-/threetwo-ui-typings-1.0.3.tgz",
|
||||
"integrity": "sha512-whyTLLMsgDIR6jkrJrz58qiMG8mYXF5V8akBI0okCmsE2djsnVPaihvXcL8bZWH4/HktqC86iJs9F9oYaG/4Ig==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"typescript": "^4.3.2"
|
||||
@@ -21369,11 +21348,6 @@
|
||||
"which-boxed-primitive": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"underscore": {
|
||||
"version": "1.4.4",
|
||||
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz",
|
||||
"integrity": "sha1-YaajIBBiKvoHljvzJSA88SI51gQ="
|
||||
},
|
||||
"union-value": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
|
||||
@@ -21404,10 +21378,6 @@
|
||||
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
||||
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
|
||||
},
|
||||
"unrar": {
|
||||
"version": "git+ssh://git@github.com/cnboker/node-unrar.git#5f07cf1672bea8ee23cf01d7c9a5f3451d687c09",
|
||||
"from": "unrar@github:cnboker/node-unrar"
|
||||
},
|
||||
"unset-value": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"jest": "^25.1.0",
|
||||
"jest-cli": "^25.1.0",
|
||||
"moleculer-repl": "^0.6.2",
|
||||
"threetwo-ui-typings": "^1.0.2-0",
|
||||
"threetwo-ui-typings": "^1.0.3",
|
||||
"ts-jest": "^25.3.0",
|
||||
"ts-node": "^8.8.1"
|
||||
},
|
||||
@@ -59,7 +59,6 @@
|
||||
"socket.io": "^4.1.1",
|
||||
"socket.io-stream": "^0.5.3",
|
||||
"typescript": "^3.8.3",
|
||||
"unrar": "github:cnboker/node-unrar",
|
||||
"xml2js": "^0.4.23"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
IExtractedComicBookCoverFile,
|
||||
IExtractionOptions,
|
||||
IFolderData,
|
||||
} from "../interfaces/folder.interface";
|
||||
} from "threetwo-ui-typings";
|
||||
import { logger } from "./logger.utils";
|
||||
import { includes, remove, indexOf } from "lodash";
|
||||
|
||||
|
||||
73
yarn.lock
73
yarn.lock
@@ -555,6 +555,20 @@
|
||||
"resolved" "https://registry.npmjs.org/@root/walk/-/walk-1.1.0.tgz"
|
||||
"version" "1.1.0"
|
||||
|
||||
"@seald-io/binary-search-tree@^1.0.2":
|
||||
"integrity" "sha512-+pYGvPFAk7wUR+ONMOlc6A+LUN4kOCFwyPLjyaeS7wVibADPHWYJNYsNtyIAwjF1AXQkuaXElnIc4XjKt55QZA=="
|
||||
"resolved" "https://registry.npmjs.org/@seald-io/binary-search-tree/-/binary-search-tree-1.0.2.tgz"
|
||||
"version" "1.0.2"
|
||||
|
||||
"@seald-io/nedb@^2.0.3":
|
||||
"integrity" "sha512-QMSMJemcCIVhbcwVg/oASV74Qudl6ex6c1U8IwckxIvFub1TwRQcchMva30qBUIrNGrLgKXM3c+lgwfdlGa55w=="
|
||||
"resolved" "https://registry.npmjs.org/@seald-io/nedb/-/nedb-2.0.4.tgz"
|
||||
"version" "2.0.4"
|
||||
dependencies:
|
||||
"@seald-io/binary-search-tree" "^1.0.2"
|
||||
"async" "0.2.10"
|
||||
"localforage" "^1.9.0"
|
||||
|
||||
"@sinonjs/commons@^1.7.0":
|
||||
"integrity" "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ=="
|
||||
"resolved" "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz"
|
||||
@@ -1173,13 +1187,6 @@
|
||||
dependencies:
|
||||
"tweetnacl" "^0.14.3"
|
||||
|
||||
"binary-search-tree@0.2.5":
|
||||
"integrity" "sha1-fbs7IQ/coIJFDa0jNMMErzm9x4Q="
|
||||
"resolved" "https://registry.npmjs.org/binary-search-tree/-/binary-search-tree-0.2.5.tgz"
|
||||
"version" "0.2.5"
|
||||
dependencies:
|
||||
"underscore" "~1.4.4"
|
||||
|
||||
"bl@^2.2.1":
|
||||
"integrity" "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g=="
|
||||
"resolved" "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz"
|
||||
@@ -3840,10 +3847,10 @@
|
||||
"pify" "^2.0.0"
|
||||
"strip-bom" "^3.0.0"
|
||||
|
||||
"localforage@^1.3.0":
|
||||
"integrity" "sha512-rR1oyNrKulpe+VM9cYmcFn6tsHuokyVHFaCM3+osEmxaHTbEk8oQu6eGDfS6DQLWi/N67XRmB8ECG37OES368g=="
|
||||
"resolved" "https://registry.npmjs.org/localforage/-/localforage-1.9.0.tgz"
|
||||
"version" "1.9.0"
|
||||
"localforage@^1.9.0":
|
||||
"integrity" "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg=="
|
||||
"resolved" "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz"
|
||||
"version" "1.10.0"
|
||||
dependencies:
|
||||
"lie" "3.1.1"
|
||||
|
||||
@@ -4082,7 +4089,7 @@
|
||||
"resolved" "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz"
|
||||
"version" "0.5.3"
|
||||
|
||||
"mkdirp@^0.5.1", "mkdirp@~0.5.1", "mkdirp@0.x":
|
||||
"mkdirp@^0.5.1", "mkdirp@0.x":
|
||||
"integrity" "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ=="
|
||||
"resolved" "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz"
|
||||
"version" "0.5.5"
|
||||
@@ -4107,14 +4114,14 @@
|
||||
"lodash" "^4.17.20"
|
||||
|
||||
"moleculer-db@^0.8.13":
|
||||
"integrity" "sha512-nsODdYa/UwQ2weFbFsbfHvLuyqDCUWaVwDf7WOYYs/m4VhwC6g5sPiLBWjqIDJjLQA+Ftkbxh+4zditmherneQ=="
|
||||
"resolved" "https://registry.npmjs.org/moleculer-db/-/moleculer-db-0.8.14.tgz"
|
||||
"version" "0.8.14"
|
||||
"integrity" "sha512-OYc0yts6jPdemzZ/lvIZENDL1MhboRDGTZe8d/Vj8r9bEE7M0rFC3ZDei+F2Qremb8xvUUBixWJeVC+tpjsfOA=="
|
||||
"resolved" "https://registry.npmjs.org/moleculer-db/-/moleculer-db-0.8.15.tgz"
|
||||
"version" "0.8.15"
|
||||
dependencies:
|
||||
"@seald-io/nedb" "^2.0.3"
|
||||
"bluebird" "^3.7.2"
|
||||
"flat" "^5.0.2"
|
||||
"lodash" "^4.17.21"
|
||||
"nedb" "^1.8.0"
|
||||
|
||||
"moleculer-repl@^0.6.2":
|
||||
"integrity" "sha512-SxMwbWUzAkNZuMn3IFPUkl7gD1YOpKxT4ljBsz1ddafYd+iYi3ISxLuYjZAlz8dEHNbuTgkvMYyH4pzgkz2BGw=="
|
||||
@@ -4284,17 +4291,6 @@
|
||||
"resolved" "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz"
|
||||
"version" "1.4.0"
|
||||
|
||||
"nedb@^1.8.0":
|
||||
"integrity" "sha1-DjUCzYLABNU1WkPJ5VV3vXvZHYg="
|
||||
"resolved" "https://registry.npmjs.org/nedb/-/nedb-1.8.0.tgz"
|
||||
"version" "1.8.0"
|
||||
dependencies:
|
||||
"async" "0.2.10"
|
||||
"binary-search-tree" "0.2.5"
|
||||
"localforage" "^1.3.0"
|
||||
"mkdirp" "~0.5.1"
|
||||
"underscore" "~1.4.4"
|
||||
|
||||
"negotiator@0.6.2":
|
||||
"integrity" "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
|
||||
"resolved" "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz"
|
||||
@@ -4702,9 +4698,9 @@
|
||||
"version" "3.1.1"
|
||||
|
||||
"path-parse@^1.0.6":
|
||||
"integrity" "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
|
||||
"resolved" "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz"
|
||||
"version" "1.0.6"
|
||||
"integrity" "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
|
||||
"resolved" "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz"
|
||||
"version" "1.0.7"
|
||||
|
||||
"path-to-regexp@^3.1.0":
|
||||
"integrity" "sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA=="
|
||||
@@ -5896,10 +5892,10 @@
|
||||
"resolved" "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz"
|
||||
"version" "0.2.0"
|
||||
|
||||
"threetwo-ui-typings@^1.0.2-0":
|
||||
"integrity" "sha512-sK5cb/fApFKseQNgcnGmAnPNxDDXT+dQ/Blei1N4q0mduO3kZfJTnlMYaXjO4FDXLP+jkiwsv0bf7PXm0DgF7g=="
|
||||
"resolved" "https://registry.npmjs.org/threetwo-ui-typings/-/threetwo-ui-typings-1.0.2.tgz"
|
||||
"version" "1.0.2"
|
||||
"threetwo-ui-typings@^1.0.3":
|
||||
"integrity" "sha512-whyTLLMsgDIR6jkrJrz58qiMG8mYXF5V8akBI0okCmsE2djsnVPaihvXcL8bZWH4/HktqC86iJs9F9oYaG/4Ig=="
|
||||
"resolved" "https://registry.npmjs.org/threetwo-ui-typings/-/threetwo-ui-typings-1.0.3.tgz"
|
||||
"version" "1.0.3"
|
||||
dependencies:
|
||||
"typescript" "^4.3.2"
|
||||
|
||||
@@ -6162,11 +6158,6 @@
|
||||
"has-symbols" "^1.0.2"
|
||||
"which-boxed-primitive" "^1.0.2"
|
||||
|
||||
"underscore@~1.4.4":
|
||||
"integrity" "sha1-YaajIBBiKvoHljvzJSA88SI51gQ="
|
||||
"resolved" "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz"
|
||||
"version" "1.4.4"
|
||||
|
||||
"union-value@^1.0.0":
|
||||
"integrity" "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg=="
|
||||
"resolved" "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz"
|
||||
@@ -6187,10 +6178,6 @@
|
||||
"resolved" "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
|
||||
"version" "1.0.0"
|
||||
|
||||
"unrar@github:cnboker/node-unrar":
|
||||
"resolved" "git+ssh://git@github.com/cnboker/node-unrar.git#5f07cf1672bea8ee23cf01d7c9a5f3451d687c09"
|
||||
"version" "0.1.7"
|
||||
|
||||
"unset-value@^1.0.0":
|
||||
"integrity" "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk="
|
||||
"resolved" "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz"
|
||||
|
||||
Reference in New Issue
Block a user