@fishawack/lab-env 4.14.0 → 4.15.0
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/CHANGELOG.md +63 -0
- package/commands/artisan.js +1 -3
- package/commands/check.js +2 -4
- package/commands/clean.js +2 -4
- package/commands/composer.js +1 -3
- package/commands/connect.js +1 -16
- package/commands/content.js +1 -3
- package/commands/craft.js +1 -3
- package/commands/deploy.js +1 -1
- package/commands/docker/mocha.js +1 -1
- package/commands/drush.js +1 -3
- package/commands/execute.js +8 -3
- package/commands/install.js +1 -3
- package/commands/npm.js +1 -3
- package/commands/php.js +1 -3
- package/commands/production.js +1 -3
- package/commands/regenerate.js +2 -4
- package/commands/reinstall.js +2 -4
- package/commands/run.js +1 -3
- package/commands/setup.js +1 -1
- package/commands/start.js +4 -14
- package/commands/test.js +2 -12
- package/commands/uninstall.js +1 -3
- package/commands/watch.js +9 -3
- package/commands/wp.js +1 -1
- package/core/0/docker-compose.yml +2 -0
- package/core/1/CHANGELOG.md +4 -0
- package/core/1/Dockerfile +6 -0
- package/core/1/docker-compose.yml +3 -0
- package/core/1/package.json +1 -1
- package/craftcms/3/apache/CHANGELOG.md +4 -0
- package/craftcms/3/apache/Dockerfile +11 -0
- package/craftcms/3/apache/httpd.conf +554 -0
- package/craftcms/3/apache/package.json +11 -0
- package/craftcms/3/docker-compose.yml +16 -12
- package/craftcms/3/php/CHANGELOG.md +4 -0
- package/craftcms/3/php/Dockerfile +32 -6
- package/craftcms/3/php/custom.ini +5 -0
- package/craftcms/3/php/entrypoint.sh +24 -0
- package/craftcms/3/php/package.json +11 -0
- package/drupal/9/apache/CHANGELOG.md +4 -0
- package/drupal/9/apache/package.json +1 -1
- package/drupal/9/docker-compose.yml +13 -7
- package/drupal/9/php/CHANGELOG.md +5 -0
- package/drupal/9/php/Dockerfile +9 -0
- package/drupal/9/php/entrypoint.sh +27 -0
- package/drupal/9/php/package.json +2 -2
- package/globals.js +52 -64
- package/intercept.sh +5 -0
- package/laravel/8/docker-compose.yml +10 -3
- package/laravel/8/nginx/package.json +1 -1
- package/laravel/8/php/CHANGELOG.md +6 -0
- package/laravel/8/php/Dockerfile +9 -3
- package/laravel/8/php/entrypoint.sh +24 -0
- package/laravel/8/php/package.json +2 -2
- package/package.json +2 -2
- package/wordpress/0/CHANGELOG.md +4 -0
- package/wordpress/{5.7.2/wordpress → 0}/Dockerfile +4 -1
- package/wordpress/{5.7.2 → 0}/docker-compose.yml +4 -8
- package/wordpress/0/package.json +11 -0
- package/core/0/docker-compose-dev.yml +0 -5
- package/core/1/docker-compose-dev.yml +0 -6
- package/craftcms/3/nginx/nginx.conf +0 -37
- package/craftcms/3/php/custom.conf +0 -9
- package/drupal/9/docker-compose-dev.yml +0 -11
- package/laravel/8/docker-compose-dev.yml +0 -11
- package/laravel/8/php/custom.conf +0 -9
- package/wordpress/5.7.2/apache/.htaccess +0 -25
- /package/wordpress/{5.7.2/apache/uploads.ini → 0/custom.ini} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
1
|
## Changelog
|
|
2
2
|
|
|
3
|
+
### 4.15.0 (2023-03-23)
|
|
4
|
+
* [Feature] moved wordpress to new version folder and build into standalone image
|
|
5
|
+
* [Feature] drupal apache now a multi arch build with changelog
|
|
6
|
+
* [Feature] can now pass --container flag to exec command to pipe commands into different containers
|
|
7
|
+
* [Feature] intercept chgrp commands and pipe into node container
|
|
8
|
+
* [Feature] export user mapping of containers to uids
|
|
9
|
+
* [Feature] copy .env regardless of project if it exists in the project root
|
|
10
|
+
* [Feature] _.command can now handle no command which just starts a bash terminal
|
|
11
|
+
* [Feature] can now ignore errors in commands
|
|
12
|
+
* [Feature] commands now a global function that can accept container and command
|
|
13
|
+
* [Change] Bumped fishawack/lab-env-craftcms-3-apache to 1.0.0
|
|
14
|
+
* [Change] Bumped fishawack/lab-env-craftcms-3-php to 1.0.0
|
|
15
|
+
* [Change] Bumped fishawack/lab-env-wordpress-0 to 1.0.0
|
|
16
|
+
* [Change] Bumped fishawack/lab-env-drupal-9-php to 0.6.0
|
|
17
|
+
* [Change] Bumped fishawack/lab-env-laravel-8-php to 0.4.1
|
|
18
|
+
* [Change] Bumped fishawack/lab-env-laravel-8-php to 0.4.0
|
|
19
|
+
* [Change] Bumped fishawack/lab-env-core-1 to 1.3.0
|
|
20
|
+
* [Bug] added craft versions to global.js
|
|
21
|
+
* [Bug] craft now publishes to standalone images and uses apache
|
|
22
|
+
* [Bug] switch to mysql 8.0.32 for drupal for arm64 arch
|
|
23
|
+
* [Bug] added versions to drupal images in compose files
|
|
24
|
+
* [Bug] remove dev Dockerfiles as default docker compose can handle them now
|
|
25
|
+
* [Bug] remove platform from wordpress image to allow it to be chosen by platform
|
|
26
|
+
* [Bug] map user id and group to wordpress container to Bug permission issues
|
|
27
|
+
* [Bug] remove redundant htaccess file
|
|
28
|
+
* [Bug] removed duplicate keys in wordpress
|
|
29
|
+
* [Bug] drupal php now maps env variables correctly
|
|
30
|
+
* [Bug] dont map platforms to drupal containers
|
|
31
|
+
* [Bug] drupal php now a multi arch build with changelog
|
|
32
|
+
* [Bug] dont log ports after first launch
|
|
33
|
+
* [Bug] dont re-set ports on running containers as it can cause error if core is stopped and redundant anyway
|
|
34
|
+
* [Bug] wp now correctly maps container user
|
|
35
|
+
* [Bug] connect now correctly maps container user
|
|
36
|
+
* [Bug] mocha now correctly maps container user
|
|
37
|
+
* [Bug] watch command now ups containers on full stack projects
|
|
38
|
+
* [Bug] watch now correctly maps container user
|
|
39
|
+
* [Bug] uninstall now correctly maps container user
|
|
40
|
+
* [Bug] start now correctly maps container user
|
|
41
|
+
* [Bug] setup now correctly maps container user
|
|
42
|
+
* [Bug] run now correctly maps container user
|
|
43
|
+
* [Bug] npm now correctly maps container user
|
|
44
|
+
* [Bug] production now correctly maps container user
|
|
45
|
+
* [Bug] install now correctly maps container user
|
|
46
|
+
* [Bug] content now correctly maps container user
|
|
47
|
+
* [Bug] correctly check composer deps and list out missing when -v flag passed in
|
|
48
|
+
* [Bug] check now correctly maps container user
|
|
49
|
+
* [Bug] remap method in command func to take into account changing running variable
|
|
50
|
+
* [Bug] test now correctly maps container user
|
|
51
|
+
* [Bug] reinstall now correctly maps container user
|
|
52
|
+
* [Bug] regenerate now correctly maps container user
|
|
53
|
+
* [Bug] drush now correctly maps container user
|
|
54
|
+
* [Bug] deploy now correctly maps container user
|
|
55
|
+
* [Bug] craft now correctly maps container user
|
|
56
|
+
* [Bug] clean now correctly maps container user
|
|
57
|
+
* [Bug] dont join -g prep between commands as not needed and causes invalid task calls
|
|
58
|
+
* [Bug] correctly set and unset running during up node commands to ensure other functions work as expected
|
|
59
|
+
* [Bug] php now correctly maps container user
|
|
60
|
+
* [Bug] composer now correctly maps container user
|
|
61
|
+
* [Bug] artisan now correctly maps container user
|
|
62
|
+
* [Bug] updated lab-env-laravel-nginx build image script to be multi arch
|
|
63
|
+
* [Bug] updated lab-env-laravel-php build image script to be multi arch
|
|
64
|
+
* [Bug] no longer specify platform on laravel projects for nginx, php and redis images
|
|
65
|
+
|
|
3
66
|
### 4.14.0 (2023-03-02)
|
|
4
67
|
* [Change] Bumped fishawack/lab-env-laravel-8-nginx to 0.1.2
|
|
5
68
|
* [Change] Bumped fishawack/lab-env-laravel-8-php to 0.3.1
|
package/commands/artisan.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
['artisan [command...]', 'art'],
|
|
7
5
|
'run artisan command',
|
|
@@ -11,5 +9,5 @@ module.exports = [
|
|
|
11
9
|
default: ''
|
|
12
10
|
});
|
|
13
11
|
},
|
|
14
|
-
argv => _.up(() =>
|
|
12
|
+
argv => _.up(() => _.command("php", `php artisan ${argv.command.join(' ')}`))
|
|
15
13
|
];
|
package/commands/check.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
'check',
|
|
7
5
|
'check if node modules are missing or outdated',
|
|
@@ -13,10 +11,10 @@ module.exports = [
|
|
|
13
11
|
});
|
|
14
12
|
},
|
|
15
13
|
argv => {
|
|
16
|
-
|
|
14
|
+
_.command("core", `check-dependencies ${argv.v ? '' : '&>/dev/null'} && echo -e '\\033[0;32mNpm deps OK\\033[0m' || { echo -e '\\033[0;31mNpm deps missing or outdated\\033[0m'; } && are-you-es5 check . && echo -e '\\033[0;32mNpm-ES5 compatibility OK\\033[0m' || { echo -e '\\033[0;31mNpm-ES5 incompatibilities detected\\033[0m'; }`);
|
|
17
15
|
|
|
18
16
|
if(_.platform === "laravel" || _.platform === "drupal" || _.platform === "craftcms"){
|
|
19
|
-
|
|
17
|
+
_.command("php", `${argv.v ? `composer install --dry-run 2>&1 | grep '\\- Installing' | while read -r line; do echo \\$\{line/'Installing'\}; done && ` : ''}composer install --dry-run 2>&1 | grep -q 'Nothing to install, update or remove' && echo -e '\\033[0;32mComposer deps OK\\033[0m' || echo -e '\\033[0;31mComposer deps missing or outdated\\033[0m'`);
|
|
20
18
|
}
|
|
21
19
|
}
|
|
22
20
|
];
|
package/commands/clean.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
'clean',
|
|
7
5
|
'cleans out dependencies',
|
|
8
6
|
yargs => {},
|
|
9
7
|
argv => {
|
|
10
|
-
|
|
8
|
+
_.command("core", `git clean -xfd node_modules/ 2>/dev/null || true`);
|
|
11
9
|
|
|
12
10
|
if(_.platform === "laravel" || _.platform === "drupal" || _.platform === "craftcms"){
|
|
13
|
-
|
|
11
|
+
_.command("php", `git clean -xfd vendor/ 2>/dev/null || true`);
|
|
14
12
|
}
|
|
15
13
|
}
|
|
16
14
|
];
|
package/commands/composer.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
'composer [command...]',
|
|
7
5
|
'run composer command',
|
|
@@ -11,5 +9,5 @@ module.exports = [
|
|
|
11
9
|
default: ''
|
|
12
10
|
});
|
|
13
11
|
},
|
|
14
|
-
argv =>
|
|
12
|
+
argv => _.command("php", `composer ${argv.command.join(' ')}`)
|
|
15
13
|
];
|
package/commands/connect.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
'connect [container]',
|
|
7
5
|
'jump into container',
|
|
@@ -11,18 +9,5 @@ module.exports = [
|
|
|
11
9
|
default: 'core'
|
|
12
10
|
});
|
|
13
11
|
},
|
|
14
|
-
argv =>
|
|
15
|
-
let run = ' -l';
|
|
16
|
-
let user = '';
|
|
17
|
-
// Don't login on core@1 so /etc/profile isn't loaded and $PATH reset (likely don't need to login on anything other than core@0 but need test suite to check)
|
|
18
|
-
if(argv.container === "core" && process.env.VERSION === "1"){
|
|
19
|
-
run = '';
|
|
20
|
-
|
|
21
|
-
if(_.running){
|
|
22
|
-
user = ' -u node';
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
execSync(`${_.docker} ${_.method}${user} ${argv.container} bash${run}`, _.opts);
|
|
27
|
-
}
|
|
12
|
+
argv => _.command(argv.container)
|
|
28
13
|
];
|
package/commands/content.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
'content',
|
|
7
5
|
'pulls any external content and assets into the repo',
|
|
8
6
|
yargs => {},
|
|
9
|
-
argv =>
|
|
7
|
+
argv => _.command("core", `npm run content`)
|
|
10
8
|
];
|
package/commands/craft.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
['craft [command...]', 'craft'],
|
|
7
5
|
'run craft command',
|
|
@@ -11,5 +9,5 @@ module.exports = [
|
|
|
11
9
|
default: ''
|
|
12
10
|
});
|
|
13
11
|
},
|
|
14
|
-
argv => _.up(() =>
|
|
12
|
+
argv => _.up(() => _.command("php", `php craft ${argv.command.join(' ')}`))
|
|
15
13
|
];
|
package/commands/deploy.js
CHANGED
|
@@ -10,7 +10,7 @@ module.exports = [
|
|
|
10
10
|
if(_.platform === "laravel" || _.platform === "wordpress" || _.platform === "drupal" || _.platform === "craftcms"){
|
|
11
11
|
_.up(() => execSync(`source ${__dirname}/../intercept.sh && /bin/bash ./_Scripts/deploy.sh`, _.opts));
|
|
12
12
|
} else {
|
|
13
|
-
|
|
13
|
+
_.command("core", `${(process.env.VERSION === "0") ? 'xvfb-run ' : ''}npm run deploy`);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
];
|
package/commands/docker/mocha.js
CHANGED
|
@@ -6,5 +6,5 @@ module.exports = [
|
|
|
6
6
|
'mocha',
|
|
7
7
|
false,
|
|
8
8
|
yargs => {},
|
|
9
|
-
argv =>
|
|
9
|
+
argv => _.command("core", `${(process.env.VERSION === "0") ? 'xvfb-run ' : ''}npm run mocha`, true)
|
|
10
10
|
];
|
package/commands/drush.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
'drush [command...]',
|
|
7
5
|
'run drush command',
|
|
@@ -11,5 +9,5 @@ module.exports = [
|
|
|
11
9
|
default: ''
|
|
12
10
|
});
|
|
13
11
|
},
|
|
14
|
-
argv => _.up(() =>
|
|
12
|
+
argv => _.up(() => _.command("php", `vendor/bin/drush ${argv.command.join(' ')}`))
|
|
15
13
|
];
|
package/commands/execute.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
['execute [command...]', 'exec'],
|
|
7
5
|
'run a custom command in the container',
|
|
@@ -24,9 +22,16 @@ module.exports = [
|
|
|
24
22
|
describe: 'Execute a grunt command',
|
|
25
23
|
type: 'boolean'
|
|
26
24
|
});
|
|
25
|
+
|
|
26
|
+
yargs.option('container', {
|
|
27
|
+
alias: 'c',
|
|
28
|
+
describe: 'container to connect to',
|
|
29
|
+
default: 'core'
|
|
30
|
+
});
|
|
27
31
|
},
|
|
28
32
|
argv => {
|
|
29
33
|
const prep = argv.g ? 'npx grunt --gruntfile node_modules/@fishawack/core/Gruntfile.js ' : ' ';
|
|
30
|
-
|
|
34
|
+
|
|
35
|
+
_.command(argv.container, `${argv.d ? 'xvfb-run ' : ''}${prep}${argv.command.join(' ')}`);
|
|
31
36
|
}
|
|
32
37
|
];
|
package/commands/install.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
['install [package...]', 'i'],
|
|
7
5
|
'runs npm install or installs a package/packages',
|
|
@@ -11,5 +9,5 @@ module.exports = [
|
|
|
11
9
|
default: ''
|
|
12
10
|
});
|
|
13
11
|
},
|
|
14
|
-
argv =>
|
|
12
|
+
argv => _.command("core", `npm install ${argv.package.join(' ')}`)
|
|
15
13
|
];
|
package/commands/npm.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
'npm [command...]',
|
|
7
5
|
'run npm command',
|
|
@@ -11,5 +9,5 @@ module.exports = [
|
|
|
11
9
|
default: ''
|
|
12
10
|
});
|
|
13
11
|
},
|
|
14
|
-
argv =>
|
|
12
|
+
argv => _.command("core", `npm ${argv.command.join(' ')}`)
|
|
15
13
|
];
|
package/commands/php.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
'php [command...]',
|
|
7
5
|
'run php command',
|
|
@@ -11,5 +9,5 @@ module.exports = [
|
|
|
11
9
|
default: ''
|
|
12
10
|
});
|
|
13
11
|
},
|
|
14
|
-
argv =>
|
|
12
|
+
argv => _.command("php", `php ${argv.command.join(' ')}`)
|
|
15
13
|
];
|
package/commands/production.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
['production', 'prod'],
|
|
7
5
|
'builds for production',
|
|
8
6
|
yargs => {},
|
|
9
|
-
argv =>
|
|
7
|
+
argv => _.command("core", `${(process.env.VERSION === "0") ? 'xvfb-run ' : ''}npm run production`)
|
|
10
8
|
];
|
package/commands/regenerate.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
['regenerate', 'regen'],
|
|
7
5
|
'regenerates dependency lock files',
|
|
8
6
|
yargs => {},
|
|
9
7
|
argv => {
|
|
10
|
-
|
|
8
|
+
_.command("core", `rm package-lock.json; git clean -xfd node_modules/ 2>/dev/null || true; npm install`);
|
|
11
9
|
|
|
12
10
|
if(_.platform === "laravel" || _.platform === "drupal" || _.platform === "craftcms"){
|
|
13
|
-
|
|
11
|
+
_.command("php", `rm composer.lock; git clean -xfd vendor/ 2>/dev/null || true; composer install`);
|
|
14
12
|
}
|
|
15
13
|
}
|
|
16
14
|
];
|
package/commands/reinstall.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
['reinstall', 'ci'],
|
|
7
5
|
'installs fresh dependencies',
|
|
8
6
|
yargs => {},
|
|
9
7
|
argv => {
|
|
10
|
-
|
|
8
|
+
_.command("core", `npm ci || npm i`);
|
|
11
9
|
|
|
12
10
|
if(_.platform === "laravel" || _.platform === "drupal" || _.platform === "craftcms"){
|
|
13
|
-
|
|
11
|
+
_.command("php", `composer install`);
|
|
14
12
|
}
|
|
15
13
|
}
|
|
16
14
|
];
|
package/commands/run.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
'run [command] [flags...]',
|
|
7
5
|
'run an npm script',
|
|
@@ -24,5 +22,5 @@ module.exports = [
|
|
|
24
22
|
});
|
|
25
23
|
}
|
|
26
24
|
},
|
|
27
|
-
argv =>
|
|
25
|
+
argv => _.command("core", `${argv.d ? 'xvfb-run ' : ''}npm run ${argv.command} -- -- ${argv.flags.join(' ')}`)
|
|
28
26
|
];
|
package/commands/setup.js
CHANGED
|
@@ -10,7 +10,7 @@ module.exports = [
|
|
|
10
10
|
if(_.platform === "laravel" || _.platform === "wordpress" || _.platform === "drupal" || _.platform === "craftcms"){
|
|
11
11
|
_.up(() => execSync(`source ${__dirname}/../intercept.sh && /bin/bash ./_Scripts/setup.sh`, _.opts));
|
|
12
12
|
} else {
|
|
13
|
-
|
|
13
|
+
_.command("core", `npm run setup`);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
];
|
package/commands/start.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
'start [flags...]',
|
|
7
5
|
'build -> watch',
|
|
@@ -13,21 +11,13 @@ module.exports = [
|
|
|
13
11
|
},
|
|
14
12
|
argv => {
|
|
15
13
|
_.ports.get();
|
|
14
|
+
|
|
15
|
+
const command = () => _.command("core", `npm start -- -- ${argv.flags.join(' ')}`, true);
|
|
16
16
|
|
|
17
17
|
if(_.platform === "laravel" || _.platform === "wordpress" || _.platform === "drupal" || _.platform === "craftcms"){
|
|
18
|
-
_.up(
|
|
19
|
-
let run = ' -l';
|
|
20
|
-
let user = '';
|
|
21
|
-
// Don't login on core@1 so /etc/profile isn't loaded and $PATH reset (likely don't need to login on anything other than core@0 but need test suite to check)
|
|
22
|
-
if(process.env.VERSION === "1"){
|
|
23
|
-
run = '';
|
|
24
|
-
user = ' -u node';
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
execSync(`${_.docker} ${_.exec}${user} core bash${run} -c "npm start -- -- ${argv.flags.join(' ')}" 2>/dev/null`, _.opts);
|
|
28
|
-
});
|
|
18
|
+
_.up(command);
|
|
29
19
|
} else {
|
|
30
|
-
|
|
20
|
+
command();
|
|
31
21
|
}
|
|
32
22
|
}
|
|
33
23
|
];
|
package/commands/test.js
CHANGED
|
@@ -1,25 +1,15 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
'test',
|
|
7
5
|
'run tests',
|
|
8
6
|
yargs => {},
|
|
9
7
|
argv => {
|
|
10
8
|
_.up(() => {
|
|
11
|
-
|
|
12
|
-
let user = '';
|
|
13
|
-
// Don't login on core@1 so /etc/profile isn't loaded and $PATH reset (likely don't need to login on anything other than core@0 but need test suite to check)
|
|
14
|
-
if(process.env.VERSION === "1"){
|
|
15
|
-
run = '';
|
|
16
|
-
user = ' -u node';
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
execSync(`${_.docker} ${_.exec}${user} core bash${run} -c "${(process.env.VERSION === "0") ? 'xvfb-run ' : ''}npm run test"`, _.opts);
|
|
9
|
+
_.command("core", `${(process.env.VERSION === "0") ? 'xvfb-run ' : ''}npm run test`);
|
|
20
10
|
|
|
21
11
|
if(_.platform === "laravel"){
|
|
22
|
-
|
|
12
|
+
_.command("php", `php artisan test`);
|
|
23
13
|
}
|
|
24
14
|
});
|
|
25
15
|
}
|
package/commands/uninstall.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
['uninstall [package...]'],
|
|
7
5
|
'runs npm uninstall on a package/packages',
|
|
@@ -11,5 +9,5 @@ module.exports = [
|
|
|
11
9
|
default: ''
|
|
12
10
|
});
|
|
13
11
|
},
|
|
14
|
-
argv =>
|
|
12
|
+
argv => _.command("core", `npm uninstall ${argv.package.join(' ')}`)
|
|
15
13
|
];
|
package/commands/watch.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const _ = require('../globals.js');
|
|
2
2
|
|
|
3
|
-
const execSync = require('child_process').execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
'watch',
|
|
7
5
|
'watch',
|
|
@@ -14,7 +12,15 @@ module.exports = [
|
|
|
14
12
|
){
|
|
15
13
|
console.log("Watch command not supported in this project");
|
|
16
14
|
} else {
|
|
17
|
-
|
|
15
|
+
const prep = 'npx grunt --gruntfile node_modules/@fishawack/core/Gruntfile.js ';
|
|
16
|
+
|
|
17
|
+
const command = () => _.command("core", `${prep}browserSync watch`, true);
|
|
18
|
+
|
|
19
|
+
if(_.platform === "laravel" || _.platform === "wordpress" || _.platform === "drupal" || _.platform === "craftcms"){
|
|
20
|
+
_.up(command);
|
|
21
|
+
} else {
|
|
22
|
+
command();
|
|
23
|
+
}
|
|
18
24
|
}
|
|
19
25
|
}
|
|
20
26
|
];
|
package/commands/wp.js
CHANGED
|
@@ -11,5 +11,5 @@ module.exports = [
|
|
|
11
11
|
default: ''
|
|
12
12
|
});
|
|
13
13
|
},
|
|
14
|
-
argv => _.up(() =>
|
|
14
|
+
argv => _.up(() => _.command("wordpress", `wp ${argv.command.join(' ')} --allow-root`))
|
|
15
15
|
];
|
package/core/1/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
## Changelog
|
|
2
2
|
|
|
3
|
+
### 1.3.0 (2023-03-17)
|
|
4
|
+
* [feat] node user is now added to www-data group for easier file permission management
|
|
5
|
+
* [fix] disable npm message about update being available
|
|
6
|
+
|
|
3
7
|
### 1.2.2 (2023-02-25)
|
|
4
8
|
* [fix] set BRANCH and CI_COMMIT_REF_NAME env variables in container
|
|
5
9
|
* [fix] installed git-branch to fetch the current branch for deployment targets
|
package/core/1/Dockerfile
CHANGED
|
@@ -28,6 +28,12 @@ RUN rm -rf /sass.tar.gz
|
|
|
28
28
|
# Set safe directory to remove intel errors when running git rev-parse
|
|
29
29
|
RUN su node -c "git config --global --add safe.directory /app"
|
|
30
30
|
|
|
31
|
+
# Disable npm message about updates being available
|
|
32
|
+
RUN su node -c "npm config set update-notifier false"
|
|
33
|
+
|
|
34
|
+
# Add node user to www-data group
|
|
35
|
+
RUN usermod -a -G www-data node
|
|
36
|
+
|
|
31
37
|
# Install lftp
|
|
32
38
|
RUN apt-get install -y lftp
|
|
33
39
|
|
package/core/1/package.json
CHANGED