@wp-playground/client 3.0.46 → 3.0.52

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.
Files changed (4) hide show
  1. package/index.cjs +122 -122
  2. package/index.d.ts +21 -1
  3. package/index.js +5731 -6131
  4. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -1,11 +1,14 @@
1
1
  export * from '@wp-playground/blueprints';
2
- export type { HTTPMethod, PHPRunOptions, PHPRequest, PHPResponse, UniversalPHP, PHPOutput, PHPResponseData, ErrnoError, PHPRequestHandler, PHPRequestHandlerConfiguration, PHPRequestHeaders, SupportedPHPVersion, RmDirOptions, RuntimeType, } from '@php-wasm/universal';
2
+ export type { HTTPMethod, PathAlias, PHPRunOptions, PHPRequest, PHPResponse, UniversalPHP, PHPOutput, PHPResponseData, ErrnoError, PHPRequestHandler, PHPRequestHandlerConfiguration, PHPRequestHeaders, SupportedPHPVersion, RmDirOptions, RuntimeType, } from '@php-wasm/universal';
3
+ export type { WordPressInstallMode } from '@wp-playground/wordpress';
3
4
  export { setPhpIniEntries, SupportedPHPVersions, SupportedPHPVersionsList, LatestSupportedPHPVersion, } from '@php-wasm/universal';
4
5
  export { phpVar, phpVars } from '@php-wasm/util';
5
6
  export type { PlaygroundClient, MountDescriptor };
6
7
  import type { BlueprintV1, BlueprintV1Declaration, OnStepCompleted } from '@wp-playground/blueprints';
8
+ import type { WordPressInstallMode } from '@wp-playground/wordpress';
7
9
  import { ProgressTracker } from '@php-wasm/progress';
8
10
  import type { MountDescriptor, PlaygroundClient } from '@wp-playground/remote';
11
+ import type { PathAlias } from '@php-wasm/universal';
9
12
  export interface StartPlaygroundOptions {
10
13
  iframe: HTMLIFrameElement;
11
14
  remoteUrl: string;
@@ -63,6 +66,23 @@ export interface StartPlaygroundOptions {
63
66
  * Defaults to the latest development version.
64
67
  */
65
68
  sqliteDriverVersion?: string;
69
+ /**
70
+ * How to handle WordPress installation.
71
+ * Defaults to 'install-from-existing-files-if-needed'.
72
+ */
73
+ wordpressInstallMode?: WordPressInstallMode;
74
+ /**
75
+ * Path aliases that map URL prefixes to filesystem paths outside
76
+ * the document root. Similar to Nginx's `alias` directive.
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * pathAliases: [
81
+ * { urlPrefix: '/phpmyadmin', fsPath: '/tools/phpmyadmin' }
82
+ * ]
83
+ * ```
84
+ */
85
+ pathAliases?: PathAlias[];
66
86
  }
67
87
  /**
68
88
  * Loads playground in iframe and returns a PlaygroundClient instance.