From 0c4a6dcdac9793718c6544e7ce4d760388d7819c Mon Sep 17 00:00:00 2001 From: MicBlaze <133346323+MicBlaze@users.noreply.github.com> Date: Fri, 12 May 2023 02:25:21 -0700 Subject: [PATCH 01/26] adjust package.json for pkg packing --- package.json | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 479282a18..cbb2078b8 100644 --- a/package.json +++ b/package.json @@ -51,11 +51,14 @@ "no-path-concat": "off", "no-var": "off" }, + "main": "server.js", "pkg": { - "assets": [ - "node_modules/open/xdg-open/", - "public", - "uploads" - ] - } + "assets": [ + "node_modules/**/*", + "poe_graphql/**/*" + ], + "scripts": [ + "server.js" + ] + } } From ba439bb1f67b9ce00a565701029434d7f37726f9 Mon Sep 17 00:00:00 2001 From: MicBlaze <133346323+MicBlaze@users.noreply.github.com> Date: Fri, 12 May 2023 02:30:53 -0700 Subject: [PATCH 02/26] adjust server.js to allow pkg compiled binary to work --- server.js | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/server.js b/server.js index f076ac54f..532acbda5 100644 --- a/server.js +++ b/server.js @@ -20,7 +20,10 @@ const cliArguments = yargs(hideBin(process.argv)) }).argv; // change all relative paths -process.chdir(__dirname) +// process.chdir(__dirname) +//console.log('cwd is: ',process.cwd()) //correct external project path +const path = require('path'); +process.chdir(path.dirname(process.execPath)); const express = require('express'); const compression = require('compression'); @@ -42,7 +45,7 @@ const encode = require('png-chunks-encode'); const PNGtext = require('png-chunk-text'); const jimp = require('jimp'); -const path = require('path'); +//const path = require('path'); const sanitize = require('sanitize-filename'); const mime = require('mime-types'); @@ -60,10 +63,10 @@ const utf8Encode = new TextEncoder(); const utf8Decode = new TextDecoder('utf-8', { ignoreBOM: true }); const commandExistsSync = require('command-exists').sync; -const config = require(path.join(__dirname, './config.conf')); +const config = require(path.join(process.cwd(), './config.conf')); const server_port = process.env.SILLY_TAVERN_PORT || config.port; -const whitelistPath = path.join(__dirname, "./whitelist.txt"); +const whitelistPath = path.join(process.cwd(), "./whitelist.txt"); let whitelist = config.whitelist; if (fs.existsSync(whitelistPath)) { @@ -252,7 +255,7 @@ app.use((req, res, next) => { console.log(filePath); fs.access(filePath, fs.constants.R_OK, (err) => { if (!err) { - res.sendFile(filePath, { root: __dirname }); + res.sendFile(filePath, { root: process.cwd() }); } else { res.send('Character not found: ' + filePath); //next(); @@ -263,10 +266,10 @@ app.use((req, res, next) => { } }); -app.use(express.static(__dirname + "/public", { refresh: true })); +app.use(express.static(process.cwd() + "/public", { refresh: true })); app.use('/backgrounds', (req, res) => { - const filePath = decodeURIComponent(path.join(__dirname, 'public/backgrounds', req.url.replace(/%20/g, ' '))); + const filePath = decodeURIComponent(path.join(process.cwd(), 'public/backgrounds', req.url.replace(/%20/g, ' '))); fs.readFile(filePath, (err, data) => { if (err) { res.status(404).send('File not found'); @@ -278,7 +281,7 @@ app.use('/backgrounds', (req, res) => { }); app.use('/characters', (req, res) => { - const filePath = decodeURIComponent(path.join(__dirname, charactersPath, req.url.replace(/%20/g, ' '))); + const filePath = decodeURIComponent(path.join(process.cwd(), charactersPath, req.url.replace(/%20/g, ' '))); fs.readFile(filePath, (err, data) => { if (err) { res.status(404).send('File not found'); @@ -289,16 +292,16 @@ app.use('/characters', (req, res) => { }); app.use(multer({ dest: "uploads" }).single("avatar")); app.get("/", function (request, response) { - response.sendFile(__dirname + "/public/index.html"); + response.sendFile(process.cwd() + "/public/index.html"); }); app.get("/notes/*", function (request, response) { - response.sendFile(__dirname + "/public" + request.url + ".html"); + response.sendFile(process.cwd() + "/public" + request.url + ".html"); }); app.get('/get_faq', function (_, response) { - response.sendFile(__dirname + "/faq.md"); + response.sendFile(process.cwd() + "/faq.md"); }); app.get('/get_readme', function (_, response) { - response.sendFile(__dirname + "/readme.md"); + response.sendFile(process.cwd() + "/readme.md"); }); app.get('/deviceinfo', function (request, response) { const userAgent = request.header('user-agent'); @@ -313,7 +316,7 @@ app.get('/version', function (_, response) { pkgVersion = pkgJson.version; if (commandExistsSync('git')) { gitRevision = require('child_process') - .execSync('git rev-parse --short HEAD', { cwd: __dirname }) + .execSync('git rev-parse --short HEAD', { cwd: process.cwd() }) .toString().trim(); } } @@ -1594,7 +1597,7 @@ app.post("/exportcharacter", jsonParser, async function (request, response) { switch (request.body.format) { case 'png': - return response.sendFile(filename, { root: __dirname }); + return response.sendFile(filename, { root: process.cwd() }); case 'json': { try { let json = await charaRead(filename); @@ -1624,7 +1627,7 @@ app.post("/exportcharacter", jsonParser, async function (request, response) { await webp.cwebp(filename, inputWebpPath, '-q 95'); await webp.webpmux_add(inputWebpPath, outputWebpPath, metadataPath, 'exif'); - response.sendFile(outputWebpPath, { root: __dirname }, () => { + response.sendFile(outputWebpPath, { root: process.cwd() }, () => { fs.rmSync(inputWebpPath); fs.rmSync(metadataPath); fs.rmSync(outputWebpPath); @@ -2255,7 +2258,7 @@ app.get('/thumbnail', jsonParser, async function (request, response) { if (config.disableThumbnails == true) { const pathToOriginalFile = path.join(getOriginalFolder(type), file); - return response.sendFile(pathToOriginalFile, { root: __dirname }); + return response.sendFile(pathToOriginalFile, { root: process.cwd() }); } const pathToCachedFile = await generateThumbnail(type, file); @@ -2264,7 +2267,7 @@ app.get('/thumbnail', jsonParser, async function (request, response) { return response.sendStatus(404); } - return response.sendFile(pathToCachedFile, { root: __dirname }); + return response.sendFile(pathToCachedFile, { root: process.cwd() }); }); /* OpenAI */ From 38f018319b13cd88c336a053dc175106039ee7f6 Mon Sep 17 00:00:00 2001 From: MicBlaze <133346323+MicBlaze@users.noreply.github.com> Date: Fri, 12 May 2023 02:32:06 -0700 Subject: [PATCH 03/26] Update basicAuthMiddleware.js for path to work for binary --- src/middleware/basicAuthMiddleware.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/middleware/basicAuthMiddleware.js b/src/middleware/basicAuthMiddleware.js index 2f368214c..a5b1b3459 100644 --- a/src/middleware/basicAuthMiddleware.js +++ b/src/middleware/basicAuthMiddleware.js @@ -3,9 +3,11 @@ * allow access to the endpoint after successful authentication. */ -const {dirname} = require('path'); -const appDir = dirname(require.main.filename); -const config = require(appDir + '/config.conf'); +//const {dirname} = require('path'); +//const appDir = dirname(require.main.filename); +//const config = require(appDir + '/config.conf'); +const path = require('path'); +const config = require(path.join(process.cwd(), './config.conf')); const unauthorizedResponse = (res) => { res.set('WWW-Authenticate', 'Basic realm="SillyTavern", charset="UTF-8"'); @@ -36,4 +38,4 @@ const basicAuthMiddleware = function (request, response, callback) { } } -module.exports = basicAuthMiddleware; \ No newline at end of file +module.exports = basicAuthMiddleware; From 627b0fb428404ef252b08a1bd607110186d4ba0b Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Fri, 12 May 2023 23:44:19 +0300 Subject: [PATCH 04/26] Fix cwd --- server.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server.js b/server.js index 69585629a..71c50be99 100644 --- a/server.js +++ b/server.js @@ -20,8 +20,6 @@ const cliArguments = yargs(hideBin(process.argv)) }).argv; // change all relative paths -// process.chdir(__dirname) -//console.log('cwd is: ',process.cwd()) //correct external project path const path = require('path'); process.chdir(path.dirname(process.execPath)); @@ -322,7 +320,7 @@ app.get('/version', function (_, response) { .toString().trim(); gitBranch = require('child_process') - .execSync('git rev-parse --abbrev-ref HEAD', { cwd: __dirname }) + .execSync('git rev-parse --abbrev-ref HEAD', { cwd: process.cwd() }) .toString().trim(); } } From c64b284d30d5198b122931978bef59e663122e93 Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Fri, 12 May 2023 23:51:52 +0300 Subject: [PATCH 05/26] Install supported axios version. Update ignore files. Update package.json --- .dockerignore | 3 +- .gitignore | 1 + .npmignore | 2 + package-lock.json | 1182 ++++++++++++++++++++++++++++++++++++++++++++- package.json | 36 +- 5 files changed, 1203 insertions(+), 21 deletions(-) diff --git a/.dockerignore b/.dockerignore index 482a98310..c09fb4d2a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,4 +2,5 @@ node_modules npm-debug.log readme* -Start.bat \ No newline at end of file +Start.bat +/dist \ No newline at end of file diff --git a/.gitignore b/.gitignore index 46eeaf2a6..531d61538 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ public/settings.json whitelist.txt .vscode secrets.json +/dist \ No newline at end of file diff --git a/.npmignore b/.npmignore index 3311d99ac..56439f095 100644 --- a/.npmignore +++ b/.npmignore @@ -2,3 +2,5 @@ node_modules/ /uploads/ .DS_Store /thumbnails +secrets.json +/dist \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index af472b031..92cf8c6df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "AGPL-3.0", "dependencies": { "@dqbd/tiktoken": "^1.0.2", - "axios": "^1.3.4", + "axios": "^0.27.2", "command-exists": "^1.2.9", "compression": "^1", "cookie-parser": "^1.4.6", @@ -40,6 +40,68 @@ }, "bin": { "sillytavern": "server.js" + }, + "devDependencies": { + "pkg": "^5.8.1", + "pkg-fetch": "^3.5.2" + } + }, + "node_modules/@babel/generator": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", + "integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.2", + "@jridgewell/gen-mapping": "^0.3.0", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz", + "integrity": "sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.18.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz", + "integrity": "sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", + "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.18.6", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@dqbd/tiktoken": { @@ -417,6 +479,95 @@ "regenerator-runtime": "^0.13.3" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@tokenizer/token": { "version": "0.3.0", "license": "MIT" @@ -444,6 +595,18 @@ "node": ">= 0.6" } }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "license": "MIT", @@ -480,17 +643,35 @@ "version": "2.1.3", "license": "ISC" }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/asynckit": { "version": "0.4.0", "license": "MIT" }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/axios": { - "version": "1.3.4", - "license": "MIT", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", "dependencies": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" } }, "node_modules/balanced-match": { @@ -515,6 +696,31 @@ ], "license": "MIT" }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/bmp-js": { "version": "0.1.0", "license": "MIT" @@ -560,6 +766,18 @@ "concat-map": "0.0.1" } }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/buffer": { "version": "5.7.1", "funding": [ @@ -620,6 +838,28 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, "node_modules/cliui": { "version": "8.0.1", "license": "ISC", @@ -816,6 +1056,30 @@ } } }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/define-lazy-prop": { "version": "2.0.0", "license": "MIT", @@ -845,6 +1109,15 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/detect-libc": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", + "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/device-detector-js": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/device-detector-js/-/device-detector-js-3.0.3.tgz", @@ -853,6 +1126,18 @@ "node": ">= 8.11.4" } }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/dom-walk": { "version": "0.1.2" }, @@ -871,6 +1156,15 @@ "node": ">= 0.8" } }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, "node_modules/escalade": { "version": "3.1.1", "license": "MIT", @@ -900,6 +1194,15 @@ "@xmldom/xmldom": "^0.7.8" } }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/express": { "version": "4.18.2", "license": "MIT", @@ -951,6 +1254,31 @@ "version": "2.0.0", "license": "MIT" }, + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/file-type": { "version": "16.5.4", "license": "MIT", @@ -966,6 +1294,18 @@ "url": "https://github.com/sindresorhus/file-type?sponsor=1" } }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/finalhandler": { "version": "1.2.0", "license": "MIT", @@ -1037,6 +1377,37 @@ "node": ">= 0.6" } }, + "node_modules/from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "license": "ISC" @@ -1072,6 +1443,12 @@ "omggif": "^1.0.10" } }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "dev": true + }, "node_modules/glob": { "version": "7.2.3", "license": "ISC", @@ -1090,6 +1467,18 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/global": { "version": "4.4.0", "license": "MIT", @@ -1098,6 +1487,26 @@ "process": "^0.11.10" } }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/gpt3-tokenizer": { "version": "1.1.5", "license": "MIT", @@ -1108,6 +1517,12 @@ "node": ">=12" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, "node_modules/has": { "version": "1.0.3", "license": "MIT", @@ -1118,6 +1533,15 @@ "node": ">= 0.4.0" } }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/has-symbols": { "version": "1.0.3", "license": "MIT", @@ -1142,6 +1566,19 @@ "node": ">= 0.8" } }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "license": "MIT", @@ -1170,6 +1607,15 @@ ], "license": "BSD-3-Clause" }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, "node_modules/image-q": { "version": "4.0.0", "license": "MIT", @@ -1189,6 +1635,28 @@ "version": "2.0.4", "license": "ISC" }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "node_modules/into-stream": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-6.0.0.tgz", + "integrity": "sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA==", + "dev": true, + "dependencies": { + "from2": "^2.3.0", + "p-is-promise": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ipaddr.js": { "version": "2.0.1", "license": "MIT", @@ -1196,6 +1664,18 @@ "node": ">= 10" } }, + "node_modules/is-core-module": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-docker": { "version": "2.2.1", "license": "MIT", @@ -1209,6 +1689,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "license": "MIT", @@ -1220,6 +1709,27 @@ "version": "1.0.2", "license": "MIT" }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/is-wsl": { "version": "2.2.0", "license": "MIT", @@ -1261,6 +1771,18 @@ "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.4.tgz", "integrity": "sha512-v28EW9DWDFpzcD9O5iyJXg3R3+q+mET5JhnjJzQUZMHOv67bpSIHq81GEYpPNZHG+XXHsfSme3nxp/hndKEcsQ==" }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/json5": { "version": "2.2.3", "license": "MIT", @@ -1271,6 +1793,18 @@ "node": ">=6" } }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/load-bmfont": { "version": "1.4.1", "license": "MIT", @@ -1285,6 +1819,18 @@ "xtend": "^4.0.0" } }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/media-typer": { "version": "0.3.0", "license": "MIT", @@ -1296,6 +1842,15 @@ "version": "1.0.1", "license": "MIT" }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, "node_modules/methods": { "version": "1.1.2", "license": "MIT", @@ -1303,6 +1858,19 @@ "node": ">= 0.6" } }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/mime": { "version": "1.6.0", "license": "MIT", @@ -1330,6 +1898,18 @@ "node": ">= 0.6" } }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/min-document": { "version": "2.19.0", "dependencies": { @@ -1363,6 +1943,12 @@ "mkdirp": "bin/cmd.js" } }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, "node_modules/ms": { "version": "2.1.2", "license": "MIT" @@ -1383,6 +1969,50 @@ "node": ">= 6.0.0" } }, + "node_modules/multistream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/multistream/-/multistream-4.1.0.tgz", + "integrity": "sha512-J1XDiAmmNpRCBfIWJv+n0ymC4ABcf/Pl+5YvC5B/D2f/2+8PtHvCNxMPKiQcZyi922Hq69J2YOpb1pTywfifyw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "once": "^1.4.0", + "readable-stream": "^3.6.0" + } + }, + "node_modules/multistream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", + "dev": true + }, "node_modules/negotiator": { "version": "0.6.3", "license": "MIT", @@ -1390,6 +2020,18 @@ "node": ">= 0.6" } }, + "node_modules/node-abi": { + "version": "3.40.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.40.0.tgz", + "integrity": "sha512-zNy02qivjjRosswoYmPi8hIKJRr8MpQyeKT6qlcq/OnOgA3Rhoae+IYOqsM9V5+JnHWmxKnWOT2GxvtqdtOCXA==", + "dev": true, + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/node-fetch": { "version": "2.6.9", "license": "MIT", @@ -1478,6 +2120,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-is-promise": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-3.0.0.tgz", + "integrity": "sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/pako": { "version": "1.0.11", "license": "(MIT AND Zlib)" @@ -1516,10 +2167,25 @@ "node": ">=0.10.0" } }, + "node_modules/path-parse": { + "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": { "version": "0.1.7", "license": "MIT" }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/peek-readable": { "version": "4.1.0", "license": "MIT", @@ -1535,6 +2201,18 @@ "version": "2.9.3", "license": "MIT" }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/piexifjs": { "version": "1.0.6", "license": "MIT" @@ -1556,6 +2234,153 @@ "node": ">=4.0.0" } }, + "node_modules/pkg": { + "version": "5.8.1", + "resolved": "https://registry.npmjs.org/pkg/-/pkg-5.8.1.tgz", + "integrity": "sha512-CjBWtFStCfIiT4Bde9QpJy0KeH19jCfwZRJqHFDFXfhUklCx8JoFmMj3wgnEYIwGmZVNkhsStPHEOnrtrQhEXA==", + "dev": true, + "dependencies": { + "@babel/generator": "7.18.2", + "@babel/parser": "7.18.4", + "@babel/types": "7.19.0", + "chalk": "^4.1.2", + "fs-extra": "^9.1.0", + "globby": "^11.1.0", + "into-stream": "^6.0.0", + "is-core-module": "2.9.0", + "minimist": "^1.2.6", + "multistream": "^4.1.0", + "pkg-fetch": "3.4.2", + "prebuild-install": "7.1.1", + "resolve": "^1.22.0", + "stream-meter": "^1.0.4" + }, + "bin": { + "pkg": "lib-es5/bin.js" + }, + "peerDependencies": { + "node-notifier": ">=9.0.1" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/pkg-fetch": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/pkg-fetch/-/pkg-fetch-3.5.2.tgz", + "integrity": "sha512-KlRF3cDS4J5PRTKh5dkF5s+CYKa+4eUXzymWqTKPU/p3WmYlWZu7AS0dH8moPxg+QcJNB4/wu1wVO2a0Asv2Dw==", + "dev": true, + "dependencies": { + "chalk": "^4.1.2", + "fs-extra": "^9.1.0", + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.6", + "progress": "^2.0.3", + "semver": "^7.3.5", + "tar-fs": "^2.1.1", + "yargs": "^16.2.0" + }, + "bin": { + "pkg-fetch": "lib-es5/bin.js" + } + }, + "node_modules/pkg-fetch/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/pkg-fetch/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/pkg-fetch/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/pkg/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/pkg/node_modules/pkg-fetch": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/pkg-fetch/-/pkg-fetch-3.4.2.tgz", + "integrity": "sha512-0+uijmzYcnhC0hStDjm/cl2VYdrmVVBpe7Q8k9YBojxmR5tG8mvR9/nooQq3QSXiQqORDVOTY3XqMEqJVIzkHA==", + "dev": true, + "dependencies": { + "chalk": "^4.1.2", + "fs-extra": "^9.1.0", + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.6", + "progress": "^2.0.3", + "semver": "^7.3.5", + "tar-fs": "^2.1.1", + "yargs": "^16.2.0" + }, + "bin": { + "pkg-fetch": "lib-es5/bin.js" + } + }, + "node_modules/pkg/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/pkg/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/png-chunk-text": { "version": "1.0.0", "license": "MIT" @@ -1582,6 +2407,32 @@ "node": ">=12.13.0" } }, + "node_modules/prebuild-install": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", + "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", + "dev": true, + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/process": { "version": "0.11.10", "license": "MIT", @@ -1593,6 +2444,15 @@ "version": "2.0.1", "license": "MIT" }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/proxy-addr": { "version": "2.0.7", "license": "MIT", @@ -1611,9 +2471,15 @@ "node": ">= 0.10" } }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "license": "MIT" + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } }, "node_modules/qs": { "version": "6.11.0", @@ -1628,6 +2494,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/range-parser": { "version": "1.2.1", "license": "MIT", @@ -1648,6 +2534,21 @@ "node": ">= 0.8" } }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, "node_modules/readable-stream": { "version": "2.3.7", "license": "MIT", @@ -1702,6 +2603,45 @@ "node": ">=0.10.0" } }, + "node_modules/resolve": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "dev": true, + "dependencies": { + "is-core-module": "^2.11.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve/node_modules/is-core-module": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", + "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rimraf": { "version": "3.0.2", "license": "ISC", @@ -1715,6 +2655,29 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "funding": [ @@ -1748,6 +2711,21 @@ "version": "1.2.4", "license": "ISC" }, + "node_modules/semver": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", + "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/send": { "version": "0.18.0", "license": "MIT", @@ -1814,6 +2792,60 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/sliced": { "version": "1.0.1", "license": "MIT" @@ -1825,6 +2857,15 @@ "node": ">= 0.8" } }, + "node_modules/stream-meter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/stream-meter/-/stream-meter-1.0.4.tgz", + "integrity": "sha512-4sOEtrbgFotXwnEuzzsQBYEV1elAeFSO8rSGeTwabuX1RRn/kEq9JVH7I0MRBhKVRR0sJkr0M0QCH7yOLf9fhQ==", + "dev": true, + "dependencies": { + "readable-stream": "^2.1.4" + } + }, "node_modules/streamsearch": { "version": "1.1.0", "engines": { @@ -1864,6 +2905,15 @@ "node": ">=8" } }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/strtok3": { "version": "6.3.0", "license": "MIT", @@ -1879,6 +2929,72 @@ "url": "https://github.com/sponsors/Borewit" } }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dev": true, + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/timm": { "version": "1.7.1", "license": "MIT" @@ -1887,6 +3003,27 @@ "version": "1.6.0", "license": "MIT" }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, "node_modules/toidentifier": { "version": "1.0.1", "license": "MIT", @@ -1920,6 +3057,18 @@ "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", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, "node_modules/type-is": { "version": "1.6.18", "license": "MIT", @@ -1935,6 +3084,15 @@ "version": "0.0.6", "license": "MIT" }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/unpipe": { "version": "1.0.0", "license": "MIT", @@ -2075,6 +3233,12 @@ "node": ">=10" } }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", diff --git a/package.json b/package.json index 1bb185e05..ae52b78c7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "dependencies": { "@dqbd/tiktoken": "^1.0.2", - "axios": "^1.3.4", + "axios": "^0.27.2", "command-exists": "^1.2.9", "compression": "^1", "cookie-parser": "^1.4.6", @@ -42,7 +42,8 @@ }, "version": "1.5.1", "scripts": { - "start": "node server.js" + "start": "node server.js", + "pkg": "pkg ." }, "bin": { "sillytavern": "./server.js" @@ -51,14 +52,27 @@ "no-path-concat": "off", "no-var": "off" }, - "main": "server.js", + "main": "server.js", "pkg": { - "assets": [ - "node_modules/**/*", - "poe_graphql/**/*" - ], - "scripts": [ - "server.js" - ] - } + "targets": [ + "node18-linux-arm64", + "node18-linux-x64", + "node18-macos-arm64", + "node18-macos-x64", + "node18-windows-arm64", + "node18-windows-x64" + ], + "assets": [ + "node_modules/**/*", + "poe_graphql/**/*" + ], + "outputPath": "dist", + "scripts": [ + "server.js" + ] + }, + "devDependencies": { + "pkg": "^5.8.1", + "pkg-fetch": "^3.5.2" + } } From c91a19b1a8a17a451353e48772fd791fd274092c Mon Sep 17 00:00:00 2001 From: Sumit Kumar Date: Tue, 16 May 2023 15:57:24 +0530 Subject: [PATCH 06/26] Support for creating new images for each message --- .../extensions/stable-diffusion/index.js | 76 ++++++++++++++++--- 1 file changed, 65 insertions(+), 11 deletions(-) diff --git a/public/scripts/extensions/stable-diffusion/index.js b/public/scripts/extensions/stable-diffusion/index.js index 0d3b5a953..bc33a766b 100644 --- a/public/scripts/extensions/stable-diffusion/index.js +++ b/public/scripts/extensions/stable-diffusion/index.js @@ -37,6 +37,7 @@ const triggerWords = { [generationMode.CHARACTER]: ['you'], [generationMode.USER]: ['me'], [generationMode.SCENARIO]: ['scene'], + [generationMode.FREE]: ['raw_last'], [generationMode.NOW]: ['last'], [generationMode.FACE]: ['face'], @@ -54,7 +55,7 @@ const quietPrompts = { [generationMode.USER]: "[Pause your roleplay and provide a detailed description of {{user}}'s appearance from the perspective of {{char}} in the form of a comma-delimited list of keywords and phrases. Ignore the rest of the story when crafting this description. Do not roleplay as {{char}}}} when writing this description, and do not attempt to continue the story.]", [generationMode.SCENARIO]: "[Pause your roleplay and provide a detailed description for all of the following: a brief recap of recent events in the story, {{char}}'s appearance, and {{char}}'s surroundings. Do not roleplay while writing this description.]", - [generationMode.FREE]: "[Pause your roleplay and provide ONLY an echo this string back to me verbatim: {0}. Do not write anything after the string. Do not roleplay at all in your response.]", + [generationMode.FREE]: "[Pause your roleplay and provide ONLY the last chat message string back to me verbatim. Do not write anything after the string. Do not roleplay at all in your response. Do not continue the roleplay story.]", } const helpString = [ @@ -65,8 +66,9 @@ const helpString = [ `
  • ${m(j(triggerWords[generationMode.USER]))} – user character full body selfie
  • `, `
  • ${m(j(triggerWords[generationMode.SCENARIO]))} – visual recap of the whole chat scenario
  • `, `
  • ${m(j(triggerWords[generationMode.NOW]))} – visual recap of the last chat message
  • `, + `
  • ${m(j(triggerWords[generationMode.FREE]))} – visual recap of the last chat message with no summary
  • `, '', - `Anything else would trigger a "free mode" to make SD generate whatever you prompted.
    + `Anything else would trigger a "free mode" to make SD generate whatever you prompted.
    example: '/sd apple tree' would generate a picture of an apple tree.`, ].join('
    '); @@ -251,7 +253,14 @@ function processReply(str) { return str; } -async function generatePicture(_, trigger) { +function getRawLastMessage(context) { + const lastMessage = context.chat.slice(-1)[0].mes, + characterDescription = context.characters[context.characterId].description, + situation = context.characters[context.characterId].scenario; + return `((${lastMessage})), (${situation}:0.7), (${characterDescription}:0.5)` +} + +async function generatePicture(_, trigger, message, callback) { if (!trigger || trigger.trim().length === 0) { console.log('Trigger word empty, aborting'); return; @@ -264,7 +273,7 @@ async function generatePicture(_, trigger) { const context = getContext(); try { - const prompt = processReply(await new Promise( + const prompt = trigger == 'raw_last' ? message || getRawLastMessage(context) : processReply(await new Promise( async function promptPromise(resolve, reject) { try { await context.generate('quiet', { resolve, reject, quiet_prompt, force_name2: true, }); @@ -278,7 +287,6 @@ async function generatePicture(_, trigger) { hideSwipeButtons(); console.log('Processed Stable Diffusion prompt:', prompt); - const url = new URL(getApiUrl()); url.pathname = '/api/image'; const result = await fetch(url, { @@ -302,7 +310,7 @@ async function generatePicture(_, trigger) { if (result.ok) { const data = await result.json(); const base64Image = `data:image/jpeg;base64,${data.image}`; - sendMessage(prompt, base64Image); + callback? callback(prompt, base64Image):sendMessage(prompt, base64Image); } } catch (err) { console.trace(err); @@ -335,6 +343,10 @@ async function sendMessage(prompt, image) { } function addSDGenButtons() { + const messageButtonHtml = ` +
    + `; + const buttonHtml = `
    `; @@ -351,19 +363,24 @@ function addSDGenButtons() {
  • Me
  • The Whole Story
  • The Last Message
  • +
  • Raw Last Message
  • `; + $('.mes_buttons').prepend(messageButtonHtml); $('#send_but_sheld').prepend(buttonHtml); $('#send_but_sheld').prepend(waitButtonHtml); - $(document.body).append(dropdownHtml) + $(document.body).append(dropdownHtml); + $(document.body).append(dropdownHtml); + const messageButton = $('.sd_message_gen'); const button = $('#sd_gen'); const waitButton = $("#sd_gen_wait"); const dropdown = $('#sd_dropdown'); waitButton.hide(); dropdown.hide(); button.hide(); + messageButton.hide(); let popper = Popper.createPopper(button.get(0), dropdown.get(0), { placement: 'top-start', @@ -396,14 +413,46 @@ async function moduleWorker() { $("#sd_gen_wait").show(200); } */ - context.onlineStatus === 'no_connection' - ? $('#sd_gen').hide(200) - : $('#sd_gen').show(200) + if (context.onlineStatus === 'no_connection'){ + $('#sd_gen').hide(200); + $('.sd_message_gen').hide(200); + } + else{ + $('#sd_gen').show(200); + $('.sd_message_gen').show(200); + } } addSDGenButtons(); + setInterval(moduleWorker, UPDATE_INTERVAL); +function sdMessageButton (e) { + const character = $(e.currentTarget).parents('div.mes_block').children('div.ch_name').children('span.name_text').text(), + message = $(e.currentTarget).parents('div.mes_block').children('div.mes_text').text(); + + console.log("doing /sd raw last"); + generatePicture('sd', 'raw_last', `${character} said: ${message}`, appendImageToMessage); + + function appendImageToMessage(prompt, image){ + const sd_image = document.createElement("img"), + context = getContext(), + message_id = $(e.target).parents('div.mes').attr('mesid'); + sd_image.src = image; + sd_image.title = prompt; + sd_image.classList.add("img_extra"); + $(e.target).parents('div.mes_block').children('div.mes_text').append(sd_image); + + context.chat[message_id].extra.inline_image = true; + context.chat[message_id].extra.image = image; + context.chat[message_id].extra.title = prompt; + + context.saveChat(); + } +}; + +window.sdMessageButton = sdMessageButton; + $("#sd_dropdown [id]").on("click", function () { var id = $(this).attr("id"); if (id == "sd_you") { @@ -430,6 +479,11 @@ $("#sd_dropdown [id]").on("click", function () { console.log("doing /sd last"); generatePicture('sd', 'last'); } + + else if (id == "sd_raw_last") { + console.log("doing /sd raw last"); + generatePicture('sd', 'raw_last'); + } }); jQuery(async () => { @@ -480,4 +534,4 @@ jQuery(async () => { await loadSettings(); -}); \ No newline at end of file +}); From 94a53d575942c1c331825ccbcd52e2fbba108d16 Mon Sep 17 00:00:00 2001 From: Sumit Kumar Date: Tue, 16 May 2023 15:59:35 +0530 Subject: [PATCH 07/26] support for not hiding everything except image --- public/script.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/public/script.js b/public/script.js index dab17418d..bf199378f 100644 --- a/public/script.js +++ b/public/script.js @@ -428,7 +428,7 @@ function getTokenCount(str, padding = 0) { let tokenCount = 0; jQuery.ajax({ async: false, - type: 'POST', // + type: 'POST', // url: `/tokenize_llama`, data: JSON.stringify({ text: str }), dataType: "json", @@ -572,7 +572,7 @@ $.get("/csrf-token").then(async (data) => { }); function checkOnlineStatus() { - ///////// REMOVED LINES THAT DUPLICATE RA_CHeckOnlineStatus FEATURES + ///////// REMOVED LINES THAT DUPLICATE RA_CHeckOnlineStatus FEATURES if (online_status == "no_connection") { $("#online_status_indicator2").css("background-color", "red"); //Kobold @@ -1020,7 +1020,7 @@ function appendImageToMessage(mes, messageElement) { image.src = mes.extra?.image; image.title = mes.extra?.title || mes.title; image.classList.add("img_extra"); - messageElement.find(".mes_text").prepend(image); + mes.extra?.inline_image?messageElement.find(".mes_text").append(image):messageElement.find(".mes_text").prepend(image); } } @@ -1078,7 +1078,7 @@ function addOneMessage(mes, { type = "normal", insertAfter = null, scroll = true avatarImg = default_avatar; } } - //old processing: + //old processing: //if messge is from sytem, use the name provided in the message JSONL to proceed, //if not system message, use name2 (char's name) to proceed //characterName = mes.is_system || mes.force_avatar ? mes.name : name2; @@ -1816,7 +1816,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject, if (novel_tier === 1) { this_max_context = 1024; } else { - this_max_context = 2048 - 60;//fix for fat tokens + this_max_context = 2048 - 60;//fix for fat tokens if (nai_settings.model_novel == 'krake-v2') { this_max_context -= 160; } @@ -1949,7 +1949,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject, // where it left off by removing the trailing newline at the end // that was added by chat2 generator. This causes problems with // instruct mode that could not have a trailing newline. So we're - // removing a newline ONLY at the end of the string if it exists. + // removing a newline ONLY at the end of the string if it exists. item = item.replace(/\n?$/, ''); //item = item.substr(0, item.length - 1); } @@ -2127,7 +2127,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject, let promptBiasTokens = getTokenCount(promptBias); let mesSendStringTokens = getTokenCount(mesSendString) let ActualChatHistoryTokens = mesSendStringTokens - allAnchorsTokens + power_user.token_padding; - + let totalTokensInPrompt = allAnchorsTokens + // AN and/or legacy anchors //afterScenarioAnchorTokens + //only counts if AN is set to 'after scenario' @@ -2137,21 +2137,21 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject, promptBiasTokens + //{{}} ActualChatHistoryTokens + //chat history power_user.token_padding; - + console.log( ` Prompt Itemization ------------------- Extension Add-ins AN: ${allAnchorsTokens} - + World Info: ${worldInfoStringTokens} - + Character Definitions: ${storyStringTokens} -- Description: ${charDescriptionTokens} -- Example Messages: ${examplesStringTokens} -- Character Personality: ${charPersonalityTokens} -- Character Scenario: ${scenarioTextTokens} - + Chat History: ${ActualChatHistoryTokens} {{}} Bias: ${promptBiasTokens} Padding: ${power_user.token_padding} @@ -2160,7 +2160,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject, vs finalPrompt: ${finalPromptTokens} Max Context: ${this_max_context} - + ` ); */ @@ -2277,8 +2277,8 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject, } else { jQuery.ajax({ - type: 'POST', // - url: generate_url, // + type: 'POST', // + url: generate_url, // data: JSON.stringify(generate_data), beforeSend: function () { From 78d4f162814aa3f2129b3de91ad74b7d402d1463 Mon Sep 17 00:00:00 2001 From: Sumit Kumar Date: Tue, 16 May 2023 17:05:53 +0530 Subject: [PATCH 08/26] removed the accidental dropdown addition --- public/scripts/extensions/stable-diffusion/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/public/scripts/extensions/stable-diffusion/index.js b/public/scripts/extensions/stable-diffusion/index.js index bc33a766b..fc6d70f8e 100644 --- a/public/scripts/extensions/stable-diffusion/index.js +++ b/public/scripts/extensions/stable-diffusion/index.js @@ -371,7 +371,6 @@ function addSDGenButtons() { $('#send_but_sheld').prepend(buttonHtml); $('#send_but_sheld').prepend(waitButtonHtml); $(document.body).append(dropdownHtml); - $(document.body).append(dropdownHtml); const messageButton = $('.sd_message_gen'); const button = $('#sd_gen'); From 843e7a83637d3333460b3c351de0142e9424ddec Mon Sep 17 00:00:00 2001 From: Cohee Date: Tue, 16 May 2023 20:24:32 +0300 Subject: [PATCH 09/26] Create build-and-publish-release-main.yml --- .../build-and-publish-release-main.yml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build-and-publish-release-main.yml diff --git a/.github/workflows/build-and-publish-release-main.yml b/.github/workflows/build-and-publish-release-main.yml new file mode 100644 index 000000000..6746f6897 --- /dev/null +++ b/.github/workflows/build-and-publish-release-main.yml @@ -0,0 +1,46 @@ +name: Build and Publish Release (Main) + +on: + push: + branches: + - main + +jobs: + build_and_publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: 18 + + - name: Install dependencies + run: npm ci + + - name: Build and package with pkg + run: | + npm install -g pkg + npm run pkg + + - name: Create or update release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: continuous-release-main + release_name: Continuous Release (Main) + draft: false + prerelease: true + + - name: Upload binaries to release + uses: softprops/action-gh-release@v1 + with: + files: dist/* + release_id: ${{ steps.create_release.outputs.id }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 65abdacefd74c891d76e3360d6a138ec3a058d78 Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Tue, 16 May 2023 20:35:31 +0300 Subject: [PATCH 10/26] New workflow file --- .../build-and-publish-release-dev.yml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build-and-publish-release-dev.yml diff --git a/.github/workflows/build-and-publish-release-dev.yml b/.github/workflows/build-and-publish-release-dev.yml new file mode 100644 index 000000000..76f45759f --- /dev/null +++ b/.github/workflows/build-and-publish-release-dev.yml @@ -0,0 +1,46 @@ +name: Build and Publish Release (Dev) + +on: + push: + branches: + - dev + +jobs: + build_and_publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: 18 + + - name: Install dependencies + run: npm ci + + - name: Build and package with pkg + run: | + npm install -g pkg + npm run pkg + + - name: Create or update release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: continuous-release-dev + release_name: Continuous Release (Dev) + draft: false + prerelease: true + + - name: Upload binaries to release + uses: softprops/action-gh-release@v1 + with: + files: dist/* + release_id: ${{ steps.create_release.outputs.id }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From bf6df2b0e84a94757e97ff5ccfa4a464e6486128 Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Tue, 16 May 2023 20:35:46 +0300 Subject: [PATCH 11/26] Change relative path handling --- server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index d6057307e..9aa926300 100644 --- a/server.js +++ b/server.js @@ -21,7 +21,9 @@ const cliArguments = yargs(hideBin(process.argv)) // change all relative paths const path = require('path'); -process.chdir(path.dirname(process.execPath)); +const directory = process.pkg ? path.dirname(process.execPath) : __dirname; +console.log(process.pkg ? 'Running from binary' : 'Running from source'); +process.chdir(directory); const express = require('express'); const compression = require('compression'); From b15ef98a4b6df00ac05be614eb1542727794fe0a Mon Sep 17 00:00:00 2001 From: Cohee Date: Tue, 16 May 2023 20:45:00 +0300 Subject: [PATCH 12/26] Update package.json --- package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/package.json b/package.json index 326fdfab0..16616d1d1 100644 --- a/package.json +++ b/package.json @@ -57,11 +57,8 @@ "main": "server.js", "pkg": { "targets": [ - "node18-linux-arm64", "node18-linux-x64", - "node18-macos-arm64", "node18-macos-x64", - "node18-windows-arm64", "node18-windows-x64" ], "assets": [ From eefefd9a288c72ba475bdfec75f31795f844d649 Mon Sep 17 00:00:00 2001 From: Cohee Date: Tue, 16 May 2023 20:47:54 +0300 Subject: [PATCH 13/26] Update build-and-publish-release-dev.yml --- .github/workflows/build-and-publish-release-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish-release-dev.yml b/.github/workflows/build-and-publish-release-dev.yml index 76f45759f..aa409149f 100644 --- a/.github/workflows/build-and-publish-release-dev.yml +++ b/.github/workflows/build-and-publish-release-dev.yml @@ -41,6 +41,6 @@ jobs: uses: softprops/action-gh-release@v1 with: files: dist/* - release_id: ${{ steps.create_release.outputs.id }} + tag_name: ${{ steps.create_release.outputs.id }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3ba379d663c259b6d72f93d53e4fc7a3b3a70ebf Mon Sep 17 00:00:00 2001 From: Cohee Date: Tue, 16 May 2023 20:48:06 +0300 Subject: [PATCH 14/26] Update build-and-publish-release-main.yml --- .github/workflows/build-and-publish-release-main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish-release-main.yml b/.github/workflows/build-and-publish-release-main.yml index 6746f6897..a588b21da 100644 --- a/.github/workflows/build-and-publish-release-main.yml +++ b/.github/workflows/build-and-publish-release-main.yml @@ -41,6 +41,6 @@ jobs: uses: softprops/action-gh-release@v1 with: files: dist/* - release_id: ${{ steps.create_release.outputs.id }} + tag_name: ${{ steps.create_release.outputs.id }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 58e072b41c7aaee7db19d0d665fb2df08a97c324 Mon Sep 17 00:00:00 2001 From: Cohee Date: Tue, 16 May 2023 20:58:29 +0300 Subject: [PATCH 15/26] Update build-and-publish-release-dev.yml --- .../workflows/build-and-publish-release-dev.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-and-publish-release-dev.yml b/.github/workflows/build-and-publish-release-dev.yml index aa409149f..0fdb25647 100644 --- a/.github/workflows/build-and-publish-release-dev.yml +++ b/.github/workflows/build-and-publish-release-dev.yml @@ -26,21 +26,12 @@ jobs: npm install -g pkg npm run pkg - - name: Create or update release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: continuous-release-dev - release_name: Continuous Release (Dev) - draft: false - prerelease: true - - name: Upload binaries to release uses: softprops/action-gh-release@v1 with: files: dist/* - tag_name: ${{ steps.create_release.outputs.id }} + tag_name: ci-dev + name: CI Release (Dev) + prerelease: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3a22e0d622472dc46dcc1d1861d1f820e324da7b Mon Sep 17 00:00:00 2001 From: Cohee Date: Tue, 16 May 2023 21:03:15 +0300 Subject: [PATCH 16/26] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 16616d1d1..06622fa9e 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "version": "1.5.4", "scripts": { "start": "node server.js", - "pkg": "pkg ." + "pkg": "pkg --compress ." }, "bin": { "sillytavern": "./server.js" From 06f540548f493acb7902676cc1395b62d0843ef3 Mon Sep 17 00:00:00 2001 From: Cohee Date: Tue, 16 May 2023 21:05:27 +0300 Subject: [PATCH 17/26] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 06622fa9e..48bbccd0f 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "version": "1.5.4", "scripts": { "start": "node server.js", - "pkg": "pkg --compress ." + "pkg": "pkg --compress Gzip ." }, "bin": { "sillytavern": "./server.js" From edab21ede351665e44732425474582405d0613a4 Mon Sep 17 00:00:00 2001 From: Cohee Date: Tue, 16 May 2023 21:06:43 +0300 Subject: [PATCH 18/26] Update build-and-publish-release-main.yml --- .../workflows/build-and-publish-release-main.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-and-publish-release-main.yml b/.github/workflows/build-and-publish-release-main.yml index a588b21da..ac8eeb03b 100644 --- a/.github/workflows/build-and-publish-release-main.yml +++ b/.github/workflows/build-and-publish-release-main.yml @@ -26,21 +26,12 @@ jobs: npm install -g pkg npm run pkg - - name: Create or update release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: continuous-release-main - release_name: Continuous Release (Main) - draft: false - prerelease: true - - name: Upload binaries to release uses: softprops/action-gh-release@v1 with: files: dist/* - tag_name: ${{ steps.create_release.outputs.id }} + tag_name: ci-main + name: Continuous Release (Main) + prerelease: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 5a39e7cf37ad2df64a041f0e262213271e51748a Mon Sep 17 00:00:00 2001 From: Cohee Date: Tue, 16 May 2023 21:06:59 +0300 Subject: [PATCH 19/26] Update build-and-publish-release-dev.yml --- .github/workflows/build-and-publish-release-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish-release-dev.yml b/.github/workflows/build-and-publish-release-dev.yml index 0fdb25647..0c740892b 100644 --- a/.github/workflows/build-and-publish-release-dev.yml +++ b/.github/workflows/build-and-publish-release-dev.yml @@ -31,7 +31,7 @@ jobs: with: files: dist/* tag_name: ci-dev - name: CI Release (Dev) + name: Continuous Release (Dev) prerelease: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 2806d869ed91961375c702263c73847c56d70046 Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Wed, 17 May 2023 03:36:50 +0900 Subject: [PATCH 20/26] CSS fix for movingUI handle + less round corners --- public/index.html | 4 +--- public/script.js | 2 +- public/style.css | 28 +++++++++++++++++++++------- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/public/index.html b/public/index.html index 11662d5a6..f848093d4 100644 --- a/public/index.html +++ b/public/index.html @@ -1088,8 +1088,7 @@

    Blocking API url

    Example: http://127.0.0.1:5000/
    - +

    Streaming API url

    @@ -2487,7 +2486,6 @@
    -
    diff --git a/public/script.js b/public/script.js index fca41f91d..366c6dac7 100644 --- a/public/script.js +++ b/public/script.js @@ -948,7 +948,7 @@ function printMessages() { function clearChat() { count_view_mes = 0; extension_prompts = {}; - $("#chat").html(""); + $("#chat").children().remove(); } function deleteLastMessage() { diff --git a/public/style.css b/public/style.css index b6480a705..54595821c 100644 --- a/public/style.css +++ b/public/style.css @@ -297,8 +297,8 @@ code { text-align: center; border-radius: 5px; vertical-align: middle; - right: 5px; - top: 5px; + right: 0px; + top: 0px; opacity: 0.5; cursor: grab; border: 1px solid var(--white30a); @@ -1255,7 +1255,7 @@ input[type=search]:focus::-webkit-search-cancel-button { background-repeat: no-repeat; background-size: cover; background-position: center; - border-radius: 20px; + border-radius: 10px; border: 1px solid var(--black50a); box-shadow: 0 0 7px var(--black50a); margin: 5px; @@ -2431,7 +2431,7 @@ h5 { box-shadow: 0px 0px 20px black; padding: 10px; background-color: var(--SmartThemeBlurTintColor); - border-radius: 20px; + border-radius: 10px; overflow-y: auto; border: 1px solid var(--grey30); } @@ -3510,13 +3510,13 @@ label[for="extensions_autoconnect"] { .drawer-content { background-color: var(--SmartThemeBlurTintColor); color: var(--SmartThemeBodyColor); - border-radius: 20px; + border-radius: 10px; padding: 10px; border: 1px solid var(--grey30a); box-shadow: 0 0 20px black; min-width: 450px; width: var(--sheldWidth); - overflow-y: scroll; + overflow-y: auto; max-height: calc(100svh - 70px); display: none; position: absolute; @@ -3595,6 +3595,10 @@ toolcool-color-picker { padding: 5px; } +.padding10 { + padding: 10px; +} + .margin0 { margin: 0; } @@ -3805,7 +3809,7 @@ toolcool-color-picker { body.bubblechat .mes { padding: 10px; - border-radius: 20px; + border-radius: 10px; background-color: var(--SmartThemeBlurTintColor); margin-bottom: 5px; border: 1px solid var(--white30a); @@ -3894,6 +3898,16 @@ body.movingUI #floatingPrompt { resize: both; } +body.movingUI #chat::-webkit-scrollbar-thumb { + background-color: var(--grey7070a); + border: 2px solid transparent; + border-top: 20px solid transparent; + box-shadow: inset 0 0 0 1px var(--black50a); + border-radius: 10px; + background-clip: content-box; +} + + #expression-image.default, #expression-holder:has(.default) { height: 120px; From d37585c993934abd26be1bf867f2ba2e9f68efeb Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Tue, 16 May 2023 22:48:21 +0300 Subject: [PATCH 21/26] Wrap message images into container --- public/index.html | 8 +++ public/script.js | 50 +++++++++++++++-- .../extensions/stable-diffusion/index.js | 47 ++++++++-------- public/style.css | 56 +++++++++++++++++-- 4 files changed, 128 insertions(+), 33 deletions(-) diff --git a/public/index.html b/public/index.html index 11662d5a6..9456f7a25 100644 --- a/public/index.html +++ b/public/index.html @@ -2394,6 +2394,7 @@ ${characterName}
    +
    @@ -2409,6 +2410,13 @@
    +
    +
    +
    +
    +
    + +
    diff --git a/public/script.js b/public/script.js index faf1d247e..063d5cc98 100644 --- a/public/script.js +++ b/public/script.js @@ -1030,13 +1030,14 @@ function getMessageFromTemplate({ mesId, characterName, isUser, avatarImg, bias, return mes; } -function appendImageToMessage(mes, messageElement) { +export function appendImageToMessage(mes, messageElement) { if (mes.extra?.image) { - const image = document.createElement("img"); - image.src = mes.extra?.image; - image.title = mes.extra?.title || mes.title; - image.classList.add("img_extra"); - mes.extra?.inline_image?messageElement.find(".mes_text").append(image):messageElement.find(".mes_text").prepend(image); + const image = messageElement.find('.mes_img'); + const isInline = !!mes.extra?.inline_image; + image.attr('src', mes.extra?.image); + image.attr('title', mes.extra?.title || mes.title); + messageElement.find(".mes_img_container").addClass("img_extra"); + image.toggleClass("img_inline", isInline); } } @@ -4479,6 +4480,40 @@ export function cancelTtsPlay() { } } +async function deleteMessageImage() { + const value = await callPopup("

    Delete image from message?
    This action can't be undone.

    ", 'confirm'); + + if (!value) { + return; + } + + const mesBlock = $(this).closest('.mes'); + const mesId = mesBlock.attr('mesid'); + const message = chat[mesId]; + delete message.extra.image; + delete message.extra.inline_image; + mesBlock.find('.mes_img_container').removeClass('img_extra'); + mesBlock.find('.mes_img').attr('src', ''); + saveChatConditional(); +} + +function enlargeMessageImage() { + const mesBlock = $(this).closest('.mes'); + const mesId = mesBlock.attr('mesid'); + const message = chat[mesId]; + const imgSrc = message?.extra?.image; + + if (!imgSrc) { + return; + } + + const img = document.createElement('img'); + img.classList.add('img_enlarged'); + img.src = imgSrc; + $('#dialogue_popup').addClass('wide_dialogue_popup'); + callPopup(img.outerHTML, 'text'); +} + window["SillyTavern"].getContext = function () { return { chat: chat, @@ -6433,6 +6468,9 @@ $(document).ready(function () { $('.code-copied').css({ 'display': 'none' }); }); + $(document).on('click', '.mes_img_enlarge', enlargeMessageImage); + $(document).on('click', '.mes_img_delete', deleteMessageImage); + $(window).on('beforeunload', () => { cancelTtsPlay(); if (streamingProcessor) { diff --git a/public/scripts/extensions/stable-diffusion/index.js b/public/scripts/extensions/stable-diffusion/index.js index a4f24194c..e22b6b49c 100644 --- a/public/scripts/extensions/stable-diffusion/index.js +++ b/public/scripts/extensions/stable-diffusion/index.js @@ -7,7 +7,8 @@ import { callPopup, getRequestHeaders, event_types, - eventSource + eventSource, + appendImageToMessage } from "../../../script.js"; import { getApiUrl, getContext, extension_settings, defaultRequestArgs, modules } from "../../extensions.js"; import { stringFormat, initScrollHeight, resetScrollHeight } from "../../utils.js"; @@ -477,9 +478,6 @@ async function sendMessage(prompt, image) { } function addSDGenButtons() { - const messageButtonHtml = ` -
    - `; const buttonHtml = `
    @@ -501,7 +499,6 @@ function addSDGenButtons() {
    `; - $('.mes_buttons').prepend(messageButtonHtml); $('#send_but_sheld').prepend(buttonHtml); $('#send_but_sheld').prepend(waitButtonHtml); $(document.body).append(dropdownHtml); @@ -519,6 +516,8 @@ function addSDGenButtons() { placement: 'top-start', }); + $(document).on('click', '.sd_message_gen', sdMessageButton); + $(document).on('click touchend', function (e) { const target = $(e.target); if (target.is(dropdown)) return; @@ -538,11 +537,11 @@ async function moduleWorker() { if (context.onlineStatus === 'no_connection'){ $('#sd_gen').hide(200); - $('.sd_message_gen').hide(200); + $('.sd_message_gen').hide(); } else{ $('#sd_gen').show(200); - $('.sd_message_gen').show(200); + $('.sd_message_gen').show(); } } @@ -551,31 +550,32 @@ addSDGenButtons(); setInterval(moduleWorker, UPDATE_INTERVAL); function sdMessageButton (e) { - const character = $(e.currentTarget).parents('div.mes_block').children('div.ch_name').children('span.name_text').text(), - message = $(e.currentTarget).parents('div.mes_block').children('div.mes_text').text(); + const $mes = $(e.currentTarget).closest('.mes'); + const character = $mes.find('.name_text').text(), + message = $mes.find('.mes_text').text(); console.log("doing /sd raw last"); - generatePicture('sd', 'raw_last', `${character} said: ${message}`, appendImageToMessage); + generatePicture('sd', 'raw_last', `${character} said: ${message}`, saveGeneratedImage); - function appendImageToMessage(prompt, image){ - const sd_image = document.createElement("img"), - context = getContext(), - message_id = $(e.target).parents('div.mes').attr('mesid'); - sd_image.src = image; - sd_image.title = prompt; - sd_image.classList.add("img_extra"); - $(e.target).parents('div.mes_block').children('div.mes_text').append(sd_image); + function saveGeneratedImage(prompt, image){ + const context = getContext(); + const message_id = $mes.attr('mesid'); + const message = context.chat[message_id]; - context.chat[message_id].extra.inline_image = true; - context.chat[message_id].extra.image = image; - context.chat[message_id].extra.title = prompt; + // Some message sources may not create the extra object + if (typeof message.extra !== 'object') { + message.extra = {}; + } + + message.extra.inline_image = true; + message.extra.image = image; + message.extra.title = prompt; + appendImageToMessage(message, $mes); context.saveChat(); } }; -window.sdMessageButton = sdMessageButton; - $("#sd_dropdown [id]").on("click", function () { var id = $(this).attr("id"); if (id == "sd_you") { @@ -672,4 +672,5 @@ jQuery(async () => { }); await loadSettings(); + $('body').addClass('sd'); }); diff --git a/public/style.css b/public/style.css index b6480a705..6f953e9ec 100644 --- a/public/style.css +++ b/public/style.css @@ -204,12 +204,14 @@ table.responsiveTable { text-align: center; } +.sd_message_gen, .mes_narrate, body.tts .mes[is_user="true"] .mes_narrate, body.tts .mes[is_system="true"] .mes_narrate { display: none; } +body.sd .sd_message_gen, body.tts .mes_narrate { display: inline-block; } @@ -2187,6 +2189,7 @@ input[type="range"]::-webkit-slider-thumb { .mes_prompt, .mes_narrate, +.sd_message_gen, .mes_copy, .mes_edit { cursor: pointer; @@ -2199,11 +2202,13 @@ input[type="range"]::-webkit-slider-thumb { .mes_edit:hover, .mes_copy:hover, +.sd_message_gen:hover, .mes_narrate:hover, .mes_stop:hover { opacity: 1; } +.last_mes .sd_message_gen, .last_mes .mes_copy, .last_mes .mes_narrate, .last_mes .mes_prompt { @@ -3307,16 +3312,59 @@ a { } /* Message images */ -.mes img.img_extra { +.mes .mes_img_container { max-width: 100%; max-height: 60svh; /*to fit inside single window height of mobile landscape*/ - border-radius: 10px; - display: block; + display: none; + position: relative; + width: fit-content; + transition: all 0.1s; } -.mes img.img_extra~* { +.mes_img { + border-radius: 10px; + width: 100%; +} + +.mes_img_controls { + position: absolute; + top: 0.5em; + left: 0; + width: 100%; display: none; + flex-direction: row; + justify-content: space-between; + padding: 0.75em; +} + +.mes_img_controls .right_menu_button { + padding: 0; + filter: brightness(80%); +} + +.mes_img_controls .right_menu_button:hover { + filter: brightness(150%); +} + +/* +.mes_img_container:hover .mes_img { + opacity: 0.9; +} +*/ + +.mes_img_container:hover .mes_img_controls { + display: flex; +} + +.mes .mes_img_container.img_extra { + display: flex; +} + +.img_enlarged { + width: 100%; + padding: 10px 0; + border-radius: 2px; } /* Extensions */ From 02fb3b7b74e485244bfca308f85c235ec9ac8398 Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Tue, 16 May 2023 23:37:54 +0300 Subject: [PATCH 22/26] Adjust debounce rate. Prevent autoconnect before secrets load --- public/script.js | 2 +- public/scripts/RossAscends-mods.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/script.js b/public/script.js index a1e705a97..0ee7daecf 100644 --- a/public/script.js +++ b/public/script.js @@ -261,7 +261,7 @@ let fav_ch_checked = false; //initialize global var for future cropped blobs let currentCroppedAvatar = ''; -const durationSaveEdit = 200; +const durationSaveEdit = 500; const saveSettingsDebounced = debounce(() => saveSettings(), durationSaveEdit); const saveCharacterDebounced = debounce(() => $("#create_button").trigger('click'), durationSaveEdit); const getStatusDebounced = debounce(() => getStatus(), 90000); diff --git a/public/scripts/RossAscends-mods.js b/public/scripts/RossAscends-mods.js index 651629bcf..cdd2cf607 100644 --- a/public/scripts/RossAscends-mods.js +++ b/public/scripts/RossAscends-mods.js @@ -370,7 +370,8 @@ function RA_checkOnlineStatus() { //Auto-connect to API (when set to kobold, API URL exists, and auto_connect is true) function RA_autoconnect(PrevApi) { - if (online_status === undefined) { + // secrets.js or script.js not loaded + if (SECRET_KEYS === undefined || online_status === undefined) { setTimeout(RA_autoconnect, 100); return; } @@ -404,7 +405,6 @@ function RA_autoconnect(PrevApi) { } if (!connection_made) { - RA_AC_retries++; retry_delay = Math.min(retry_delay * 2, 30000); // double retry delay up to to 30 secs //console.log('connection attempts: ' + RA_AC_retries + ' delay: ' + (retry_delay / 1000) + 's'); From d71fa715ab3e5ff3f4cbbd3fa8fe5773e428fab3 Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Tue, 16 May 2023 23:41:27 +0300 Subject: [PATCH 23/26] Add autocomplete off to API URLs --- public/index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/index.html b/public/index.html index d2f703d6f..4d231c692 100644 --- a/public/index.html +++ b/public/index.html @@ -1019,7 +1019,7 @@ Enter 0000000000 to use anonymous mode.
    - +
    For privacy reasons, your API key will be hidden after you reload the page.
    @@ -1053,7 +1053,7 @@
    - +
    For privacy reasons, your API key will be hidden after you reload the page.
    @@ -1088,12 +1088,12 @@

    Blocking API url

    Example: http://127.0.0.1:5000/
    - +

    Streaming API url

    Example: ws://127.0.0.1:5005/api/v1/stream
    - +
    @@ -1116,7 +1116,7 @@
    - +
    For privacy reasons, your API key will be hidden after you reload the page.
    @@ -1156,7 +1156,7 @@
    - +
    For privacy reasons, your API key will be hidden after you reload the page.
    From 9bcee0e2e22921f549d882b331932c83310cc63e Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Wed, 17 May 2023 00:52:25 +0300 Subject: [PATCH 24/26] Fix message container --- public/style.css | 1 - 1 file changed, 1 deletion(-) diff --git a/public/style.css b/public/style.css index 7b1e07c62..91c084474 100644 --- a/public/style.css +++ b/public/style.css @@ -3314,7 +3314,6 @@ a { /* Message images */ .mes .mes_img_container { max-width: 100%; - max-height: 60svh; /*to fit inside single window height of mobile landscape*/ display: none; position: relative; From 0dcd185daad754d6769a51860858599bd6f20dba Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Wed, 17 May 2023 16:21:19 +0900 Subject: [PATCH 25/26] mobile-CSS fix for AN and SD popup --- .../extensions/stable-diffusion/index.js | 23 ++++++++----------- public/style.css | 13 +++++++---- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/public/scripts/extensions/stable-diffusion/index.js b/public/scripts/extensions/stable-diffusion/index.js index e22b6b49c..579ca1cfa 100644 --- a/public/scripts/extensions/stable-diffusion/index.js +++ b/public/scripts/extensions/stable-diffusion/index.js @@ -49,17 +49,14 @@ const triggerWords = { } const quietPrompts = { + /*OLD: [generationMode.CHARACTER]: "Pause your roleplay and provide comma-delimited list of phrases and keywords which describe {{char}}'s physical appearance and clothing. Ignore {{char}}'s personality traits, and chat history when crafting this description. End your response once the comma-delimited list is complete. Do not roleplay when writing this description, and do not attempt to continue the story.", */ + [generationMode.CHARACTER]: "[In the next response I want you to provide only a detailed comma-delimited list of keywords and phrases which describe {{char}}. The list must include all of the following items in this order: name, species and race, gender, age, clothing, occupation, physical features and appearances. Do not include descriptions of non-visual qualities such as personality, movements, scents, mental traits, or anything which could not be seen in a still photograph. Do not write in full sentences. Prefix your description with the phrase 'full body portrait:']", //face-specific prompt [generationMode.FACE]: "[In the next response I want you to provide only a detailed comma-delimited list of keywords and phrases which describe {{char}}. The list must include all of the following items in this order: name, species and race, gender, age, facial features and expressions, occupation, hair and hair accessories (if any), what they are wearing on their upper body (if anything). Do not describe anything below their neck. Do not include descriptions of non-visual qualities such as personality, movements, scents, mental traits, or anything which could not be seen in a still photograph. Do not write in full sentences. Prefix your description with the phrase 'close up facial portrait:']", //prompt for only the last message - [generationMode.NOW]: "[Pause your roleplay and provide a brief description of the last chat message. Focus on visual details, clothing, actions. Ignore the emotions and thoughts of {{char}} and {{user}} as well as any spoken dialog. Do not roleplay as {{char}} while writing this description. Do not continue the roleplay story.]", - - [generationMode.CHARACTER]: "[In the next response I want you to provide only a detailed comma-delimited list of keywords and phrases which describe {{char}}. The list must include all of the following items in this order: name, species and race, gender, age, clothing, occupation, physical features and appearances. Do not include descriptions of non-visual qualities such as personality, movements, scents, mental traits, or anything which could not be seen in a still photograph. Do not write in full sentences. Prefix your description with the phrase 'full body portrait:']", - - /*OLD: [generationMode.CHARACTER]: "Pause your roleplay and provide comma-delimited list of phrases and keywords which describe {{char}}'s physical appearance and clothing. Ignore {{char}}'s personality traits, and chat history when crafting this description. End your response once the comma-delimited list is complete. Do not roleplay when writing this description, and do not attempt to continue the story.", */ - [generationMode.USER]: "[Pause your roleplay and provide a detailed description of {{user}}'s appearance from the perspective of {{char}} in the form of a comma-delimited list of keywords and phrases. Ignore the rest of the story when crafting this description. Do not roleplay as {{char}}}} when writing this description, and do not attempt to continue the story.]", [generationMode.SCENARIO]: "[Pause your roleplay and provide a detailed description for all of the following: a brief recap of recent events in the story, {{char}}'s appearance, and {{char}}'s surroundings. Do not roleplay while writing this description.]", + [generationMode.NOW]: "[Pause your roleplay and provide a brief description of the last chat message. Focus on visual details, clothing, actions. Ignore the emotions and thoughts of {{char}} and {{user}} as well as any spoken dialog. Do not roleplay as {{char}} while writing this description. Do not continue the roleplay story.]", [generationMode.FREE]: "[Pause your roleplay and provide ONLY the last chat message string back to me verbatim. Do not write anything after the string. Do not roleplay at all in your response. Do not continue the roleplay story.]", } @@ -513,7 +510,7 @@ function addSDGenButtons() { messageButton.hide(); let popper = Popper.createPopper(button.get(0), dropdown.get(0), { - placement: 'top-start', + placement: 'top-end', }); $(document).on('click', '.sd_message_gen', sdMessageButton); @@ -535,11 +532,11 @@ function addSDGenButtons() { async function moduleWorker() { const context = getContext(); - if (context.onlineStatus === 'no_connection'){ + if (context.onlineStatus === 'no_connection') { $('#sd_gen').hide(200); $('.sd_message_gen').hide(); } - else{ + else { $('#sd_gen').show(200); $('.sd_message_gen').show(); } @@ -549,15 +546,15 @@ addSDGenButtons(); setInterval(moduleWorker, UPDATE_INTERVAL); -function sdMessageButton (e) { - const $mes = $(e.currentTarget).closest('.mes'); +function sdMessageButton(e) { + const $mes = $(e.currentTarget).closest('.mes'); const character = $mes.find('.name_text').text(), - message = $mes.find('.mes_text').text(); + message = $mes.find('.mes_text').text(); console.log("doing /sd raw last"); generatePicture('sd', 'raw_last', `${character} said: ${message}`, saveGeneratedImage); - function saveGeneratedImage(prompt, image){ + function saveGeneratedImage(prompt, image) { const context = getContext(); const message_id = $mes.attr('mesid'); const message = context.chat[message_id]; diff --git a/public/style.css b/public/style.css index 91c084474..ef4381831 100644 --- a/public/style.css +++ b/public/style.css @@ -4203,11 +4203,12 @@ body.waifuMode #avatar_zoom_popup { } #right-nav-panel, - #left-nav-panel { + #left-nav-panel, + #floatingPrompt { height: calc(100svh - 45px); - min-width: 100%; - width: 100%; - max-width: 100%; + min-width: 100% !important; + width: 100% !important; + max-width: 100% !important; overflow-y: hidden; border-left: 1px solid var(--grey30); border-right: 1px solid var(--grey30); @@ -4218,6 +4219,10 @@ body.waifuMode #avatar_zoom_popup { backdrop-filter: blur(calc(var(--SmartThemeBlurStrength) * 2)); } + #floatingPrompt { + height: min-content; + } + #right-nav-panel h4 { margin: 5px auto; } From 93ff85698260e78b491bf743aa3976a083e209a3 Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Wed, 17 May 2023 16:58:17 +0900 Subject: [PATCH 26/26] fix Poe character nudge to allow OOC SD response --- public/scripts/poe.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/scripts/poe.js b/public/scripts/poe.js index 3e2568a19..de4e191ac 100644 --- a/public/scripts/poe.js +++ b/public/scripts/poe.js @@ -39,7 +39,7 @@ If you have any objections to these requirements, please mention them specifical If you accept the requriements, please confirm this by replying with "${DEFAULT_JAILBREAK_RESPONSE}", and nothing more. Upon receiving your accurate confirmation message, I will specify the context of the scene and {{char}}'s characteristics, background, and personality in the next message.`; -const DEFAULT_CHARACTER_NUDGE_MESSAGE = "[Your the next response shall only be written from the point of view of {{char}}. Do not seek approval of your writing style at the end of the response.]"; +const DEFAULT_CHARACTER_NUDGE_MESSAGE = "[Unless otherwise stated by {{user}}, your the next response shall only be written from the point of view of {{char}}. Do not seek approval of your writing style at the end of the response.]"; const DEFAULT_IMPERSONATION_PROMPT = "[Write 1 reply only in internet RP style from the point of view of {{user}}, using the chat history so far as a guideline for the writing style of {{user}}. Don't write as {{char}} or system.]"; const poe_settings = { @@ -210,7 +210,7 @@ async function sendMessage(prompt, withStreaming, signal) { async function onConnectClick() { const api_key_poe = $('#poe_token').val().trim(); - + if (api_key_poe.length) { await writeSecret(SECRET_KEYS.POE, api_key_poe); } @@ -220,7 +220,7 @@ async function onConnectClick() { return; } - if ( is_poe_button_press) { + if (is_poe_button_press) { console.log('Poe API button is pressed'); return; }