nextpress-core 3.1.1 → 3.1.3

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
1
  # Nextpress Core
2
- `npm i -D nextpress-core`
2
+ `npm i nextpress-core`
3
3
 
4
4
  https://github.com/ellsaw/nextpress
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ import { Command } from 'commander';
3
+ import path from 'path';
4
+ import { runCommand } from './run-command.js';
5
+ import { containerLibPath } from './start-composer.js';
6
+
7
+ const program = new Command();
8
+
9
+ program
10
+ .name('np run wp-cli')
11
+ .allowUnknownOption()
12
+ .argument('[args...]', 'Arguments passed directly to WP-CLI')
13
+ .action(async () => {
14
+ const wpArgs = program.args;
15
+
16
+ await runCommand('docker', [
17
+ 'compose',
18
+ '--project-directory', process.cwd(),
19
+ '--env-file', path.join(process.cwd(), '.env'),
20
+ '-f', path.join(containerLibPath, 'docker-compose.yml'),
21
+ 'run',
22
+ '--rm',
23
+ 'wp-cli',
24
+ 'wp',
25
+ ...wpArgs
26
+ ]);
27
+ });
28
+
29
+ program.parse(process.argv);
package/cli/np-run.js CHANGED
@@ -6,5 +6,6 @@ program
6
6
  .name('np run')
7
7
  .command('dev', 'Run Nextpress in development mode')
8
8
  .command('start', 'Run Nextpress in production mode')
9
+ .command('wp-cli', 'Execute command in the Wordpress CLI')
9
10
  .parse(process.argv);
10
11
 
@@ -41,8 +41,8 @@ services:
41
41
  wordpress:
42
42
  condition: service_healthy
43
43
  environment:
44
- - MP_WEBROOT=/mailpit-admin/
45
- - MP_API_CORS=http://localhost:8080
44
+ MP_WEBROOT: /mailpit-admin/
45
+ MP_API_CORS: ${WP_SITE_URL}
46
46
  restart: always
47
47
  ports:
48
48
  - "8025:8025"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextpress-core",
3
- "version": "3.1.1",
3
+ "version": "3.1.3",
4
4
  "description": "Nextpress Core",
5
5
  "keywords": [],
6
6
  "bin": {