@wp-playground/blueprints 0.7.1 → 0.7.3

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/index.d.ts CHANGED
@@ -170,6 +170,7 @@ declare class PHPResponse implements PHPResponseData {
170
170
  /** @inheritDoc */
171
171
  readonly httpStatusCode: number;
172
172
  constructor(httpStatusCode: number, headers: Record<string, string[]>, body: ArrayBuffer, errors?: string, exitCode?: number);
173
+ static forHttpCode(httpStatusCode: number, text?: string): PHPResponse;
173
174
  static fromRawData(data: PHPResponseData): PHPResponse;
174
175
  toRawData(): PHPResponseData;
175
176
  /**
@@ -465,7 +466,13 @@ export interface IsomorphicLocalPHP {
465
466
  onMessage(listener: MessageListener): void;
466
467
  }
467
468
  export type MessageListener = (data: string) => Promise<string | Uint8Array | void> | string | void;
468
- export type IsomorphicRemotePHP = Remote<IsomorphicLocalPHP>;
469
+ /**
470
+ * The omited methods must either be called synchronously before
471
+ * the PHP internal state is initialized, or with a complex argument
472
+ * that can't be serialized over a remote connection. Therefeore,
473
+ * they don't make sense in a remote PHP instance.
474
+ */
475
+ export type IsomorphicRemotePHP = Remote<Omit<IsomorphicLocalPHP, "setSapiName" | "setPhpIniEntry" | "setPhpIniPath">>;
469
476
  export type UniversalPHP = IsomorphicLocalPHP | IsomorphicRemotePHP;
470
477
  export type HTTPMethod = "GET" | "POST" | "HEAD" | "OPTIONS" | "PATCH" | "PUT" | "DELETE";
471
478
  export type PHPRequestHeaders = Record<string, string>;
@@ -541,20 +548,6 @@ export interface ListFilesOptions {
541
548
  */
542
549
  prependPath: boolean;
543
550
  }
544
- declare const SupportedPHPVersions: readonly [
545
- "8.3",
546
- "8.2",
547
- "8.1",
548
- "8.0",
549
- "7.4",
550
- "7.3",
551
- "7.2",
552
- "7.1",
553
- "7.0"
554
- ];
555
- export type SupportedPHPVersion = (typeof SupportedPHPVersions)[number];
556
- export type SupportedPHPExtension = "iconv" | "mbstring" | "xml-bundle" | "gd";
557
- export type SupportedPHPExtensionBundle = "kitchen-sink" | "light";
558
551
  export interface SemaphoreOptions {
559
552
  /**
560
553
  * The maximum number of concurrent locks.
@@ -576,6 +569,20 @@ declare class Semaphore {
576
569
  acquire(): Promise<() => void>;
577
570
  run<T>(fn: () => T | Promise<T>): Promise<T>;
578
571
  }
572
+ declare const SupportedPHPVersions: readonly [
573
+ "8.3",
574
+ "8.2",
575
+ "8.1",
576
+ "8.0",
577
+ "7.4",
578
+ "7.3",
579
+ "7.2",
580
+ "7.1",
581
+ "7.0"
582
+ ];
583
+ export type SupportedPHPVersion = (typeof SupportedPHPVersions)[number];
584
+ export type SupportedPHPExtension = "iconv" | "mbstring" | "xml-bundle" | "gd";
585
+ export type SupportedPHPExtensionBundle = "kitchen-sink" | "light";
579
586
  export declare const ResourceTypes: readonly [
580
587
  "vfs",
581
588
  "literal",
@@ -1251,6 +1258,7 @@ export interface RunPHPWithOptionsStep {
1251
1258
  */
1252
1259
  export declare const runPHPWithOptions: StepHandler<RunPHPWithOptionsStep>;
1253
1260
  /**
1261
+ * @private
1254
1262
  * @inheritDoc request
1255
1263
  * @needsLogin
1256
1264
  * @hasRunnableExample