@cratis/stage.runtime 4.187.1 → 4.187.2

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.
@@ -9,6 +9,13 @@ export declare function registeredCommand(name: string, typeName?: string, route
9
9
  * they would be posted to the root of the proxy's host instead of to the Stage.
10
10
  */
11
11
  export declare function hostedBasePath(): string;
12
+ /**
13
+ * Points a command at the path the page is served under when Arc was not given a base path. Arc's own command form builds its command from
14
+ * Arc's default configuration, whose empty base path posts to the root of the host - Studio's Play at `/api/play/{id}/` refused that with `405`.
15
+ */
16
+ export declare function withHostedBasePath<TCommand extends {
17
+ setApiBasePath(apiBasePath: string): void;
18
+ }>(command: TCommand, arcApiBasePath?: string): TCommand;
12
19
  /** Executes the registered proxy with the same host configuration as Arc's useCommand. */
13
20
  export declare function executeRegisteredCommand(name: string, values: Record<string, unknown>, arc: ArcConfiguration): Promise<StageCommandOutcome>;
14
21
  /** Maps Arc's typed result without treating a rejection or authorization failure as success. */