diff --git a/README.md b/README.md
index d62d900..85eb04f 100755
--- a/README.md
+++ b/README.md
@@ -72,9 +72,9 @@ ass was designed with developers in mind. If you are a developer & want somethin
- **Multiple file storage methods**
- Local file system
- Amazon S3, including [DigitalOcean Spaces]
-- **Multiple data storage methods** using [ass StorageEngines]
+- **Multiple data storage methods** using [data engines]
- **File**
- - JSON (default, [ass-storage-engine])
+ - JSON (default, [papito])
- YAML (soon)
- **Database**
- PostgreSQL ([ass-psql])
@@ -84,8 +84,8 @@ ass was designed with developers in mind. If you are a developer & want somethin
[Git Submodules]: https://git-scm.com/book/en/v2/Git-Tools-Submodules
[ZWS]: https://zws.im
[DigitalOcean Spaces]: https://www.digitalocean.com/products/spaces/
-[ass StorageEngines]: #storageengines
-[ass-storage-engine]: https://github.com/tycrek/ass-storage-engine
+[data engines]: #data-engines
+[papito]: https://github.com/tycrek/papito
[ass-psql]: https://github.com/tycrek/ass-psql
[Flameshot]: https://flameshot.org/
[script for ass]: #flameshot-users-linux
@@ -318,23 +318,23 @@ ass is intended to provide a strong backend for developers to build their own fr
[Express.js router]: https://expressjs.com/en/guide/routing.html#express-router
[ctw1]: https://github.com/tycrek/ass/wiki/Writing-a-custom-frontend
-## StorageEngines
+## Data Engines
-[StorageEngines] are responsible for managing your data. "Data" has two parts: an identifier & the actual data itself. With ass, the data is a JSON object representing the uploaded resource. The identifier is the unique ID in the URL returned to the user on upload.
+[Papito data engines] are responsible for managing your data. "Data" has two parts: an identifier & the actual data itself. With ass, the data is a JSON object representing the uploaded resource. The identifier is the unique ID in the URL returned to the user on upload.
-[StorageEngines]: https://github.com/tycrek/ass-storage-engine
+[Papito data engines]: https://github.com/tycrek/papito
-**Supported StorageEngines:**
+**Supported data engines:**
| Name | Description | Links |
| :--: | ----------- | :---: |
-| **JSON** | JSON-based data storage. On disk, data is stored in a JSON file. In memory, data is stored in a [Map]. This is the default StorageEngine. | [GitHub][GH ASE]
[NPM][NPM ASE] |
+| **JSON** | JSON-based data storage. On disk, data is stored in a JSON file. In memory, data is stored in a [Map]. This is the default engine. | [GitHub][GH ASE]
[NPM][NPM ASE] |
| **PostgreSQL** | Data storage using a [PostgreSQL] database. [node-postgres] is used for communicating with the database. | [GitHub][GH APSQL]
[NPM][NPM APSQL] |
| **Mongoose** | Data storage using a [MongoDB] database. [mongoose] is used for communicating with the database. Created by [@dylancl] | [GitHub][GH AMongoose]
[NPM][NPM AMongoose] |
[Map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
-[GH ASE]: https://github.com/tycrek/ass-storage-engine/
-[NPM ASE]: https://www.npmjs.com/package/@tycrek/ass-storage-engine
+[GH ASE]: https://github.com/tycrek/papito/
+[NPM ASE]: https://www.npmjs.com/package/@tycrek/papito
[PostgreSQL]: https://www.postgresql.org/
[node-postgres]: https://node-postgres.com/
[GH APSQL]: https://github.com/tycrek/ass-psql/
@@ -345,17 +345,17 @@ ass is intended to provide a strong backend for developers to build their own fr
[NPM AMongoose]: https://www.npmjs.com/package/ass-mongoose
[@dylancl]: https://github.com/dylancl
-An ass StorageEngine implements support for one type of database (or file, such as JSON or YAML). This lets ass server hosts pick their database of choice, because all they'll have to do is enter the connection/authentication details, and ass will handle the rest, using the resource ID as the key.
+A Papito data engine implements support for one type of database (or file, such as JSON or YAML). This lets ass server hosts pick their database of choice, because all they'll have to do is enter the connection/authentication details, and ass will handle the rest, using the resource ID as the key.
-The only StorageEngine ass comes with by default is **JSON**. If you find or create a StorageEngine you like, you can use it by installing it with `npm i ` then changing the contents of [`data.js`]. The StorageEngines own README file should also instruct how to use it. At this time, a modified `data.js` might look like this:
+The only engine ass comes with by default is **JSON**. If you find or create an engine you like, you can use it by installing it with `npm i ` then changing the contents of [`data.js`]. The engines own README file should also instruct how to use it. At this time, a modified `data.js` might look like this:
```js
/**
* Used for global data management
*/
-//const { JsonStorageEngine } = require('@tycrek/ass-storage-engine');
-const { CustomStorageEngine } = require('my-custom-ass-storage-engine');
+//const { JsonStorageEngine } = require('@tycrek/papito');
+const { CustomStorageEngine } = require('my-custom-papito');
//const data = new JsonStorageEngine();
@@ -372,17 +372,13 @@ module.exports = data1;
```
-As long as the StorageEngine properly implements `GET`/`PUT`/`DEL`/`HAS` StorageFunctions, replacing the file/database system is just that easy.
+As long as the engine properly implements `GET`/`PUT`/`DEL`/`HAS` StorageFunctions, replacing the file/database system is just that easy.
-**For a detailed walkthrough on developing StorageEngines, [consult the wiki][ctw2].**
+**For a detailed walkthrough on developing engines, [consult the wiki][ctw2].**
[`data.js`]: https://github.com/tycrek/ass/blob/master/data.js
[ctw2]: https://github.com/tycrek/ass/wiki/Writing-a-StorageEngine
-#### But why not "DataEngine"?
-
-Because I was dumb & didn't know what to call it, totally forgetting that "storage engine" would also imply a way to store *files*, not just *data*.
-
## npm scripts
ass has a number of pre-made npm scripts for you to use. **All** of these scripts should be run using `npm run ` (except `start`).
diff --git a/package-lock.json b/package-lock.json
index f0f2e66..0951e06 100755
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,10 +10,10 @@
"license": "ISC",
"dependencies": {
"@tsconfig/node14": "^1.0.1",
- "@tycrek/ass-storage-engine": "^0.2.7",
"@tycrek/express-nofavicon": "^1.0.2",
"@tycrek/isprod": "^2.0.2",
"@tycrek/log": ">=0.5.x",
+ "@tycrek/papito": "^0.3.1",
"any-shell-escape": "^0.1.1",
"aws-sdk": "^2.930.0",
"check-node-version": "^4.1.0",
@@ -155,9 +155,9 @@
}
},
"node_modules/@babel/parser": {
- "version": "7.15.3",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz",
- "integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==",
+ "version": "7.15.6",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.6.tgz",
+ "integrity": "sha512-S/TSCcsRuCkmpUuoWijua0Snt+f3ewU/8spLo+4AXJCZfT0bVCzLD5MuOKdrx0mlAptbKzn5AdgEIIKXxXkz9Q==",
"bin": {
"parser": "bin/babel-parser.js"
},
@@ -166,9 +166,9 @@
}
},
"node_modules/@babel/runtime": {
- "version": "7.15.3",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz",
- "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==",
+ "version": "7.15.4",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz",
+ "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==",
"dependencies": {
"regenerator-runtime": "^0.13.4"
},
@@ -177,9 +177,9 @@
}
},
"node_modules/@babel/types": {
- "version": "7.15.0",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.0.tgz",
- "integrity": "sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==",
+ "version": "7.15.6",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz",
+ "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==",
"dependencies": {
"@babel/helper-validator-identifier": "^7.14.9",
"to-fast-properties": "^2.0.0"
@@ -669,35 +669,6 @@
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz",
"integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg=="
},
- "node_modules/@tycrek/ass-storage-engine": {
- "version": "0.2.7",
- "resolved": "https://registry.npmjs.org/@tycrek/ass-storage-engine/-/ass-storage-engine-0.2.7.tgz",
- "integrity": "sha512-bNgUVu4zw2zFGmIL/vZTpwYWX2P+tvAHVwlrtBkIYFH1BIEmpTVYw5mnsu0xYKZU10HbAeKTclBz2lOynIQHFA==",
- "dependencies": {
- "fs-extra": "^10.0.0"
- },
- "engines": {
- "node": ">=14.x.x",
- "npm": ">=7.x.x"
- },
- "funding": {
- "type": "patreon",
- "url": "https://patreon.com/tycrek"
- }
- },
- "node_modules/@tycrek/ass-storage-engine/node_modules/fs-extra": {
- "version": "10.0.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
- "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
- "dependencies": {
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- },
- "engines": {
- "node": ">=12"
- }
- },
"node_modules/@tycrek/express-nofavicon": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@tycrek/express-nofavicon/-/express-nofavicon-1.0.3.tgz",
@@ -731,75 +702,35 @@
"url": "https://patreon.com/tycrek"
}
},
- "node_modules/@types/body-parser": {
- "version": "1.19.1",
- "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.1.tgz",
- "integrity": "sha512-a6bTJ21vFOGIkwM0kzh9Yr89ziVxq4vYH2fQ6N8AeipEzai/cFK6aGMArIkUeIdRIgpwQa+2bXiLuUJCpSf2Cg==",
- "dev": true,
- "dependencies": {
- "@types/connect": "*",
- "@types/node": "*"
- }
- },
- "node_modules/@types/connect": {
- "version": "3.4.35",
- "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz",
- "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==",
- "dev": true,
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/escape-html": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@types/escape-html/-/escape-html-1.0.1.tgz",
- "integrity": "sha512-4mI1FuUUZiuT95fSVqvZxp/ssQK9zsa86S43h9x3zPOSU9BBJ+BfDkXwuaU7BfsD+e7U0/cUUfJFk3iW2M4okA==",
- "dev": true
- },
- "node_modules/@types/express": {
- "version": "4.17.13",
- "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz",
- "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==",
- "dev": true,
- "dependencies": {
- "@types/body-parser": "*",
- "@types/express-serve-static-core": "^4.17.18",
- "@types/qs": "*",
- "@types/serve-static": "*"
- }
- },
- "node_modules/@types/express-serve-static-core": {
- "version": "4.17.24",
- "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.24.tgz",
- "integrity": "sha512-3UJuW+Qxhzwjq3xhwXm2onQcFHn76frIYVbTu+kn24LFxI+dEhdfISDFovPB8VpEgW8oQCTpRuCe+0zJxB7NEA==",
- "dev": true,
+ "node_modules/@tycrek/papito": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/@tycrek/papito/-/papito-0.3.1.tgz",
+ "integrity": "sha512-hhUMqe+rLIMeLEDERq8LoL20wAaEJMF3RH2nONpiz4ihkUjzLyuRwc6DDayyJkrzIdJVohLWcSK3vV3icJ2RCw==",
"dependencies": {
- "@types/node": "*",
- "@types/qs": "*",
- "@types/range-parser": "*"
+ "fs-extra": "^10.0.0"
+ },
+ "engines": {
+ "node": ">=14.x.x",
+ "npm": ">=7.x.x"
+ },
+ "funding": {
+ "type": "patreon",
+ "url": "https://patreon.com/tycrek"
}
},
- "node_modules/@types/ffmpeg-static": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/ffmpeg-static/-/ffmpeg-static-3.0.0.tgz",
- "integrity": "sha512-JTwV8fFQYUgp8VLUKLd8zHfhFOoTTszMlofnWINAZYWSd/iR2ZZHJsWanUhBG4+c8QPfWE8P7t3nAjSxTNjevQ==",
- "dev": true
- },
- "node_modules/@types/fs-extra": {
- "version": "9.0.12",
- "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.12.tgz",
- "integrity": "sha512-I+bsBr67CurCGnSenZZ7v94gd3tc3+Aj2taxMT4yu4ABLuOgOjeFxX3dokG24ztSRg5tnT00sL8BszO7gSMoIw==",
- "dev": true,
+ "node_modules/@tycrek/papito/node_modules/fs-extra": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
+ "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
"dependencies": {
- "@types/node": "*"
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@types/mime": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz",
- "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==",
- "dev": true
- },
"node_modules/@types/node": {
"version": "16.9.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.0.tgz",
@@ -1198,9 +1129,9 @@
}
},
"node_modules/aws-sdk": {
- "version": "2.978.0",
- "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.978.0.tgz",
- "integrity": "sha512-UO1HP2b9FFtPhc5KbzEJ9oMBdzCmVv9nQTb+yIEh6SajcaErmK/ryleLOuPq9EsirE6wgb6mtf2qodRFucUA3g==",
+ "version": "2.987.0",
+ "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.987.0.tgz",
+ "integrity": "sha512-XgMrHWHE3aKg11D4QSlpyLvsGw6mHHiUQuowbswd11k89Q6wEfA+jMbYMC7/jsx3LrH9EKti70qhfZyw/wQIfg==",
"hasInstallScript": true,
"dependencies": {
"buffer": "4.9.2",
@@ -1735,9 +1666,9 @@
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
},
"node_modules/core-util-is": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
},
"node_modules/cross-spawn": {
"version": "6.0.5",
@@ -4593,9 +4524,9 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"node_modules/ws": {
- "version": "7.5.4",
- "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.4.tgz",
- "integrity": "sha512-zP9z6GXm6zC27YtspwH99T3qTG7bBFv2VIkeHstMLrLlDJuzA7tQ5ls3OJ1hOGGCzTQPniNJoHXIAOS0Jljohg==",
+ "version": "7.5.5",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz",
+ "integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==",
"engines": {
"node": ">=8.3.0"
},
@@ -4805,22 +4736,22 @@
}
},
"@babel/parser": {
- "version": "7.15.3",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz",
- "integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA=="
+ "version": "7.15.6",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.6.tgz",
+ "integrity": "sha512-S/TSCcsRuCkmpUuoWijua0Snt+f3ewU/8spLo+4AXJCZfT0bVCzLD5MuOKdrx0mlAptbKzn5AdgEIIKXxXkz9Q=="
},
"@babel/runtime": {
- "version": "7.15.3",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz",
- "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==",
+ "version": "7.15.4",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz",
+ "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
},
"@babel/types": {
- "version": "7.15.0",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.0.tgz",
- "integrity": "sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==",
+ "version": "7.15.6",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz",
+ "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==",
"requires": {
"@babel/helper-validator-identifier": "^7.14.9",
"to-fast-properties": "^2.0.0"
@@ -5189,26 +5120,6 @@
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz",
"integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg=="
},
- "@tycrek/ass-storage-engine": {
- "version": "0.2.7",
- "resolved": "https://registry.npmjs.org/@tycrek/ass-storage-engine/-/ass-storage-engine-0.2.7.tgz",
- "integrity": "sha512-bNgUVu4zw2zFGmIL/vZTpwYWX2P+tvAHVwlrtBkIYFH1BIEmpTVYw5mnsu0xYKZU10HbAeKTclBz2lOynIQHFA==",
- "requires": {
- "fs-extra": "^10.0.0"
- },
- "dependencies": {
- "fs-extra": {
- "version": "10.0.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
- "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
- "requires": {
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- }
- }
- }
- },
"@tycrek/express-nofavicon": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@tycrek/express-nofavicon/-/express-nofavicon-1.0.3.tgz",
@@ -5230,75 +5141,26 @@
"use-climate-change-reminder": "^0.0.7"
}
},
- "@types/body-parser": {
- "version": "1.19.1",
- "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.1.tgz",
- "integrity": "sha512-a6bTJ21vFOGIkwM0kzh9Yr89ziVxq4vYH2fQ6N8AeipEzai/cFK6aGMArIkUeIdRIgpwQa+2bXiLuUJCpSf2Cg==",
- "dev": true,
- "requires": {
- "@types/connect": "*",
- "@types/node": "*"
- }
- },
- "@types/connect": {
- "version": "3.4.35",
- "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz",
- "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==",
- "dev": true,
- "requires": {
- "@types/node": "*"
- }
- },
- "@types/escape-html": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@types/escape-html/-/escape-html-1.0.1.tgz",
- "integrity": "sha512-4mI1FuUUZiuT95fSVqvZxp/ssQK9zsa86S43h9x3zPOSU9BBJ+BfDkXwuaU7BfsD+e7U0/cUUfJFk3iW2M4okA==",
- "dev": true
- },
- "@types/express": {
- "version": "4.17.13",
- "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz",
- "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==",
- "dev": true,
- "requires": {
- "@types/body-parser": "*",
- "@types/express-serve-static-core": "^4.17.18",
- "@types/qs": "*",
- "@types/serve-static": "*"
- }
- },
- "@types/express-serve-static-core": {
- "version": "4.17.24",
- "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.24.tgz",
- "integrity": "sha512-3UJuW+Qxhzwjq3xhwXm2onQcFHn76frIYVbTu+kn24LFxI+dEhdfISDFovPB8VpEgW8oQCTpRuCe+0zJxB7NEA==",
- "dev": true,
- "requires": {
- "@types/node": "*",
- "@types/qs": "*",
- "@types/range-parser": "*"
- }
- },
- "@types/ffmpeg-static": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/ffmpeg-static/-/ffmpeg-static-3.0.0.tgz",
- "integrity": "sha512-JTwV8fFQYUgp8VLUKLd8zHfhFOoTTszMlofnWINAZYWSd/iR2ZZHJsWanUhBG4+c8QPfWE8P7t3nAjSxTNjevQ==",
- "dev": true
- },
- "@types/fs-extra": {
- "version": "9.0.12",
- "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.12.tgz",
- "integrity": "sha512-I+bsBr67CurCGnSenZZ7v94gd3tc3+Aj2taxMT4yu4ABLuOgOjeFxX3dokG24ztSRg5tnT00sL8BszO7gSMoIw==",
- "dev": true,
+ "@tycrek/papito": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/@tycrek/papito/-/papito-0.3.1.tgz",
+ "integrity": "sha512-hhUMqe+rLIMeLEDERq8LoL20wAaEJMF3RH2nONpiz4ihkUjzLyuRwc6DDayyJkrzIdJVohLWcSK3vV3icJ2RCw==",
"requires": {
- "@types/node": "*"
+ "fs-extra": "^10.0.0"
+ },
+ "dependencies": {
+ "fs-extra": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
+ "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
+ "requires": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ }
+ }
}
},
- "@types/mime": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz",
- "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==",
- "dev": true
- },
"@types/node": {
"version": "16.9.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.0.tgz",
@@ -5638,9 +5500,9 @@
"integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg=="
},
"aws-sdk": {
- "version": "2.978.0",
- "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.978.0.tgz",
- "integrity": "sha512-UO1HP2b9FFtPhc5KbzEJ9oMBdzCmVv9nQTb+yIEh6SajcaErmK/ryleLOuPq9EsirE6wgb6mtf2qodRFucUA3g==",
+ "version": "2.987.0",
+ "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.987.0.tgz",
+ "integrity": "sha512-XgMrHWHE3aKg11D4QSlpyLvsGw6mHHiUQuowbswd11k89Q6wEfA+jMbYMC7/jsx3LrH9EKti70qhfZyw/wQIfg==",
"requires": {
"buffer": "4.9.2",
"events": "1.1.1",
@@ -6056,9 +5918,9 @@
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
},
"core-util-is": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
},
"cross-spawn": {
"version": "6.0.5",
@@ -8290,9 +8152,9 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"ws": {
- "version": "7.5.4",
- "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.4.tgz",
- "integrity": "sha512-zP9z6GXm6zC27YtspwH99T3qTG7bBFv2VIkeHstMLrLlDJuzA7tQ5ls3OJ1hOGGCzTQPniNJoHXIAOS0Jljohg==",
+ "version": "7.5.5",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz",
+ "integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==",
"requires": {}
},
"xhr": {
diff --git a/package.json b/package.json
index c9e53e1..582877c 100755
--- a/package.json
+++ b/package.json
@@ -37,10 +37,10 @@
},
"dependencies": {
"@tsconfig/node14": "^1.0.1",
- "@tycrek/ass-storage-engine": "^0.2.7",
"@tycrek/express-nofavicon": "^1.0.2",
"@tycrek/isprod": "^2.0.2",
"@tycrek/log": ">=0.5.x",
+ "@tycrek/papito": "^0.3.1",
"any-shell-escape": "^0.1.1",
"aws-sdk": "^2.930.0",
"check-node-version": "^4.1.0",
diff --git a/src/ass.js b/src/ass.js
index cea0235..d7b9cf4 100644
--- a/src/ass.js
+++ b/src/ass.js
@@ -92,7 +92,7 @@ app.use((err, _req, res, _next) => log.error(err).err(err).callback(() => res.se
log
.info('Users', `${Object.keys(users).length}`)
.info('Files', `${data.size}`)
- .info('StorageEngine', data.name, data.type)
+ .info('Data engine', data.name, data.type)
.info('Frontend', ASS_FRONTEND.enabled ? ASS_FRONTEND.brand : 'disabled', `${ASS_FRONTEND.enabled ? `${getTrueHttp()}${getTrueDomain()}${ASS_FRONTEND.endpoint}` : ''}`)
.info('Custom index', ASS_INDEX ? `enabled` : 'disabled')
.blank()
diff --git a/src/data.ts b/src/data.ts
index e28d932..8ba1ff5 100644
--- a/src/data.ts
+++ b/src/data.ts
@@ -2,6 +2,6 @@
* Used for global data management
*/
-const { JsonStorageEngine } = require('@tycrek/ass-storage-engine');
-const data = new JsonStorageEngine();
+const { JsonDataEngine } = require('@tycrek/papito');
+const data = new JsonDataEngine();
module.exports = data;