@wp-playground/blueprints 0.1.35 → 0.1.37

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wp-playground/blueprints",
3
- "version": "0.1.35",
3
+ "version": "0.1.37",
4
4
  "exports": {
5
5
  ".": {
6
6
  "import": "./index.js",
@@ -20,5 +20,5 @@
20
20
  "publishConfig": {
21
21
  "access": "public"
22
22
  },
23
- "gitHead": "0962f89a2b1a438997960a25c26f5341db063a3e"
23
+ "gitHead": "278ae7717090b6ee837b43c7d60df94dcdcaec3f"
24
24
  }
package/src/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './lib/steps';
2
2
  export * from './lib/steps/handlers';
3
3
  export { runBlueprintSteps, compileBlueprint } from './lib/compile';
4
+ export { setPluginProxyURL } from './lib/resources';
4
5
  export type { Blueprint } from './lib/blueprint';
5
6
  export type {
6
7
  CompiledStep,
@@ -275,6 +275,11 @@ export class UrlResource extends FetchResource {
275
275
  }
276
276
  }
277
277
 
278
+ let pluginProxyURL = '/plugin-proxy';
279
+ export function setPluginProxyURL(url: string) {
280
+ pluginProxyURL = url;
281
+ }
282
+
278
283
  /**
279
284
  * A `Resource` that represents a WordPress core theme.
280
285
  */
@@ -290,9 +295,10 @@ export class CoreThemeResource extends FetchResource {
290
295
  }
291
296
  getURL() {
292
297
  const zipName = toDirectoryZipName(this.resource.slug);
293
- return '/plugin-proxy?theme=' + zipName;
298
+ return `${pluginProxyURL}?theme=` + zipName;
294
299
  }
295
300
  }
301
+
296
302
  /**
297
303
  * A resource that fetches a WordPress plugin from wordpress.org.
298
304
  */
@@ -312,7 +318,7 @@ export class CorePluginResource extends FetchResource {
312
318
  /** @inheritDoc */
313
319
  getURL() {
314
320
  const zipName = toDirectoryZipName(this.resource.slug);
315
- return '/plugin-proxy?plugin=' + zipName;
321
+ return `${pluginProxyURL}?plugin=` + zipName;
316
322
  }
317
323
  }
318
324