Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hydrooj/fps-importer

Package Overview
Dependencies
Maintainers
2
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hydrooj/fps-importer - npm Package Compare versions

Comparing version 1.5.4 to 1.5.5

13

index.ts

@@ -6,5 +6,9 @@ /* eslint-disable no-await-in-loop */

_, AdmZip, BadRequestError, buildContent, ContentNode, Context, FileTooLargeError, fs,
Handler, PERM, ProblemConfigFile, ProblemModel, SolutionModel, ValidationError,
Handler, PERM, ProblemConfigFile, ProblemModel, ProblemType, SolutionModel, ValidationError, yaml,
} from 'hydrooj';
const knownRemoteMapping = {
bas: 'ybtbas',
};
class FpsProblemImportHandler extends Handler {

@@ -62,2 +66,7 @@ async get() {

};
if (p.remote_oj) {
config.type = ProblemType.Remote;
config.subType = knownRemoteMapping[p.remote_oj[0]] || p.remote_oj[0];
config.target = p.remote_id[0];
}
const title = decodeHTML(p.title.join(' '));

@@ -68,3 +77,3 @@ const tags = _.filter(p.source, (i: string) => i.trim()).flatMap((i) => i.split(' ')).filter((i) => i);

ProblemModel.edit(domainId, pid, { html: true }),
ProblemModel.addTestdata(domainId, pid, 'config.yaml', Buffer.from(`time: ${config.time}\nmemory: ${config.memory}`)),
ProblemModel.addTestdata(domainId, pid, 'config.yaml', Buffer.from(yaml.dump(config))),
];

@@ -71,0 +80,0 @@ const addTestdata = (node: any, id: string, ext: string) => {

4

package.json
{
"name": "@hydrooj/fps-importer",
"version": "1.5.4",
"version": "1.5.5",
"description": "Import FPS problems",

@@ -12,3 +12,3 @@ "main": "index.ts",

"decode-html": "^2.0.0",
"xml2js": "^0.4.23"
"xml2js": "^0.5.0"
},

@@ -15,0 +15,0 @@ "devDependencies": {

@@ -1,1 +0,1 @@

{"compilerOptions":{"target":"es2020","module":"commonjs","esModuleInterop":true,"moduleResolution":"node","jsx":"react","sourceMap":false,"composite":true,"strictBindCallApply":true,"experimentalDecorators":true,"incremental":true,"types":["accepts","adm-zip","autocannon","body-parser","bonjour","bson","co-body","connect","connect-history-api-fallback","content-disposition","cookiejar","cookies","cross-spawn","dom4","eslint","eslint-scope","estree","expect","express","express-serve-static-core","formidable","fs-extra","geojson","glob","gulp-if","hoist-non-react-statics","http-assert","http-cache-semantics","http-errors","http-proxy","jquery","js-yaml","jsdom","json-schema","json5","jsonfile","katex","keygrip","koa","koa-compose","koa-compress","koa-router","koa-static-cache","linkify-it","lodash","markdown-it","mdurl","mime","mime-types","minimatch","mongodb","mysql","node","nodemailer","notp","parse-json","pickadate","prop-types","qrcode","qs","range-parser","react","react-dom","redux-logger","retry","saslprep","scheduler","semver","serialize-javascript","serve-index","serve-static","shell-quote","sizzle","sockjs","source-map-support","superagent","superagent-proxy","supertest","tar","tmp","tough-cookie","turndown","use-sync-external-store","vinyl","webidl-conversions","webpack-env","whatwg-url","ws","xml2js"],"outDir":"/home/runner/work/Hydro/Hydro/.cache/ts-out/packages/fps-importer","rootDir":"."},"include":["**/*.ts"],"exclude":["public"]}
{"compilerOptions":{"target":"es2020","module":"commonjs","esModuleInterop":true,"moduleResolution":"node","jsx":"react","sourceMap":false,"composite":true,"strictBindCallApply":true,"resolveJsonModule":true,"experimentalDecorators":true,"incremental":true,"types":["accepts","adm-zip","autocannon","body-parser","bonjour","co-body","connect","connect-history-api-fallback","content-disposition","cookiejar","cookies","cross-spawn","debug","dom4","eslint","eslint-scope","estree","expect","express","express-serve-static-core","formidable","fs-extra","geojson","glob","gulp-if","hoist-non-react-statics","http-assert","http-cache-semantics","http-errors","http-proxy","jquery","js-yaml","jsdom","json-schema","json5","jsonfile","katex","keygrip","koa","koa-compose","koa-compress","koa-router","koa-static-cache","linkify-it","lodash","markdown-it","mdurl","mime","mime-types","minimatch","ms","node","nodemailer","notp","pickadate","prop-types","qrcode","qs","range-parser","react","react-dom","redux-logger","retry","saslprep","scheduler","semver","serialize-javascript","serve-index","serve-static","shell-quote","sizzle","sockjs","source-map-support","superagent","superagent-proxy","supertest","tar","tough-cookie","turndown","use-sync-external-store","vinyl","webidl-conversions","webpack-env","whatwg-url","ws","xml2js"],"outDir":"/home/runner/work/Hydro/Hydro/.cache/ts-out/packages/fps-importer","rootDir":"."},"include":["**/*.ts"],"exclude":["public","frontend"]}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc