eddev 2.0.0-beta.21 → 2.0.0-beta.22
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "2.0.0-beta.
|
|
1
|
+
export declare const VERSION = "2.0.0-beta.22";
|
package/dist/node/cli/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "2.0.0-beta.
|
|
1
|
+
export const VERSION = "2.0.0-beta.22";
|
|
@@ -33,13 +33,13 @@ export class Project {
|
|
|
33
33
|
reportPluginCompatibility = false;
|
|
34
34
|
constructor(opts) {
|
|
35
35
|
this.rootDir = opts.rootDir;
|
|
36
|
-
this.origin = ProjectEnvUtils.
|
|
36
|
+
this.origin = ProjectEnvUtils.getSafe("SITE_URL") ?? "";
|
|
37
37
|
this.reportPluginCompatibility = opts.reportPluginCompatibility || false;
|
|
38
38
|
this.blocks = loadBlockManifest(this);
|
|
39
39
|
this.views = loadViewManifest(this);
|
|
40
40
|
this.fields = loadFieldManifest(this);
|
|
41
41
|
this.widgets = loadWidgetManifest(this);
|
|
42
|
-
this.wp = new WPInfo(
|
|
42
|
+
this.wp = new WPInfo(this.origin);
|
|
43
43
|
}
|
|
44
44
|
async load() {
|
|
45
45
|
console.setWorking(true);
|
|
@@ -6,6 +6,9 @@ export class WPInfo {
|
|
|
6
6
|
this.siteUrl = siteUrl;
|
|
7
7
|
}
|
|
8
8
|
async getInfo(force = false) {
|
|
9
|
+
if (!this.siteUrl) {
|
|
10
|
+
throw new Error("Attempted to get site info from WordPress, but SITE_URL was not present in the environment.");
|
|
11
|
+
}
|
|
9
12
|
if (this.cached && !force)
|
|
10
13
|
return this.cached;
|
|
11
14
|
const url = resolveURL(this.siteUrl, "/wp-json/ed/v1/dev/site-info");
|