@wp-playground/remote 3.1.54 → 3.1.55

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,5 +1,6 @@
1
1
  import type { FilesystemOperation } from '@php-wasm/fs-journal';
2
2
  import type { EmscriptenDownloadMonitor } from '@php-wasm/progress';
3
+ import type { Email } from 'postal-mime';
3
4
  import type { PHPWebExtension, SyncProgressCallback } from '@php-wasm/web';
4
5
  import type { MountDevice } from '@wp-playground/storage';
5
6
  import type { AllPHPVersion, PathAlias, PHP, PHPRequestHandler } from '@php-wasm/universal';
@@ -66,6 +67,8 @@ export declare abstract class PlaygroundWorkerEndpoint extends PHPWorker {
66
67
  private opfsMounts;
67
68
  private networkTransport;
68
69
  private requestHandler;
70
+ private emails;
71
+ private emailParsingQueue;
69
72
  protected downloadMonitor: EmscriptenDownloadMonitor;
70
73
  constructor(monitor: EmscriptenDownloadMonitor);
71
74
  protected computeSiteUrl(scope: string): string;
@@ -106,6 +109,16 @@ export declare abstract class PlaygroundWorkerEndpoint extends PHPWorker {
106
109
  };
107
110
  latest: string;
108
111
  }>;
112
+ /**
113
+ * Returns the email inbox: every email this Playground has sent so far.
114
+ *
115
+ * Playground has no mail server. Each message WordPress hands to
116
+ * sendmail – via wp_mail(), mail(), proc_open(), etc. – is captured
117
+ * instead of being delivered, parsed, and appended to the inbox in
118
+ * send order. A message still being written by PHP when this method
119
+ * is called is awaited and included in the result.
120
+ */
121
+ email(): Promise<Email[]>;
109
122
  hasOpfsMount(mountpoint: string): Promise<boolean>;
110
123
  mountOpfs(options: MountDescriptor, onProgress?: SyncProgressCallback): Promise<void>;
111
124
  flushOpfs(mountpoint: string): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wp-playground/remote",
3
- "version": "3.1.54",
3
+ "version": "3.1.55",
4
4
  "description": "WordPress Playground remote host",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,5 +25,5 @@
25
25
  "access": "public",
26
26
  "directory": "../../../dist/packages/playground/remote"
27
27
  },
28
- "gitHead": "b64c3a5e4dad38194f8c8bca58269221564ac1da"
28
+ "gitHead": "4a5af3fd0abf7ae5eff97799cf14200f73f4fc9b"
29
29
  }