@wp-operations/wp-ide 0.4.0 → 0.5.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/README.md +1 -1
- package/cli.js +1 -1
- package/dist/index.js +5 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ It opens on `http://127.0.0.1:4500/#token=…` with:
|
|
|
16
16
|
|
|
17
17
|
It listens on 127.0.0.1 only, and every request needs the token from the printed URL. It never touches `.git/`, `vendor/`, `node_modules/` or `.local/`, stays inside the repository, and limits files to 400 KB.
|
|
18
18
|
|
|
19
|
-
wp-ops and wp-code also use it as a library: it reads the
|
|
19
|
+
wp-ops and wp-code also use it as a library: it reads the WP monorepo (`.github/app.json`, the app manifests, apps and plugins) and makes the same composer.json edits the platform makes.
|
|
20
20
|
|
|
21
21
|
## License
|
|
22
22
|
|
package/cli.js
CHANGED
|
@@ -12,7 +12,7 @@ const HELP = `wp-ide v${version}
|
|
|
12
12
|
Usage:
|
|
13
13
|
wp-ide serve [dir] [--port=4500] [--preview=<sandbox url>]
|
|
14
14
|
|
|
15
|
-
Opens a local editor for the
|
|
15
|
+
Opens a local editor for the WP monorepo, or any folder, that contains [dir]
|
|
16
16
|
(default: the current folder). It only listens on 127.0.0.1 and every
|
|
17
17
|
request needs the token from the printed URL.
|
|
18
18
|
|
package/dist/index.js
CHANGED
|
@@ -140,7 +140,8 @@ import path4 from "path";
|
|
|
140
140
|
var LAYOUT_FILE = ".github/app.json";
|
|
141
141
|
var LEGACY_LAYOUT_FILE = ".github/platform.json";
|
|
142
142
|
var RESERVED_KINDS = ["app"];
|
|
143
|
-
var PLUGIN_TYPE = "
|
|
143
|
+
var PLUGIN_TYPE = "plugin";
|
|
144
|
+
var PLUGIN_TYPES = ["plugin", "psr4-plugin"];
|
|
144
145
|
var APP_TYPE = "wp-app";
|
|
145
146
|
var COMPOSER_ACTIONS = ["add", "remove", "update"];
|
|
146
147
|
var DEFAULT_KINDS = [
|
|
@@ -311,7 +312,7 @@ function listPlugins(rootDir, layout = readLayout(rootDir)) {
|
|
|
311
312
|
path: path4.relative(rootDir, child).split(path4.sep).join("/"),
|
|
312
313
|
dir: child,
|
|
313
314
|
namespace: Object.keys(data.autoload?.["psr-4"] ?? {})[0] ?? "",
|
|
314
|
-
warnings: type
|
|
315
|
+
warnings: PLUGIN_TYPES.includes(type) ? [] : [`type is "${type}", expected "${PLUGIN_TYPE}"`]
|
|
315
316
|
});
|
|
316
317
|
}
|
|
317
318
|
if (depth < 2) {
|
|
@@ -467,7 +468,7 @@ iframe { width:100%; height:100%; border:0; background:#fff; }
|
|
|
467
468
|
nav.appendChild(item(p.name, p.version, p.warnings.join('; '), function () { open({ dir: p.path }); }));
|
|
468
469
|
});
|
|
469
470
|
} else {
|
|
470
|
-
nav.appendChild(el('div', 'empty', 'No .github/app.json here. Run "wp-ops init" to make this a
|
|
471
|
+
nav.appendChild(el('div', 'empty', 'No .github/app.json here. Run "wp-ops init" to make this a WP monorepo.'));
|
|
471
472
|
}
|
|
472
473
|
nav.appendChild(el('h4', '', 'Repository'));
|
|
473
474
|
nav.appendChild(item('All files', '', '', function () { open({ dir: '' }); }));
|
|
@@ -797,6 +798,7 @@ export {
|
|
|
797
798
|
MAX_FILE_BYTES,
|
|
798
799
|
PACKAGE_NAME,
|
|
799
800
|
PLUGIN_TYPE,
|
|
801
|
+
PLUGIN_TYPES,
|
|
800
802
|
RESERVED_KINDS,
|
|
801
803
|
ROOT_MARKERS,
|
|
802
804
|
appServerOptions,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wp-operations/wp-ide",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "A simple WordPress-first browser editor with live preview, and the
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "A simple WordPress-first browser editor with live preview, and the WP monorepo library used by wp-ops and wp-code. Comes with @wp-operations/wp-ops.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"bin": {
|