poad 2.5.9 → 2.5.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/global/init.js CHANGED
@@ -24,6 +24,7 @@ module.exports = async (args) => {
24
24
  config.project_uuid = generateUniqueId();
25
25
  await fs.mkdir(path.join(process.cwd(), 'poad', 'data'), { recursive: true });
26
26
  const ports = await findFreePorts(4);
27
+ config.engine = global.package.engine;
27
28
  config.db = {
28
29
  port: ports[0],
29
30
  };
package/global/install.js CHANGED
@@ -4,7 +4,7 @@ module.exports = async (args) => {
4
4
  const cliProgress = require('cli-progress');
5
5
 
6
6
  const docker = new Docker();
7
- const imageName = 'poadio/engine:0.5.2';
7
+ const imageName = 'poadio/engine:' + global.package.engine;
8
8
  const platform = 'linux/amd64';
9
9
 
10
10
  // Create a new progress bar
package/global/start.js CHANGED
@@ -20,7 +20,7 @@ module.exports = async (args) => {
20
20
  docker
21
21
  .createContainer({
22
22
  name: containerName,
23
- Image: 'poadio/engine:0.5.2',
23
+ Image: 'poadio/engine:' + config.engine,
24
24
  Tty: false,
25
25
  Env: [
26
26
  'OMNEEDIA_GATEWAY_URL=http://localhost:' + config.web.port,
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "poad",
3
- "version": "2.5.9",
3
+ "version": "2.5.11",
4
+ "engine": "0.5.3",
4
5
  "main": "index.js",
5
6
  "license": "MIT",
6
7
  "bin": {
package/poad.js CHANGED
@@ -16,7 +16,7 @@ const { findPoadDir } = require('./utils/findpoad');
16
16
 
17
17
  const packageJsonPath = path.join(__dirname, 'package.json');
18
18
 
19
- const package = require(packageJsonPath);
19
+ global.package = require(packageJsonPath);
20
20
  let args = process.argv.slice(2);
21
21
 
22
22
  // Function to check internet connection
@@ -79,7 +79,8 @@ const checkVersion = async () => {
79
79
  }
80
80
  return new Promise((resolve, reject) => {
81
81
  const packageName = 'poad';
82
- const child = spawn('npm', ['view', packageName, 'version'], {
82
+ const npmCmd = process.platform === 'win32' ? 'npm.cmd' : 'npm';
83
+ const child = spawn(`${npmCmd} view ${packageName} version`, {
83
84
  shell: true,
84
85
  });
85
86