Compare commits
1 Commits
xo-lite-v0
...
npm-turbo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ab7692ef9 |
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@@ -21,12 +21,12 @@ jobs:
|
|||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '18'
|
node-version: '18'
|
||||||
cache: 'yarn'
|
cache: 'npm'
|
||||||
- name: Install project dependencies
|
- name: Install project dependencies
|
||||||
run: yarn
|
run: npm ci
|
||||||
- name: Build the project
|
- name: Build the project
|
||||||
run: yarn build
|
run: npm run build
|
||||||
- name: Lint tests
|
- name: Lint tests
|
||||||
run: yarn test-lint
|
run: npm run test-lint
|
||||||
- name: Integration tests
|
- name: Integration tests
|
||||||
run: sudo yarn test-integration
|
run: sudo npm run test-integration
|
||||||
|
|||||||
@@ -61,10 +61,10 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"clean": "rimraf dist/",
|
"clean": "rimraf dist/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "yarn run clean",
|
"prebuild": "npm run clean",
|
||||||
"predev": "yarn run clean",
|
"predev": "npm run clean",
|
||||||
"prepublishOnly": "yarn run build",
|
"prepublishOnly": "npm run build",
|
||||||
"pretest": "yarn run build",
|
"pretest": "npm run build",
|
||||||
"postversion": "npm publish",
|
"postversion": "npm publish",
|
||||||
"test": "node--test ./dist/"
|
"test": "node--test ./dist/"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
- Clone
|
- Clone
|
||||||
- Copy `.env.dist` to `.env` and set vars
|
- Copy `.env.dist` to `.env` and set vars
|
||||||
- `yarn`
|
- `npm ci`
|
||||||
- `yarn dev`
|
- `npm run dev`
|
||||||
|
|
||||||
## Conventions
|
## Conventions
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"preview": "vite preview --port 4173",
|
"preview": "vite preview --port 4173",
|
||||||
"build-only": "GIT_HEAD=$(git rev-parse HEAD) vite build",
|
"build-only": "GIT_HEAD=$(git rev-parse HEAD) vite build",
|
||||||
"deploy": "./scripts/deploy.sh",
|
"deploy": "./scripts/deploy.sh",
|
||||||
"test": "yarn run type-check",
|
"test": "npm run type-check",
|
||||||
"type-check": "vue-tsc --noEmit"
|
"type-check": "vue-tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ SERVER="www-xo.gpn.vates.fr"
|
|||||||
|
|
||||||
echo "Building XO Lite"
|
echo "Building XO Lite"
|
||||||
|
|
||||||
(cd ../.. && yarn)
|
(cd ../.. && npm ci)
|
||||||
yarn build-only --base="$BASE"
|
npm run build-only --base="$BASE"
|
||||||
|
|
||||||
echo "Deploying XO Lite from $DIST"
|
echo "Deploying XO Lite from $DIST"
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ configure(transportConsole())
|
|||||||
Optional dependency:
|
Optional dependency:
|
||||||
|
|
||||||
```
|
```
|
||||||
> yarn add nodemailer pretty-format
|
> npm add nodemailer pretty-format
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration:
|
Configuration:
|
||||||
@@ -127,7 +127,7 @@ configure(
|
|||||||
Optional dependency:
|
Optional dependency:
|
||||||
|
|
||||||
```
|
```
|
||||||
> yarn add split-host syslog-client
|
> npm add split-host syslog-client
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration:
|
Configuration:
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ configure(transportConsole())
|
|||||||
Optional dependency:
|
Optional dependency:
|
||||||
|
|
||||||
```
|
```
|
||||||
> yarn add nodemailer pretty-format
|
> npm add nodemailer pretty-format
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration:
|
Configuration:
|
||||||
@@ -145,7 +145,7 @@ configure(
|
|||||||
Optional dependency:
|
Optional dependency:
|
||||||
|
|
||||||
```
|
```
|
||||||
> yarn add split-host syslog-client
|
> npm add split-host syslog-client
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration:
|
Configuration:
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"postversion": "npm publish --access public",
|
"postversion": "npm publish --access public",
|
||||||
"prebuild": "rimraf dist/",
|
"prebuild": "rimraf dist/",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.7.4",
|
"@babel/cli": "^7.7.4",
|
||||||
|
|||||||
@@ -56,8 +56,8 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "rimraf dist/",
|
"prebuild": "rimraf dist/",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
@@ -93,12 +93,6 @@ v16.14.0
|
|||||||
|
|
||||||
If not, see [this page](https://nodejs.org/en/download/package-manager/) for instructions on how to install Node.
|
If not, see [this page](https://nodejs.org/en/download/package-manager/) for instructions on how to install Node.
|
||||||
|
|
||||||
#### Yarn
|
|
||||||
|
|
||||||
Yarn is a package manager that offers more guarantees than npm.
|
|
||||||
|
|
||||||
See [this page](https://yarnpkg.com/en/docs/install#debian-stable) for instructions on how to install Yarn.
|
|
||||||
|
|
||||||
#### Packages
|
#### Packages
|
||||||
|
|
||||||
XO needs the following packages to be installed. Redis is used as a database by XO.
|
XO needs the following packages to be installed. Redis is used as a database by XO.
|
||||||
@@ -129,12 +123,12 @@ git clone -b master https://github.com/vatesfr/xen-orchestra
|
|||||||
|
|
||||||
### Installing dependencies
|
### Installing dependencies
|
||||||
|
|
||||||
Now that you have the code, you can enter the `xen-orchestra` directory and use `yarn` to install other dependencies. Then finally build it using `yarn build`. Be sure to run `yarn` commands as the same user you will be using to run Xen Orchestra:
|
Now that you have the code, you can enter the `xen-orchestra` directory and use `npm ci` to install other dependencies. Then finally build it using `npm run build`. Be sure to run `npm` commands as the same user you will be using to run Xen Orchestra:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd xen-orchestra
|
cd xen-orchestra
|
||||||
yarn
|
npm ci
|
||||||
yarn build
|
npm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
Now you have to create a config file for `xo-server`:
|
Now you have to create a config file for `xo-server`:
|
||||||
@@ -152,7 +146,7 @@ In this config file, you can change default ports (80 and 443) for xo-server. If
|
|||||||
You can try to start xo-server to see if it works. You should have something like this:
|
You can try to start xo-server to see if it works. You should have something like this:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ yarn start
|
$ npm run start
|
||||||
WebServer listening on localhost:80
|
WebServer listening on localhost:80
|
||||||
[INFO] Default user: "admin@admin.net" with password "admin"
|
[INFO] Default user: "admin@admin.net" with password "admin"
|
||||||
```
|
```
|
||||||
@@ -162,7 +156,7 @@ WebServer listening on localhost:80
|
|||||||
The only part you need to launch is xo-server, which is quite easy to do. From the `xen-orchestra/packages/xo-server` directory, run the following:
|
The only part you need to launch is xo-server, which is quite easy to do. From the `xen-orchestra/packages/xo-server` directory, run the following:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
yarn start
|
npm run start
|
||||||
```
|
```
|
||||||
|
|
||||||
That's it! Use your browser to visit the xo-server IP address, and it works! :)
|
That's it! Use your browser to visit the xo-server IP address, and it works! :)
|
||||||
@@ -176,8 +170,8 @@ If you would like to update your current version, enter your `xen-orchestra` dir
|
|||||||
git checkout .
|
git checkout .
|
||||||
|
|
||||||
git pull --ff-only
|
git pull --ff-only
|
||||||
yarn
|
npm ci
|
||||||
yarn build
|
npm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
Then restart Xen Orchestra if it was running.
|
Then restart Xen Orchestra if it was running.
|
||||||
@@ -187,7 +181,7 @@ Then restart Xen Orchestra if it was running.
|
|||||||
- You can use [forever](https://github.com/nodejitsu/forever) to have the process always running:
|
- You can use [forever](https://github.com/nodejitsu/forever) to have the process always running:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
yarn global add forever
|
npm i -g forever
|
||||||
|
|
||||||
# Run the below as the user owning XO
|
# Run the below as the user owning XO
|
||||||
forever start dist/cli.mjs
|
forever start dist/cli.mjs
|
||||||
@@ -196,8 +190,8 @@ forever start dist/cli.mjs
|
|||||||
- Or you can use [forever-service](https://github.com/zapty/forever-service) to install XO as a system service, so it starts automatically at boot. Run the following as root:
|
- Or you can use [forever-service](https://github.com/zapty/forever-service) to install XO as a system service, so it starts automatically at boot. Run the following as root:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
yarn global add forever
|
npm i -g forever
|
||||||
yarn global add forever-service
|
npm i -g forever-service
|
||||||
|
|
||||||
# Be sure to edit the path below to where your install is located!
|
# Be sure to edit the path below to where your install is located!
|
||||||
cd /home/username/xen-orchestra/packages/xo-server/
|
cd /home/username/xen-orchestra/packages/xo-server/
|
||||||
@@ -238,8 +232,8 @@ Exceptional individual contributers are awarded with a free XOA Premium subscrip
|
|||||||
If you have problems during the building phase, follow these steps in your `xen-orchestra` directory:
|
If you have problems during the building phase, follow these steps in your `xen-orchestra` directory:
|
||||||
|
|
||||||
1. `rm -rf node_modules`
|
1. `rm -rf node_modules`
|
||||||
1. `yarn`
|
1. `npm ci`
|
||||||
1. `yarn build`
|
1. `npm run build`
|
||||||
|
|
||||||
### FreeBSD
|
### FreeBSD
|
||||||
|
|
||||||
@@ -284,7 +278,7 @@ service redis start
|
|||||||
If you are using OpenBSD, you need to install these packages:
|
If you are using OpenBSD, you need to install these packages:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pkg_add gmake redis python--%2.7 git node autoconf yarn
|
pkg_add gmake redis python--%2.7 git node autoconf
|
||||||
```
|
```
|
||||||
|
|
||||||
A few of the npm packages look for system binaries as part of their installation, and if missing will try to build it themselves. Installing these will save some time and allow for easier upgrades later:
|
A few of the npm packages look for system binaries as part of their installation, and if missing will try to build it themselves. Installing these will save some time and allow for easier upgrades later:
|
||||||
@@ -307,10 +301,10 @@ ulimit -n 10240
|
|||||||
ln -s /usr/local/bin/node /tmp/node
|
ln -s /usr/local/bin/node /tmp/node
|
||||||
```
|
```
|
||||||
|
|
||||||
If `yarn` cannot find Python, give it an hand :
|
If `npm` cannot find Python, give it an hand :
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
PYTHON=/usr/local/bin/python2 yarn
|
PYTHON=/usr/local/bin/python2 npm
|
||||||
```
|
```
|
||||||
|
|
||||||
Enable redis on boot with:
|
Enable redis on boot with:
|
||||||
|
|||||||
49047
package-lock.json
generated
Normal file
49047
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -88,7 +88,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "turbo run build --scope xo-server --scope xo-server-'*' --scope xo-web",
|
"build": "turbo run build --scope xo-server --scope xo-server-'*' --scope xo-web",
|
||||||
"build:xo-lite": "turbo run build --scope @xen-orchestra/lite",
|
"build:xo-lite": "turbo run build --scope @xen-orchestra/lite",
|
||||||
"ci": "yarn && yarn build && yarn test-lint && yarn test-integration",
|
"ci": "npm ci && npm run build && npm run test-lint && npm run test-integration",
|
||||||
"clean": "scripts/run-script.js --parallel clean",
|
"clean": "scripts/run-script.js --parallel clean",
|
||||||
"dev": "scripts/run-script.js --parallel --concurrency 0 --verbose dev",
|
"dev": "scripts/run-script.js --parallel --concurrency 0 --verbose dev",
|
||||||
"dev-test": "jest --bail --watch \"^(?!.*\\.integ\\.spec\\.js$)\"",
|
"dev-test": "jest --bail --watch \"^(?!.*\\.integ\\.spec\\.js$)\"",
|
||||||
@@ -104,6 +104,5 @@
|
|||||||
"workspaces": [
|
"workspaces": [
|
||||||
"@*/*",
|
"@*/*",
|
||||||
"packages/*"
|
"packages/*"
|
||||||
],
|
]
|
||||||
"packageManager": "yarn@1.22.19"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,8 +53,8 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "rimraf dist/",
|
"prebuild": "rimraf dist/",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build",
|
"prepublishOnly": "npm run build",
|
||||||
"postversion": "npm publish"
|
"postversion": "npm publish"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,8 +64,8 @@
|
|||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"plot": "gnuplot -p memory-test.gnu",
|
"plot": "gnuplot -p memory-test.gnu",
|
||||||
"prebuild": "rimraf dist/",
|
"prebuild": "rimraf dist/",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build",
|
"prepublishOnly": "npm run build",
|
||||||
"postversion": "npm publish",
|
"postversion": "npm publish",
|
||||||
"test": "tap"
|
"test": "tap"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,8 +37,8 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "rimraf dist/",
|
"prebuild": "rimraf dist/",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build",
|
"prepublishOnly": "npm run build",
|
||||||
"postversion": "npm publish"
|
"postversion": "npm publish"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"dev": "tsc -w",
|
"dev": "tsc -w",
|
||||||
"prepublishOnly": "yarn run build",
|
"prepublishOnly": "npm run build",
|
||||||
"start": "node dist/index.js",
|
"start": "node dist/index.js",
|
||||||
"postversion": "npm publish"
|
"postversion": "npm publish"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,8 +44,8 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "rimraf dist/",
|
"prebuild": "rimraf dist/",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build",
|
"prepublishOnly": "npm run build",
|
||||||
"postversion": "npm publish"
|
"postversion": "npm publish"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,8 +37,8 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "rimraf dist/",
|
"prebuild": "rimraf dist/",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build",
|
"prepublishOnly": "npm run build",
|
||||||
"postversion": "npm publish",
|
"postversion": "npm publish",
|
||||||
"test": "node--test"
|
"test": "node--test"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,8 +40,8 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "rimraf dist/",
|
"prebuild": "rimraf dist/",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@xen-orchestra/audit-core": "^0.2.3",
|
"@xen-orchestra/audit-core": "^0.2.3",
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"dev": "NODE_DEV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "NODE_DEV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,8 +42,8 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "rimraf dist/",
|
"prebuild": "rimraf dist/",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,8 +49,8 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "rimraf dist/",
|
"prebuild": "rimraf dist/",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,9 +42,9 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"clean": "rimraf dist/",
|
"clean": "rimraf dist/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "yarn run clean",
|
"prebuild": "npm run clean",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,9 +49,9 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"clean": "rimraf dist/",
|
"clean": "rimraf dist/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "yarn run clean",
|
"prebuild": "npm run clean",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"dev": "NODE_DEV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "NODE_DEV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,8 +44,8 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "rimraf dist/",
|
"prebuild": "rimraf dist/",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,9 +33,9 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"clean": "rimraf dist/",
|
"clean": "rimraf dist/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "yarn run clean",
|
"prebuild": "npm run clean",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "rimraf dist/",
|
"prebuild": "rimraf dist/",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"version": "1.0.8",
|
"version": "1.0.8",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -118,14 +118,13 @@ describe('issue', () => {
|
|||||||
|
|
||||||
```
|
```
|
||||||
> npm ci
|
> npm ci
|
||||||
> yarn start
|
> npm run start
|
||||||
```
|
```
|
||||||
|
|
||||||
You get all the test suites passed (`PASS`) or failed (`FAIL`).
|
You get all the test suites passed (`PASS`) or failed (`FAIL`).
|
||||||
|
|
||||||
```
|
```
|
||||||
> yarn test
|
> npm run test
|
||||||
yarn run v1.9.4
|
|
||||||
$ jest
|
$ jest
|
||||||
PASS src/user/user.spec.js
|
PASS src/user/user.spec.js
|
||||||
PASS src/job/job.spec.js
|
PASS src/job/job.spec.js
|
||||||
@@ -139,11 +138,11 @@ describe('issue', () => {
|
|||||||
Done in 7.92s.
|
Done in 7.92s.
|
||||||
```
|
```
|
||||||
|
|
||||||
- You can run only tests related to changed files, and review the failed output by using: `> yarn start --watch`
|
- You can run only tests related to changed files, and review the failed output by using: `> npm run start -- --watch`
|
||||||
|
|
||||||
- ⚠ Warning: snapshots ⚠
|
- ⚠ Warning: snapshots ⚠
|
||||||
After each run of the tests, check that snapshots are not inadvertently modified.
|
After each run of the tests, check that snapshots are not inadvertently modified.
|
||||||
|
|
||||||
- ⚠ Jest known issue ⚠
|
- ⚠ Jest known issue ⚠
|
||||||
If a test timeout is triggered the next async tests can fail, it's due to an inadvertently modified snapshots.
|
If a test timeout is triggered the next async tests can fail, it's due to an inadvertently modified snapshots.
|
||||||
As a workaround, you can clean your git working tree and re-run jest using a large timeout: `> yarn start --testTimeout=100000`
|
As a workaround, you can clean your git working tree and re-run jest using a large timeout: `> npm run start -- --testTimeout=100000`
|
||||||
|
|||||||
@@ -126,14 +126,13 @@ describe('issue', () => {
|
|||||||
|
|
||||||
```
|
```
|
||||||
> npm ci
|
> npm ci
|
||||||
> yarn start
|
> npm run start
|
||||||
```
|
```
|
||||||
|
|
||||||
You get all the test suites passed (`PASS`) or failed (`FAIL`).
|
You get all the test suites passed (`PASS`) or failed (`FAIL`).
|
||||||
|
|
||||||
```
|
```
|
||||||
> yarn test
|
> npm run test
|
||||||
yarn run v1.9.4
|
|
||||||
$ jest
|
$ jest
|
||||||
PASS src/user/user.spec.js
|
PASS src/user/user.spec.js
|
||||||
PASS src/job/job.spec.js
|
PASS src/job/job.spec.js
|
||||||
@@ -147,14 +146,14 @@ describe('issue', () => {
|
|||||||
Done in 7.92s.
|
Done in 7.92s.
|
||||||
```
|
```
|
||||||
|
|
||||||
- You can run only tests related to changed files, and review the failed output by using: `> yarn start --watch`
|
- You can run only tests related to changed files, and review the failed output by using: `> npm run start -- --watch`
|
||||||
|
|
||||||
- ⚠ Warning: snapshots ⚠
|
- ⚠ Warning: snapshots ⚠
|
||||||
After each run of the tests, check that snapshots are not inadvertently modified.
|
After each run of the tests, check that snapshots are not inadvertently modified.
|
||||||
|
|
||||||
- ⚠ Jest known issue ⚠
|
- ⚠ Jest known issue ⚠
|
||||||
If a test timeout is triggered the next async tests can fail, it's due to an inadvertently modified snapshots.
|
If a test timeout is triggered the next async tests can fail, it's due to an inadvertently modified snapshots.
|
||||||
As a workaround, you can clean your git working tree and re-run jest using a large timeout: `> yarn start --testTimeout=100000`
|
As a workaround, you can clean your git working tree and re-run jest using a large timeout: `> npm run start -- --testTimeout=100000`
|
||||||
|
|
||||||
## Contributions
|
## Contributions
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,8 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "rimraf dist/",
|
"prebuild": "rimraf dist/",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "rimraf dist/",
|
"prebuild": "rimraf dist/",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"version": "0.1.2",
|
"version": "0.1.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -43,9 +43,9 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"clean": "rimraf dist/",
|
"clean": "rimraf dist/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "yarn run clean",
|
"prebuild": "npm run clean",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,9 +43,9 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"clean": "rimraf dist/",
|
"clean": "rimraf dist/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "yarn run clean",
|
"prebuild": "npm run clean",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,9 +43,9 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"clean": "rimraf dist/",
|
"clean": "rimraf dist/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "yarn run clean",
|
"prebuild": "npm run clean",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,9 +50,9 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"clean": "rimraf dist/",
|
"clean": "rimraf dist/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "yarn run clean",
|
"prebuild": "npm run clean",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,8 +42,8 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "rimraf dist/",
|
"prebuild": "rimraf dist/",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,14 +25,14 @@ Manual install procedure is [available here](https://xen-orchestra.com/docs/from
|
|||||||
|
|
||||||
Production build:
|
Production build:
|
||||||
|
|
||||||
```sh
|
```console
|
||||||
yarn run build
|
$ npm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
Development build:
|
Development build:
|
||||||
|
|
||||||
```sh
|
```console
|
||||||
yarn run dev
|
$ npm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
## How to report a bug?
|
## How to report a bug?
|
||||||
|
|||||||
@@ -154,11 +154,11 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"_build": "index-modules --index-file index.mjs src/api src/xapi/mixins src/xo-mixins && babel --delete-dir-on-start --keep-file-extension --source-maps --out-dir=dist/ src/",
|
"_build": "index-modules --index-file index.mjs src/api src/xapi/mixins src/xo-mixins && babel --delete-dir-on-start --keep-file-extension --source-maps --out-dir=dist/ src/",
|
||||||
"build": "cross-env NODE_ENV=production yarn run _build",
|
"build": "cross-env NODE_ENV=production npm run _build",
|
||||||
"dev": "cross-env NODE_ENV=development yarn run _build --watch",
|
"dev": "cross-env NODE_ENV=development npm run _build --watch",
|
||||||
"prepublishOnly": "yarn run build",
|
"prepublishOnly": "npm run build",
|
||||||
"start": "node dist/cli.mjs",
|
"start": "node dist/cli.mjs",
|
||||||
"pretest": "yarn run build",
|
"pretest": "npm run build",
|
||||||
"test": "tap 'dist/**/*.spec.mjs'"
|
"test": "tap 'dist/**/*.spec.mjs'"
|
||||||
},
|
},
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
@@ -45,9 +45,9 @@
|
|||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
||||||
"clean": "rimraf dist/",
|
"clean": "rimraf dist/",
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||||
"prebuild": "yarn run clean",
|
"prebuild": "npm run clean",
|
||||||
"predev": "yarn run clean",
|
"predev": "npm run clean",
|
||||||
"prepublishOnly": "yarn run build",
|
"prepublishOnly": "npm run build",
|
||||||
"postversion": "npm publish"
|
"postversion": "npm publish"
|
||||||
},
|
},
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
@@ -143,9 +143,9 @@
|
|||||||
"build": "GIT_HEAD=$(git rev-parse HEAD) NODE_ENV=production gulp build",
|
"build": "GIT_HEAD=$(git rev-parse HEAD) NODE_ENV=production gulp build",
|
||||||
"clean": "gulp clean",
|
"clean": "gulp clean",
|
||||||
"dev": "GIT_HEAD=$(git rev-parse HEAD) NODE_ENV=development gulp build",
|
"dev": "GIT_HEAD=$(git rev-parse HEAD) NODE_ENV=development gulp build",
|
||||||
"prebuild": "yarn run clean && index-modules --auto src",
|
"prebuild": "npm run clean && index-modules --auto src",
|
||||||
"predev": "yarn run prebuild",
|
"predev": "npm run prebuild",
|
||||||
"prepublishOnly": "yarn run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"browserify": {
|
"browserify": {
|
||||||
"transform": [
|
"transform": [
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ esac
|
|||||||
if [ $# -ge 2 ]
|
if [ $# -ge 2 ]
|
||||||
then
|
then
|
||||||
npm --save=false --workspaces=false version "$2"
|
npm --save=false --workspaces=false version "$2"
|
||||||
git checkout HEAD :/yarn.lock
|
|
||||||
fi
|
fi
|
||||||
# if version is not passed, simply update other packages
|
# if version is not passed, simply update other packages
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user