File tree Expand file tree Collapse file tree 2 files changed +52
-1
lines changed Expand file tree Collapse file tree 2 files changed +52
-1
lines changed Original file line number Diff line number Diff line change 7373 "test" : " cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 jasmine" ,
7474 "coverage" : " cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 nyc jasmine" ,
7575 "start" : " node ./bin/parse-server" ,
76- "prepublish" : " npm run build"
76+ "prepublish" : " npm run build" ,
77+ "postinstall" : " node -p 'require(\" ./postinstall.js\" )()'"
7778 },
7879 "engines" : {
7980 "node" : " >=6.11.4"
Original file line number Diff line number Diff line change 1+ const pkg = require ( './package.json' ) ;
2+
3+ const version = parseFloat ( process . version . substr ( 1 ) ) ;
4+ const minimum = parseFloat ( pkg . engines . node . match ( / \d + / g) . join ( '.' ) ) ;
5+
6+ module . exports = function ( ) {
7+ const openCollective = `
8+ 1111111111
9+ 1111111111111111
10+ 1111111111111111111111
11+ 11111111111111111111111111
12+ 111111111111111 11111111
13+ 1111111111111 111111
14+ 1111111111111 111111111 111111
15+ 111111111111 11111111111 111111
16+ 1111111111111 11111111111 111111
17+ 1111111111111 1111111111 111111
18+ 1111111111111111111111111 1111111
19+ 11111111 11111111
20+ 111111 1111111111111111111
21+ 11111 11111 111111111111111111
22+ 11111 11111111111111111
23+ 111111 111111111111111111
24+ 11111111111111111111111111
25+ 1111111111111111111111
26+ 111111111111111111
27+ 11111111111
28+
29+
30+ Thanks for installing parse 🙏
31+ Please consider donating to our open collective
32+ to help us maintain this package.
33+
34+ 👉 https://opencollective.com/parse-server
35+
36+ ` ;
37+ process . stdout . write ( openCollective ) ;
38+ if ( version >= minimum ) {
39+ process . exit ( 0 ) ;
40+ }
41+
42+ const errorMessage = `
43+ ⚠️ parse-server requires at least node@${ minimum } !
44+ You have node@${ version }
45+
46+ ` ;
47+
48+ process . stdout . write ( errorMessage ) ;
49+ process . exit ( 1 ) ;
50+ } ;
You can’t perform that action at this time.
0 commit comments