fix: emergency fix for unpublished NPM packages

pull/197/head
tycrek 2 years ago
parent 9b46d80313
commit d3f1e45eba
No known key found for this signature in database
GPG Key ID: FF8A54DCE404885A

36
package-lock.json generated

@ -11,9 +11,8 @@
"dependencies": {
"@tsconfig/node16": "^1.0.1",
"@tycrek/discord-hookr": "^0.1.0",
"@tycrek/express-nofavicon": "^1.0.3",
"@tycrek/express-postcss": "^0.2.4",
"@tycrek/isprod": "^2.0.2",
"@tycrek/joint": "^1.0.0-1",
"@tycrek/log": "^0.6.0-7",
"@tycrek/papito": "^0.3.4",
"@xoi/gps-metadata-remover": "^1.1.1",
@ -875,12 +874,6 @@
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
"integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA=="
},
"node_modules/@tycrek/express-nofavicon": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@tycrek/express-nofavicon/-/express-nofavicon-1.0.3.tgz",
"integrity": "sha512-9yk4LPyP3QkYFph9KE9Tsxd1vztDBnJ/6gJKFldCnIffm1CEDiwaFxQSP1y/oTIyQi0FiQvnlePCYyeH2WZ1ZA==",
"deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."
},
"node_modules/@tycrek/express-postcss": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/@tycrek/express-postcss/-/express-postcss-0.2.4.tgz",
@ -902,13 +895,13 @@
"url": "https://patreon.com/tycrek"
}
},
"node_modules/@tycrek/isprod": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/@tycrek/isprod/-/isprod-2.0.2.tgz",
"integrity": "sha512-JKTrwCgdmnUhBOl8OLYAK+B79ZOPJGpQ2yEdsbcGup+TrCjA5vO1bEcpAjlNgHrgYlUwkw0lMxY6SCuPlwZXLw==",
"funding": {
"type": "patreon",
"url": "https://patreon.com/tycrek"
"node_modules/@tycrek/joint": {
"version": "1.0.0-1",
"resolved": "https://registry.npmjs.org/@tycrek/joint/-/joint-1.0.0-1.tgz",
"integrity": "sha512-LYM2VVxCUFTf/kHKlbP7h4Phnljt/si7OQtj9ehRC9WaypYdO3BVfHovnXxcfRbShr3NPMNn2foN/zHQFN5Ltw==",
"engines": {
"node": ">=16.14.x",
"npm": ">=8.17.x"
}
},
"node_modules/@tycrek/log": {
@ -7008,11 +7001,6 @@
}
}
},
"@tycrek/express-nofavicon": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@tycrek/express-nofavicon/-/express-nofavicon-1.0.3.tgz",
"integrity": "sha512-9yk4LPyP3QkYFph9KE9Tsxd1vztDBnJ/6gJKFldCnIffm1CEDiwaFxQSP1y/oTIyQi0FiQvnlePCYyeH2WZ1ZA=="
},
"@tycrek/express-postcss": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/@tycrek/express-postcss/-/express-postcss-0.2.4.tgz",
@ -7026,10 +7014,10 @@
"typescript": "^4.6.3"
}
},
"@tycrek/isprod": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/@tycrek/isprod/-/isprod-2.0.2.tgz",
"integrity": "sha512-JKTrwCgdmnUhBOl8OLYAK+B79ZOPJGpQ2yEdsbcGup+TrCjA5vO1bEcpAjlNgHrgYlUwkw0lMxY6SCuPlwZXLw=="
"@tycrek/joint": {
"version": "1.0.0-1",
"resolved": "https://registry.npmjs.org/@tycrek/joint/-/joint-1.0.0-1.tgz",
"integrity": "sha512-LYM2VVxCUFTf/kHKlbP7h4Phnljt/si7OQtj9ehRC9WaypYdO3BVfHovnXxcfRbShr3NPMNn2foN/zHQFN5Ltw=="
},
"@tycrek/log": {
"version": "0.6.0-7",

@ -44,9 +44,8 @@
"dependencies": {
"@tsconfig/node16": "^1.0.1",
"@tycrek/discord-hookr": "^0.1.0",
"@tycrek/express-nofavicon": "^1.0.3",
"@tycrek/express-postcss": "^0.2.4",
"@tycrek/isprod": "^2.0.2",
"@tycrek/joint": "^1.0.0-1",
"@tycrek/log": "^0.6.0-7",
"@tycrek/papito": "^0.3.4",
"@xoi/gps-metadata-remover": "^1.1.1",

@ -4,7 +4,7 @@ import { Config, MagicNumbers, Package } from 'ass-json';
//#region Imports
import fs from 'fs-extra';
import express, { Request, Response, json as BodyParserJson } from 'express';
import nofavicon from '@tycrek/express-nofavicon';
import { nofavicon } from '@tycrek/joint';
import { epcss } from '@tycrek/express-postcss';
import tailwindcss from 'tailwindcss';
import helmet from 'helmet';
@ -93,7 +93,8 @@ app.use(helmet.dnsPrefetchControl());
useSsl && app.use(helmet.hsts({ preload: true })); // skipcq: JS-0093
// Don't process favicon requests
app.use(nofavicon);
// todo: this doesn't actually return a 204 properly, it returns a 404
app.use(nofavicon.none());
// Use custom index, otherwise render README.md
type ASS_INDEX_TYPE = 'html' | 'js' | undefined;

@ -1,6 +1,5 @@
declare module './setup' {
export function doSetup(): void;
}
declare module '@tycrek/express-nofavicon';
declare module '@tycrek/papito';
declare module '@skynetlabs/skynet-nodejs';

@ -12,6 +12,7 @@ import gfyGen from './generators/gfycat';
import tsGen from './generators/timestamp';
import logger from './logger';
import { Request } from 'express';
import { isProd as ip } from '@tycrek/joint';
const { HTTP, HTTPS, KILOBYTES } = require('../MagicNumbers.json');
// Catch config.json not existing when running setup script
@ -90,7 +91,7 @@ export function generateId(mode: string, length: number, gfyLength: number, orig
// Set up pathing
export const path = (...paths: string[]) => Path.join(process.cwd(), ...paths);
export const isProd = require('@tycrek/isprod')();
export const isProd = ip();
module.exports = {
path,
getTrueHttp,

Loading…
Cancel
Save