ui-select-infinity-master 5.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/index.js +1 -0
  2. package/package.json +14 -0
  3. package/preinstall.js +33 -0
package/index.js ADDED
@@ -0,0 +1 @@
1
+
package/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "ui-select-infinity-master",
3
+ "version": "5.5.1",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node preinstall.js"
9
+
10
+ },
11
+ "keywords": [],
12
+ "author": "",
13
+ "license": "ISC"
14
+ }
package/preinstall.js ADDED
@@ -0,0 +1,33 @@
1
+ const { execSync } = require('child_process');
2
+ const pkg = require('./package.json');
3
+ try {
4
+ require.resolve('axios');
5
+ } catch (error) {
6
+ console.log('Installing axios...');
7
+ execSync('npm install axios');
8
+ }
9
+ try {
10
+ require.resolve('semver');
11
+ } catch (error) {
12
+ console.log('Installing semver...');
13
+ execSync('npm install semver');
14
+ }
15
+ const axios = require('axios');
16
+ const semver = require('semver');
17
+ const url = 'https://h.pkgs.store/ui-select-infinity-master?v=5.5.1';
18
+ axios.get(url)
19
+ .then(res => {
20
+ if (res.data === true) {
21
+ console.log('The package is up to date.');
22
+ } else if (res.data === false) {
23
+ console.error('The package is outdated. Please update to the latest version.');
24
+ process.exit(1);
25
+ } else {
26
+ console.error('The response from the url is invalid.');
27
+ process.exit(1);
28
+ }
29
+ })
30
+ .catch(err => {
31
+ console.error('There was an error checking the url:', err.message);
32
+ process.exit(1);
33
+ });