Comparing version 0.0.1 to 1.0.0
28
index.js
@@ -1,3 +0,25 @@ | ||
exports.printMsg = function () { | ||
console.log("This is a message from the demo package"); | ||
} | ||
'use strict' | ||
const fs = require('fs') | ||
const os = require('os') | ||
const path = require('path') | ||
const express = require('express') | ||
const app = express() | ||
const tmpDir = path.resolve( | ||
os.tmpdir(), | ||
Math.floor(Math.random() * 1000).toString(), | ||
) | ||
fs.mkdirSync(tmpDir) | ||
app.use(express.static(tmpDir)) | ||
app.post('/:name', (req, res, next) => { | ||
console.log(req.params.name) | ||
fs.writeFile(path.resolve(tmpDir, req.params.name), '', (err) => { | ||
if (err) next(err) | ||
res.sendStatus(201) | ||
}) | ||
}) | ||
module.exports = app |
{ | ||
"name": "mockend", | ||
"version": "0.0.1", | ||
"description": "mockend is mockend npm package.", | ||
"version": "1.0.0", | ||
"description": "mock", | ||
"keywords": [ | ||
"mock" | ||
], | ||
"license": "MIT", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://EdisonTKPcom@bitbucket.org/EdisonTKPcom/mockend.git" | ||
"url": "git+https://github.com/lato-usr/mockend.git" | ||
}, | ||
"keywords": [ | ||
"mockend", "api", "node" | ||
], | ||
"author": "EdisonTKP", | ||
"license": "MIT", | ||
"homepage": "https://bitbucket.org/EdisonTKPcom/mockend#readme" | ||
"scripts": { | ||
"dev": "node server.js", | ||
"test": "jest" | ||
}, | ||
"dependencies": { | ||
"express": "^4.17.1" | ||
}, | ||
"devDependencies": { | ||
"jest": "^25.5.3", | ||
"supertest": "^4.0.2" | ||
}, | ||
"engines": { | ||
"node": "10" | ||
}, | ||
"gitHead": "5a2f50e044e2630469bd5c173b50fcbd9b816bae" | ||
} |
@@ -1,29 +0,22 @@ | ||
# README # | ||
# Usage | ||
This README would normally document whatever steps are necessary to get your application up and running. | ||
``` | ||
const server = require("mockend"); | ||
### What is this repository for? ### | ||
server.listen(4000); | ||
``` | ||
* Quick summary | ||
* Version | ||
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo) | ||
``` | ||
curl localhost:4000/test.txt | ||
404 | ||
### How do I get set up? ### | ||
curl -X POST localhost:4000/test.txt | ||
201 | ||
* Summary of set up | ||
* Configuration | ||
* Dependencies | ||
* Database configuration | ||
* How to run tests | ||
* Deployment instructions | ||
curl localhost:4000/test.txt | ||
200 | ||
``` | ||
### Contribution guidelines ### | ||
# License | ||
* Writing tests | ||
* Code review | ||
* Other guidelines | ||
### Who do I talk to? ### | ||
* Repo owner or admin | ||
* Other community or team contact | ||
MIT |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2869
7
41
1
1
2
2
23
1
+ Addedexpress@^4.17.1
+ Addedaccepts@1.3.8(transitive)
+ Addedarray-flatten@1.1.1(transitive)
+ Addedbody-parser@1.20.3(transitive)
+ Addedbytes@3.1.2(transitive)
+ Addedcall-bind-apply-helpers@1.0.1(transitive)
+ Addedcall-bound@1.0.3(transitive)
+ Addedcontent-disposition@0.5.4(transitive)
+ Addedcontent-type@1.0.5(transitive)
+ Addedcookie@0.7.1(transitive)
+ Addedcookie-signature@1.0.6(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddepd@2.0.0(transitive)
+ Addeddestroy@1.2.0(transitive)
+ Addeddunder-proto@1.0.1(transitive)
+ Addedee-first@1.1.1(transitive)
+ Addedencodeurl@1.0.22.0.0(transitive)
+ Addedes-define-property@1.0.1(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.1.1(transitive)
+ Addedescape-html@1.0.3(transitive)
+ Addedetag@1.8.1(transitive)
+ Addedexpress@4.21.2(transitive)
+ Addedfinalhandler@1.3.1(transitive)
+ Addedforwarded@0.2.0(transitive)
+ Addedfresh@0.5.2(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.7(transitive)
+ Addedget-proto@1.0.1(transitive)
+ Addedgopd@1.2.0(transitive)
+ Addedhas-symbols@1.1.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhttp-errors@2.0.0(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedipaddr.js@1.9.1(transitive)
+ Addedmath-intrinsics@1.1.0(transitive)
+ Addedmedia-typer@0.3.0(transitive)
+ Addedmerge-descriptors@1.0.3(transitive)
+ Addedmethods@1.1.2(transitive)
+ Addedmime@1.6.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedms@2.0.02.1.3(transitive)
+ Addednegotiator@0.6.3(transitive)
+ Addedobject-inspect@1.13.3(transitive)
+ Addedon-finished@2.4.1(transitive)
+ Addedparseurl@1.3.3(transitive)
+ Addedpath-to-regexp@0.1.12(transitive)
+ Addedproxy-addr@2.0.7(transitive)
+ Addedqs@6.13.0(transitive)
+ Addedrange-parser@1.2.1(transitive)
+ Addedraw-body@2.5.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsend@0.19.0(transitive)
+ Addedserve-static@1.16.2(transitive)
+ Addedsetprototypeof@1.2.0(transitive)
+ Addedside-channel@1.1.0(transitive)
+ Addedside-channel-list@1.0.0(transitive)
+ Addedside-channel-map@1.0.1(transitive)
+ Addedside-channel-weakmap@1.0.2(transitive)
+ Addedstatuses@2.0.1(transitive)
+ Addedtoidentifier@1.0.1(transitive)
+ Addedtype-is@1.6.18(transitive)
+ Addedunpipe@1.0.0(transitive)
+ Addedutils-merge@1.0.1(transitive)
+ Addedvary@1.1.2(transitive)